/* Aha site: Aha type and colour, grain only on moments that matter, everything that moves at 8 frames a second. */
:root {
  --bg: #FDFBF7;          /* page: warm off-white */
  --surface: #FDF6F4;     /* button fill, quiet surfaces */
  --ink: #202020; --ink2: #62605F; --ink3: #898786;
  --line: #CAC8C7; --hair: #00000014;
  --brand: #749C49; --sage: #C9D27A; --forest: #4A6A3B; --cream: #FDFBF7;
  --accent: #F28C38;      /* hand-drawn underlines */
  --shadow: 0 4px 16px rgba(0, 0, 0, .12);
  --serif: "Hedvig Letters Serif", Georgia, serif;
  --sans: "Satoshi", system-ui, sans-serif;
  --hand: "Schoolbell", cursive;
  --r-m: 12px; --r-l: 16px; --r-xl: 28px; --r-xxl: 48px;
  --gut: clamp(20px, 5vw, 72px);
  --f: 125ms;             /* one frame at 8 fps */
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font: 500 18px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }

/* ---------- type ---------- */
h1 { font: 400 clamp(44px, 6.6vw, 112px)/1 var(--serif); letter-spacing: -0.025em; }
h2 { font: 400 clamp(36px, 5vw, 72px)/1.05 var(--serif); letter-spacing: -0.015em; text-wrap: balance; }
.big { font: 400 clamp(40px, 6.4vw, 104px)/1.05 var(--serif); letter-spacing: -0.02em; text-wrap: balance; }
.lede { font-size: clamp(18px, 1.9vw, 26px); color: var(--ink2); max-width: 34ch; text-wrap: pretty; }
.hand { font: 400 clamp(24px, 2.6vw, 34px)/1.25 var(--hand); }

/* ---------- the logo (official file, coloured with a mask) ---------- */
.logo { display: block; width: 76px; height: 40px; background: var(--brand); -webkit-mask: url(assets/aha-logo.svg) center / contain no-repeat; mask: url(assets/aha-logo.svg) center / contain no-repeat; }

/* ---------- buttons: the DLS primary is outlined, never filled ink or green ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 999px; background: var(--surface); border: 1px solid var(--ink); color: var(--ink); font: 700 16px/1 var(--sans); text-decoration: none; transition: transform .25s var(--o3); }
.btn:active { transform: scale(.97); }
.btn.big { padding: 18px 30px; font-size: 18px; }

/* ---------- layout ---------- */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 16px var(--gut); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); }
.block { padding: clamp(64px, 10vw, 140px) var(--gut); max-width: 1320px; margin: 0 auto; }
.block > h2 { margin-bottom: clamp(28px, 4vw, 56px); }

/* ---------- hero ---------- */
.hero { position: relative; display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 24px; min-height: min(86vh, 820px); padding: 24px var(--gut) 64px; max-width: 1320px; margin: 0 auto; }
.hero-copy { display: grid; gap: 24px; justify-items: start; position: relative; z-index: 2; }
.hero h1 .ln { display: block; }
.hero-art { position: relative; height: 420px; display: grid; place-items: center; }
.hero-art .gr { opacity: 0; }
.hero-art .copy { position: absolute; }
.hero-art .copy.a { right: -10px; top: -30px; }
.hero-art .copy.b { left: 0; bottom: -20px; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-art { order: -1; height: 300px; zoom: .8; }
}

