/* My Hearth's signed-out pages: the homepage, sign-in, sign-up, the emailed code and the waitlist.
   Same paper, ember and ink as the journal (style.css); this file holds the homepage's sections
   and its motion (static/site.js adds the classes that start each one). */
/* Signed-out pages use the same palette as the journal (:root in style.css, docs/brand/BRAND.md). */
body.pub { color-scheme: light; background: var(--page); color: var(--body); overflow-x: clip; }
html:has(body.pub) { background: var(--hearth-parchment); color-scheme: light; }
.pub .btn-lg { min-height: 52px; padding: 12px 10px 12px 24px; font-size: 16px; }
.pub .btn-lg::after { width: 34px; height: 34px; } .pub .btn-lg::before { width: 34px; height: 34px; margin-top: -17px; right: 10px; }
.pub .meta { font-size: 13px; line-height: 18px; color: var(--muted); }
.pub .error { color: var(--attention); }
.pill { display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border-radius: var(--pill); border: 0;
  background: var(--surface); color: var(--ink); font: 500 14px/20px var(--font); text-decoration: none; cursor: pointer;
  transition: background .32s var(--ease), color .32s var(--ease), transform .32s var(--spring); }
.pill:hover { background: var(--ink); color: var(--page); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.wordmark-logo { width: 34px; height: 34px; flex: none; color: var(--brand); }
.wordmark, .pub-brand { font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: 30px; line-height: 1;
  text-transform: none; color: var(--ink); text-decoration: none; letter-spacing: 0; }   /* My Hearth, never in capitals */
.pub-brand { display: inline-flex; align-items: center; gap: 8px; }
.pub-mark { width: 30px; height: 30px; flex: none; color: var(--brand); }
.site h2, .site-foot h2 { font-family: var(--display); font-stretch: 75%; font-weight: 800; text-transform: uppercase;
  font-size: clamp(44px, 6.4vw, 92px); line-height: .86; color: var(--ink); }

/* Arriving. Only when the script is running, so nothing is hidden without it. */
.js .rise { opacity: 0; transform: translateY(28px); transition: opacity .5s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--n, 0) * 70ms); }
.js .rise.in { opacity: 1; transform: none; }

/* The opener: the fingerprint draws itself like the doodles (a ridge at a time, quickly), the lines give way
   to the solid mark, then My Hearth rises under it a letter at a time, and the whole thing lifts away. */
.pre { position: fixed; inset: 0; z-index: 3000; display: grid; place-content: center; justify-items: center; gap: clamp(14px, 2.4vw, 26px);
  background: var(--blush); pointer-events: none; animation: pre-out .7s var(--ease) 2.3s forwards; }
.pre-mark { width: clamp(92px, 15vw, 164px); height: auto; overflow: visible; color: var(--brand); }
.pre-lines path { fill: none; stroke: currentColor; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: pre-draw .55s cubic-bezier(.65, 0, .35, 1) forwards, pre-lines-out .3s ease 1s forwards;
  animation-delay: calc(var(--i) * 55ms + 80ms), 1s; }
.pre-fill { fill: currentColor; opacity: 0; animation: pre-fill .35s var(--ease) .85s forwards; }
@keyframes pre-draw { to { stroke-dashoffset: 0; } }
@keyframes pre-lines-out { to { opacity: 0; } }
@keyframes pre-fill { to { opacity: 1; } }
.pre-word { font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: clamp(56px, 12vw, 150px); line-height: 1; color: var(--ink); display: flex; }
.pre-word i { font-style: normal; display: inline-block; animation: pre-letter .5s var(--spring) both; animation-delay: calc(var(--i) * 60ms + 1.05s); }
@keyframes pre-letter { from { opacity: 0; transform: translateY(60%) rotate(12deg) scale(.6); } }
@keyframes pre-out { to { transform: translateY(-100%); visibility: hidden; } }
.seen .pre { display: none; }
:root { --wait: 2.55s; } .seen { --wait: .1s; }

