/* Saath website, Windowsill identity (claude/WINDOWSILL-BRAND-SPEC.md).
   Paper on plaster: the real app sits on paper cards set down slightly askew (never more than 2°),
   two pebbles rest behind the hero phone, and one hand-drawn tomato line marks the word that matters. */

@font-face {
  font-family: 'Young Serif';
  src: url('/welcome/assets/fonts/young-serif-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/welcome/assets/fonts/hanken-grotesk-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --plaster: #F3ECE2;
  --paper: #FCF9F4;
  --sunk: #ECE3D6;
  --pebble: #E2D6C6;
  --line: #DDD0BF;
  --ink: #2B211C;
  --quiet: #6A5A4E;
  --olive: #4D5A2A;
  --olive-ink: #3A4520;
  --olive-soft: #E6EAD6;
  --tomato: #C2432A;
  --partner: #B83F27;
  --sage: #DCE1C8;
  --apricot: #F1C9A5;
  --ok: #3E7347;
  --err: #B0341C;
  --shadow: 0 1px 0 rgba(43, 33, 28, .05), 0 22px 44px -22px rgba(43, 33, 28, .38);
  --ease: cubic-bezier(.22, 1.2, .36, 1);

  --display: 'Young Serif', Georgia, 'Times New Roman', serif;
  --body: 'Hanken Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --t-meta: 0.8125rem;
  --t-body: 1.0625rem;
  --t-lede: 1.25rem;
  --t-h2: clamp(1.875rem, 1.3rem + 2.2vw, 2.75rem);
  --t-h1: clamp(2.5rem, 1.5rem + 4.4vw, 4.4rem);

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(4rem, 8vw, 7.5rem);
  --radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--plaster);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { max-width: 100%; }
[hidden] { display: none !important; }
img { height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; font-synthesis: none; line-height: 1.06; letter-spacing: -0.01em; text-wrap: balance; margin: 0; }
p { margin: 0; }
q { quotes: '“' '”'; }
:focus-visible { outline: 3px solid var(--olive); outline-offset: 3px; border-radius: 6px; }
.nowrap { white-space: nowrap; }

.wrap { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; z-index: 50; background: var(--paper); padding: 0.75rem 1rem; }
.skip:focus { left: 1rem; top: 1rem; }
.preview-ribbon { background: var(--sunk); font-size: var(--t-meta); text-align: center; padding: 0.5rem var(--gutter); border-bottom: 1px solid var(--line); }

.eyebrow { font-size: var(--t-meta); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--quiet); }
.section-title { font-size: var(--t-h2); }
.fine { font-size: var(--t-meta); color: var(--quiet); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0.75rem 1.4rem; border-radius: 14px;
  font: 600 1rem/1.2 var(--body); text-decoration: none; border: 1.5px solid transparent;
  cursor: pointer; transition: transform 180ms var(--ease), background-color 180ms ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--olive); color: var(--paper); }
.btn-primary:hover { background: var(--olive-ink); }
.btn-quiet { color: var(--olive); border-color: color-mix(in srgb, var(--olive) 40%, transparent); background: transparent; }
.btn-quiet:hover { background: var(--olive-soft); }
.btn-small { min-height: 44px; padding: 0.5rem 1.1rem; font-size: 0.9375rem; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--plaster) 90%, transparent); backdrop-filter: saturate(1.3) blur(10px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.nav-row { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; margin-right: auto; min-height: 44px; }
.brand img { width: 112px; height: auto; }
.nav-links { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav-links a, .signin { text-decoration: none; font-weight: 500; color: var(--quiet); font-size: 0.9375rem; min-height: 44px; display: inline-flex; align-items: center; }
.nav-links a:hover, .signin:hover { color: var(--ink); }
@media (max-width: 760px) { .nav-links { display: none; } .nav-row { gap: 1rem; } }

/* hero */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) var(--section); overflow-x: clip; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero-copy { display: grid; gap: 1.4rem; min-width: 0; }
.hero h1 { font-size: var(--t-h1); }
.drawn { position: relative; display: inline-block; }
.underline { position: absolute; left: -2%; bottom: -0.16em; width: 104%; height: 0.3em; overflow: visible; }
.underline path { fill: none; stroke: var(--tomato); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 300; stroke-dashoffset: 300; animation: draw 400ms 600ms ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.lede { font-size: var(--t-lede); color: var(--quiet); max-width: 34rem; line-height: 1.5; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.4rem; }
.status-note { font-size: 0.9375rem; color: var(--quiet); padding-left: 0.9rem; border-left: 2px solid var(--tomato); max-width: 30rem; }

.story { margin: 0; display: grid; gap: 1.25rem; justify-items: center; min-width: 0; }
.story-stage { position: relative; width: min(100%, 21rem); }
.pebbles { position: absolute; left: 50%; top: 62%; width: 165%; max-width: none; transform: translate(-50%, -50%); z-index: 0; pointer-events: none; overflow: visible; }
.pebbles .pb { fill: var(--pebble); }
.pebbles .ps { fill: var(--apricot); animation: roll 700ms 200ms var(--ease) both; transform-box: fill-box; transform-origin: center; }
@keyframes roll { from { transform: translateX(60%) rotate(80deg); opacity: 0; } to { transform: none; opacity: 1; } }

.phone {
  position: relative; z-index: 1;
  aspect-ratio: 804 / 1748; max-width: 100%;
  border-radius: 30px; overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow), 0 0 0 8px var(--paper), 0 0 0 9px var(--line);
}
.tilt-r { transform: rotate(1.5deg); }
.tilt-l { transform: rotate(-1.5deg); }
.phone .shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 520ms ease; }
.phone .shot.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .phone .shot { transition: none; }
  .pebbles .ps, .underline path { animation: none !important; }
  .underline path { stroke-dashoffset: 0; }
}

