/* The home page of elimjournal.app: what is only here (the hero, the picture of the app, the verse, the
   feature grid, the invite callout). The palette, typefaces, header, footer and buttons are in styles.css,
   which the home page loads first.

   There is no script on the page: everything that moves is CSS, and none of it moves for a reader who has
   asked their device for less motion. */

/* ---- Type: the home page's sizes ------------------------------------------ */

h1 { font-size: clamp(2.75rem, 1.5rem + 5.2vw, 5.4rem); line-height: 1.08; letter-spacing: -.02em; }
h2 { font-size: clamp(2rem, 1.2rem + 2.9vw, 3.5rem); line-height: 1.07; letter-spacing: -.022em; }
h3 { font-size: clamp(1.55rem, 1.2rem + 1vw, 2rem); line-height: 1.15; letter-spacing: -.012em; font-weight: 500; }

/* ---- Hero ---------------------------------------------------------------- */

.hero {
  display: grid; gap: clamp(3rem, 8vw, 4.5rem); align-items: center;
  padding-top: clamp(2.5rem, 7vw, 6.5rem); padding-bottom: clamp(3rem, 8vw, 6rem);
}
.hero-copy { display: grid; gap: 1.6rem; justify-items: start; }
.hero-copy .pill { margin-bottom: .4rem; }
.hero-links { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; margin: 0; font-size: .94rem; }

/* The two store buttons and, close under them, the one line an Android tester needs. */
.cta-stack { display: grid; gap: .8rem; justify-items: start; margin-top: .4rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.cta-stack .btn { gap: .7rem; padding: 0 1.5rem 0 1.3rem; }
.cta-stack .btn svg { width: 1.3rem; height: 1.3rem; flex: none; fill: currentColor; }
.cta-stack .btn-primary {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), inset 0 -1px 0 rgba(140, 83, 56, .35),
    0 1px 2px rgba(0, 0, 0, .35), 0 12px 28px -10px rgba(217, 154, 121, .5);
}
.cta-stack .btn-ghost { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 10px 24px -14px rgba(0, 0, 0, .7); }
.hero-copy .store-note { display: flex; align-items: flex-start; gap: .5rem; max-width: none; font-size: .8rem; line-height: 1.4; }
.store-note svg { width: .95rem; height: .95rem; flex: none; margin-top: .08rem; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; opacity: .85; }

.assure { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .55rem; color: var(--muted); font-size: .94rem; }
.assure li { display: flex; align-items: center; gap: .6rem; }
.assure svg { width: 1.05rem; height: 1.05rem; flex: none; fill: none; stroke: var(--clay); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (min-width: 40rem) { .assure { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; } }
@media (min-width: 64rem) {
  .hero { grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); gap: 3rem; }
  .assure { display: grid; }
}
/* Wide enough for the three in one row: no ticks, a dot between them, a hairline above. */
@media (min-width: 80rem) {
  .assure { display: flex; flex-wrap: nowrap; align-items: center; gap: 0; margin-top: .8rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .86rem; }
  .assure li { white-space: nowrap; }
  .assure li + li::before { content: ""; flex: none; width: 3px; height: 3px; margin-inline: .9rem; border-radius: 50%; background: var(--muted); opacity: .6; }
  .assure svg { display: none; }
}

/* ---- The app, drawn in CSS ----------------------------------------------- */

.stage {
  position: relative; justify-self: center;
  width: 100%; max-width: 36rem; padding-block: 1rem;
  display: grid; place-items: center;
}
.stage-glow {
  position: absolute; inset: -4% -6%; border-radius: 50%;
  background:
    radial-gradient(closest-side at 42% 48%, rgba(217, 154, 121, .34), rgba(140, 83, 56, .16) 52%, transparent 74%),
    radial-gradient(closest-side at 72% 28%, rgba(233, 220, 198, .07), transparent 70%);
  filter: blur(34px);
}

/* Everything in the picture is sized in em from here, so the whole thing scales together. */
.rig { position: relative; z-index: 1; font-size: clamp(11.5px, 3.3vw, 14.5px); }
@media (min-width: 40rem) { .rig { font-size: 14.5px; padding-right: 12.2em; } }
@media (min-width: 64rem) { .rig { font-size: clamp(12px, 1.3vw, 14.5px); } }