/* Navigation: pills at the sides, the wordmark in the middle. */
.site-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 20px 14px; transition: background .32s var(--ease); }
.site-nav.scrolled { background: color-mix(in srgb, var(--page) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.site-nav-left, .site-nav-right { display: flex; align-items: center; gap: 8px; }
.site-nav-right { justify-content: flex-end; }
.site-nav > * { animation: drop .6s var(--spring) both; animation-delay: calc(var(--wait) + .1s); }
@keyframes drop { from { opacity: 0; transform: translateY(-24px); } }

/* Hero */
.site { display: block; }
.s-hero { position: relative; display: grid; justify-items: center; gap: 22px; padding: calc(104px + env(safe-area-inset-top)) 20px 150px; text-align: center;
  background: var(--blush); overflow: clip; }
.s-title { position: relative; z-index: 1; font-family: var(--display); font-stretch: 75%; font-weight: 800; text-transform: uppercase; color: var(--ink);
  font-size: clamp(60px, 12.4vw, 190px); line-height: .8; letter-spacing: -.01em; }
.s-title .line { display: block; overflow: hidden; padding: .06em .05em 0; margin-top: -.06em; }
.s-title .line > span { display: block; animation: line-up .9s var(--ease) both; animation-delay: var(--wait); }
.s-title .line:nth-child(2) > span { animation-delay: calc(var(--wait) + .09s); } .s-title .line:nth-child(3) > span { animation-delay: calc(var(--wait) + .18s); }
@keyframes line-up { from { transform: translateY(105%) rotate(3deg); } }
.s-art { position: relative; z-index: 1; width: min(660px, 92vw); aspect-ratio: 1.4845; margin-top: -1.5vw; background-repeat: no-repeat;
  animation: rise-in .9s var(--ease) both; animation-delay: calc(var(--wait) + .35s); }
@keyframes rise-in { from { opacity: 0; transform: translateY(60px); } }
.s-cta { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.s-hero .meta { position: relative; z-index: 1; color: var(--body); }
.squig { position: absolute; top: 6%; width: min(30vw, 420px); height: 80%; fill: none; stroke: var(--hearth-red); stroke-width: 26; stroke-linecap: round; pointer-events: none; }
.squig-l { left: -9vw; } .squig-r { right: -9vw; }
.squig path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.2s var(--ease) forwards; animation-delay: calc(var(--wait) + .3s); }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* The band of running words, on a curve. */
.band { position: relative; z-index: 2; margin: -128px 0 -40px; pointer-events: none; }
.band svg { display: block; width: 100%; height: clamp(150px, 19vw, 280px); overflow: visible; }
.band path, .band use { fill: none; }
.band .band-fill { stroke: var(--hearth-rose); stroke-width: 84; }
.band text { font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: 46px; text-transform: uppercase; fill: var(--surface); dominant-baseline: central; }

/* The statement */
.s-about { position: relative; display: grid; justify-items: center; gap: 44px; padding: 110px 20px 130px; text-align: center; }
.fill-text { max-width: 1040px; font-family: var(--font); font-weight: 700; font-size: clamp(30px, 5.2vw, 76px); line-height: 1.08; letter-spacing: -.045em; color: var(--ink); }
.js .fill-text .w { white-space: nowrap; }
.js .fill-text i { font-style: normal; color: color-mix(in srgb, var(--ink) 30%, var(--page)); transition: color .25s var(--ease); }
.js .fill-text i.lit { color: var(--ink); } .js .fill-text i.ink { color: var(--ink); }

/* Section heads: the heading alone, no label above or beside it. */
.s-head { padding: 0 20px; margin-bottom: 44px; }
.s-does .s-head, .s-maker .s-head { text-align: center; } .s-does .s-head h2, .s-maker .s-head h2 { white-space: nowrap; }
/* The homepage keeps its own headings: Bricolage Grotesque, narrow and heavy (the app uses Your Roster). */
body.home { --display: "Hearth Display", "Hearth", "Arial Narrow", system-ui, sans-serif; }
/* A long one-line heading shrinks to fit a phone instead of wrapping. */
.s-maker .s-head h2 { font-size: min(clamp(44px, 6.4vw, 92px), 10.4vw); }
.s-does, .s-how, .s-maker { padding: 60px 0 90px; }
/* Drawings between the sections: the same sheets of frames as the hero's (site.js plays them). */
.s-pic { width: min(520px, 86vw); aspect-ratio: var(--ar); margin: 0 auto; background-repeat: no-repeat; opacity: 0; transition: opacity .5s var(--ease); }
.s-pic.on { opacity: 1; }
.s-pic-sm { width: min(400px, 78vw); margin-bottom: 30px; }
.s-does > .s-pic:last-child { margin-top: 70px; }
.s-head-pic { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.s-pic-side { width: min(340px, 40vw); margin: 0; flex: none; }

/* Who makes it */
.maker { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.maker-photo { display: block; width: clamp(180px, 22vw, 280px); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 24px; }
.maker-text { display: grid; gap: 16px; max-width: 60ch; }
.maker-text p { font-size: 18px; line-height: 29px; color: var(--body); }
.maker-text cite { font-style: italic; color: var(--ink); }
.maker-link { width: fit-content; color: var(--link); font-weight: 500; text-underline-offset: 3px; }

/* What it does: six things along a line that draws itself as you go. */
.trail { position: relative; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.trail-line { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; pointer-events: none; }
.trail-line path { vector-effect: non-scaling-stroke; stroke-width: 9; stroke-linecap: round; }
.trail-ghost { stroke: var(--hearth-linen); }
.trail-ink { stroke: var(--hearth-sage); stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .trail-ink { stroke-dashoffset: 1; }
.trail-list { position: relative; display: grid; gap: clamp(70px, 10vw, 150px); padding: 60px 0 80px; }
.trail-list li { width: fit-content; max-width: min(620px, 100%); display: grid; gap: 10px; }
.trail-list li:nth-child(odd) { margin-left: clamp(0px, 34vw, 480px); }
.trail-list li:nth-child(3n) { margin-left: clamp(0px, 16vw, 220px); }
.trail-list h3 { font-family: var(--display); font-stretch: 75%; font-weight: 800; text-transform: uppercase; color: var(--ink);
  font-size: clamp(40px, 6vw, 84px); line-height: .88; display: flex; align-items: center; gap: .18em; flex-wrap: wrap;
  text-shadow: 0 0 0 var(--page); paint-order: stroke fill; -webkit-text-stroke: 10px var(--page); }
.trail-list .dot { display: inline-grid; place-items: center; width: 1em; height: 1em; border-radius: 28%; background: var(--fill); color: var(--on-fill);
  font-family: var(--font); font-size: .56em; font-weight: 500; -webkit-text-stroke: 0; transform: rotate(-8deg); transition: transform .5s var(--spring); }
.trail-list li:hover .dot { transform: rotate(12deg) scale(1.15); }
.trail-list p { width: fit-content; max-width: 46ch; padding: 10px 18px; border-radius: 22px; border: 1.5px solid var(--rule); background: var(--surface);
  color: var(--ink); font-size: 14px; line-height: 21px; transform: rotate(-1.5deg); }
.trail-list li:nth-child(even) p { transform: rotate(1.5deg); }

/* Three steps */
.steps-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; padding: 0 20px; }
.steps-row li { display: grid; gap: 8px; align-content: start; padding: 22px; border-radius: 24px; background: var(--surface); border: 1.5px solid var(--ink);
  transition: transform .5s var(--spring), background .32s var(--ease), opacity .5s var(--ease); }
.steps-row li:hover { transform: rotate(-2deg) translateY(-6px); background: var(--blush); }
.steps-row b { font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: 96px; line-height: .8; color: var(--ink); }
.steps-row strong { font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: 30px; line-height: 28px; text-transform: uppercase; margin-top: 10px; }
.steps-row p { font-size: 15px; line-height: 23px; color: var(--body); max-width: 40ch; }

/* Questions, as a conversation. */
.s-ask { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 30px; padding: 60px 20px 110px; align-items: start; }
.s-ask-side { display: grid; gap: 14px; position: sticky; top: 96px; }
.s-mug { width: min(320px, 70%); aspect-ratio: 1.261; background-repeat: no-repeat; margin-top: 18px; }
.chat { display: grid; gap: 8px; }
.chat li { display: grid; gap: 8px; }
.chat button { justify-self: start; width: 100%; text-align: left; min-height: 48px; padding: 12px 20px; border-radius: 24px 24px 24px 6px; border: 1.5px solid transparent;
  background: color-mix(in srgb, var(--ink) 6%, var(--page)); color: var(--ink); font: 500 15px/22px var(--font);
  transition: width .5s var(--ease), background .32s var(--ease), border-color .32s var(--ease), transform .32s var(--spring); }
.chat button:hover { transform: translateX(6px); }
.chat button[aria-expanded=true] { width: min(100%, 26em); background: var(--tint); border-color: var(--fill); color: var(--link); }
.chat .answer { display: grid; grid-template-rows: 0fr; justify-self: end; width: min(100%, 34em); transition: grid-template-rows .5s var(--ease); }
.chat .answer p { min-height: 0; overflow: hidden; padding: 0 20px; border-radius: 24px 24px 6px 24px; background: var(--surface); border: 0 solid var(--rule);
  color: var(--body); font-size: 15px; line-height: 23px; opacity: 0; transform: translateY(10px) scale(.96); transform-origin: right bottom;
  transition: opacity .32s var(--ease), transform .5s var(--spring), padding .5s var(--ease); }
.chat button[aria-expanded=true] + .answer { grid-template-rows: 1fr; margin-bottom: 10px; }
.chat button[aria-expanded=true] + .answer p { padding: 14px 20px; border-width: 1.5px; opacity: 1; transform: none; }

/* The foot: espresso, not ember, so every word on it reads clearly; ember is only the accent. */
.site-foot { position: relative; background: var(--hearth-charcoal); color: var(--hearth-white); padding: 64px 20px 32px; overflow: hidden; border-radius: 28px 28px 0 0; }
.site-foot h2 { color: var(--hearth-white); font-size: clamp(40px, 5vw, 72px); margin-bottom: 8px; }
.foot-sub { font-size: 18px; line-height: 26px; color: var(--hearth-linen); margin-bottom: 28px; }
.foot-top { position: relative; z-index: 1; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.foot-top nav { display: grid; gap: 8px; align-content: start; }
.foot-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--hearth-sage); margin-bottom: 6px; }
.foot-logo { width: 20px; height: 20px; color: var(--hearth-white); }
.foot-top nav a { color: var(--hearth-white); text-decoration: none; font-weight: 500; font-size: 16px; width: fit-content; transition: transform .32s var(--spring); }
.foot-top nav a:hover { transform: translateX(6px); text-decoration: underline; }
.site-foot .btn-primary { background: var(--fill); color: var(--on-fill); }
.site-foot .btn-primary::before { background: var(--fill-hover); } .site-foot .btn-primary:hover { color: var(--on-fill); }
.foot-top nav a:focus-visible, .site-foot .btn:focus-visible { outline: 2px solid var(--hearth-white); outline-offset: 3px; }
.foot-copy { position: relative; z-index: 1; margin-top: 56px; padding-top: 20px; border-top: 1px solid color-mix(in srgb, var(--hearth-linen) 22%, var(--hearth-charcoal)); font-size: 13px; color: var(--hearth-linen); }

/* Sign-in, sign-up, code, waitlist */
.auth { position: relative; max-width: 420px; margin: 0 auto; padding: calc(64px + env(safe-area-inset-top)) 20px 56px; display: grid; gap: 14px; }
.auth > * { animation: rise-in .6s var(--ease) both; }
.auth > :nth-child(2) { animation-delay: .06s; } .auth > :nth-child(3) { animation-delay: .12s; } .auth > :nth-child(4) { animation-delay: .18s; } .auth > :nth-child(n+5) { animation-delay: .24s; }
.auth .pub-brand { margin-bottom: 26px; justify-self: start; }
.auth h1 { font-family: var(--display); font-stretch: 75%; font-weight: 800; text-transform: uppercase; font-size: clamp(48px, 13vw, 68px); line-height: .86; color: var(--ink); text-wrap: balance; }
.auth-sub { font-size: 15px; line-height: 22px; color: var(--body); }
.auth-form { display: grid; gap: 8px; margin-top: 8px; padding: 20px; border-radius: 24px; background: var(--surface); border: 1.5px solid var(--ink); }
.auth-form label { font-weight: 500; color: var(--ink); margin-top: 6px; }
.auth-form input { font: inherit; font-size: 16px; min-height: 48px; padding: 8px 18px; border: 1.5px solid var(--rule); background: var(--page); color: var(--ink);
  transition: border-color .16s var(--ease), box-shadow .32s var(--ease); }
.auth-form input:focus-visible { outline: 0; border-color: var(--fill); box-shadow: 0 0 0 4px var(--tint); }
.auth-form .btn { justify-content: center; min-height: 48px; margin-top: 10px; }
.auth-form .btn-primary { justify-content: space-between; padding-left: 22px; }
.auth-form .meta { margin-top: -2px; }
.auth-code { font-size: 24px !important; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin-top: 6px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.auth-alt { font-size: 14px; color: var(--body); margin-top: 8px; }
.auth-alt a, .auth-legal a { color: var(--link); }
.auth-alt .btn-tertiary { min-height: 0; padding: 0; display: inline; }
.auth-alt .auth-switch { display: block; margin-top: 8px; }
.welcome-next { display: grid; gap: 6px; margin-top: 8px; border: 1.5px solid var(--ink); border-radius: 24px; }
.welcome-next p { color: var(--body); line-height: 22px; }

@media (max-width: 860px) {
  .site-nav { grid-template-columns: auto 1fr; padding-left: 16px; padding-right: 16px; }
  .site-nav-left { display: none; }
  .wordmark { font-size: 24px; gap: 6px; } .wordmark-logo { width: 30px; height: 30px; }
  .maker { grid-template-columns: 1fr; } .maker-photo { width: min(280px, 100%); }
  .site-nav .btn-primary { padding: 8px 8px 8px 14px; }
  .site-nav .pill, .site-nav .btn { white-space: nowrap; font-size: 13px; } .site-nav .pill { padding: 0 12px; }
  .site-nav-right { gap: 6px; }
  .s-hero { padding-bottom: 110px; }
  .squig { width: 40vw; stroke-width: 18; top: 30%; height: 50%; } .squig-l { left: -27vw; } .squig-r { right: -27vw; }
  .band { margin-top: -96px; } .band text { font-size: 64px; } .band .band-fill { stroke-width: 120; }
  .s-about { padding: 80px 16px 90px; }
  .s-head { padding: 0 16px; margin-bottom: 28px; }
  .s-head-pic { flex-direction: column; align-items: flex-start; } .s-pic-side { width: min(300px, 76vw); align-self: center; }
  .trail-list li:nth-child(n) { margin-left: 0; } .trail-list li:nth-child(even) { margin-left: auto; }
  .trail-list h3 { -webkit-text-stroke-width: 6px; }
  .s-ask { grid-template-columns: 1fr; padding: 40px 16px 80px; } .s-ask-side { position: static; } .s-mug { width: 200px; margin-top: 0; }
  .foot-top { grid-template-columns: 1fr 1fr; } .foot-top > div { grid-column: 1 / -1; }
}

@media (max-width: 420px) { .wordmark > span { display: none; } .wordmark-logo { width: 34px; height: 34px; } }
/* Onboarding for beta testers */
.ob { max-width: 520px; }
.ob .pub-brand { margin-bottom: 8px; }
.ob-step { display: flex; align-items: center; gap: 6px; }
.ob-step span:not(.meta) { width: 28px; height: 4px; border-radius: 2px; background: var(--hair); }
.ob-step span.on { background: var(--fill); }
.ob-step .meta { margin-left: 6px; }
.ob-choices { border: 0; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.ob-choices legend { font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.ob-choice { display: flex; align-items: flex-start; gap: 10px; margin: 0 !important; font-weight: 400 !important;
             padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface);
             line-height: 22px; cursor: pointer; }
.ob-choice:has(input:checked) { border-color: var(--fill); background: var(--tint); }
.ob-choice input { margin: 4px 0 0; accent-color: var(--fill); flex: none; min-height: 0; padding: 0; width: 16px; height: 16px; }
.ob-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ob-chips legend { width: 100%; }
.ob-chips .ob-choice { padding: 6px 12px; border-radius: 999px; align-items: center; }
.ob-chips .ob-choice input { margin: 0; }
.ob-choice a { color: var(--link); }
.auth-form select, .auth-form textarea { font: inherit; font-size: 16px; min-height: 44px; padding: 8px 12px;
  border-radius: var(--r); border: 1px solid var(--rule); background: var(--surface); color: var(--ink); width: 100%; }
.auth-form textarea { resize: vertical; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
