/* =============================================================
   Shaswath Academy — Design System
   Pure CSS. Two complete themes via html[data-theme].
   Fraunces (display) + Manrope (body/UI). Restrained gold/green.
   Author: design engineering · 2026
   ============================================================= */

/* -------------------------------------------------------------
   1. TOKENS
   ------------------------------------------------------------- */

:root {
  /* Fluid type scale (clamp: min, preferred, max) */
  --step-eyebrow: 0.78rem;
  --step-small:   clamp(0.85rem, 0.82rem + 0.15vw, 0.95rem);
  --step-body:    clamp(1rem, 0.96rem + 0.28vw, 1.125rem);
  --step-lead:    clamp(1.125rem, 1.03rem + 0.5vw, 1.35rem);
  --step-h4:      clamp(1.2rem, 1.08rem + 0.55vw, 1.5rem);
  --step-h3:      clamp(1.4rem, 1.15rem + 1.1vw, 1.95rem);
  --step-h2:      clamp(2rem, 1.55rem + 2.1vw, 3rem);
  --step-h1:      clamp(2.6rem, 1.75rem + 3.9vw, 4.6rem);
  --step-display: clamp(3.4rem, 2.2rem + 6vw, 7rem);

  /* Spacing rhythm */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs:  0.75rem;
  --space-s:   1rem;
  --space-m:   1.5rem;
  --space-l:   2.25rem;
  --space-xl:  3.5rem;
  --space-2xl: 5rem;
  --space-3xl: clamp(4rem, 2.5rem + 6vw, 8.5rem);

  /* Structure */
  --container:      1240px;
  --container-tight: 900px;
  --gutter:         clamp(1.25rem, 0.75rem + 2.4vw, 3rem);
  --radius:         14px;
  --radius-s:       9px;
  --radius-pill:    999px;
  --hairline:       1px;

  /* Fonts */
  --font-display: "Fraunces", "Times New Roman", Georgia, serif;
  --font-body:    "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Motion */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:   0.25s;
  --dur:        0.4s;
  --dur-slow:   0.7s;

  /* Layering */
  --z-grain:  1;
  --z-nav:    100;
  --z-menu:   110;
  --z-bubble: 90;
  --z-skip:   200;
}

/* ---- Theme A — Dark Academic Luxe ---- */
html[data-theme="dark"] {
  --bg:           #0D0E11;
  --bg-elevated:  #15171C;
  --bg-subtle:    #1C1F26;
  --text:         #EDE8DC;
  --text-muted:   #B0A99C;   /* lightened from #9B958A for AA on near-black */
  --accent:       #C9A227;   /* antique gold */
  --accent-2:     #C9A227;   /* single accent family in dark */
  --accent-strong:#DDB53A;   /* hover lift on gold */
  --accent-soft:  rgba(201, 162, 39, 0.13);
  --accent-line:  rgba(201, 162, 39, 0.42);
  --line:         #2A2D35;
  --line-strong:  #3A3E48;
  --scrim:        rgba(9, 10, 13, 0.72);
  --scrim-soft:   linear-gradient(90deg, rgba(9,10,13,0.94) 0%, rgba(9,10,13,0.7) 42%, rgba(9,10,13,0.28) 100%);

  --btn-primary-bg:   #C9A227;
  --btn-primary-text: #14110A;
  --btn-primary-hover:#DDB53A;

  --shadow-card: 0 1px 0 rgba(255,255,255,0.03), 0 18px 46px -24px rgba(0,0,0,0.85);
  --shadow-lift: 0 1px 0 rgba(255,255,255,0.05), 0 30px 64px -28px rgba(0,0,0,0.9);
  --grain-opacity: 0.05;
  --placeholder-1: #191B21;
  --placeholder-2: #24262E;

  color-scheme: dark;
}

