/* Minda site. Colours and fonts mirror the app's brand (utils/color-theme.ts, DESIGN.md):
   warm linen chrome, one logo-orange action, saturated colour only on the cork (notes and pins).
   Headlines are Outfit Bold; Forum is only the "Minda" wordmark. */
:root {
  --bg: #F6F2EE; --surface: #FFFCF9; --text: #1F1A17; --muted: #665C54;
  --highlight: #A4573A; --highlight-hover: #8E4A31; --on-highlight: #FFFFFF;
  --border: rgb(31 26 23 / .12); --cork: #D8B98E; --cork-speck: #C9A677; --cork-frame: #8A6A47; --ink: #1F1A17;
  --pin: #8A8178;
  --screen: #1C1916; --shadow: 31 26 23;
  --cta-bg: #A4573A; --cta-text: #FFFFFF;
  /* The app's pin hues, fixed like a photo (the same in both themes). */
  --note-yellow: #E8C547; --note-orange: #F2994A; --note-green: #46A758; --note-blue: #3E8ED0; --note-pink: #E5484D;
  --radius: 16px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141716; --surface: #1E2221; --text: #EEF1EF; --muted: #A9B0AD;
    --highlight: #D08A6B; --highlight-hover: #DD9E82; --on-highlight: #141716;
    --border: rgb(238 241 239 / .12); --cork: #5A4733; --cork-speck: #6A553E; --cork-frame: #3D3023;
    --pin: #A39A90;
    --screen: #0D0F0E; --shadow: 0 0 0;
    --cta-bg: #6E3A27; --cta-text: #EEF1EF;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { overflow-x: clip; margin: 0; background: var(--bg); color: var(--text); font: 17px/1.65 Outfit, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
::selection { background: var(--highlight); color: var(--on-highlight); }
:focus-visible { outline: 2px solid var(--highlight); outline-offset: 3px; border-radius: 6px; }
a { color: var(--highlight); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--highlight-hover); }
h1, h2 { font-family: Outfit, system-ui, sans-serif; font-weight: 700; letter-spacing: -0.025em; text-wrap: balance; margin: 0; }
p { text-wrap: pretty; }
img { max-width: 100%; }
figure { margin: 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text); text-decoration: none; font: 26px Forum, serif; }
.brand:hover { color: var(--text); }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 12px; }
.nav-links a:not(.btn) { color: var(--muted); text-decoration: none; font-size: 15px; padding: 12px 10px; }
.nav-links a:not(.btn):hover { color: var(--text); }

