/* ============================================================
   OpenAcademy — design tokens & foundation
   Mirrors tokens.json / SKILL.md
   ============================================================ */
:root {
  /* Brand */
  --oa-dark-blue: #071749;
  --oa-magenta:   #D83366;
  --oa-light-blue:#64B8F2;
  --oa-yellow:    #F9B01C;
  --oa-green:     #23A564;

  /* Action / interactive */
  --oa-primary:        #2548DB;
  --oa-primary-hover:  #183094;
  --oa-primary-label:  #FFFFFF;

  /* Text */
  --oa-text:           #040D2A;
  --oa-text-secondary: #43464A;
  --oa-text-tertiary:  #595E62;
  --oa-text-inverse:   #FFFFFF;
  --oa-text-selected:  #014977;

  /* Surfaces & borders */
  --oa-bg-base:      #F9F9F9;
  --oa-bg-alt:       #FFFFFF;
  --oa-bg-dark:      #040D2A;
  --oa-bg-dark-alt:  #111935;
  --oa-bg-highlight: #B0C2F7;
  --oa-tint-blue-50:  #F8F9FF;
  --oa-tint-blue-100: #E0E4FF;
  --oa-tint-blue-200: #D0D5EE;
  --oa-border-weak:  #E9EBED;
  --oa-border-medium:#D8DCDE;

  /* Type */
  --oa-font-display: "Poppins", system-ui, sans-serif;
  --oa-font-body:    "Poppins", system-ui, sans-serif;
  --oa-font-accent:  "Lora", Georgia, serif;

  /* Spacing */
  --oa-space-2xs: 4px;  --oa-space-xs: 8px;  --oa-space-sm: 12px;
  --oa-space-md: 16px;  --oa-space-lg: 24px; --oa-space-xl: 32px;
  --oa-space-2xl: 48px; --oa-space-3xl: 64px;

  /* Radius & elevation */
  --oa-radius-sm: 8px;
  --oa-radius-md: 16px;
  --oa-radius-lg: 24px;
  --oa-radius-full: 9999px;
  --oa-shadow-ambient: 0 0 42px 8px rgba(89,89,90,0.15);
  --oa-shadow-card: 0 1px 2px rgba(7,23,73,0.04), 0 8px 28px -12px rgba(7,23,73,0.14);

  /* Layout */
  --oa-maxw: 1200px;
  --oa-gutter: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--oa-font-body);
  color: var(--oa-text);
  background: var(--oa-bg-base);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---------- Type ---------- */