/* ---- Theme B — Light Editorial Premium ---- */
html[data-theme="light"] {
  --bg:           #F7F3EA;
  --bg-elevated:  #FFFDF7;
  --bg-subtle:    #EFE9DB;
  --text:         #1C2B24;
  --text-muted:   #545E57;   /* darkened slightly for AA on ivory */
  --accent:       #1E5A3F;   /* deep pine green */
  --accent-2:     #8A6E15;   /* gold flourish, darkened for AA on ivory */
  --accent-strong:#17492F;
  --accent-soft:  rgba(30, 90, 63, 0.08);
  --accent-line:  rgba(138, 110, 21, 0.5);
  --line:         #DAD2C0;
  --line-strong:  #C6BBA2;
  --scrim:        rgba(247, 243, 234, 0.6);
  --scrim-soft:   linear-gradient(90deg, rgba(247,243,234,0.96) 0%, rgba(247,243,234,0.72) 44%, rgba(247,243,234,0.3) 100%);

  --btn-primary-bg:   #1E5A3F;
  --btn-primary-text: #FFFDF7;
  --btn-primary-hover:#17492F;

  --shadow-card: 0 1px 0 rgba(255,255,255,0.6), 0 16px 40px -26px rgba(40,54,45,0.5);
  --shadow-lift: 0 1px 0 rgba(255,255,255,0.7), 0 28px 56px -28px rgba(40,54,45,0.55);
  --grain-opacity: 0.035;
  --placeholder-1: #ECE4D2;
  --placeholder-2: #E2D8C2;

  color-scheme: light;
}

/* -------------------------------------------------------------
   2. RESET & BASE
   ------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-body);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100dvh;
  transition: background-color var(--dur) var(--ease-inout),
              color var(--dur) var(--ease-inout);
}

img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

ul, ol { list-style: none; padding: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

::selection { background: var(--accent-soft); color: var(--text); }

/* Paper-grain overlay (both themes, subtle, non-interactive) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* -------------------------------------------------------------
   3. TYPOGRAPHY
   ------------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  font-optical-sizing: auto;
  color: var(--text);
  text-wrap: balance;
}

h1 { font-size: var(--step-h1); }
h2 { font-size: var(--step-h2); line-height: 1.1; }
h3 { font-size: var(--step-h3); line-height: 1.15; }
h4 { font-size: var(--step-h4); line-height: 1.25; letter-spacing: -0.01em; }

p { max-width: 68ch; }

strong, b { font-weight: 700; }
em { font-style: italic; }

.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-display);
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.serif-italic {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
}

/* Emphasis within a serif headline: same family, italic (never mixed serif into sans) */
.hl-accent {
  font-style: italic;
  color: var(--accent);
  /* descender clearance for y/g/j/p/q in italic display */
  line-height: 1.1;
  padding-bottom: 0.04em;
  display: inline-block;
}

.lead {
  font-size: var(--step-lead);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 60ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-size: var(--step-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 1.9rem;
  height: 1px;
  background: var(--accent-line);
}
.eyebrow.no-rule::before { display: none; }

.muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }

/* -------------------------------------------------------------
   4. LAYOUT PRIMITIVES
   ------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container.tight { max-width: var(--container-tight); }

.section {
  position: relative;
  padding-block: var(--space-3xl);
}
.section.bg-subtle { background: var(--bg-subtle); }
.section.bg-elevated { background: var(--bg-elevated); }
.section.compact { padding-block: var(--space-2xl); }

.stack > * + * { margin-top: var(--space-s); }
.stack-l > * + * { margin-top: var(--space-l); }

.grid { display: grid; gap: var(--space-l); }

/* -------------------------------------------------------------
   5. SIGNATURE MOTIFS — rules, ticks, section headers
   ------------------------------------------------------------- */

/* Hairline gold rule */
.rule-gold {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-line), transparent);
  width: 100%;
}

/* Framed block with corner ticks (ledger/registry aesthetic) */
.ticked {
  position: relative;
}
.ticked::before,
.ticked::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--accent-line);
  border-style: solid;
  pointer-events: none;
}
.ticked::before { top: 0; left: 0; border-width: 1px 0 0 1px; }
.ticked::after  { bottom: 0; right: 0; border-width: 0 1px 1px 0; }