.story figcaption { display: grid; gap: 0.75rem; width: min(100%, 26rem); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
.steps button {
  width: 100%; text-align: left; font: 500 0.9375rem/1.35 var(--body); color: var(--quiet);
  background: none; border: 0; border-radius: 12px; padding: 0.6rem 0.75rem 0.6rem 1.9rem; cursor: pointer; position: relative; min-height: 44px;
}
.steps button::before { content: ''; position: absolute; left: 0.75rem; top: 1.05rem; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.steps button[aria-selected='true'] { color: var(--ink); background: var(--paper); }
.steps button[aria-selected='true']::before { background: var(--olive); }
.steps b { font-weight: 700; }
.story-toggle { justify-self: start; background: none; border: 0; color: var(--olive); font: 600 0.875rem var(--body); text-decoration: underline; text-underline-offset: 3px; padding: 0.5rem 0.75rem; min-height: 44px; cursor: pointer; }
.story .fine { padding-inline: 0.75rem; }

/* insight */
.insight { padding-block: var(--section); background: var(--paper); border-block: 1px solid var(--line); }
.insight-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem clamp(2rem, 6vw, 5rem); align-items: start; }
.insight h2 { font-size: var(--t-h2); grid-column: 1 / -1; max-width: 22ch; }
.insight-body { display: grid; gap: 1.1rem; max-width: 36rem; font-size: 1.125rem; }
.behind { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; align-content: start; }
.behind li { display: grid; gap: 0.15rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.behind li:last-child { border-bottom: 0; }
.said { font-family: var(--display); font-size: 1.75rem; }
.meant { color: var(--partner); font-size: 1.125rem; font-weight: 500; }

/* benefits */
.how { padding-block: var(--section); }
.how > .wrap { display: grid; gap: 1rem; }
.how .section-title { margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.benefit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; padding-block: clamp(1.5rem, 4vw, 3rem); border-top: 1px solid var(--line); }
.benefit.flip .benefit-copy { order: 2; }
.benefit-copy { display: grid; gap: 1rem; max-width: 34rem; min-width: 0; }
.benefit h3 { font-size: clamp(1.625rem, 1.2rem + 1.4vw, 2.25rem); }
.situation { font-family: var(--display); font-size: 1.25rem; color: var(--quiet); }
.value { font-weight: 600; padding-left: 0.9rem; border-left: 2px solid var(--olive); }
.benefit-shot { margin: 0; display: grid; gap: 1rem; justify-items: center; min-width: 0; }
.phone-crop { width: min(100%, 19rem); aspect-ratio: 804 / 1180; }
.phone-crop img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone-crop img.pos-mid { object-position: 50% 30%; }
.benefit-shot figcaption { font-size: var(--t-meta); color: var(--quiet); text-align: center; max-width: 19rem; }
.pace { margin-top: clamp(1rem, 3vw, 2rem); font-family: var(--display); font-size: clamp(1.25rem, 1rem + 0.8vw, 1.625rem); max-width: 40rem; line-height: 1.35; }

/* film */
.film { padding-block: var(--section); background: var(--sunk); }
.film > .wrap { display: grid; gap: 1rem; }
.film-frame { margin-top: 1rem; border-radius: var(--radius); overflow: hidden; background: var(--ink); aspect-ratio: 16 / 9; max-width: 100%; box-shadow: var(--shadow); }
.film-frame video { width: 100%; height: 100%; display: block; }
.transcript { max-width: 46rem; }
.transcript summary { cursor: pointer; font-weight: 600; color: var(--olive); min-height: 44px; display: flex; align-items: center; }
.transcript ol { margin: 0.5rem 0 0; padding-left: 1.25rem; display: grid; gap: 0.5rem; color: var(--quiet); }

/* getting started */
.start { padding-block: var(--section); }
.start-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.start-grid > div { display: grid; gap: 1.1rem; min-width: 0; }
.lede-sm { font-size: 1.125rem; color: var(--quiet); max-width: 36rem; }
.small-head { font-family: var(--body); font-size: 1rem; font-weight: 700; margin-top: 0.5rem; }
.flow { margin: 0; padding: 0; list-style: none; counter-reset: f; display: grid; gap: 0.9rem; }
.flow li { counter-increment: f; position: relative; padding-left: 2.6rem; }
.flow li::before { content: counter(f); position: absolute; left: 0; top: 0.05rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; font: 700 0.875rem var(--body); background: var(--sage); color: var(--olive-ink); }
.facts { margin: 0; display: grid; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.5rem 1.5rem; box-shadow: var(--shadow); transform: rotate(-0.6deg); }
.facts > div { padding-block: 1.1rem; border-bottom: 1px solid var(--line); display: grid; gap: 0.3rem; }
.facts > div:last-child { border-bottom: 0; }
.facts dt { font-size: var(--t-meta); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--quiet); }
.facts dd { margin: 0; }

/* faq */
.faq { padding-block: 0 var(--section); }
.faq-wrap { display: grid; grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.4fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.faq-list { display: grid; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-weight: 600; font-size: 1.0625rem; padding-block: 1.1rem; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 400 1.5rem/1 var(--body); color: var(--quiet); transition: transform 180ms var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 1.1rem; color: var(--quiet); max-width: 40rem; }
.faq details p + p { margin-top: -0.4rem; }
.faq a { color: var(--olive); }

/* closing */
.close { background: var(--paper); border-top: 1px solid var(--line); padding-block: var(--section); text-align: center; }
.close-inner { display: grid; justify-items: center; gap: 1rem; }
.close-mark { width: 84px; height: 84px; margin-bottom: -0.5rem; }
.close h2 { font-size: clamp(2.25rem, 1.5rem + 3.2vw, 3.75rem); }
.close-sub { font-family: var(--display); font-size: 1.25rem; color: var(--quiet); }
.waitlist { width: min(100%, 31rem); margin-top: 1.5rem; display: grid; gap: 0.6rem; text-align: left; }
.waitlist > label { font-weight: 600; font-size: 0.9375rem; }
.field-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.field-row input {
  flex: 1 1 14rem; min-width: 0; min-height: 50px; padding: 0.7rem 1.1rem; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--plaster); color: var(--ink); font: 400 1rem var(--body);
}
.field-row input::placeholder { color: #8A7B6F; }
.field-row input:focus-visible { border-color: var(--olive); }
.field-row input[aria-invalid='true'] { border-color: var(--err); }
.field-row .btn { flex: 0 0 auto; min-height: 50px; }
.help { font-size: var(--t-meta); color: var(--quiet); }
.msg { font-size: 0.9375rem; min-height: 1.5em; }
.msg.is-error { color: var(--err); }
.msg.is-ok { color: var(--ok); font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.spinner { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; }
.is-loading .spinner { display: inline-block; }
.is-loading .label { opacity: 0.7; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* footer */
.foot { padding-block: 2rem; border-top: 1px solid var(--line); }
.foot-row { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.foot-brand { color: var(--quiet); font-size: 0.9375rem; display: flex; align-items: center; gap: 0.5rem; }
.foot-brand img { width: 72px; }
.foot-links { list-style: none; display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin: 0; padding: 0; font-size: 0.9375rem; color: var(--quiet); }
.foot-links a { color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; }

/* narrow screens */
@media (max-width: 900px) {
  .hero-grid, .insight-grid, .benefit, .start-grid, .faq-wrap { grid-template-columns: minmax(0, 1fr); }
  .benefit.flip .benefit-copy { order: 0; }
  .story-stage { width: min(76%, 19rem); }
  .insight h2 { max-width: none; }
}
@media (max-width: 480px) {
  .nav .btn-small { padding-inline: 0.8rem; font-size: 0.875rem; }
  .brand img { width: 92px; }
  .actions .btn { flex: 1 1 100%; }
  .field-row .btn { flex: 1 1 100%; }
}
@media (max-width: 360px) { .signin { display: none; } }
@media (max-width: 400px) { .insight .nowrap { white-space: normal; } }
