/* Mirajian landing — design tokens from services/knowledge-base/DESIGN.md v2 */

:root {
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --paper: #f1efe7;
  --card: #fbfaf5;
  --sink: #eae7dc;
  --ink: #24262b;
  --ink-muted: #64675d;
  --ink-faint: #96978b;
  --rule: #ddd8c8;
  --learn: #1c7f72;
  --learn-text: #1a776b;   /* AA on paper for small text; --learn is for large type only */
  --learn-soft: rgba(28, 127, 114, 0.10);
  --act: #b4620d;
  --act-text: #a2580c;     /* AA on paper for small text */
  --act-soft: rgba(180, 98, 13, 0.10);

  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-pill: 99px;
  --wrap: 1080px;
}

html[data-theme="dark"] {
  --paper: #14151b;
  --card: #1b1d25;
  --sink: #22242e;
  --ink: #edece5;
  --ink-muted: #9b9d91;
  --ink-faint: #6a6c62;
  --rule: #2c2f3a;
  --learn: #4dc3b2;
  --learn-text: #4dc3b2;
  --learn-soft: rgba(77, 195, 178, 0.12);
  --act: #f0a04b;
  --act-text: #f0a04b;
  --act-soft: rgba(240, 160, 75, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}

/* height:auto is load-bearing: the <img> width/height attributes are
   presentational hints, so without it a CSS width alone stretches the mark. */
img { max-width: 100%; height: auto; display: block; }
a { color: var(--learn-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
:focus-visible { outline: 2px solid var(--learn); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 20px;
  min-height: 66px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand .word {
  font-family: var(--font-display); font-weight: 700;
  font-size: 20px; letter-spacing: -0.01em;
}
.nav { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  padding: 7px 13px; border-radius: var(--radius-pill);
  font-size: 13.5px; font-weight: 500; color: var(--ink-muted);
  transition: background .18s ease, color .18s ease;
}
.nav a:hover { background: var(--sink); color: var(--ink); text-decoration: none; }
.nav a.nav-cta { border: 1px solid var(--rule); color: var(--ink); font-weight: 600; }
.nav a.nav-cta:hover { border-color: var(--ink-faint); background: var(--card); }
.theme-toggle {
  width: 34px; height: 34px; border-radius: var(--radius-pill);
  border: 1px solid var(--rule); display: grid; place-items: center;
  color: var(--ink-muted); font-size: 15px; line-height: 1;
}
.theme-toggle:hover { background: var(--sink); color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding: clamp(36px, 5.5vh, 68px) 0 52px; }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 56px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--act-text);
  background: var(--act-soft); border-radius: var(--radius-pill);
  padding: 5px 12px; margin-bottom: 22px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--act); }
h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(34px, 4.6vw, 56px); line-height: 1.08;
  letter-spacing: -0.02em; margin-bottom: 20px;
}
h1 em { font-style: italic; color: var(--learn); }
.lede {
  font-size: clamp(16px, 1.5vw, 18.5px); color: var(--ink-muted);
  max-width: 34em; margin-bottom: 30px;
}
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: var(--radius-pill);
  font-size: 15px; font-weight: 600; transition: transform .15s ease, background .18s ease, border-color .18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--learn); color: #fff; }
.btn-ghost { border: 1px solid var(--rule); color: var(--ink); background: var(--card); }
.btn-ghost:hover { border-color: var(--ink-faint); }

.hero-mark { display: grid; place-items: center; }
.hero-mark img {
  width: 100%; max-width: 320px; height: auto; aspect-ratio: 1 / 1;
  border-radius: 26px;
  box-shadow: 0 26px 60px -34px rgba(36, 38, 43, .55);
}
.hero-mark figcaption {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-muted); margin-top: 16px;
}

/* ---------- trust strip ---------- */
.trust { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--card); }
.trust .wrap {
  display: flex; flex-wrap: wrap; gap: 10px 34px; justify-content: center;
  padding: 16px 24px; font-size: 13px; color: var(--ink-muted);
}
.trust span { display: inline-flex; align-items: center; gap: 8px; }
.trust span::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--learn); flex: none;
}