/* Section header with oversized ghosted serif numeral */
.section-head {
  position: relative;
  display: grid;
  gap: var(--space-s);
  max-width: 60ch;
  margin-bottom: var(--space-xl);
}
.section-head .index {
  position: absolute;
  top: -0.55em;
  right: 0;
  font-family: var(--font-display);
  font-size: clamp(5rem, 4rem + 8vw, 12rem);
  line-height: 1;
  font-weight: 400;
  color: var(--text);
  opacity: 0.05;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.section-head > * { position: relative; z-index: 1; }
.section-head .lead { margin-top: var(--space-2xs); }

.section-head.center {
  margin-inline: auto;
  text-align: center;
  justify-items: center;
}
.section-head.center .index { right: 50%; transform: translateX(50%); }

/* -------------------------------------------------------------
   6. BUTTONS
   ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 48px;
  padding: 0.85em 1.6em;
  font-family: var(--font-body);
  font-size: var(--step-small);
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}
.btn-primary:hover { background: var(--btn-primary-hover); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-plain {
  min-height: auto;
  padding: 0;
  border-radius: 0;
  color: var(--accent);
  gap: 0.4em;
}
.btn-plain .arrow { transition: transform var(--dur-fast) var(--ease-out); }
.btn-plain:hover .arrow { transform: translateX(4px); }

.btn-block { width: 100%; }

/* -------------------------------------------------------------
   7. NAVBAR + MOBILE MENU
   ------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%);
  z-index: var(--z-skip);
  background: var(--accent);
  color: var(--btn-primary-text);
  padding: 0.7em 1.2em;
  border-radius: 0 0 var(--radius-s) var(--radius-s);
  font-weight: 700;
  font-size: var(--step-small);
  transition: transform var(--dur-fast) var(--ease-out);
}
.skip-link:focus { transform: translate(-50%, 0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: background-color var(--dur) var(--ease-inout),
              border-color var(--dur) var(--ease-inout);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  height: 72px;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  margin-right: auto;
}
.nav-logo img {
  height: 40px;
  width: auto;
}
/* Logo swap by theme */
html[data-theme="dark"] .logo-light { display: block; }
html[data-theme="dark"] .logo-dark  { display: none; }
html[data-theme="light"] .logo-light { display: none; }
html[data-theme="light"] .logo-dark  { display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.nav-links a,
.nav-drop-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.55em 0.85em;
  font-size: var(--step-small);
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius-s);
  transition: color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
}
.nav-links a:hover,
.nav-drop-toggle:hover { color: var(--accent); background: var(--accent-soft); }
.nav-links a[aria-current="page"] { color: var(--accent); }

/* Courses dropdown */
.nav-drop { position: relative; }
.nav-drop-toggle .chev {
  width: 12px; height: 12px;
  transition: transform var(--dur-fast) var(--ease-out);
}
.nav-drop[data-open="true"] .chev { transform: rotate(180deg); }
.nav-drop-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 260px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 0.5rem;
  display: grid;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out),
              visibility var(--dur-fast);
}
.nav-drop[data-open="true"] .nav-drop-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-drop-menu a {
  display: grid;
  gap: 2px;
  padding: 0.7em 0.85em;
  border-radius: var(--radius-s);
}
.nav-drop-menu a .d-title { font-weight: 600; color: var(--text); }
.nav-drop-menu a .d-sub { font-size: 0.8rem; color: var(--text-muted); }
.nav-drop-menu a:hover { background: var(--accent-soft); }
.nav-drop-menu a:hover .d-title { color: var(--accent); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  color: var(--text);
  transition: color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.nav-cta { display: inline-flex; }

/* Hamburger */
.nav-burger {
  display: none;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.nav-burger span {
  position: relative;
  width: 20px; height: 2px;
  background: currentColor;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast);
}
.nav-burger span::before,
.nav-burger span::after {
  content: "";
  position: absolute; left: 0;
  width: 20px; height: 2px;
  background: currentColor;
  transition: transform var(--dur-fast) var(--ease-out), top var(--dur-fast);
}
.nav-burger span::before { top: -6px; }
.nav-burger span::after  { top: 6px; }
html.menu-open .nav-burger span { background: transparent; }
html.menu-open .nav-burger span::before { top: 0; transform: rotate(45deg); }
html.menu-open .nav-burger span::after  { top: 0; transform: rotate(-45deg); }

/* Mobile menu panel */
.mobile-menu {
  position: fixed;
  inset: 72px 0 0 0;
  z-index: var(--z-menu);
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: var(--gutter);
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease-out),
              transform var(--dur) var(--ease-out),
              visibility var(--dur);
}
html.menu-open .mobile-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.mobile-menu a:not(.btn) {
  display: block;
  padding: 0.9em 0.25em;
  font-family: var(--font-display);
  font-size: 1.5rem;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}
