/* ============================================================================
   medkit — marketing landing ("The Examiner's Standard", v2/v3)
   Ported from the Claude Design handoff (Medkit Landing Page.html).
   Loads on top of ds-colors.css (tokens) + ds-components.css (.ds-* primitives).
   ========================================================================== */

:root {
  /* AA-safe accent for small text on paper/surface (links, labels, grades). */
  --accent-text: #C8432A;
  /* warm-ink modal scrim — never pure black. */
  --scrim: rgba(26, 26, 24, .55);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ── Auth-gating (prod has no login until launch) ──────────────────────────
   Every login / sign-up / "Start a case" CTA carries `data-auth-cta` and is
   HIDDEN BY DEFAULT, so the production apex (medkit.clinic) is correct with
   zero JS and no flash of login buttons. On non-production hosts,
   public/app-host.js strips the `data-auth-cta` attribute (revealing
   the CTAs) and adds `.landing-hidden` to the prod-only Contact nav link. */
[data-auth-cta] { display: none !important; }
.landing-hidden { display: none !important; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-sans); -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

/* ── shared section rhythm ── */
section { position: relative; }
.sec-pad { padding: 104px 0; }
.eyebrow {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2);
  display: flex; align-items: center; gap: 13px; margin: 0 0 22px;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--accent); flex: none; }
.sec-head { max-width: 60ch; }
.sec-title {
  font-size: var(--t-h1); font-weight: 600; letter-spacing: -.025em;
  line-height: 1.08; margin: 0; color: var(--ink);
}
.sec-title em {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  color: var(--accent-deep); letter-spacing: -.01em;
}
.sec-sub { font-size: var(--t-body); line-height: 1.55; color: var(--muted); margin: 16px 0 0; max-width: 54ch; }

/* ── top bar — sticky, centered content column ── */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 32px; }
.nav-brand { display: inline-flex; align-items: center; gap: 9px; }
.nav-brand img { width: 26px; height: 26px; border-radius: 7px; display: block; }
.nav-brand .wm { font-size: 17px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
.nav-brand .wm b { color: var(--accent-deep); font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.ds-btn .arr { width: 15px; height: 15px; flex: none; }

/* ── locale toggle (EN ⇄ TR) rendered into [data-locale-slot] ── */
.locale-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  background: transparent; color: var(--muted); border: 1px solid var(--line-2);
  border-radius: var(--r-pill); padding: 6px 12px;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.locale-btn:hover { color: var(--ink); border-color: var(--muted-2); background: var(--paper-2); }

/* ── hero ── */
.hero { padding: 72px 0 92px; }
/* "Now in beta" chip — blinking red dot for a live feel. */
.hero .ds-chip.dot::before {
  background: var(--bad); opacity: 1;
  animation: ds-pulse 1.6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .hero .ds-chip.dot::before { animation: none; }
}
.hero-grid { display: grid; grid-template-columns: minmax(0,1.04fr) minmax(0,.96fr); gap: 64px; align-items: center; }
.hero-display {
  font-family: var(--font-sans); font-weight: 600; font-size: clamp(46px,5.2vw,72px);
  letter-spacing: -.035em; line-height: 1.01; margin: 22px 0 0; color: var(--ink); text-wrap: balance;
}
.hero-display em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--accent-deep); letter-spacing: -.012em; }
.hero-sub { font-size: 19px; line-height: 1.5; color: var(--muted); margin: 24px 0 0; max-width: 46ch; }
.hero-cta { display: flex; align-items: center; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.hero-meta {
  display: flex; align-items: center; gap: 14px; margin-top: 30px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .04em; color: var(--muted-2); flex-wrap: wrap;
}
.hero-meta > span:not(.d) { white-space: nowrap; }
.hero-meta .d { width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); }

/* ── encounter preview frame (mark-sheet aesthetic, not a glossy mockup) ── */
.frame { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); overflow: hidden; }
.frame-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 17px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.frame-bar .t { display: flex; align-items: center; gap: 9px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.frame-bar .timer { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted-2); letter-spacing: .04em; }
.rec { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); flex: none; }
@media (prefers-reduced-motion: no-preference) { .rec { animation: ds-pulse 1.7s ease-in-out infinite; } }
.frame-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }

.pt-row { display: flex; align-items: center; gap: 12px; }
.pt-av { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex: none; box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--accent) 22%,transparent); }
.pt-name { font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.pt-sub { font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); letter-spacing: .03em; margin-top: 2px; }

