*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--type-body)/1.55 var(--font-ui);
  font-optical-sizing: auto; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: var(--type-hero); line-height: var(--hero-line); letter-spacing: var(--hero-tracking); font-weight: var(--weight-display); }
h2 { font-size: var(--type-section); line-height: var(--section-line); letter-spacing: var(--heading-tracking); font-weight: var(--weight-display); text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }

[hidden] { display: none !important; }   /* the hidden attribute always wins over a component's display */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; font-size: var(--type-ui); text-decoration: none; }
.skip:focus { top: 12px; }

.page { position: relative; overflow-x: clip; }
.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
.narrow { max-width: 760px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45em; border: 0; border-radius: 10px;
  padding: 0 20px; height: 48px; font-size: 15px; font-weight: 550; letter-spacing: -.01em; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s ease, translate .25s var(--ease), box-shadow .2s ease; }
.btn-primary { background: var(--accent); color: var(--ink); box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 6px 18px -8px rgba(216,65,11,.7); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-sm { height: 34px; padding: 0 14px; font-size: var(--type-ui); border-radius: 8px; }

/* header */
.header { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between;
  width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: 19px; letter-spacing: -.04em; }
.nav { display: flex; align-items: center; gap: 22px; font-size: var(--type-ui); }
.nav a:not(.btn) { text-decoration: none; color: var(--ink); opacity: .85; }
.nav a:not(.btn):hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }

/* phone menu: a ☰ button beside "Join the waitlist" opens a panel with every page (menu.js) */
.menu-btn { display: none; position: relative; flex: none; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px;
  background: rgba(27, 22, 38, .07); color: var(--ink); cursor: pointer; }
.menu-btn::after { content: ""; position: absolute; inset: -6px; }   /* ~46 px hit area */
.menu-btn i { position: absolute; left: 10px; top: 17px; width: 14px; }
.menu-btn i::before, .menu-btn i::after { content: ""; position: absolute; left: 0; width: 14px; height: 1.5px; border-radius: 1px;
  background: currentColor; transition: transform .2s var(--ease); }
.menu-btn i::before { top: -4px; }
.menu-btn i::after { top: 2.5px; }
.menu-btn[aria-expanded="true"] i::before { transform: translateY(3.25px) rotate(45deg); }
.menu-btn[aria-expanded="true"] i::after { transform: translateY(-3.25px) rotate(-45deg); }
.menu { position: absolute; top: calc(100% - 8px); left: 0; right: 0; z-index: 40; padding: 6px; border-radius: 16px;
  background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px rgba(27, 22, 38, .06), 0 20px 50px rgba(27, 22, 38, .24);
  animation: menu-in .18s var(--ease); }
.menu a { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px; border-radius: 10px;
  font-size: 19px; letter-spacing: -.025em; color: var(--ink); text-decoration: none; }
