/* AXORA landing page — an anatomical atlas that turns as you scroll.
   Plain CSS (no Tailwind). Tokens match assets/css/app.css. */

:root {
  --plate: #EFF2EE;
  --sheet: #FFFFFF;
  --ink: #171A2B;
  --ink-soft: #535868;
  --ink-faint: #8A8F9C;
  --rule: #D5DAD3;
  --rule-strong: #B4BBB2;
  --vein: #2747A8;
  --vein-dark: #1C3580;
  --vein-wash: #E6EBF8;
  --artery: #C9302C;
  --nerve: #E9B826;
  --nerve-dark: #8A6800;
  --nerve-wash: #FCF3D6;
  --correct: #2F7D57;
  --correct-wash: #E3F2EA;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--plate); color: var(--ink); font: 17px/1.6 var(--sans); }
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--vein); text-underline-offset: 3px; }
a:hover { color: var(--vein-dark); }
:focus-visible { outline: 3px solid var(--nerve); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 640px) { .wrap { padding: 0 2rem; } }
.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; }
.small { font-size: 15px; color: var(--ink-soft); }
[hidden] { display: none !important; }
@media (display-mode: standalone) { .hide-installed { display: none !important; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .75rem 1.3rem; border-radius: 11px; font: 600 16px/1.2 var(--sans); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; white-space: nowrap; transition: background-color .15s ease, border-color .15s ease; }
.btn svg { width: 20px; height: 20px; }
.btn-primary { background: var(--vein); color: #fff; }
.btn-primary:hover { background: var(--vein-dark); color: #fff; }
.btn-quiet { background: var(--sheet); color: var(--ink); border-color: var(--rule); }
.btn-quiet:hover { color: var(--ink); border-color: var(--rule-strong); }
.btn-small { min-height: 40px; padding: .5rem .95rem; font-size: 15px; border-radius: 9px; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Top bar ---------- */
.topbar { position: fixed; inset: 0 0 auto 0; z-index: 30; transition: background-color .2s ease, box-shadow .2s ease; }
.topbar.is-scrolled { background: rgba(239, 242, 238, .92); backdrop-filter: blur(8px); box-shadow: 0 1px 0 var(--rule); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 64px; }
.wordmark { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; }
.wordmark:hover { color: var(--ink); }
.wordmark span { font: 400 27px/1 var(--serif); letter-spacing: .04em; }
.topbar nav { display: flex; align-items: center; gap: 1.1rem; }
.topbar nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.topbar nav a:not(.btn):hover { color: var(--vein); }
.only-wide { display: none; }
@media (min-width: 760px) { .only-wide { display: inline; } }

/* ---------- The scroll story ----------
   The stage is sticky and as tall as the screen; the panels slide over it.
   The figure sits to the right on wide screens and in the top half on phones. */
.story { position: relative; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; margin-bottom: -100vh; margin-bottom: -100svh; overflow: hidden; z-index: 0; pointer-events: none; }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .8s ease; }
.has-3d .scene { opacity: 1; }
.still { position: absolute; width: min(70vw, 420px); right: 6vw; top: 50%; transform: translateY(-50%); opacity: .95; }
.has-3d .still { display: none; }
@media (max-width: 899px) { .still { width: 62vw; right: 50%; top: 9vh; transform: translateX(50%); } }

.panel { position: relative; z-index: 1; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 6rem 0 3rem; }
.panel .copy { max-width: 32rem; }
@media (max-width: 899px) {
  .panel { align-items: flex-end; padding-bottom: 2.5rem; }
  .panel.hero { align-items: flex-end; }
}

.hero-course { font-weight: 600; color: var(--ink-soft); font-size: 15px; }
.hero h1 { margin-top: .75rem; font-size: clamp(46px, 8.6vw, 92px); line-height: .98; max-width: 11ch; }
.hero .lead { margin-top: 1.25rem; font-size: 18px; color: var(--ink); max-width: 34rem; }
.hero .actions { margin-top: 1.75rem; }
.hero .small { margin-top: .9rem; }
.scroll-hint { margin-top: 2.5rem; display: flex; align-items: center; gap: .7rem; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.scroll-hint span { position: relative; width: 2.6rem; height: 2px; background: var(--ink); }
.scroll-hint span::after { content: ""; position: absolute; right: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--nerve); border: 2px solid var(--ink); }
@media (max-width: 899px) {
  .hero .copy { background: linear-gradient(to top, var(--plate) 80%, rgba(239, 242, 238, 0)); padding-top: 2.5rem; }
  .hero h1 { font-size: clamp(42px, 12vw, 60px); }
  .hero .lead { font-size: 17px; margin-top: 1rem; }
  .scroll-hint { display: none; }
}

.plate .card { background: rgba(255, 255, 255, .9); backdrop-filter: blur(6px); border: 1px solid var(--rule); border-radius: 18px; padding: 1.5rem 1.4rem 1.6rem; box-shadow: 0 30px 60px -45px rgba(23, 26, 43, .55); }
@media (min-width: 640px) { .plate .card { padding: 2rem 2rem 2.1rem; } }
.plate-label { display: flex; align-items: center; gap: .6rem; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.leader-pin { position: relative; width: 2.2rem; height: 1.5px; background: var(--ink); flex: none; }
.leader-pin::before { content: ""; position: absolute; left: -3px; top: -3.5px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.plate h2 { margin-top: .6rem; font-size: clamp(34px, 5vw, 50px); line-height: 1.02; }
.plate .card > p:not(.plate-label) { margin-top: .85rem; font-size: 17px; }
.plate ul { margin: .9rem 0 0; padding: 0; list-style: none; }
.plate li { position: relative; padding-left: 1.4rem; margin-top: .35rem; font-size: 16px; }
.plate li::before { content: ""; position: absolute; left: 0; top: .62em; width: .6rem; height: .6rem; border-radius: 50%; border: 2px solid var(--vein); }

/* ---------- Sections after the story ---------- */
.section { position: relative; z-index: 2; background: var(--plate); padding: 5rem 0; }
.section-head { max-width: 40rem; }
.section-head h2 { font-size: clamp(36px, 5.4vw, 56px); line-height: 1.02; }
.section-head p { margin-top: 1rem; color: var(--ink-soft); font-size: 17px; }
.section-head p.small { font-size: 15px; }
.course { padding-bottom: 2rem; border-top: 1px solid var(--rule); }

/* ---------- Stacking atlas plates (pose math ported from 21st.dev's Scroll Stacking Cards) ---------- */
.stack { position: relative; height: calc(var(--count) * 70vh + 30vh); }
.stack-stage { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; place-items: center; overflow: hidden; padding: 4.5rem 1.25rem 2rem; }
.stack-cards { position: relative; list-style: none; margin: 0; padding: 0; width: min(100%, 44rem); height: min(62vh, 23rem); perspective: 1400px; }
.atlas { position: absolute; inset: 0; display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); background: var(--sheet); border: 1px solid var(--rule); border-radius: 18px; overflow: hidden; box-shadow: 0 40px 70px -50px rgba(23, 26, 43, .6); transform-origin: 50% 0%; will-change: transform; }
@media (min-width: 640px) { .atlas { grid-template-columns: 9rem minmax(0, 1fr); } }
.atlas::after { content: ""; position: absolute; inset: 0; background: var(--ink); opacity: var(--shade, 0); pointer-events: none; }
.atlas-label { display: flex; flex-direction: column; justify-content: space-between; padding: 1.1rem .9rem; border-right: 1px solid var(--rule); background: repeating-linear-gradient(90deg, #E6EAE4 0 1px, transparent 1px 6px), #F3F5F1; }
.atlas-label small { display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft); letter-spacing: .02em; }
.atlas-label b { display: block; font: 400 52px/0.95 var(--serif); }
.atlas-sem { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.atlas-body { padding: 1.3rem 1.2rem; min-width: 0; display: flex; flex-direction: column; }
@media (min-width: 640px) { .atlas-body { padding: 1.8rem 1.8rem; } }
.atlas h3 { font: 400 clamp(28px, 4vw, 38px)/1.05 var(--serif); }
.atlas .count { margin-top: .5rem; color: var(--ink-soft); font-size: 15px; }
.atlas .sections, .atlas .later { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.atlas .sections li { font-size: 14px; font-weight: 600; padding: .2rem .65rem; border-radius: 999px; border: 1px solid var(--rule); }
.atlas .later { flex-direction: column; gap: .3rem; }
.atlas .later li { font-size: 16px; }
.atlas .later li span { font-weight: 700; color: var(--vein); }
.atlas .stain { margin-top: auto; }
.stain { display: flex; height: 9px; border-radius: 999px; overflow: hidden; background: #E2E6E0; }
.stain > span { display: block; height: 100%; }
.stack-count { position: absolute; bottom: 1.2rem; right: 1.25rem; font: 400 22px/1 var(--serif); color: var(--ink-soft); }
/* Without the 3D motion, the plates are a plain list. */
html:not(.motion) .stack { height: auto; }
html:not(.motion) .stack-stage { position: static; height: auto; display: block; padding: 0 1.25rem; }
html:not(.motion) .stack-cards { height: auto; margin: 0 auto; display: grid; gap: 1rem; perspective: none; }
html:not(.motion) .atlas { position: relative; inset: auto; min-height: 16rem; }
html:not(.motion) .stack-count { display: none; }

.disciplines { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.disciplines p { max-width: 30rem; font-size: 16px; }
.disciplines ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.disciplines li { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .7rem; border-radius: 999px; border: 1px solid var(--rule); background: var(--sheet); font-size: 14px; font-weight: 600; }
.dot { width: .6rem; height: .6rem; border-radius: 50%; }
.course-foot { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; color: var(--ink-soft); font-size: 15px; }
.course-foot b { font: 400 26px/1 var(--serif); color: var(--ink); margin-right: .2rem; }

/* ---------- Try the checklist ---------- */
.try { border-top: 1px solid var(--rule); }
.try-grid { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 900px) { .try-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.try .small { margin-top: 1rem; }
.try-card { background: var(--sheet); border: 2px solid var(--ink); border-radius: 18px; padding: 1.4rem; }
.try-head { display: flex; align-items: center; gap: 1.1rem; }
.try-ring { width: 96px; height: 96px; flex: none; }
.try-ring circle[data-try-arc] { transition: stroke-dashoffset .4s ease, stroke .3s ease; }
.try-topic { font: 400 30px/1.05 var(--serif); }
.try-meta { font-size: 14px; color: var(--ink-soft); }
.try-score { margin-top: .3rem; font-size: 15px; }
.try-score b { font: 400 26px/1 var(--serif); }
.try-items { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: .5rem; }
.mark { width: 100%; display: flex; align-items: center; gap: .7rem; min-height: 48px; padding: .5rem .8rem .5rem .6rem; border-radius: 12px; border: 1.5px solid var(--rule); background: var(--sheet); font: 600 16px/1.3 var(--sans); color: var(--ink); text-align: left; cursor: pointer; }
.mark:hover { border-color: var(--rule-strong); }
.mark .box { position: relative; width: 1.45rem; height: 1.45rem; flex: none; border-radius: 7px; border: 2px solid var(--rule-strong); background: var(--sheet); }
.mark .name { flex: 1; }
.mark .share { font-size: 14px; font-weight: 500; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.mark[data-level="1"] { border-color: #E5CF85; background: var(--nerve-wash); }
.mark[data-level="1"] .box { border-color: var(--nerve-dark); background: linear-gradient(135deg, var(--nerve) 50%, var(--sheet) 50%); }
.mark[data-level="2"] { border-color: #A9D2BB; background: var(--correct-wash); }
.mark[data-level="2"] .box { border-color: var(--correct); background: var(--correct); }
.mark[data-level="2"] .box::after { content: ""; position: absolute; left: .38rem; top: .1rem; width: .42rem; height: .78rem; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

/* ---------- More features ---------- */
.more { border-top: 1px solid var(--rule); }
.more-grid { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.5rem 2.5rem; }
@media (min-width: 760px) { .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.more-grid li { padding-top: 1rem; border-top: 2px solid var(--ink); }
.more-grid h3 { font: 700 19px/1.3 var(--sans); }
.more-grid p { margin-top: .4rem; color: var(--ink-soft); }

/* ---------- Install ---------- */
.install { border-top: 1px solid var(--rule); }
.install-grid { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 900px) { .install-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.install-state { margin-top: 1rem; font-weight: 600; }
.install-now { margin-top: 1.2rem; display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.install-now span { font-size: 15px; color: var(--ink-soft); }
.laptop { font-size: 15px; }
.howto-box { background: var(--sheet); border: 1px solid var(--rule); border-radius: 18px; padding: 1.25rem; }
.tabs { display: flex; gap: .4rem; padding: .3rem; background: var(--plate); border-radius: 12px; }
.tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; border: 0; border-radius: 9px; background: transparent; font: 600 15px/1 var(--sans); color: var(--ink-soft); cursor: pointer; }
.tabs button svg { width: 18px; height: 18px; }
.tabs button[aria-selected="true"] { background: var(--sheet); color: var(--ink); box-shadow: 0 1px 2px rgba(23, 26, 43, .12); }
.howto { padding: 1.1rem .4rem .3rem; }
.howto h3 { font: 700 18px/1.3 var(--sans); }
.howto ol { margin: .9rem 0 0; padding: 0; list-style: none; counter-reset: step; }
.howto li { counter-increment: step; position: relative; padding-left: 2.3rem; margin-top: .8rem; }
.howto li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--ink); color: #fff; font: 700 13px/1.6rem var(--sans); text-align: center; }
.howto .note { margin-top: 1rem; font-size: 15px; color: var(--ink-soft); }
.key { display: inline-flex; vertical-align: -5px; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 6px; border: 1px solid var(--rule); background: var(--plate); }
.key svg { width: 16px; height: 16px; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--rule); }
.faq-list { margin-top: 1.8rem; max-width: 46rem; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.05rem 0; font-weight: 600; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.plus { position: relative; width: 14px; height: 14px; flex: none; }
.plus::before, .plus::after { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: var(--ink); transition: transform .2s ease; }
.plus::after { transform: rotate(90deg); }
.faq details[open] .plus::after { transform: rotate(0); }
.faq details p { padding: 0 0 1.1rem; color: var(--ink-soft); max-width: 42rem; }

/* ---------- Last call and footer ---------- */
.last { border-top: 1px solid var(--rule); text-align: left; }
.last h2 { font-size: clamp(38px, 6vw, 64px); line-height: 1; }
.last p { margin-top: .8rem; color: var(--ink-soft); }
.last .actions { margin-top: 1.5rem; }
.footer { position: relative; z-index: 2; background: var(--ink); color: #D5D8E0; padding: 2rem 0; font-size: 15px; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.footer a { color: #fff; }
.footer nav { display: flex; gap: 1.2rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media (max-width: 899px) {
  .hero-course { display: none; }
}
@media (max-width: 639px) {
  .stack-cards { height: min(76vh, 34rem); }
  .atlas .sections { gap: .3rem; }
  .atlas .sections li { font-size: 13px; padding: .15rem .55rem; }
  .atlas-label b { font-size: 40px; }
}