/* Buttons. One action site-wide: "Get started" (web sign-in, which also offers sign-up). */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; background: var(--highlight); color: var(--on-highlight); text-decoration: none; font-weight: 500; padding: 12px 22px; border-radius: 999px; white-space: nowrap; transition: background-color .2s, transform .2s cubic-bezier(.16,1,.3,1); }
.btn:hover { background: var(--highlight-hover); color: var(--on-highlight); transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn.small { min-height: 44px; padding: 10px 18px; font-size: 15px; margin-left: 8px; }
/* Store betas: outline, so the page keeps one orange action (DESIGN.md, the One Orange Rule). */
.btn.outline { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.btn.outline:hover { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--muted); }

/* Hero */
.hero { display: grid; grid-template-columns: 7fr 5fr; gap: 24px 56px; align-items: end; padding: 48px 0 40px; }
.hero h1 { font-size: clamp(42px, 5.8vw, 72px); line-height: 1.02; }
.hero h1 .mascot { display: block; width: clamp(72px, 8vw, 104px); height: auto; margin: 0 0 16px -6px; rotate: -6deg; }
.hero p { color: var(--muted); font-size: 19px; margin: 0 0 20px; max-width: 36ch; }
.hero .actions { margin: 4px 0 20px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero .status { font-size: 15px; margin: 0; color: var(--muted); }
.hero .status b { color: var(--text); font-weight: 600; }
.status svg { width: 18px; height: 18px; fill: var(--highlight); flex: none; }

/* Wall to board: the product in one picture. Illustration sits underneath; a real photo/screenshot covers it when present. */
.stage { display: grid; grid-template-columns: 1fr 56px 1fr; align-items: center; margin-bottom: 80px; }
.panel { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; container-type: inline-size; }
.panel > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }
.panel figcaption { position: absolute; left: 12px; bottom: 12px; z-index: 3; font-size: 13px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: rgb(0 0 0 / .55); color: #F2EDE4; }
.wall { background: var(--cork) radial-gradient(var(--cork-speck) 1px, transparent 1.6px) 0 0 / 14px 14px; box-shadow: inset 0 0 0 10px var(--cork-frame), 0 24px 48px -24px rgb(var(--shadow) / .45); }
.board { background: var(--screen); padding: 6cqi 5cqi; border: 1px solid var(--border); box-shadow: 0 24px 48px -24px rgb(var(--shadow) / .55); }
.note { position: absolute; width: 21cqi; aspect-ratio: 1; padding: 2.2cqi; font: 3.3cqi/1.15 Schoolbell, "Comic Sans MS", cursive; color: #1F1A17; box-shadow: 0 .6cqi 1.2cqi rgb(31 26 23 / .3); }
/* The pin on a pinned note: neutral, centred on the top edge (as in the app and web). */
.note::before { content: ""; position: absolute; top: -0.9cqi; left: 50%; width: 2.4cqi; height: 2.4cqi; margin-left: -1.2cqi; border-radius: 50%; background: var(--pin); box-shadow: 0 .3cqi .6cqi rgb(0 0 0 / .3); }
.board-col .note::before { display: none; }
.note.y { background: var(--note-yellow); } .note.o { background: var(--note-orange); } .note.g { background: var(--note-green); }
.note.b { background: var(--note-blue); } .note.p { background: var(--note-pink); }
.arrow { width: 32px; height: 32px; margin: auto; color: var(--highlight); }
.board-title { position: absolute; top: 3.4cqi; left: 5cqi; font: 500 max(11px, 3cqi) Outfit, sans-serif; color: #B3A99D; }
.board-grid { position: relative; height: 100%; align-content: center; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3cqi; }
.board-col .col-title { display: block; margin: 0 0 2.4cqi; font: 500 max(11px, 3.4cqi) Outfit, sans-serif; color: #F2EDE4; }
.board-col .note { position: static; width: 100%; aspect-ratio: auto; min-height: 16cqi; margin-bottom: 2.4cqi; font-size: max(11.5px, 3.4cqi); padding: max(8px, 2cqi); }
/* Focal moment (driven by index.html's script): a scan light crosses the wall, each note flashes as "found",
   then copies fly to the board via the Web Animations API. Without JS or with reduced motion, everything is simply shown. */
.board.flying { overflow: visible; }
.wall::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 18%; z-index: 1; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / .6), transparent); }
@media (prefers-reduced-motion: no-preference) {
  .wall.scanning::after { animation: beam 1.1s cubic-bezier(.45,0,.55,1) both; }
  .wall.scanning .note { animation: found .8s var(--d, 0ms) both; }
  @keyframes beam { 0% { opacity: 0; transform: translateX(-100%); } 12%, 88% { opacity: 1; } 100% { opacity: 0; transform: translateX(560%); } }
  .wall.scanning .note { outline: 2px solid transparent; outline-offset: 3px; }
  @keyframes found { 30%, 70% { outline-color: var(--highlight); } }
}

.pause { grid-column: 1 / -1; justify-self: end; display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; min-height: 44px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--muted); font: 500 14px Outfit, sans-serif; cursor: pointer; transition: color .15s, border-color .15s; }
.pause:hover { color: var(--text); border-color: var(--muted); }
.pause svg { width: 14px; height: 14px; fill: currentColor; }
.pause .i-play, .pause[aria-pressed="true"] .i-pause { display: none; }
.pause[aria-pressed="true"] .i-play { display: block; }

/* Hero settles in once on load; short so nobody waits. */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero > div { animation: rise .6s cubic-bezier(.16,1,.3,1) both; }
  .hero > div { animation-delay: .12s; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } }
}