/* ---------- sections ---------- */
section { padding: 76px 0; }
.section-head { max-width: 40em; margin-bottom: 40px; }
.section-head h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(26px, 3vw, 36px); line-height: 1.15;
  letter-spacing: -0.015em; margin-bottom: 12px;
}
.section-head p { color: var(--ink-muted); font-size: 16.5px; }
.kicker {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-muted); margin-bottom: 12px;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

.card {
  background: var(--card); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); padding: 26px;
}
.card h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 20px;
  line-height: 1.25; margin-bottom: 9px; letter-spacing: -0.01em;
}
.card p { color: var(--ink-muted); font-size: 14.5px; }
.card .tag {
  display: inline-block; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--learn-text);
  background: var(--learn-soft); border-radius: var(--radius-pill);
  padding: 3px 9px; margin-bottom: 14px;
}

/* modes */
.modes { background: var(--card); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.mode {
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); padding: 28px;
}
.mode h3 {
  font-family: var(--font-display); font-size: 22px; font-weight: 600;
  margin-bottom: 6px; letter-spacing: -0.01em;
}
.mode .sub {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 16px;
}
.mode ul { list-style: none; display: grid; gap: 9px; }
.mode li { position: relative; padding-left: 20px; font-size: 14.5px; color: var(--ink-muted); }
.mode li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 7px; height: 7px; border-radius: 2px; background: var(--learn);
  opacity: .55;
}

/* steps */
#how-it-works { padding-bottom: 44px; }
.step { position: relative; padding-top: 8px; }
.step .num {
  font-family: var(--font-mono); font-size: 12px; color: var(--act-text);
  letter-spacing: .1em; margin-bottom: 10px; display: block;
}
.step h3 {
  font-family: var(--font-display); font-size: 19px; font-weight: 600;
  margin-bottom: 8px; letter-spacing: -0.01em;
}
.step p { color: var(--ink-muted); font-size: 14.5px; }

/* faq */
.faq { max-width: 780px; }
details {
  border-bottom: 1px solid var(--rule); padding: 18px 0;
}
details summary {
  cursor: pointer; list-style: none; display: flex; gap: 14px;
  align-items: baseline; font-weight: 600; font-size: 16px;
  padding: 8px 0; min-height: 44px;   /* 44px touch target on phones */
  transition: color .15s ease;
}
details summary:hover { color: var(--learn-text); }
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: "+"; margin-left: auto; color: var(--ink-muted);
  font-family: var(--font-mono); font-size: 20px; line-height: 1;
}
details[open] summary::after { content: "–"; }
details p { color: var(--ink-muted); font-size: 15px; margin-top: 10px; padding-right: 30px; }

/* signup */
.signup { background: var(--card); border-top: 1px solid var(--rule); }
.signup .wrap { max-width: 720px; text-align: center; }
.signup h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(26px, 3.2vw, 38px); line-height: 1.15;
  letter-spacing: -0.015em; margin-bottom: 12px;
}
.signup p { color: var(--ink-muted); margin-bottom: 26px; }
form.waitlist { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
form.waitlist input[type="email"] {
  flex: 1 1 300px; min-width: 0; padding: 13px 18px;
  border: 1px solid var(--rule); border-radius: var(--radius-pill);
  background: var(--paper); color: var(--ink); font: inherit; font-size: 15px;
}
form.waitlist input[type="email"]:focus { outline: 2px solid var(--learn); outline-offset: 1px; }
form.waitlist .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 13px; color: var(--ink-muted); margin-top: 14px; }
.signup p { max-width: 36em; margin-left: auto; margin-right: auto; }
form.waitlist input[type="email"]::placeholder { color: var(--ink-muted); opacity: .75; }
.form-status { margin-top: 16px; font-size: 14.5px; min-height: 1.4em; }
.form-status.ok { color: var(--learn-text); }
.form-status.err { color: var(--act-text); }