.mobile-menu a:not(.btn)[aria-current="page"] { color: var(--accent); }
.mobile-group-label {
  font-family: var(--font-body);
  font-size: var(--step-eyebrow);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  padding: 1.4em 0.25em 0.35em;
}
.mobile-menu a.sub-link {
  font-family: var(--font-body);
  font-size: 1.05rem;
  padding-left: 1rem;
}
.mobile-menu .btn { margin-top: var(--space-l); }

/* -------------------------------------------------------------
   8. MEDIA FRAME (image placeholder treatment)
   ------------------------------------------------------------- */

.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--accent-line);
  background:
    radial-gradient(120% 90% at 78% 12%, var(--accent-soft), transparent 55%),
    linear-gradient(140deg, var(--placeholder-1), var(--placeholder-2));
  isolation: isolate;
}
/* Dove watermark inside the placeholder (shows through when img missing/failed) */
.media-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120' fill='none' stroke='%23C9A227' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M30 74c14 6 30 4 42-6 8-7 12-17 22-20-6 9-6 16-2 24-10 2-16 8-24 12-14 6-30 2-38-10 0 0-4-6 0-8'/%3E%3Cpath d='M72 48c6-6 14-8 22-6'/%3E%3Cpath d='M40 72l-14 8'/%3E%3Cpath d='M46 78l-10 10'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 44%;
  opacity: 0.22;
}
.media-frame::after {
  content: attr(data-label);
  position: absolute;
  left: 1rem;
  bottom: 0.85rem;
  z-index: 0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.55;
}
.media-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--dur-slow) var(--ease-out);
}
/* JS adds .img-failed when a real image is absent, revealing the placeholder */
.media-frame img.img-failed { opacity: 0; }

.media-frame.ratio-16-9 { aspect-ratio: 16 / 9; }
.media-frame.ratio-4-3  { aspect-ratio: 4 / 3; }
.media-frame.ratio-3-2  { aspect-ratio: 3 / 2; }
.media-frame.ratio-4-5  { aspect-ratio: 4 / 5; }

/* -------------------------------------------------------------
   9. HERO
   ------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: calc(100dvh - 72px);
  display: flex;
  align-items: center;
  padding-block: var(--space-2xl);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg .media-frame {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
}
.hero-bg .media-frame img { will-change: transform; }
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--scrim-soft);
}
.hero-dove {
  position: absolute;
  right: clamp(-2rem, 2vw, 3rem);
  bottom: -1rem;
  z-index: 1;
  width: clamp(140px, 22vw, 340px);
  color: var(--accent);
  opacity: 0.1;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 2; }
.hero-inner { max-width: 62ch; }
.hero h1 {
  font-size: var(--step-h1);
  margin-top: var(--space-m);
}
.hero .line { display: block; overflow: hidden; }
.hero .line > span { display: block; }
.hero-sub {
  margin-top: var(--space-m);
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  margin-top: var(--space-l);
}

/* -------------------------------------------------------------
   10. STAT STRIP
   ------------------------------------------------------------- */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  overflow: hidden;
}
.stat {
  padding: var(--space-l) var(--space-m);
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: 0; }
.stat .stat-num {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 1.8rem + 2.4vw, 3.6rem);
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 0.08em;
}
.stat .stat-num .affix { font-size: 0.5em; }
.stat .stat-label {
  margin-top: var(--space-2xs);
  font-size: var(--step-small);
  color: var(--text-muted);
  line-height: 1.4;
}

/* -------------------------------------------------------------
   11. COURSE CARDS
   ------------------------------------------------------------- */

.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-l);
}

.course-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
}
.course-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-line);
  box-shadow: var(--shadow-lift);
}
.course-card .media-frame {
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
}
/* gold hairline draws across on hover */
.course-card .media-frame::after { content: none; }
.course-card__draw {
  position: absolute;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-slow) var(--ease-out);
  z-index: 3;
}
.course-card:hover .course-card__draw { transform: scaleX(1); }

.course-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  padding: var(--space-l);
  flex: 1;
}
.course-card__body h3 { letter-spacing: -0.02em; }
.course-card__meta {
  font-size: var(--step-small);
  color: var(--text-muted);
}
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.4em 0.85em;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-pill);
}
.course-card__foot {
  margin-top: auto;
  padding-top: var(--space-s);
}

