/* ==========================================================================
   enrolled.ai — landing page
   Palette and type mirror frontend/src/theme/brand.ts (single brand system).
   ========================================================================== */

/* ---- Fonts (self-hosted, variable) ---- */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/site/fonts/space-grotesk-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/site/fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
}

/* ---- Tokens ---- */
:root {
  --ink: #15110D;
  --ink-soft: #241E17;
  --paper: #FBF8F4;
  --warm: #F4EDE3;
  --orange: #EE7E1F;
  --orange-deep: #DC6510;
  --orange-dark: #C05509;
  --orange-light: #F8AE55;
  --accent-on-dark: #F8923C;
  --accent-on-light: #A84708;

  --text-on-dark: #EDE6DC;
  --muted-on-dark: #B3A99B;
  --text-on-light: #2A241E;
  --muted-on-light: #5D554B;
  --hairline-light: #E6DDD0;
  --hairline-dark: #332B22;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Space Grotesk', var(--font-body);

  --container: 1120px;
  --radius: 14px;
  --shadow-card: 0 1px 2px rgba(21, 17, 13, 0.05), 0 12px 32px -12px rgba(21, 17, 13, 0.12);
}

/* ---- Reset / base ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
/* Anchor targets must clear the 72px sticky nav */
[id] { scroll-margin-top: 88px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-on-light);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.12;
  text-wrap: balance;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---- Microlabel (figure-annotation style) ---- */
.microlabel {
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-on-light);
  margin-bottom: 1rem;
}
.microlabel-dark { color: var(--accent-on-dark); }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 1rem 1.9rem; font-size: 1.0625rem; }

.btn-primary {
  background: linear-gradient(180deg, var(--orange-deep), var(--orange-dark));
  color: #fff;
}
.btn-primary:hover { background: linear-gradient(180deg, var(--orange), var(--orange-deep)); }

.btn-outline {
  border-color: rgba(237, 230, 220, 0.45);
  color: var(--text-on-dark);
}
.btn-outline:hover { border-color: var(--text-on-dark); }

.btn-ghost { color: var(--text-on-dark); padding: 0.8rem 1rem; }
.btn-ghost:hover { color: #fff; }

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(21, 17, 13, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline-dark);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 72px;
}
.nav-logo { flex: none; }
.nav-logo img { height: 30px; width: auto; }

.nav-links {
  display: flex;
  gap: 1.75rem;
  margin-left: auto;
}
.nav-links a {
  color: var(--muted-on-dark);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: #fff; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---- Hero ---- */
.hero {
  background:
    radial-gradient(1100px 560px at 72% -12%, rgba(238, 126, 31, 0.20), transparent 62%),
    radial-gradient(700px 420px at 8% 110%, rgba(220, 101, 16, 0.10), transparent 60%),
    var(--ink);
  color: var(--text-on-dark);
  padding: clamp(4.5rem, 10vw, 8rem) 0 clamp(4.5rem, 9vw, 7.5rem);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.4rem, 5.2vw, 3.9rem);
  font-weight: 600;
  margin-bottom: 1.4rem;
}
.hero-sub {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  color: var(--muted-on-dark);
  max-width: 34em;
  margin-bottom: 2.2rem;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 1.6rem; }
.hero-note { font-size: 0.875rem; color: var(--muted-on-dark); }

/* ---- Hero scan card ---- */
.hero-visual { display: flex; justify-content: center; }
.scan-card {
  width: min(100%, 380px);
  background: rgba(36, 30, 23, 0.72);
  border: 1px solid rgba(248, 174, 85, 0.22);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: 0 24px 64px -24px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}
