/* Cadence design system — see BRAND-GUIDE.md */
:root {
  /* Core palette */
  --cad-navy-900: #0E1B3D;
  --cad-navy-800: #16265C;
  --cad-navy-700: #1F3375;
  --cad-blue-600: #1E66C8;
  --cad-blue-500: #2D7DE0;
  --cad-blue-400: #5B9CEA;
  --cad-blue-100: #E3EEFB;
  --cad-blue-50: #F2F7FD;
  /* Neutrals */
  --cad-ink-900: #101828;
  --cad-ink-700: #344054;
  --cad-ink-500: #667085;
  --cad-ink-300: #D0D5DD;
  --cad-ink-100: #F2F4F7;
  --cad-white: #FFFFFF;
  /* Semantic */
  --cad-success: #12805C;
  --cad-warning: #B54708;
  --cad-danger: #B42318;
  --cad-gold: #C9A227;
  /* Tokens */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgb(16 24 40 / .06);
  --shadow-md: 0 4px 12px rgb(16 24 40 / .08);
  --shadow-lg: 0 12px 32px rgb(16 24 40 / .12);
  --gradient-brand: linear-gradient(135deg, #16265C 0%, #1E66C8 100%);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: Inter, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--cad-ink-700);
  background: var(--cad-white);
}

img { max-width: 100%; display: block; }

a { color: var(--cad-blue-600); }

:focus-visible {
  outline: 2px solid var(--cad-blue-500);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Allow grid/flex children to shrink below their content width on small screens */
.hero-grid > *,
.card-grid > *,
.audience-grid > *,
.split-grid > *,
.footer-grid > * { min-width: 0; }

.overline {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cad-blue-500);
  margin-bottom: 12px;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--cad-ink-100);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo { height: 48px; width: auto; }

.brand-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--cad-navy-800);
}

.nav-links {
  display: none;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--cad-ink-700);
  font-weight: 500;
  font-size: 15px;
  transition: color .2s var(--ease);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--cad-blue-600); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

/* Header CTA is hidden on small screens; the mobile menu carries the CTA instead */
.nav-actions .nav-cta { display: none; }

@media (min-width: 640px) {
  .nav-actions .nav-cta { display: inline-flex; }
}

.mobile-menu .menu-cta { margin-top: 12px; width: 100%; }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--cad-ink-300);
  border-radius: var(--radius-sm);
  background: var(--cad-white);
  cursor: pointer;
  color: var(--cad-navy-800);
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--cad-ink-100);
  background: var(--cad-white);
  padding: 12px 24px 20px;
}

.mobile-menu.open { display: block; }

.mobile-menu ul { list-style: none; display: grid; gap: 4px; }

.mobile-menu a {
  display: block;
  padding: 12px 8px;
  font-weight: 500;
  text-decoration: none;
  color: var(--cad-ink-700);
  border-radius: var(--radius-sm);
}

.mobile-menu a:hover { background: var(--cad-blue-50); color: var(--cad-blue-600); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}

.btn-primary { background: var(--cad-blue-500); color: var(--cad-white); }

.btn-primary:hover {
  background: var(--cad-blue-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--cad-white);
  color: var(--cad-navy-800);
  border-color: var(--cad-ink-300);
}

.btn-secondary:hover { background: var(--cad-blue-50); }

.btn-light { background: var(--cad-white); color: var(--cad-navy-800); }

.btn-light:hover { background: var(--cad-blue-100); transform: translateY(-2px); }

.btn-ghost-light {
  background: transparent;
  color: var(--cad-white);
  border-color: rgb(255 255 255 / .4);
}

.btn-ghost-light:hover { background: rgb(255 255 255 / .1); }

.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

/* ---------- Hero ---------- */
.hero {
  background: var(--gradient-brand);
  color: var(--cad-white);
  padding: 72px 0 88px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgb(91 156 234 / .25), transparent 70%);
  pointer-events: none;
}

.hero-grid { display: grid; gap: 48px; align-items: center; }

.hero .overline { color: var(--cad-blue-400); }

.hero h1 {
  font-size: clamp(36px, 5.5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero h1 .accent { color: var(--cad-blue-400); }

.hero p.lede {
  font-size: 18px;
  color: rgb(255 255 255 / .85);
  max-width: 540px;
  margin-bottom: 32px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 36px;
  font-size: 14px;
  color: rgb(255 255 255 / .75);
}

.hero-meta strong { color: var(--cad-white); font-size: 22px; display: block; }

/* Compact hero variant for subpages */
.hero.hero-sub { padding: 56px 0 64px; }

/* ---------- Preview / mock cards ---------- */
.preview-card {
  background: var(--cad-white);
  color: var(--cad-ink-700);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  max-width: 480px;
  justify-self: center;
  width: 100%;
}

.preview-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--cad-ink-900);
  margin-bottom: 4px;
}

.preview-card .sub { font-size: 13px; color: var(--cad-ink-500); margin-bottom: 18px; }

.lesson-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--cad-ink-100);
  margin-bottom: 10px;
}