/* footer */
.site-footer { border-top: 1px solid var(--rule); padding: 34px 0 44px; }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center;
  font-size: 13px; color: var(--ink-muted);
}
.site-footer .brand img { width: 26px; height: 26px; border-radius: 7px; }
.site-footer .brand .word { font-size: 16px; }
.site-footer nav { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.site-footer a { color: var(--ink-muted); }
/* keep footer links at a 24px+ touch target without changing the visual rhythm */
.site-footer nav a, .site-footer .brand { padding: 4px 0; min-height: 28px; display: inline-flex; align-items: center; }
.site-footer a:hover { color: var(--ink); }

/* legal pages */
.legal { padding: 56px 0 80px; }
.legal .wrap { max-width: 760px; }
.legal h1 {
  font-family: var(--font-display); font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 600; letter-spacing: -0.02em; margin-bottom: 8px;
}
.legal .updated {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-muted); margin-bottom: 34px;
}
.legal h2 {
  font-family: var(--font-display); font-size: 21px; font-weight: 600;
  margin: 34px 0 10px; letter-spacing: -0.01em;
}
.legal p, .legal li { color: var(--ink-muted); font-size: 15px; }
.legal p + p { margin-top: 12px; }
.legal ul { margin: 10px 0 0 20px; display: grid; gap: 6px; }
.legal a { color: var(--learn-text); }
.legal .back { display: inline-block; margin-top: 40px; font-size: 14px; }

/* ---------- responsive ----------
   Tiers: phone <=640 · tablet 641-900 · laptop 901-1599 · HD >=1600 · 4K >=2200.
   Every tier must keep zero horizontal overflow and a 1:1 hero mark. */

/* HD and up: widen the measure and scale type with the screen */
@media (min-width: 1600px) {
  :root { --wrap: 1160px; }
  body { font-size: 16.5px; }
  .hero .wrap { gap: 64px; }
  .hero-mark img { max-width: 360px; }
  .card { padding: 30px; }
  .card p, .mode li, .step p { font-size: 15px; }
}

/* 4K: the page must not read as a postage stamp in the middle of the screen */
@media (min-width: 2200px) {
  :root { --wrap: 1560px; }
  body { font-size: 19px; }
  h1 { font-size: clamp(64px, 3.2vw, 88px); }
  .section-head h2 { font-size: clamp(38px, 2vw, 52px); }
  .section-head p { font-size: 19px; }
  .hero .wrap { gap: 80px; }
  .hero-mark img { max-width: 480px; }
  section { padding: 96px 0; }
  .card { padding: 40px; }
  .card h3 { font-size: 25px; }
  .card p, .mode li, .step p { font-size: 17px; }
  .mode h3 { font-size: 27px; }
  .step h3 { font-size: 24px; }
  details summary { font-size: 19px; }
  details p { font-size: 17.5px; }
  .btn { padding: 16px 30px; font-size: 17px; }
  .nav a { font-size: 16px; }
  .brand .word { font-size: 25px; }
  .brand img { width: 44px; height: 44px; }
  .trust .wrap { font-size: 15px; }
}

/* tablet and below: one column for the hero and the three-step row */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; }
  .hero-mark { order: 0; justify-items: start; }
  .hero-mark img { max-width: 200px; }
  .grid-3 { grid-template-columns: 1fr; gap: 26px; }
  section { padding: 56px 0; }
  .hero { padding: 44px 0 40px; }
  .section-head { margin-bottom: 32px; }
}

/* small tablet / large phone: the 2x2 card grid collapses */
@media (max-width: 760px) {
  .grid-2 { grid-template-columns: 1fr; }
  .hero-mark img { max-width: 168px; }
}

/* phone */
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .nav { display: none; }
  .site-header .wrap { min-height: 58px; }
  .btn { width: 100%; justify-content: center; }
  .cta-row { flex-direction: column; align-items: stretch; }
  form.waitlist { flex-direction: column; }
  form.waitlist .btn { width: 100%; }
  .site-footer nav { margin-left: 0; }
  .site-footer .wrap { gap: 10px 18px; }
  section { padding: 44px 0; }
  .hero { padding: 32px 0 32px; }
  .card, .mode { padding: 22px; }
  .hero-mark img { max-width: 148px; }
  .trust .wrap { justify-content: flex-start; gap: 8px 20px; font-size: 12.5px; }
  .legal { padding: 36px 0 56px; }
}

/* very small phones (iPhone SE, 320px) */
@media (max-width: 360px) {
  .wrap { padding: 0 14px; }
  h1 { font-size: 30px; }
  .eyebrow { font-size: 10.5px; letter-spacing: .05em; padding: 4px 10px; }
  .brand .word { font-size: 18px; }
  .card, .mode { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