/* -------------------------------------------------------------
   12. WHY / FEATURE TILES
   ------------------------------------------------------------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.feature {
  background: var(--bg-elevated);
  padding: var(--space-l);
  display: grid;
  gap: var(--space-xs);
  transition: background-color var(--dur) var(--ease-out);
}
.feature:hover { background: var(--bg-subtle); }
.feature .f-index {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--accent);
}
.feature h4 { letter-spacing: -0.01em; }
.feature p { font-size: var(--step-small); color: var(--text-muted); max-width: 40ch; }

/* -------------------------------------------------------------
   13. FACULTY TEASER
   ------------------------------------------------------------- */

.faculty {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: center;
}
.faculty .media-frame { max-width: 420px; }
.faculty__body { display: grid; gap: var(--space-s); }
.faculty__creds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: var(--space-2xs);
}
.faculty__quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--step-h4);
  line-height: 1.4;
  color: var(--text);
  border-left: 2px solid var(--accent);
  padding-left: var(--space-m);
  max-width: 52ch;
}

/* -------------------------------------------------------------
   14. FORMATS RIBBON
   ------------------------------------------------------------- */

.formats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-m);
}
.format {
  display: grid;
  gap: var(--space-2xs);
  padding-top: var(--space-s);
  border-top: 1px solid var(--line-strong);
}
.format .fmt-n {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--accent);
}
.format h4 { font-size: var(--step-body); font-family: var(--font-body); font-weight: 700; letter-spacing: 0; }
.format p { font-size: var(--step-small); color: var(--text-muted); }

/* -------------------------------------------------------------
   15. MARQUEE RIBBON (tagline)
   ------------------------------------------------------------- */

.marquee {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-l);
  border-block: 1px solid var(--line);
  background: var(--bg-subtle);
  user-select: none;
}
.marquee__track {
  display: flex;
  width: max-content;
  will-change: transform;
}
.marquee__group {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}
.marquee__item {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.6rem, 1.1rem + 2.2vw, 3rem);
  line-height: 1;
  color: var(--text);
  padding-inline: clamp(1.5rem, 3vw, 3rem);
  white-space: nowrap;
}
.marquee__item .dot { color: var(--accent); font-style: normal; }
/* Static fallback when JS off or reduced motion */
.marquee:not(.is-animating) .marquee__track { justify-content: center; width: 100%; }
.marquee:not(.is-animating) .marquee__group:nth-child(n+2) { display: none; }

/* -------------------------------------------------------------
   16. BELIEF / PULL-QUOTE BAND
   ------------------------------------------------------------- */

.belief {
  text-align: center;
  display: grid;
  gap: var(--space-m);
  justify-items: center;
}
.belief__quote {
  font-family: var(--font-display);
  font-size: var(--step-h1);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 20ch;
}
.belief__quote .hl-accent { color: var(--accent); }
.belief p { color: var(--text-muted); max-width: 56ch; }

/* -------------------------------------------------------------
   17. CTA BAND
   ------------------------------------------------------------- */

.cta-band {
  position: relative;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 140% at 85% 0%, var(--accent-soft), transparent 60%),
    var(--bg-elevated);
  padding: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
  overflow: hidden;
}
.cta-band__inner {
  display: grid;
  gap: var(--space-m);
  max-width: 58ch;
}
.cta-band h2 { max-width: 18ch; }
.cta-band .hero-actions { margin-top: var(--space-2xs); }
.cta-band .hero-dove {
  position: absolute;
  right: -1rem; bottom: -2rem;
  width: clamp(120px, 18vw, 240px);
  opacity: 0.08;
}

/* -------------------------------------------------------------
   18. ACCORDION
   ------------------------------------------------------------- */