.display {
  font-family: var(--oa-font-display);
  font-weight: 700;
  font-size: clamp(38px, 5.6vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
}
h1, .h1 {
  font-family: var(--oa-font-display);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
}
h2, .h2 {
  font-family: var(--oa-font-display);
  font-weight: 600;
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
h3, .h3 {
  font-family: var(--oa-font-display);
  font-weight: 600;
  font-size: clamp(20px, 2.2vw, 24px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0;
}
.h4 {
  font-family: var(--oa-font-display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.4;
  margin: 0;
}
.lead {
  font-size: clamp(18px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--oa-text-secondary);
  margin: 0;
}
p { margin: 0; }
.muted { color: var(--oa-text-secondary); }

/* Eyebrow — Lora italic label, brand signature */
.eyebrow {
  font-family: var(--oa-font-accent);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--oa-primary);
  margin: 0 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  flex: none;
}
.eyebrow.on-dark { color: var(--oa-light-blue); }
.eyebrow.centered { justify-content: center; }

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--oa-maxw);
  margin: 0 auto;
  padding-inline: var(--oa-gutter);
}
.wrap-narrow { max-width: 880px; }

section { position: relative; }
.section {
  padding-block: clamp(64px, 9vw, 116px);
}
.section.dark {
  background: var(--oa-bg-dark);
  color: var(--oa-text-inverse);
}
.section.tint { background: var(--oa-tint-blue-50); }
.section.head {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.section-intro { max-width: 720px; }
.section-intro.centered { margin-inline: auto; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 54px;
  padding: 0 32px;
  border-radius: var(--oa-radius-full);
  font-family: var(--oa-font-display);
  font-weight: 500;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s cubic-bezier(.2,.8,.2,1),
              box-shadow .2s cubic-bezier(.2,.8,.2,1),
              transform .15s cubic-bezier(.2,.8,.2,1),
              color .2s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary {
  background: var(--oa-primary);
  color: var(--oa-primary-label);
  box-shadow: 0 8px 24px -10px rgba(37,72,219,.45);
}
.btn-primary:hover { background: var(--oa-primary-hover); transform: translateY(-1px); }
/* press feedback — scale overrides any hover lift so every press is felt (incl. touch) */
.btn:active { transform: scale(0.97); }
.btn-secondary {
  background: var(--oa-bg-alt);
  color: var(--oa-primary);
  border: 1px solid var(--oa-border-medium);
}
.btn-secondary:hover { border-color: var(--oa-primary); transform: translateY(-1px); }
/* on dark */
.on-dark .btn-secondary,
.btn-secondary.on-dark {
  background: transparent;
  color: var(--oa-bg-highlight);
  border: 1px solid rgba(176,194,247,.35);
}
.on-dark .btn-secondary:hover,
.btn-secondary.on-dark:hover { border-color: var(--oa-bg-highlight); background: rgba(176,194,247,.08); }
.btn-sm { height: 44px; padding: 0 22px; font-size: 15px; }

/* ---------- Chips / tags ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 16px;
  border-radius: var(--oa-radius-full);
  font-size: 14px;
  font-weight: 500;
  background: var(--oa-bg-alt);
  color: var(--oa-text);
  border: 1px solid var(--oa-border-weak);
}
.chip.solid { background: var(--oa-tint-blue-100); border-color: transparent; color: var(--oa-text-selected); }
.chip.on-dark {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(176,194,247,.22);
  color: #DDE6FF;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--oa-green); flex: none; }

/* Check pill (highlights) */
.checkrow { display: flex; flex-wrap: wrap; gap: 12px; }
.checkpill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 14px;
  border-radius: var(--oa-radius-full);
  font-weight: 500; font-size: 15px;
}
.on-dark .checkpill { background: rgba(255,255,255,.05); border: 1px solid rgba(176,194,247,.18); color: #EAF0FF; }
.checkpill svg { width: 18px; height: 18px; flex: none; }

/* ---------- Logo mark ---------- */
.oa-mark { display: block; }
.oa-lockup { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.oa-lockup .word {
  font-family: var(--oa-font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 24px;
  color: var(--oa-dark-blue);
}
.oa-lockup.inverse .word { color: #fff; }
.oa-logo-img { display: block; height: auto; max-width: 100%; }

/* ---------- Cards ---------- */
.card {
  background: var(--oa-bg-alt);
  border: 1px solid var(--oa-border-weak);
  border-radius: var(--oa-radius-md);
  padding: 28px;
  transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s cubic-bezier(.2,.8,.2,1);
}
.card.hover:hover { transform: translateY(-3px); box-shadow: var(--oa-shadow-card); }

/* ---------- Decorative motifs ---------- */
.motif { position: absolute; pointer-events: none; z-index: 0; }
[data-motifs="off"] .motif { display: none; }

/* ---------- Reveal animation ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
  .reveal.in { opacity: 1; transform: none; }
}

/* ============================================================
   Accent emphasis tweak
   ============================================================ */
[data-accent="restrained"] { /* accents muted; lean navy/blue */ }
[data-accent="bright"] { /* accents amplified */ }

/* ============================================================
   Accessibility — visible keyboard focus + reduced motion
   ============================================================ */
:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--oa-primary);
  outline-offset: 3px;
  border-radius: 6px;
}
/* lighter brand blue for focus on dark surfaces */
.nav :focus-visible,
.footer :focus-visible,
.finalcta :focus-visible,
.section.dark :focus-visible {
  outline-color: var(--oa-light-blue);
}
.btn:focus-visible { outline-offset: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