.menu a::after { content: "→"; font-size: 16px; color: var(--muted); }
.menu a:hover, .menu a:focus-visible { background: var(--paper); }
.menu a[aria-current="page"] { color: var(--accent-text); }
.menu a[aria-current="page"]::after { content: "•"; color: var(--accent-text); }
.menu-legal { display: flex; gap: 4px; margin: 4px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); }
.menu-legal a { padding: 10px 14px; font-size: 14px; letter-spacing: 0; color: var(--muted); }
.menu-legal a::after { content: none; }
.menu-legal a[aria-current="page"]::after { content: none; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } }
/* Lessons is hidden until launch: plain text with a "Coming soon" tag wherever its link was (header, menu, footer, guide) */
.soon { display: inline-flex; align-items: center; gap: 7px; cursor: default; white-space: nowrap; }
.soon small { padding: 2px 7px; border-radius: 99px; background: rgba(27, 22, 38, .08); font-size: 11px; font-weight: 600; line-height: 1.4; letter-spacing: 0; opacity: .9; }
.nav .soon { color: var(--ink); opacity: .6; }
.menu .soon { display: flex; justify-content: space-between; padding: 14px; font-size: 19px; letter-spacing: -.025em; color: var(--muted); }
.menu .soon small { font-size: 12px; letter-spacing: 0; }
.foot-nav .soon { display: flex; width: fit-content; padding: 3px 0; font-size: 14px; color: rgba(255,255,255,.5); }
.foot-nav .soon small { background: rgba(255,255,255,.12); color: rgba(255,255,255,.7); }
@media (max-width: 700px) { .nav { gap: 10px; } .menu-btn { display: block; } }
@media (min-width: 701px) { .menu { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .menu { animation: none; } .menu-btn i::before, .menu-btn i::after { transition: none; } }

/* waitlist form */
.waitlist { position: relative; display: flex; gap: 8px; width: min(460px, 100%); margin-top: 32px; }
.waitlist input { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border-radius: 10px; border: 0; background: var(--surface);
  box-shadow: 0 0 0 1px rgba(27,22,38,.09), 0 8px 24px -14px rgba(27,22,38,.35); font-size: 16px; }   /* 16px: iOS zooms into smaller fields */
.waitlist input::placeholder { color: #9a93a3; }
.waitlist input:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 1px; }
.waitlist input[aria-invalid="true"] { box-shadow: 0 0 0 2px #c22d2d; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.wl-status { position: absolute; left: 2px; top: calc(100% + 8px); font-size: var(--type-ui); font-weight: 500; }
.wl-status.is-error { color: #b42222; }
.waitlist.is-done input, .waitlist.is-done button { display: none; }
.waitlist.is-done .wl-status { position: static; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px;
  border-radius: 10px; background: var(--surface); box-shadow: 0 0 0 1px rgba(27,22,38,.09); font-size: 15px; }
.hint { margin-top: 14px; font-size: var(--type-ui); color: var(--muted); }
.waitlist:has(.wl-status:not(:empty)) + .hint { visibility: hidden; }
.waitlist.is-done + .hint { visibility: visible; }

/* FAQ */
.faq { margin-top: 32px; display: grid; gap: 8px; }
.faq-item { background: var(--surface); border-radius: 12px; box-shadow: 0 1px 2px rgba(27,22,38,.05); }
.faq-item h3 { font: inherit; }
.faq-item button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; text-align: left;
  padding: 18px 20px; background: none; border: 0; cursor: pointer; font-size: 15px; font-weight: 500; letter-spacing: -.01em; }
.faq-item [role=region] { padding: 0 20px 20px; font-size: 15px; color: var(--muted); max-width: 62ch; }
.plus { position: relative; width: 12px; height: 12px; flex: none; }
.plus::before, .plus::after { content: ""; position: absolute; left: 0; top: 5.25px; width: 12px; height: 1.5px; background: var(--ink); transition: transform .25s var(--ease); }
.plus::after { transform: rotate(90deg); }
[aria-expanded="true"] .plus::after { transform: rotate(0deg); }

/* footer: brand lead + link columns on the dark ground under the hills (every page) */
.footer { background: var(--hill-near); color: rgba(255,255,255,.72); font-size: var(--type-ui);
  padding: 30px max(var(--gutter), (100% - var(--max)) / 2) 34px; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px 48px; }
.foot-lead { display: grid; gap: 8px; align-content: start; }
.foot-lead .brand { color: #fff; }
.foot-lead p { margin: 0; }
.foot-nav { display: grid; grid-template-columns: repeat(3, minmax(120px, auto)); gap: 24px 48px; }
.foot-nav h2 { margin: 0 0 8px; font-size: 12px; font-weight: 500; letter-spacing: 0; line-height: 1.4; color: rgba(255,255,255,.45); }
.foot-nav a { display: block; width: fit-content; padding: 3px 0; font-size: 14px; color: rgba(255,255,255,.82); text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer .tm { margin-top: 26px; font-size: 12px; color: rgba(255,255,255,.45); }
@media (max-width: 700px) { .foot-nav { grid-template-columns: 1fr 1fr; } }