.accordion { display: grid; }
.accordion__item { border-bottom: 1px solid var(--line); }
.accordion__item:first-child { border-top: 1px solid var(--line); }
.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  text-align: left;
  padding: var(--space-m) 0;
  font-family: var(--font-display);
  font-size: var(--step-h4);
  color: var(--text);
  transition: color var(--dur-fast) var(--ease-out);
}
.accordion__trigger:hover { color: var(--accent); }
.accordion__icon {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  position: relative;
}
.accordion__icon::before,
.accordion__icon::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 14px; height: 2px;
  background: var(--accent);
  transform: translate(-50%, -50%);
  transition: transform var(--dur-fast) var(--ease-out);
}
.accordion__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.accordion__trigger[aria-expanded="true"] .accordion__icon::after { transform: translate(-50%, -50%) rotate(0); }
.accordion__panel {
  overflow: hidden;
  height: 0;
}
.accordion__panel-inner {
  padding-bottom: var(--space-m);
  color: var(--text-muted);
  max-width: 64ch;
}
/* JS-off fallback: panels open */
html:not(.js) .accordion__panel { height: auto; }

/* -------------------------------------------------------------
   19. FOOTER
   ------------------------------------------------------------- */

.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--line);
  padding-block: var(--space-2xl) var(--space-l);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: var(--space-xl);
}
.footer-brand img { height: 42px; width: auto; margin-bottom: var(--space-s); }
.footer-brand p { font-size: var(--step-small); color: var(--text-muted); max-width: 34ch; }
.footer-col h5 {
  font-family: var(--font-body);
  font-size: var(--step-eyebrow);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: var(--space-s);
}
.footer-col ul { display: grid; gap: 0.6rem; }
.footer-col a, .footer-col address {
  font-size: var(--step-small);
  color: var(--text-muted);
  font-style: normal;
  line-height: 1.6;
  transition: color var(--dur-fast) var(--ease-out);
}
.footer-col a:hover { color: var(--accent); }
.footer-socials { display: flex; gap: 0.6rem; margin-top: var(--space-s); }
.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
}
.footer-socials a:hover { color: var(--accent); border-color: var(--accent); }
.footer-socials svg { width: 18px; height: 18px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-2xl);
  padding-top: var(--space-l);
  border-top: 1px solid var(--line);
  font-size: var(--step-small);
  color: var(--text-muted);
}
.footer-bottom a { color: var(--text); }
.footer-bottom a:hover { color: var(--accent); }

/* -------------------------------------------------------------
   20. FLOATING WHATSAPP BUBBLE
   ------------------------------------------------------------- */