.phone {
  position: relative;
  width: 21em; aspect-ratio: 9 / 18.6;
  border-radius: 3.1em; padding: .55em;
  /* A dark metal bezel: light catches the top-left and bottom-right edges, the middle stays black. */
  background: linear-gradient(155deg, #554f47 0%, #26221d 12%, #0d0c0a 38%, #14120f 62%, #2c2822 88%, #48423a 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .34),
    inset 0 0 0 1px rgba(255, 255, 255, .07),
    inset 0 -1px 0 rgba(0, 0, 0, .6),
    0 0 0 1px rgba(0, 0, 0, .55),
    0 0 0 2px rgba(243, 236, 226, .07),
    0 .5em 1em -.3em rgba(0, 0, 0, .55),
    0 2.6em 5em -1.4em rgba(0, 0, 0, .8),
    0 5.5em 9em -2.4em rgba(0, 0, 0, .65),
    0 0 8em -2em rgba(217, 154, 121, .30);
}
/* Side buttons: volume (two) on the left, power on the right. */
.phone::before, .phone::after {
  content: ""; position: absolute; width: .22em; border-radius: .2em;
  background: linear-gradient(90deg, #4a443c, #1a1713);
}
.phone::before { left: -.22em; top: 19%; height: 2.3em; box-shadow: 0 3.3em 0 0 #2a251f; }
.phone::after { right: -.22em; top: 27%; height: 4.4em; background: linear-gradient(270deg, #4a443c, #1a1713); }
.phone-island {
  position: absolute; z-index: 3; top: 1.35em; left: 50%; translate: -50% 0;
  width: 6.2em; height: 1.75em; border-radius: 999px; background: #050504;
}
.screen {
  position: relative; height: 100%; overflow: hidden; border-radius: 2.6em;
  padding: 1.15em 1.15em 0;
  background:
    radial-gradient(18em 14em at 90% -5%, rgba(217, 154, 121, .16), transparent 70%),
    #171512;
  color: var(--body); line-height: 1.4;
}
/* A faint reflection across the glass, upper left. */
.screen::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(118deg, rgba(255, 255, 255, .07) 0%, rgba(255, 255, 255, .015) 28%, transparent 42%);
}

.status { display: flex; justify-content: space-between; align-items: center; padding: .1em .7em 0; font-size: .82em; font-weight: 600; color: var(--text); }
.status-r { display: inline-flex; gap: .3em; align-items: center; }
.status-r i { width: .85em; height: .5em; border-radius: .15em; background: var(--text); opacity: .9; }
.status-r i:nth-child(1) { width: .4em; opacity: .55; }
.status-r .batt { width: 1.5em; height: .72em; border-radius: .22em; }

.scr-head { display: flex; justify-content: space-between; align-items: baseline; padding: 1.5em .35em .7em; }
.scr-title { font: 500 2em/1 var(--serif); letter-spacing: -.02em; color: var(--text); }

.scr-card {
  margin-bottom: .75em; padding: 1.05em 1.1em; border-radius: 1.4em;
  background: rgba(243, 236, 226, .045); border: 1px solid rgba(243, 236, 226, .09);
}
.scr-label { font-size: .7em; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--clay); }
.scr-ref { margin-top: .55em; font-size: .85em; color: var(--muted); }
.scr-verse { margin-top: .25em; font: 400 1.62em/1.2 var(--serif); letter-spacing: -.012em; color: var(--text); }
.scr-row { display: flex; flex-wrap: wrap; gap: .5em; margin-top: .95em; }
.scr-chip {
  padding: .45em .85em; border-radius: 999px; font-size: .78em; font-weight: 600; color: var(--body);
  border: 1px solid rgba(243, 236, 226, .16);
}
.scr-chip-solid { background: rgba(217, 154, 121, .16); border-color: rgba(217, 154, 121, .4); color: var(--clay-soft); }
.scr-q { margin-top: .5em; font: 400 1.2em/1.25 var(--serif); color: var(--text); }
.scr-input {
  margin-top: .8em; padding: .7em .85em; border-radius: .9em; font-size: .82em; color: var(--muted);
  background: rgba(0, 0, 0, .28); border: 1px solid rgba(243, 236, 226, .08);
}

.scr-actions { display: grid; gap: .5em; }
.scr-btn {
  padding: .8em 1em; text-align: center; border-radius: 999px; font-size: .88em; font-weight: 600; color: var(--body);
  border: 1px solid rgba(243, 236, 226, .16);
}
.scr-btn-main { background: var(--clay); border-color: var(--clay); color: var(--clay-ink); }

.scr-tabs {
  position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr);
  padding: .8em .6em 1.3em; font-size: .68em; text-align: center; color: var(--muted);
  background: linear-gradient(to bottom, rgba(23, 21, 18, 0), #171512 38%);
  border-top: 1px solid rgba(243, 236, 226, .06);
}
.scr-tabs span { display: grid; gap: .4em; justify-items: center; }
.scr-tabs i { width: 1.5em; height: 1.5em; border-radius: 50%; border: 1.5px solid currentColor; opacity: .8; }
.scr-tabs .on { color: var(--clay); }
.scr-tabs .on i { background: var(--clay); border-color: var(--clay); }

/* The two cards that overlap the phone's edge */

.float {
  position: absolute; z-index: 2; right: 0; width: 16.2em; padding: 1.1em 1.15em; border-radius: 1.4em;
  font-size: .86em; line-height: 1.4; color: var(--body);
  background: linear-gradient(160deg, rgba(58, 52, 46, .62), rgba(28, 25, 22, .58));
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  backdrop-filter: blur(22px) saturate(1.6);
  border: 1px solid rgba(243, 236, 226, .16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .16),
    inset 0 0 0 1px rgba(255, 255, 255, .035),
    0 .5em 1em -.4em rgba(0, 0, 0, .5),
    0 1.8em 3.4em -1.2em rgba(0, 0, 0, .7),
    0 3em 5em -2em rgba(0, 0, 0, .55);
}
/* Where the blur is not available the card is made solid, so its text still reads. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .float { background: rgba(32, 29, 26, .95); }
}
.float-pod { top: 9%; }
.float-private { bottom: 11%; width: 15em; }

.f-head { display: flex; align-items: center; gap: .6em; margin-bottom: .8em; font-weight: 600; color: var(--text); font-size: 1.02em; }
.f-head svg { width: 1.3em; height: 1.3em; flex: none; fill: none; stroke: var(--clay); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.f-chip { margin-left: auto; padding: .15em .65em; border-radius: 999px; font-size: .82em; font-weight: 500; color: var(--muted); border: 1px solid var(--line-strong); }
.f-row { display: flex; align-items: flex-start; gap: .7em; padding: .6em 0; border-top: 1px solid var(--line); }
.f-foot { display: flex; align-items: center; gap: .7em; padding-top: .75em; border-top: 1px solid var(--line); color: var(--muted); font-size: .9em; }
.f-note { color: var(--body); }
.float-private .f-head { margin-bottom: .55em; }

.av {
  display: inline-grid; place-items: center; flex: none; width: 1.85em; height: 1.85em; border-radius: 50%;
  font-size: .8em; font-weight: 650; color: var(--clay-ink);
  background: var(--clay); box-shadow: 0 0 0 2px #201d1a;
}
.av-1 { background: var(--clay); }
.av-2 { background: var(--parchment); }
.av-3 { background: #b9856a; }
.av-4 { background: #3a342e; color: var(--text); font-weight: 600; }
.av-stack { display: inline-flex; }
.av-stack .av + .av { margin-left: -.4em; }

/* On a phone the two cards drop below the picture and overlap its foot, so they never sit on its text. */
@media (max-width: 39.99rem) {
  .rig { display: flex; flex-direction: column; }
  .float { position: relative; right: auto; bottom: auto; top: auto; width: 19em; font-size: .84em; padding: .9em 1em; }
  .float-pod { margin-top: -3.4em; align-self: flex-end; margin-right: -.8em; }
  .float-private { margin-top: .9em; align-self: flex-start; margin-left: -.8em; width: 17em; }
  .float-pod .f-row + .f-row, .float-pod .f-chip { display: none; }
  .cta-row { width: 100%; }
  .cta-row .btn { flex: 1 1 100%; }
}

/* ---- The verse ------------------------------------------------------------ */

.verse { padding-block: clamp(3rem, 7vw, 5.5rem); text-align: center; }
.verse .eyebrow { margin-bottom: 1.6rem; }
.verse figure { margin: 0 auto; max-width: 50rem; }
.verse blockquote { margin: 0; }
.verse blockquote p {
  font: italic 400 clamp(1.65rem, 1.1rem + 2.4vw, 2.85rem)/1.22 var(--serif);
  letter-spacing: -.015em; color: var(--text); text-wrap: balance;
}
.verse figcaption { margin-top: 1.6rem; color: var(--muted); font-size: .9rem; letter-spacing: .04em; }
.verse::before, .verse::after {
  content: ""; display: block; height: 1px; max-width: 14rem; margin-inline: auto;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}
.verse::before { margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.verse::after { margin-top: clamp(2.5rem, 6vw, 4rem); }

/* ---- Features: the bento -------------------------------------------------- */

.features { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-head { max-width: 40rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }

.bento { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 46rem) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem; } }
@media (min-width: 68rem) {
  .bento { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.25rem; }
  .card-read, .card-private { grid-column: span 7; }
  .card-write, .card-walk { grid-column: span 5; }
}

.card {
  position: relative; display: flex; flex-direction: column; gap: 1rem; overflow: hidden;
  padding: clamp(1.5rem, 1rem + 1.6vw, 2.4rem);
  border-radius: var(--r-lg); border: 1px solid var(--line);
  background:
    radial-gradient(28rem 16rem at 0% 0%, rgba(217, 154, 121, .09), transparent 70%),
    linear-gradient(180deg, rgba(243, 236, 226, .035), rgba(243, 236, 226, .01)),
    var(--raise);
}
.card > p { max-width: 36rem; }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.card-no { font: 400 1.05rem/1 var(--serif); font-style: italic; color: var(--muted); }
.chip-ico {
  display: inline-grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 50%;
  background: rgba(217, 154, 121, .1); border: 1px solid rgba(217, 154, 121, .32);
}
.chip-ico svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: var(--clay); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.viz {
  margin-top: auto; padding-top: 1rem; font-size: .88rem; line-height: 1.45;
}
.tag {
  display: inline-block; padding: .2rem .65rem; border-radius: 999px;
  font-size: .72rem; font-weight: 500; line-height: 1.4; color: var(--muted); border: 1px solid var(--line-strong);
}

/* Read */
.viz-read { padding: 1.15rem 1.25rem 1.25rem; border-radius: var(--r-md); background: rgba(0, 0, 0, .26); border: 1px solid var(--line); margin-top: auto; }
.viz-bar { display: flex; justify-content: space-between; align-items: center; color: var(--text); font-weight: 600; font-size: .86rem; }
.viz-verse { margin: .8rem 0 1.1rem; font: 400 clamp(1.25rem, 1rem + .8vw, 1.55rem)/1.4 var(--serif); color: var(--text); }
.viz-verse sup { margin-right: .35em; font: 600 .55em/1 var(--sans); color: var(--clay); vertical-align: .55em; }
.progress { height: 5px; border-radius: 99px; background: rgba(243, 236, 226, .1); overflow: hidden; }
.progress-fill { display: block; width: 19%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--terra), var(--clay)); }
.viz-foot { display: flex; justify-content: space-between; margin-top: .6rem; color: var(--muted); font-size: .78rem; }

/* Write */
.viz-write { display: grid; gap: .9rem; }
.paper {
  padding: 1.1rem 1.2rem 1.25rem; border-radius: var(--r-md); color: #2b241d;
  background: linear-gradient(180deg, #efe5d3, #e6d9c2);
  box-shadow: 0 1.2rem 2.4rem -1rem rgba(0, 0, 0, .6);
  transform: rotate(-1.2deg);
}
.paper-top { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: .78rem; letter-spacing: .02em; color: #6b4a36; }
.paper-top .tag { color: #6b4a36; border-color: rgba(107, 74, 54, .35); }
.paper p { margin-top: .6rem; font: italic 400 1.2rem/1.35 var(--serif); color: #2b241d; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Pods */
.viz-walk { display: grid; gap: .55rem; }
.viz-walk .av { width: 2.1rem; height: 2.1rem; font-size: .76rem; }
.viz-walk .av-stack .av + .av { margin-left: -.5rem; }
.pod-line { display: flex; align-items: center; justify-content: space-between; margin-bottom: .35rem; }
.pod-item {
  display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; border-radius: var(--r-sm);
  color: var(--text); font-weight: 500; background: rgba(243, 236, 226, .04); border: 1px solid var(--line);
}
.pod-item .dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--clay); flex: none; }
.pod-item .dot-2 { background: var(--parchment); }
.pod-meta { margin-left: auto; color: var(--muted); font-weight: 400; font-size: .8rem; }
.pod-item-private { background: transparent; border-style: dashed; border-color: rgba(217, 154, 121, .4); }
.lock { display: inline-grid; place-items: center; width: .95rem; flex: none; }
.lock svg { width: .95rem; height: .95rem; fill: none; stroke: var(--clay); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* Private */
.ledger { margin: auto 0 0; padding-top: 1rem; display: grid; }
.ledger > div {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem;
  padding: .95rem 0; border-top: 1px solid var(--line);
}
.ledger > div:last-child { border-bottom: 1px solid var(--line); }
.ledger dt { flex: none; color: var(--body); }
.ledger dd { margin: 0; flex: 1 1 auto; min-width: 0; text-align: right; color: var(--text); font: 400 1.25rem/1.2 var(--serif); }
.ledger > div:last-child dd { color: var(--clay-soft); }

/* ---- Invite callout -------------------------------------------------------- */

.invite { padding-block: clamp(2rem, 5vw, 4rem) clamp(3.5rem, 8vw, 6rem); }
.invite-card {
  display: grid; gap: 2.2rem; padding: clamp(1.6rem, 1rem + 2.4vw, 3.4rem);
  border-radius: var(--r-lg); border: 1px solid transparent;
  background:
    radial-gradient(34rem 20rem at 100% 0%, rgba(217, 154, 121, .16), transparent 70%) padding-box,
    linear-gradient(var(--raise), var(--raise)) padding-box,
    linear-gradient(135deg, rgba(217, 154, 121, .65), rgba(243, 236, 226, .08) 45%, rgba(217, 154, 121, .3)) border-box;
}
.invite-copy { display: grid; gap: 1.1rem; align-content: center; justify-items: start; }
.invite-copy p { max-width: 30rem; }
.invite-copy strong { color: var(--text); font-weight: 600; }
.invite-copy .cta-row { margin-top: .6rem; }
@media (min-width: 52rem) { .invite-card { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 3.5rem; } }

.ticket {
  align-self: center; padding: 1.5rem 1.5rem 1.6rem; border-radius: var(--r-md);
  background: rgba(0, 0, 0, .3); border: 1px dashed rgba(217, 154, 121, .45);
}
.ticket-label { font-size: .72rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
.ticket-code {
  margin: .5rem 0 1.3rem; padding-bottom: 1.3rem; border-bottom: 1px dashed var(--line-strong);
  font: 600 clamp(1.6rem, 1rem + 3.4vw, 2.5rem)/1.1 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: .1em; color: var(--text); overflow-wrap: anywhere;
}
.ticket-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; font-size: .95rem; }
.ticket-steps li { display: flex; align-items: center; gap: .8rem; }
.ticket-steps span {
  display: inline-grid; place-items: center; flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  font-size: .78rem; font-weight: 600; color: var(--clay); border: 1px solid rgba(217, 154, 121, .5);
}

.help { margin-top: 1.6rem; text-align: center; color: var(--muted); font-size: .96rem; }

/* ---- Motion: only for a reader who has not asked for less ---------------------- */

@media (prefers-reduced-motion: no-preference) {
  .card { transition: border-color .3s ease, transform .3s ease; }

  .rise { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
  .d1 { animation-delay: .08s; } .d2 { animation-delay: .16s; } .d3 { animation-delay: .24s; } .d4 { animation-delay: .32s; }

  .pill-dot { animation: ring 2.8s ease-out infinite; }
  .phone { animation: drift 11s ease-in-out infinite; }
  .float-pod { animation: drift 9s ease-in-out -3s infinite; }
  .float-private { animation: drift 10s ease-in-out -6s infinite; }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
}

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(217, 154, 121, .55); } 70%, 100% { box-shadow: 0 0 0 .6rem rgba(217, 154, 121, 0); } }
@keyframes drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-.55rem); } }

@media print {
  .stage { display: none; }
  h1, h2, h3, .verse blockquote p { color: #000; }
}