.lesson-row .dot {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.dot-done { background: #E3F6EE; color: var(--cad-success); }
.dot-active { background: var(--cad-blue-100); color: var(--cad-blue-600); }
.dot-locked { background: var(--cad-ink-100); color: var(--cad-ink-500); }
.dot-warn { background: #FCEEE3; color: var(--cad-warning); }

.lesson-row .info { flex: 1; min-width: 0; }
.lesson-row .title { font-size: 14px; font-weight: 600; color: var(--cad-ink-900); display: block; }
.lesson-row .meta { font-size: 12px; color: var(--cad-ink-500); display: block; }

.chip {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.chip-success { background: #E3F6EE; color: var(--cad-success); }
.chip-info { background: var(--cad-blue-100); color: var(--cad-blue-600); }
.chip-gold { background: #FAF3DC; color: #8A6D14; }
.chip-warn { background: #FCEEE3; color: var(--cad-warning); }

.progress {
  margin-top: 8px;
  background: var(--cad-ink-100);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--cad-blue-500);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--cad-ink-500);
  margin-top: 6px;
}

/* ---------- Sections ---------- */
section { padding: 80px 0; }

.section-head { max-width: 640px; margin-bottom: 48px; }

.section-head h2 {
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--cad-ink-900);
  margin-bottom: 12px;
}

.tinted { background: var(--cad-blue-50); }

/* Feature cards */
.card-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }

.card {
  background: var(--cad-white);
  border: 1px solid var(--cad-ink-100);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}

.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.card .icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--cad-blue-100);
  color: var(--cad-blue-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.card h3 {
  font-size: 19px;
  font-weight: 600;
  color: var(--cad-ink-900);
  margin-bottom: 8px;
}

.card p { font-size: 15px; color: var(--cad-ink-500); }

/* Two-column feature/visual split for subpages */
.split-grid {
  display: grid;
  gap: 40px;
  align-items: center;
  grid-template-columns: 1fr;
}

.split-grid .copy h3 {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 700;
  color: var(--cad-ink-900);
  margin-bottom: 10px;
}

.split-grid .copy p { margin-bottom: 16px; }

.split-grid ul.checks { list-style: none; display: grid; gap: 12px; margin: 8px 0 0; }

.split-grid ul.checks li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 15px;
}

.split-grid ul.checks svg { flex-shrink: 0; margin-top: 4px; color: var(--cad-blue-500); }

/* Audience split */
.audience-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }

.audience-card {
  border-radius: var(--radius-lg);
  padding: 36px;
  color: var(--cad-white);
  background: var(--cad-navy-800);
}

.audience-card.alt { background: var(--gradient-brand); }

.audience-card h3 { font-size: 24px; font-weight: 700; margin-bottom: 12px; }

.audience-card ul { list-style: none; margin: 20px 0 28px; display: grid; gap: 12px; }

.audience-card li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 15px;
  color: rgb(255 255 255 / .9);
}

.audience-card li svg { flex-shrink: 0; margin-top: 3px; color: var(--cad-blue-400); }

/* CTA band */
.cta-band {
  background: var(--gradient-brand);
  border-radius: var(--radius-lg);
  color: var(--cad-white);
  padding: 56px 32px;
  text-align: center;
}

.cta-band h2 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.cta-band p { color: rgb(255 255 255 / .85); margin-bottom: 28px; }

/* ---------- Contact modal + form ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  background: rgb(14 27 61 / .55);
  backdrop-filter: blur(3px);
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--cad-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  padding: 32px;
  margin: auto 0;
  position: relative;
}

.modal h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--cad-ink-900);
  margin-bottom: 6px;
}

.modal .modal-sub { font-size: 15px; color: var(--cad-ink-500); margin-bottom: 24px; }

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--cad-ink-500);
  font-size: 22px;
  line-height: 1;
}

.modal-close:hover { background: var(--cad-ink-100); color: var(--cad-ink-900); }

.form-grid { display: grid; gap: 18px; }

.form-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--cad-ink-900);
  margin-bottom: 6px;
}

.form-field label .req { color: var(--cad-danger); }

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--cad-ink-900);
  background: var(--cad-white);
  border: 1px solid var(--cad-ink-300);
  border-radius: var(--radius-sm);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.form-field textarea { resize: vertical; min-height: 96px; }

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--cad-blue-500);
  box-shadow: 0 0 0 3px var(--cad-blue-100);
}

.form-field .help { font-size: 13px; color: var(--cad-ink-500); margin-top: 4px; }

.form-status {
  display: none;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
}

.form-status.success { display: block; background: #E3F6EE; color: var(--cad-success); }
.form-status.error { display: block; background: #FBEAE9; color: var(--cad-danger); }

/* Honeypot — hidden from humans, visible to bots */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--cad-navy-900);
  color: rgb(255 255 255 / .75);
  padding: 56px 0 32px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  margin-bottom: 40px;
}

.footer-brand .brand-name { color: var(--cad-white); }

.footer-logo-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cad-white);
  border-radius: var(--radius-sm);
  padding: 6px;
}

.site-footer h4 {
  color: var(--cad-white);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.site-footer ul { list-style: none; display: grid; gap: 10px; }

.site-footer a { color: rgb(255 255 255 / .75); text-decoration: none; }

.site-footer a:hover { color: var(--cad-white); }

.footer-bottom {
  border-top: 1px solid rgb(255 255 255 / .12);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

@media (min-width: 768px) {
  .audience-grid { grid-template-columns: 1fr 1fr; }
  .split-grid { grid-template-columns: 1fr 1fr; }
  .split-grid.flip .copy { order: 2; }
  .split-grid.flip .visual { order: 1; }
}

@media (min-width: 1024px) {
  .nav-links { display: flex; }
  .menu-toggle { display: none; }
  .mobile-menu { display: none !important; }
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