/* the hand-drawn underline */
.u { position: relative; display: inline-block; white-space: nowrap; }
.scribble { position: absolute; left: -2%; bottom: -0.28em; width: 104%; height: .3em; overflow: visible; }
.scribble path { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; vector-effect: non-scaling-stroke; }
html[data-b="0"] .boil { filter: url(#boil0); }
html[data-b="1"] .boil { filter: url(#boil1); }
html[data-b="2"] .boil { filter: url(#boil2); }

/* ---------- grain cards: white text on grain ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 28px); }
.gcard { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-xxl); overflow: hidden; color: var(--cream); }
.gcard canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.gcard b { position: absolute; left: 28px; top: 20px; font: 400 clamp(64px, 7vw, 104px)/1 var(--serif); letter-spacing: -0.03em; }
.gcard span { position: absolute; left: 28px; right: 24px; bottom: 28px; font: 400 clamp(26px, 2.6vw, 38px)/1.1 var(--serif); text-wrap: balance; }
@media (max-width: 760px) { .cards { grid-template-columns: 1fr; } .gcard { aspect-ratio: 4 / 3; } }

/* ---------- Milo ---------- */
.milo-row { display: flex; align-items: center; justify-content: center; gap: clamp(16px, 4vw, 56px); flex-wrap: wrap; }
.milo-host { line-height: 0; }
.note { background: #fff; border-radius: var(--r-xl) var(--r-xl) var(--r-xl) 4px; padding: 22px 28px; box-shadow: var(--shadow); max-width: 420px; }

/* ---------- statement ---------- */
.statement { position: relative; overflow: hidden; background: var(--forest); color: var(--cream); padding: clamp(96px, 14vw, 200px) var(--gut); text-align: center; }
.statement .field { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.statement .big { position: relative; max-width: 16ch; margin: 0 auto; }

.cta { text-align: center; display: grid; justify-items: center; gap: 22px; }
.cta > h2 { margin-bottom: 0; }

.foot { display: flex; align-items: center; justify-content: space-between; padding: 40px var(--gut) 56px; border-top: 1px solid var(--hair); color: var(--ink3); }

/* ---------- motion: stepped, eases only (site.js writes --oN / --ioN) ---------- */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .5s var(--o6), transform .667s var(--o8); transition-delay: calc(var(--d, 0) * 2 * var(--f)); }
.reveal.in { opacity: 1; transform: none; }
.hero .ln, .focus-late { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .hero .ln, .focus-late { opacity: 1 !important; transform: none !important; filter: none !important; transition: none; }
  .scribble path { stroke-dashoffset: 0; }
}

/* ================= Aha One ================= */
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.brand .logo { width: 64px; height: 34px; }
.one { font: 400 28px/1 var(--serif); color: var(--ink); letter-spacing: -0.01em; transform: translateY(2px); }
.top .links { display: flex; gap: 28px; margin-left: auto; margin-right: 28px; }
.links a { text-decoration: none; color: var(--ink2); font-weight: 500; font-size: 16px; }
.links a:hover { color: var(--ink); }
@media (max-width: 860px) { .top .links { display: none; } }

.hero-act { display: grid; gap: 12px; justify-items: start; }
.hero-act small { color: var(--ink3); font-size: 15px; }
.btn i { font-size: 18px; }

h3 { font: 400 clamp(24px, 2.2vw, 32px)/1.15 var(--serif); letter-spacing: -0.01em; }
.block.tight { padding-top: 0; }

/* steps: big serif numbers, one line each */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 40px); }
.steps li { display: grid; gap: 14px; align-content: start; border-top: 1px solid var(--line); padding-top: 20px; }
.steps b { font: 400 clamp(56px, 6vw, 88px)/1 var(--serif); color: var(--brand); letter-spacing: -0.03em; }
.steps p { color: var(--ink2); margin-top: 8px; }
@media (max-width: 960px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } .steps li { grid-template-columns: 64px 1fr; } .steps b { font-size: 56px; } }

.gcard b { font-size: clamp(40px, 4.4vw, 64px); }

/* chat demo */
.chat-row { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.chat-side { display: grid; gap: 24px; }
.chat-side h2 { margin: 0; }
.chat-row .milo-row { justify-content: flex-start; flex-wrap: nowrap; margin-top: 8px; }
.chat-row .note { max-width: 280px; }
.phone { background: var(--surface); border-radius: var(--r-xxl); padding: 28px 22px 32px; box-shadow: var(--shadow); max-width: 440px; width: 100%; justify-self: center; }
.phone-head { font-size: 14px; color: var(--ink3); text-align: center; margin-bottom: 18px; }
.thread { display: grid; gap: 10px; }
.bub { max-width: 84%; padding: 12px 16px; border-radius: 22px; font-size: 16px; line-height: 1.4; opacity: 0; transform: translateY(14px); transition: opacity .5s var(--o6), transform .667s var(--o8); }
.bub.me { justify-self: end; background: var(--brand); color: var(--cream); border-bottom-right-radius: 4px; }
.bub.milo { justify-self: start; background: #fff; border: 1px solid var(--hair); border-bottom-left-radius: 4px; }
.phone.in .bub { opacity: 1; transform: none; }
.phone.in .bub:nth-child(1) { transition-delay: .5s; }
.phone.in .bub:nth-child(2) { transition-delay: 1.5s; }
.phone.in .bub:nth-child(3) { transition-delay: 2.75s; }
.phone.in .bub:nth-child(4) { transition-delay: 3.75s; }
.phone.in .bub:nth-child(5) { transition-delay: 5s; }
@media (max-width: 860px) { .chat-row { grid-template-columns: 1fr; } }

/* between sessions */
.rows { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(32px, 5vw, 80px); }
.row { display: grid; grid-template-columns: 52px 1fr; gap: 6px 18px; padding: 28px 0; border-top: 1px solid var(--line); }
.row i { grid-row: span 2; font-size: 30px; color: var(--ink); padding-top: 2px; }
.row p { color: var(--ink2); }
@media (max-width: 760px) { .rows { grid-template-columns: 1fr; } }

/* privacy */
.privacy { text-align: center; }
.plist { list-style: none; display: flex; justify-content: center; gap: clamp(20px, 5vw, 64px); flex-wrap: wrap; }
.plist li { display: inline-flex; align-items: center; gap: 12px; font: 400 clamp(22px, 2vw, 28px)/1.2 var(--serif); }
.plist i { font-size: 26px; color: var(--brand); }

/* faq */
.faq { max-width: 880px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 0; font: 400 clamp(22px, 2.2vw, 30px)/1.2 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { font-size: 22px; transition: transform .375s var(--io4); }
.faq details[open] summary i { transform: rotate(180deg); }
.faq details p { color: var(--ink2); padding: 0 0 26px; max-width: 64ch; }

/* footer */
.foot { flex-direction: column; align-items: stretch; gap: 18px; }
.foot-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot .links { display: flex; gap: 24px; flex-wrap: wrap; }
.foot .links a { color: var(--ink3); font-size: 15px; }
.crisis { color: var(--ink); font-weight: 700; font-size: 16px; }
.foot small { font-size: 14px; }

@media (prefers-reduced-motion: reduce) { .bub { opacity: 1 !important; transform: none !important; transition: none; } }
.chat-row > * { min-width: 0; }
@media (max-width: 560px) { .chat-row .milo-row { flex-wrap: wrap; } }
.hero h1 { font-size: clamp(44px, 5.8vw, 96px); }
@media (min-width: 761px) { .hero h1 .ln { white-space: nowrap; } }
.plist { gap: clamp(16px, 3.5vw, 48px); }
.plist li { font-size: clamp(20px, 1.8vw, 26px); }