.turn { display: flex; gap: 10px; align-items: flex-start; }
.turn .who { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); width: 54px; flex: none; padding-top: 5px; }
.bubble { flex: 1; min-width: 0; padding: 11px 14px; border-radius: var(--r-md); font-size: 13.5px; line-height: 1.5; color: var(--ink-2); background: var(--paper-2); }
.bubble.you { background: transparent; border: 1px dashed var(--line-2); color: var(--muted); display: flex; align-items: center; gap: 8px; }
.caret { display: inline-block; width: 2px; height: 1.05em; background: var(--accent); vertical-align: -2px; }
@media (prefers-reduced-motion: no-preference) { .caret { animation: ds-blink 1.1s steps(1) infinite; } }

.vitals { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.vital { background: var(--surface); padding: 11px 13px; }
.vital .k { font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }
.vital .v { font-family: var(--font-mono); font-size: 17px; font-weight: 500; color: var(--ink); margin-top: 3px; font-variant-numeric: tabular-nums; }
.vital .v.warn { color: var(--warn); }

.cover { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cue { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); padding: 5px 11px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); }
.cue.met { color: var(--ink); }
.cue.active { color: var(--accent-deep); background: var(--accent-soft); border-color: transparent; }
.cue .mk { width: 14px; height: 14px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.cue.met .mk { background: var(--good); }
.cue.active .mk span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cue.pending { color: var(--muted-2); }
.cue.pending .mk { background: var(--line-2); width: 8px; height: 2px; border-radius: 1px; }
.tick { width: 8px; height: 8px; }

/* ── how it works ── */
.steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; margin-top: 54px; }
.step { padding: 26px 24px 28px; display: flex; flex-direction: column; gap: 14px; }
.step .num { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; color: var(--accent-text); }
.step h3 { font-size: 18px; font-weight: 600; letter-spacing: -.015em; color: var(--ink); margin: 0; line-height: 1.25; }
.step p { font-size: 13.5px; line-height: 1.55; color: var(--muted); margin: 0; }
.step .voice { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); display: inline-flex; align-items: center; gap: 6px; }

/* ── demo (grafted: keeps the YouTube walkthrough, framed in v2) ── */
.demo-frame { margin-top: 48px; max-width: 920px; margin-left: auto; margin-right: auto; }
.demo-frame .frame-bar .t { color: var(--muted); }
.demo-video { position: relative; width: 100%; aspect-ratio: 16 / 9; background: var(--viewer-bg, #0E0E0C); }
.demo-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.demo-cta { display: flex; justify-content: center; margin-top: 30px; }

/* ── the grade is the product (signature) ── */
.grade-grid { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: 56px; align-items: center; margin-top: 8px; }
.score-stack { display: flex; flex-direction: column; gap: 20px; }
.bigscore { display: flex; align-items: baseline; gap: 10px; }
.bigscore .n { font-family: var(--font-mono); font-size: 64px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.bigscore .d { font-family: var(--font-mono); font-size: 18px; color: var(--muted-2); }
.meter-wrap { max-width: 320px; }
.meter-cap { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); margin-top: 9px; }
.grade-note { font-size: var(--t-body); line-height: 1.55; color: var(--muted); margin: 0; max-width: 42ch; }
.grade-serif { font-family: var(--font-serif); font-style: italic; font-size: 23px; line-height: 1.4; color: var(--ink); margin: 0; letter-spacing: -.005em; max-width: 24ch; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.sheet-head .t { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ── two modes ── */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 54px; }
.mode { padding: 32px 30px 30px; display: flex; flex-direction: column; gap: 18px; }
.mode .tag { align-self: flex-start; }
.mode h3 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); margin: 0; }
.mode p { font-size: 14.5px; line-height: 1.55; color: var(--muted); margin: 0; max-width: 42ch; }
.mode ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.mode li { display: flex; gap: 11px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.mode li .b { font-family: var(--font-mono); font-size: 10px; color: var(--accent-text); margin-top: 3px; flex: none; }

/* ── medical schools ── */
.schools { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-sm); padding: 48px; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.82fr); gap: 56px; align-items: center; }
.schools .feats { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 28px; }
.feat .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 7px; }
.feat .t { font-size: 14.5px; font-weight: 600; color: var(--ink); margin-bottom: 5px; letter-spacing: -.01em; }
.feat p { font-size: 13px; line-height: 1.5; color: var(--muted); margin: 0; }
.schools-cta { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.schools-cta .price { font-family: var(--font-mono); font-size: 11px; letter-spacing: .03em; color: var(--muted-2); }

/* ── trust strip ── */
.trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust .row { display: flex; align-items: center; justify-content: center; gap: 0; flex-wrap: wrap; padding: 26px 0; }
.trust .item { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; color: var(--muted); padding: 0 28px; display: inline-flex; align-items: center; gap: 9px; }
.trust .item .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: .85; flex: none; }
.trust .sep { width: 1px; align-self: stretch; background: var(--line); }