.scan-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.1rem;
}
.scan-card-title {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-on-dark);
}
.scan-badge {
  font-size: 0.6875rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-on-dark);
  border: 1px solid rgba(248, 146, 60, 0.45);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
}
.scan-disc {
  height: 210px;
  border-radius: 10px;
  background: #0E0B08;
  margin-bottom: 1.1rem;
  overflow: hidden;
}
/* Real ultra-widefield fundus photograph, cropped to fill the frame */
.scan-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 48%;
  display: block;
}
.scan-rows { display: flex; flex-direction: column; }
.scan-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0;
  border-top: 1px solid rgba(237, 230, 220, 0.09);
}
.scan-row dt {
  font-size: 0.8125rem;
  color: var(--muted-on-dark);
  flex: none;
}
.scan-row dd {
  font-size: 0.875rem;
  color: var(--text-on-dark);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-align: right;
}
.scan-row dd strong { color: #fff; font-size: 1rem; }
.conf-bar {
  width: 92px;
  height: 6px;
  border-radius: 999px;
  background: rgba(237, 230, 220, 0.14);
  overflow: hidden;
}
.conf-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange-deep), var(--orange-light));
}
.conf-num { font-variant-numeric: tabular-nums; }
.scan-flag { color: var(--accent-on-dark); font-weight: 600; }

/* ---- Sections ---- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-paper { background: var(--paper); }
.section-warm { background: var(--warm); }

.section h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 600;
  max-width: 22em;
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
}
.section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.55rem;
}
.section p { color: var(--muted-on-light); }

/* ---- Problem pillars ---- */
.col-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.pillar {
  border-top: 2px solid var(--orange);
  padding-top: 1.25rem;
}

/* ---- Steps ---- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
  counter-reset: step;
}
.step {
  background: #fff;
  border: 1px solid var(--hairline-light);
  border-radius: var(--radius);
  padding: 1.75rem 1.6rem;
  box-shadow: var(--shadow-card);
}
.step-num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  color: var(--accent-on-light);
  margin-bottom: 1.1rem;
}
.step p { font-size: 0.9688rem; }

/* ---- Reading centers split ---- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.split-copy h2 { margin-bottom: 1.4rem; }
.split-copy p + p { margin-top: 1rem; }

.feature-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
}
.feature-list li {
  background: #fff;
  border: 1px solid var(--hairline-light);
  border-left: 3px solid var(--orange);
  border-radius: 10px;
  padding: 1.25rem 1.25rem 1.1rem;
  box-shadow: var(--shadow-card);
}
.feature-list h3 { font-size: 1rem; }
.feature-list p { font-size: 0.9063rem; }

/* ---- Platform ---- */
.col-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
}
.plat-card {
  background: #fff;
  border: 1px solid var(--hairline-light);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  box-shadow: var(--shadow-card);
}
.plat-card p { font-size: 0.9063rem; }

/* ---- CTA band ---- */
.cta-band {
  background:
    radial-gradient(900px 460px at 50% -30%, rgba(238, 126, 31, 0.22), transparent 65%),
    var(--ink);
  padding: clamp(4.5rem, 9vw, 7rem) 0;
  text-align: center;
}
.cta-inner { max-width: 42rem; }
.cta-band h2 {
  color: #fff;
  font-size: clamp(1.85rem, 3.6vw, 2.6rem);
  font-weight: 600;
  margin-bottom: 1rem;
}
.cta-band p {
  color: var(--muted-on-dark);
  margin-bottom: 2.2rem;
  font-size: 1.0938rem;
}

/* ---- Footer ---- */
.footer {
  background: var(--ink);
  border-top: 1px solid var(--hairline-dark);
  color: var(--muted-on-dark);
  padding: 3.5rem 0 2rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2.5rem;
  flex-wrap: wrap;
  padding-bottom: 2.25rem;
}
.footer-brand p {
  font-size: 0.9063rem;
  margin-top: 0.9rem;
  max-width: 24em;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-links a {
  color: var(--muted-on-dark);
  text-decoration: none;
  font-size: 0.9063rem;
}
.footer-links a:hover { color: #fff; }
.footer-legal {
  border-top: 1px solid var(--hairline-dark);
  padding-top: 1.5rem;
}
.footer-legal p { font-size: 0.8125rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { justify-content: flex-start; }
  .col-3, .steps { grid-template-columns: 1fr 1fr; }
  .col-4 { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-inner { justify-content: space-between; }
  .nav-actions { margin-left: auto; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .col-3, .steps, .col-4, .feature-list { grid-template-columns: 1fr; }
  .hero-ctas .btn { width: 100%; text-align: center; }
  .footer-inner { flex-direction: column; }
}