.wa-bubble {
  position: fixed;
  right: clamp(1rem, 2vw, 1.75rem);
  bottom: clamp(1rem, 2vw, 1.75rem);
  z-index: var(--z-bubble);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  border-radius: var(--radius-pill);
  background: #1FA855;
  color: #fff;
  box-shadow: 0 12px 30px -8px rgba(31, 168, 85, 0.6);
  transition: transform var(--dur-fast) var(--ease-out);
}
.wa-bubble:hover { transform: translateY(-3px) scale(1.05); }
.wa-bubble svg { width: 30px; height: 30px; }
.wa-bubble::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid rgba(31, 168, 85, 0.5);
  animation: wa-ping 2.6s var(--ease-out) infinite;
}
@keyframes wa-ping {
  0%   { transform: scale(1);   opacity: 0.7; }
  70%  { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* -------------------------------------------------------------
   21. REVEAL (progressive enhancement)
   Only hidden when JS is present; visible without JS.
   ------------------------------------------------------------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(24px);
}
html.js .reveal-group > * {
  opacity: 0;
  transform: translateY(24px);
}

/* -------------------------------------------------------------
   22. UTILITIES
   ------------------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.mt-l { margin-top: var(--space-l); }
.mt-xl { margin-top: var(--space-xl); }
.hidden { display: none !important; }
.split-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: center;
}

/* -------------------------------------------------------------
   23. RESPONSIVE
   ------------------------------------------------------------- */

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-l); }
  .formats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: inline-flex; }
  .card-grid-3 { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .faculty { grid-template-columns: 1fr; }
  .faculty .media-frame { max-width: 100%; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
  .split-2 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .feature-grid { grid-template-columns: 1fr; }
  .formats { grid-template-columns: 1fr 1fr; }
  .stat-strip { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .section-head .index { font-size: 5.5rem; opacity: 0.045; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .hero-actions .btn { width: 100%; }
}

@media (max-width: 420px) {
  .formats { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------
   24. MOTION PREFERENCE + PRINT
   ------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  html.js .reveal,
  html.js .reveal-group > * { opacity: 1 !important; transform: none !important; }
  .wa-bubble::after { display: none; }
}

@media print {
  .wa-bubble,
  .site-header,
  .theme-toggle,
  .marquee { display: none !important; }
  body::after { display: none; }
  body { background: #fff; color: #000; }
}


/* =============================================================
   25. INNER-PAGE ADDITIONS (About / Contact / 404)
   Added by the About/Contact/404 build pass. Token-driven, reuses
   existing primitives (.card, .btn, .chip, .section). Do not
   edit rules above this line.
   ============================================================= */

/* ---- Breadcrumb (compact page hero, per COMPONENTS.md §7) ---- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4em;
  font-size: var(--step-small);
  color: var(--text-muted);
  margin-bottom: var(--space-m);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current="page"] { color: var(--text); }
.breadcrumb .sep { opacity: 0.6; }

/* ---- Compact page hero (About / Contact / 404) ---- */
.page-hero { padding-block: var(--space-2xl) var(--space-xl); }
.page-hero h1 { max-width: 16ch; }
.page-hero .lead { max-width: 62ch; margin-top: var(--space-s); }

/* ---- Contact: one-tap action cards ---- */
.action-cards {
  display: grid;
  gap: var(--space-m);
}
.action-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-m);
  padding: var(--space-l);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  transition: transform var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.action-card:hover,
.action-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--accent-line);
  box-shadow: var(--shadow-card);
}
.action-card__icon {
  flex: none;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
}
.action-card__icon svg { width: 24px; height: 24px; }
.action-card h3 { font-size: var(--step-h4); letter-spacing: -0.01em; }
.action-card p { font-size: var(--step-small); color: var(--text-muted); margin-top: 0.25em; }
.action-card .arrow { display: inline-block; margin-top: 0.6em; color: var(--accent); font-weight: 700; font-size: var(--step-small); }

/* ---- Contact: address card ---- */
.address-card {
  padding: var(--space-l);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-subtle);
}
.address-card h3 { font-size: var(--step-h4); margin-bottom: var(--space-2xs); }
.address-card address { font-style: normal; color: var(--text-muted); line-height: 1.7; }

/* ---- Enquiry form ---- */
.form-field {
  display: grid;
  gap: 0.5rem;
  margin-bottom: var(--space-m);
}
.form-field label {
  font-size: var(--step-small);
  font-weight: 700;
  letter-spacing: 0.01em;
}
.form-field .req { color: var(--accent); }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.85em 1em;
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  font-family: var(--font-body);
  font-size: var(--step-body);
  color: var(--text);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-field select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B0A99C' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1em center;
  background-size: 18px;
  padding-right: 2.6em;
}
.form-note {
  font-size: var(--step-small);
  color: var(--text-muted);
  margin-top: var(--space-s);
}
.form-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---- Contact split layout ---- */
.contact-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}
.contact-split .stack > * + * { margin-top: var(--space-l); }

@media (max-width: 900px) {
  .contact-split { grid-template-columns: 1fr; gap: var(--space-xl); }
}

/* ---- 404 page ---- */
.error-page {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: var(--space-3xl);
}
.error-page .error-code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 3.5rem + 9vw, 11rem);
  line-height: 1;
  color: var(--accent);
  opacity: 0.9;
}
.error-page h1 { margin-top: var(--space-s); max-width: 20ch; margin-inline: auto; }
.error-page .lead { max-width: 52ch; margin-inline: auto; margin-top: var(--space-s); }
.error-page .hero-actions { justify-content: center; margin-top: var(--space-l); }

/* =============================================================
   26. COURSE PAGES — small additions (courses/*.html)
   Reuses .breadcrumb / .page-hero above. Token-driven; no new
   colours. Do not edit rules above this line.
   ============================================================= */

/* 2-up variant of .card-grid-3, for per-attempt batch cards */
.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-l);
}
@media (max-width: 900px) {
  .card-grid-2 { grid-template-columns: 1fr; }
}

/* Batch card without a media-frame: fee/format lines inside .stack */
.course-card__body .stack p { margin: 0; }
.course-card__body .stack .fmt-name {
  font-weight: 700;
  color: var(--text);
}
.course-card__body .stack .fmt-fee {
  color: var(--accent);
  font-weight: 700;
}