/* ── final CTA band — recessed well on paper-2 ── */
.final { background: var(--paper-2); }
.final-inner { padding: 96px 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 26px; }
.final-serif { font-family: var(--font-serif); font-style: italic; font-size: clamp(30px,4vw,46px); line-height: 1.18; color: var(--ink); margin: 0; letter-spacing: -.01em; max-width: 20ch; }
.final-sub { font-size: var(--t-body); color: var(--muted); margin: 0; max-width: 48ch; line-height: 1.55; }

/* ── footer ── */
footer { background: var(--paper); }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 34px 0; flex-wrap: wrap; }
.foot .c { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .04em; color: var(--muted-2); display: inline-flex; align-items: center; gap: 9px; }
.foot .c img { width: 18px; height: 18px; border-radius: 5px; }
.foot-links { display: flex; gap: 26px; flex-wrap: wrap; }
.foot-links a { font-size: 13px; color: var(--muted); transition: color var(--dur) var(--ease); }
.foot-links a:hover { color: var(--ink); }

/* ── calm single rise-on-mount. Transform-only so content is never hidden. ── */
.reveal { opacity: 1; transform: none; }
@keyframes ds-reveal { from { transform: translateY(16px); } to { transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: ds-reveal .62s var(--ease) both; }
  .hero-grid .reveal:nth-child(2) { animation-delay: .08s; }
  .steps .step:nth-child(2) { animation-delay: .06s; }
  .steps .step:nth-child(3) { animation-delay: .12s; }
  .steps .step:nth-child(4) { animation-delay: .18s; }
  .modes .mode:nth-child(2) { animation-delay: .08s; }
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .grade-grid { grid-template-columns: 1fr; gap: 36px; }
  .schools { grid-template-columns: 1fr; gap: 40px; padding: 36px; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .wrap { padding: 0 22px; }
  .nav-inner { padding: 12px 22px; }
  .sec-pad { padding: 72px 0; }
  .hero { padding: 48px 0 64px; }
  .steps { grid-template-columns: 1fr; }
  .modes { grid-template-columns: 1fr; }
  .schools .feats { grid-template-columns: 1fr; }
  .nav-secondary { display: none; }
  .trust .sep { display: none; }
}

/* ============================================================================
   try-it modal — v2 overrides on top of auth.css (which is the legacy cartoon
   styling). We keep auth.css for layout/structure and re-skin to the Examiner's
   Standard so the modal matches the landing instead of the retired plush look.
   ========================================================================== */
.auth-overlay { background: var(--scrim); font-family: var(--font-sans); }
.auth-card {
  background: var(--surface); color: var(--ink-2);
  border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); padding: 32px 34px; gap: 16px;
}
.auth-title { font-family: var(--font-sans); font-weight: 600; font-size: 22px; letter-spacing: -.02em; color: var(--ink); }
.auth-sub { font-family: var(--font-sans); font-weight: 400; font-size: 14px; color: var(--muted); }
.auth-link { color: var(--accent-text); font-weight: 500; }
.auth-field span { font-family: var(--font-sans); font-weight: 600; font-size: 12px; color: var(--muted); letter-spacing: 0; }
.auth-field input,
.auth-field textarea,
.auth-dropdown-trigger {
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); font-family: var(--font-sans); font-weight: 400;
}
.auth-field input:focus,
.auth-field textarea:focus,
.auth-dropdown-trigger:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.auth-dropdown-menu { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md); box-shadow: var(--shadow-md); }
.auth-dropdown-option { font-weight: 500; color: var(--ink); border-radius: var(--r-sm); }
.auth-dropdown-option:hover,
.auth-dropdown-option.is-active { background: var(--paper-2); }
.auth-dropdown-option[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.auth-error { color: var(--bad); background: var(--bad-soft); border: 1px solid var(--bad); border-radius: var(--r-md); font-weight: 500; }
.auth-cancel { color: var(--muted); font-weight: 500; font-family: var(--font-sans); }
.auth-cancel:hover { color: var(--ink); }

/* The modal markup hardcodes legacy `btn-plush` classes — re-skin them to the
   ds button system so the modal CTAs read as Examiner's Standard. */
.auth-card .btn-plush {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-size: var(--t-small); font-weight: 500;
  padding: 11px 18px; border-radius: var(--r-md); border: 1px solid transparent;
  cursor: pointer; box-shadow: none; transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.auth-card .btn-plush.primary { background: var(--ink); color: var(--paper); }
.auth-card .btn-plush.primary:hover { background: var(--ink-2); }
.auth-card .btn-plush.mint { background: var(--accent); color: var(--accent-ink); }
.auth-card .btn-plush.mint:hover { background: var(--accent-deep); }