/* Dashboard: the summary "writes" itself line by line when it comes into view. */
@media (prefers-reduced-motion: no-preference) {
  .js .dash .dash-row, .js .dash .dash-quotes q { opacity: 0; translate: 0 6px; transition: opacity .4s ease, translate .5s cubic-bezier(.16,1,.3,1); }
  .js .dash.play .dash-row, .js .dash.play .dash-quotes q { opacity: 1; translate: 0 0; }
  .dash.play .dash-row:nth-of-type(1) { transition-delay: .15s; } .dash.play .dash-row:nth-of-type(2) { transition-delay: .3s; }
  .dash.play .dash-row:nth-of-type(3) { transition-delay: .45s; } .dash.play .dash-quotes q { transition-delay: .65s; }
  .dash.play .dash-quotes q + q { transition-delay: .78s; }
}

/* Sections */
section { padding: 0 0 104px; }
.section-head { max-width: 44ch; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(36px, 4.4vw, 52px); line-height: 1.08; }
.section-head p { color: var(--muted); margin: 14px 0 0; }

/* Bands: sections take on Minda's own materials (paper page, dark screen, cork wall, terracotta brand).
   The ::before paints edge to edge; content stays in the column. Each band remaps the text tokens it needs. */
.band { position: relative; isolation: isolate; padding: 96px 0; margin-bottom: 104px; color: var(--text); }
.band::before { content: ""; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1; background: var(--band-bg); }
.band:has(+ .band), main > .band:last-child { margin-bottom: 0; }
.band-screen { --band-bg: #1C1916; --text: #F2EDE4; --muted: #B3A99D; --border: #3A352F; --highlight: #D08A6B; }
.band-screen .dash { --text: #1F1A17; --muted: #665C54; --border: rgb(31 26 23 / .12); --bg: #F6F2EE; --surface: #FFFCF9; --highlight: #A4573A; color: var(--text); box-shadow: 0 30px 60px -20px rgb(0 0 0 / .6); }
.band-cork { --band-bg: #D8B98E; --text: #2B2520; --muted: #4E3F31; --border: rgb(43 37 32 / .18); }
.band-cork::before { background: var(--band-bg) radial-gradient(#C9A677 1px, transparent 1.6px) 0 0 / 14px 14px; }
.band-terra { --band-bg: var(--cta-bg); padding: 88px 0; }
@media (prefers-color-scheme: dark) {
  .band-screen { --band-bg: #0F0D0B; }
  .band-screen .dash { --text: #EEF1EF; --muted: #A9B0AD; --border: rgb(238 241 239 / .12); --bg: #141716; --surface: #1E2221; --highlight: #D08A6B; }
  .band-cork { --band-bg: #5A4430; --text: #F7EFE3; --muted: #E2D2BC; --border: rgb(247 239 227 / .2); }
  .band-cork::before { background: var(--band-bg) radial-gradient(#6A5038 1px, transparent 1.6px) 0 0 / 14px 14px; }
}

/* Steps: phones staggered when screenshots exist, no boxes */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.step:nth-child(2):has(.phone:not(.empty)) { margin-top: 56px; }
.step .phone { width: min(240px, 100%); aspect-ratio: 9 / 19.5; border-radius: 34px; padding: 7px; background: var(--screen); box-shadow: 0 0 0 1px var(--border), 0 24px 48px -24px rgb(var(--shadow) / .5); margin-bottom: 24px; }
.step .phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 27px; display: block; }
.step .phone.empty { display: none; }
.step h3 { font: 700 30px/1.1 Outfit, sans-serif; letter-spacing: -0.02em; color: var(--highlight); margin: 0 0 6px; }
.step p { margin: 0; color: var(--muted); max-width: 32ch; }

/* Dashboard: copy left, drawn browser window right */
.dash-section { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; }
.dash-copy h2 { font-size: clamp(36px, 4.4vw, 52px); line-height: 1.08; }
.dash-copy p { color: var(--muted); margin: 14px 0 20px; max-width: 40ch; }
.dash-copy ul { margin: 0; padding-left: 20px; }
.dash-copy li { margin-bottom: 10px; }
.dash-copy li::marker { color: var(--highlight); }
.dash { aspect-ratio: 16 / 10; display: grid; grid-template-columns: 22% 1fr; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 24px 48px -24px rgb(var(--shadow) / .45); }
/* cqi inside .dash measures .dash itself, so size the children, not the panel. */
.dash > * { font-size: max(10px, 2.2cqi); }
.dash-side { background: var(--bg); border-right: 1px solid var(--border); padding: 4cqi 2.6cqi; display: flex; flex-direction: column; gap: 2.2cqi; color: var(--muted); }
.dash-side b { font: 3.4cqi Forum, serif; color: var(--text); margin-bottom: 1.4cqi; }
.dash-side span { padding: 1cqi 1.6cqi; border-radius: 1.4cqi; }
.dash-side .on { background: var(--surface); color: var(--text); font-weight: 500; }
.dash-main { padding: 4cqi 4.4cqi; display: flex; flex-direction: column; gap: 1.6cqi; min-width: 0; }
.dash-title { font: 700 3.6cqi Outfit, sans-serif; letter-spacing: -0.02em; }
.dash-tabs { display: flex; gap: 3cqi; border-bottom: 1px solid var(--border); margin-bottom: 1cqi; color: var(--muted); }
.dash-tabs span { padding-bottom: 1.2cqi; }
.dash-tabs .on { color: var(--text); font-weight: 500; box-shadow: inset 0 -2px 0 var(--highlight); }
.dash-h { font-weight: 600; margin-top: 1.4cqi; }
.dash-row { display: flex; align-items: center; gap: 1.6cqi; padding: 1.2cqi 0; border-bottom: 1px solid var(--border); }
.dash-row i { width: 2.2cqi; height: 2.2cqi; border-radius: .4cqi; flex: none; }
.dash-row i.o { background: var(--note-orange); } .dash-row i.p { background: var(--note-pink); } .dash-row i.y { background: var(--note-yellow); }
.dash-row span { margin-left: auto; color: var(--muted); white-space: nowrap; }
.dash-quotes { display: flex; gap: 2cqi; }
.dash-quotes q { font: 2.8cqi/1.2 Schoolbell, cursive; background: var(--note-blue); color: var(--ink); padding: 1.4cqi 2cqi; quotes: none; }
.dash-quotes q + q { background: var(--note-yellow); }

/* Cork band: one concrete scene instead of a grid of one-liners */
.scene { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.15; max-width: 26ch; }
.scene-more { margin: 28px 0 0; color: var(--muted); font-size: 18px; }
.scene-more span { white-space: nowrap; color: var(--text); }
.scene-more i { display: inline-block; width: 12px; height: 12px; margin-right: 6px; rotate: -4deg; box-shadow: 0 1px 2px rgb(43 37 32 / .25); }
.scene-more i.b { background: var(--note-blue); } .scene-more i.g { background: var(--note-green); } .scene-more i.p { background: var(--note-pink); }

/* Promises: two lead, two support */
.promises { border-top: 1px solid var(--border); padding-top: 48px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px 56px; }
.promises .lead h3 { font: 700 28px/1.15 Outfit, sans-serif; letter-spacing: -0.02em; margin: 0 0 10px; }
.promises .lead p { margin: 0; color: var(--muted); }
.promises .support { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 56px; border-top: 1px solid var(--border); padding-top: 32px; }
.promises .support b { font-weight: 600; }
.promises .support p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.promises .more { grid-column: 1 / -1; margin: 0; }

/* FAQ: native disclosure. The puzzled mascot sits beside the heading (a feeling moment, DESIGN.md Mascot). */
.faq-head { display: flex; align-items: center; gap: 16px; }
.pose { display: block; height: auto; flex: none; }
.pose-faq { width: clamp(52px, 6vw, 65px); rotate: 4deg; }
.faq { width: 100%; }
.faq details { border-top: 1px solid var(--border); }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary, .toc-mobile summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 24px; }
.faq summary { padding: 20px 0; font-weight: 500; font-size: 18px; }
.faq summary::-webkit-details-marker, .toc-mobile summary::-webkit-details-marker { display: none; }
.faq summary::after, .toc-mobile summary::after { content: "+"; color: var(--highlight); font-size: 24px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after, .toc-mobile[open] summary::after { transform: rotate(45deg); }
@media (prefers-reduced-motion: no-preference) {
  :root { interpolate-size: allow-keywords; }
  .faq details::details-content { block-size: 0; overflow: hidden; transition: block-size .3s cubic-bezier(.16,1,.3,1), content-visibility .3s allow-discrete; }
  .faq details[open]::details-content { block-size: auto; }
}
.faq details p { margin: 0 0 20px; color: var(--muted); max-width: 70ch; }

/* Closing band. The mascot celebrates above the headline. */
.pose-cta { width: clamp(96px, 10vw, 128px); margin: 0 0 16px -6px; rotate: -4deg; }
.cta { color: var(--cta-text); display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.cta h2 { font-size: clamp(34px, 4vw, 48px); line-height: 1.08; }
.cta p { margin: 12px 0 0; opacity: .92; max-width: 48ch; }
.cta p a, .cta .next a { color: inherit; font-weight: 600; }
.cta .next { margin: 16px 0 0; padding-left: 22px; display: grid; gap: 6px; opacity: .95; }
.cta .next li::marker { font-weight: 600; }
.cta .btn { background: var(--cta-text); color: var(--cta-bg); }
.cta .btn:hover { background: var(--surface); color: var(--text); }

/* Footer */
.footer { padding: 72px 0 28px; color: var(--muted); font-size: 15px; }
.footer-top { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; padding-bottom: 48px; }
.footer-brand p { margin: 10px 0 0; max-width: 30ch; }
.footer-brand .status { display: flex; align-items: center; gap: 8px; margin-top: 20px; color: var(--text); font-size: 14px; }
.footer-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.footer-cols b { display: block; color: var(--text); font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.footer-cols a, .footer-cols span { display: block; padding: 10px 0; color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.footer-cols a:hover, .footer-bottom a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; align-items: center; font-size: 14px; }
.footer-bottom a { color: var(--muted); text-decoration: none; padding: 12px 0; }

/* Document pages (privacy, delete account) */
.doc-page { display: grid; grid-template-columns: 220px 1fr; gap: 64px; padding: 48px 0 96px; }
.toc { position: sticky; top: 96px; align-self: start; font-size: 14px; }
.toc b { display: block; margin-bottom: 10px; }
.toc a { display: block; color: var(--muted); text-decoration: none; padding: 5px 0; }
.toc a:hover { color: var(--highlight); }
.toc-mobile { display: none; }
.doc { max-width: 36em; }
.doc h1 { font-size: clamp(40px, 5vw, 56px); line-height: 1.05; margin-bottom: 8px; }
.doc .meta { color: var(--muted); font-size: 14px; margin: 0 0 28px; }
.doc h2 { font: 600 20px/1.3 Outfit, sans-serif; letter-spacing: 0; margin: 44px 0 8px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: var(--highlight); }
.doc .callout { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; margin: 28px 0; }
.doc .callout p { margin: 0; }
.to-top { display: inline-block; margin-top: 48px; padding: 10px 0; }

@media (max-width: 900px) {
  .hero, .doc-page, .dash-section { grid-template-columns: 1fr; }
  .hero { padding-top: 24px; gap: 8px; }
  .stage { grid-template-columns: 1fr; gap: 8px; margin-bottom: 80px; }
  .arrow { transform: rotate(90deg); }
  .steps { grid-template-columns: 1fr; gap: 40px; }
  .step:nth-child(2):has(.phone:not(.empty)) { margin-top: 0; }
  .dash-section { gap: 32px; }
  .promises { grid-template-columns: 1fr; }
  .promises .support { grid-template-columns: 1fr; }
  .cta { grid-template-columns: 1fr; }
  .band { padding: 72px 0; margin-bottom: 80px; }
  .toc { display: none; }
  .doc-page { padding-top: 32px; }
  .toc-mobile { display: block; border: 1px solid var(--border); border-radius: var(--radius); padding: 0 18px; margin-bottom: 32px; background: var(--surface); }
  .toc-mobile summary { padding: 14px 0; font-weight: 500; }
  .toc-mobile a { display: block; padding: 8px 0; color: var(--muted); text-decoration: none; }
  .toc-mobile[open] { padding-bottom: 10px; }
  section { padding-bottom: 80px; }
  .footer-top { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav-links a:not(.btn) { display: none; }
  .dash { grid-template-columns: 1fr; aspect-ratio: auto; }
  .dash-side { display: none; }
  .dash-main { padding: 20px; gap: 8px; font-size: 14px; }
  .dash-title { font-size: 22px; }
  .dash-quotes q { font-size: 16px; padding: 8px 12px; }
  .dash-row i { width: 10px; height: 10px; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 24px; }
}
