/* ==========================================================================
   SA Classes — Website Styles
   Design system per SA-Classes-Website-Specification/docs/01-Branding-and-Design-System.md
   Theme tokens are CSS custom properties so a future backend (doc 23) can
   override them at runtime without touching this file.
   ========================================================================== */

:root {
  /* Brand palette matched to the SA Classes logo (Logo V2): a red "SA" with a
     white maple leaf, and a red pencil with a GOLD ferrule + white "CLASSES".
     So the brand is Red + Gold + White + Black. Layout & feel referenced from
     kyndryl.com (dark animated hero, clean minimalism). Tokens are CSS custom
     properties so admin/settings.php can override them at runtime. */
  --brand-red: #ED1C24;           /* SA Primary Red (official brand palette) — buttons, links, active nav */
  --brand-red-dark: #C8102E;      /* SA Deep Crimson — hover / pressed */
  --brand-red-tint: #FF8A73;      /* warm coral accent used on the black sections */
  --brand-gold: #F6B333;          /* Pencil Gold (official) — real brand accent */
  --brand-black: #141414;         /* near-black for dark buttons / badges */
  --star-gold: #F6B333;           /* 5-star rating + gold accents, matched to the logo gold */
  --surface-white: #FFFFFF;
  --surface-light: #F2F2F2;       /* light gray section stripe */
  --ink-navy: #0A0A0A;            /* "dark section" background — now near-black, Kyndryl style */
  --ink-charcoal: #1A1A1A;        /* body text — near-black */
  --ink-muted: #6E6E6E;           /* gray secondary text */
  --success: #22C55E;
  --warning: #F79009;
  --danger: #F04438;
  --border: #EAECF0;

  /* Typography */
  --font-display: "Poppins", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Spacing scale (8px base) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;
  --space-12: 96px;

  --maxw: 1200px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 20px 50px rgba(16, 24, 40, 0.14);

  --nav-h: 72px;
  --bottomnav-h: 68px;
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-charcoal);
  background: var(--surface-white);
  line-height: 1.6;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink-navy); line-height: 1.15; margin: 0 0 var(--space-2); font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p { margin: 0 0 var(--space-2); }
a { color: var(--brand-red); text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--space-3); }
.section { padding: var(--space-8) 0; }
@media (min-width: 768px) { .section { padding: var(--space-12) 0; } }
.section--light { background: var(--surface-light); }
.section--navy { background: var(--ink-navy); color: #E7E9EE; }
.section--navy h2, .section--navy h3 { color: #fff; }
.eyebrow {
  display: inline-block; font-family: var(--font-display); font-weight: 600;
  font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brand-red); margin-bottom: var(--space-1);
}
.section--navy .eyebrow { color: var(--brand-red-tint); }
.section-head { max-width: 720px; margin: 0 auto var(--space-6); text-align: center; }
.lead { font-size: 1.125rem; color: var(--ink-muted); }
.section--navy .lead { color: #B6BDCB; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.98rem;
  padding: 13px 26px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand-red); color: #fff; box-shadow: 0 8px 20px rgba(227, 30, 36,.28); }
.btn--primary:hover { background: var(--brand-red-dark); transform: translateY(-2px); }
.btn--dark { background: var(--brand-black); color: #fff; }
.btn--dark:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.35); background: #000; }
.btn--ghost { background: transparent; color: var(--ink-navy); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--brand-red); color: var(--brand-red); }
.section--navy .btn--ghost { color: #fff; border-color: rgba(255,255,255,.25); }
.btn--lg { padding: 16px 34px; font-size: 1.05rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ---------- Glassmorphism card (doc 02: cards only, never full-bleed) ---------- */
.card {
  background: var(--surface-white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: var(--space-3); transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.glass {
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.5);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.badge {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
  background: rgba(227, 30, 36,.1); color: var(--brand-red);
}
.badge--dark { background: rgba(26,26,26,.08); color: var(--brand-black); }

/* ---------- Header / desktop nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(255,255,255,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  /* Own compositing layer: stops Android Chrome from jittering sticky
     elements while its address bar collapses/expands during scroll. */
  transform: translateZ(0); -webkit-transform: translateZ(0);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; color: var(--ink-navy); }
.brand__mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--brand-red); color: #fff; font-weight: 800;
}
.brand small { display: block; font-size: .62rem; font-weight: 600; letter-spacing: .12em; color: var(--ink-muted); text-transform: uppercase; }
.nav-links { display: none; align-items: center; gap: 26px; list-style: none; }
.nav-links a { color: var(--ink-charcoal); font-weight: 600; font-size: .95rem; position: relative; }
.nav-links a:hover, .nav-links a.is-active { color: var(--brand-red); }
.nav-links a.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px; background: var(--brand-red); border-radius: 2px; }
.header-cta { display: none; }
@media (min-width: 940px) {
  .nav-links, .header-cta { display: flex; }
}

/* ---------- Mobile bottom nav (doc 17) — APP-STYLE 5 TABS ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
  height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex; align-items: stretch; justify-content: space-around;
  background: rgba(255,255,255,.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px rgba(16,24,40,.08);
  /* Own compositing layer: stops Android Chrome from clipping/jumping this
     fixed bar while its address bar collapses/expands during scroll. */
  transform: translateZ(0); -webkit-transform: translateZ(0);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-muted); font-size: .68rem; font-weight: 600; letter-spacing: .01em;
}
.bottom-nav a svg { width: 23px; height: 23px; stroke: currentColor; }
.bottom-nav a.is-active { color: var(--brand-red); }
/* Raised center Enroll button */
.bottom-nav a.tab-enroll {
  color: #fff; position: relative;
}
.bottom-nav a.tab-enroll .tab-enroll__btn {
  position: absolute; top: -22px; width: 54px; height: 54px; border-radius: 50%;
  background: var(--brand-red); display: grid; place-items: center;
  box-shadow: 0 8px 20px rgba(227, 30, 36,.4); border: 4px solid #fff;
}
.bottom-nav a.tab-enroll span.lbl { margin-top: 30px; color: var(--brand-red); }
.bottom-nav a.tab-enroll svg { width: 26px; height: 26px; }
@media (min-width: 940px) { .bottom-nav { display: none; } }
/* add breathing room so fixed bottom nav never hides content on mobile */
@media (max-width: 939px) { body { padding-bottom: calc(var(--bottomnav-h) + 12px); } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: var(--space-8) 0 var(--space-6); }
.hero__grid { display: grid; gap: var(--space-4); align-items: center; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: 1.1fr .9fr; gap: var(--space-6); } .hero { padding: var(--space-12) 0; } }
.hero h1 span { color: var(--brand-red); }
.hero .lead { max-width: 540px; }
.hero__art {
  position: relative; min-height: 300px; border-radius: 24px;
  background: linear-gradient(150deg, #1a1a1a, var(--ink-navy));
  display: grid; place-items: center; overflow: hidden; box-shadow: var(--shadow-lg);
}
.hero__globe {
  width: 210px; height: 210px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #ff8a73, var(--brand-red) 55%, #5a0f08);
  box-shadow: 0 0 60px rgba(255,199,44,.35), inset -20px -20px 50px rgba(0,0,0,.35);
  animation: spin 22s linear infinite; position: relative;
}
.hero__globe::after {
  content: "∑  π  √  ƒ(x)"; position: absolute; inset: 0; display: grid; place-items: center;
  color: rgba(255,255,255,.85); font-family: var(--font-display); font-weight: 700; letter-spacing: 2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Floating math glyphs (decorative, aria-hidden) */
.math-field { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.math-field span {
  position: absolute; font-family: var(--font-display); font-weight: 700;
  color: var(--brand-red); opacity: .10; font-size: 2.4rem; animation: floaty 9s ease-in-out infinite;
}
.section--navy .math-field span { color: var(--brand-red-tint); opacity: .14; }
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-22px) rotate(8deg); } }
.hero .container { position: relative; z-index: 1; }

/* ---------- Stats band ---------- */
.stats { display: grid; grid-template-columns: repeat(2,1fr); gap: var(--space-3); text-align: center; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(5,1fr); } }
.stat__num { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.9rem,4vw,2.8rem); color: var(--brand-red-tint); }
.stat__label { font-size: .9rem; color: #B6BDCB; }

/* ---------- Grids ---------- */
.grid { display: grid; gap: var(--space-3); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 640px) { .grid--2 { grid-template-columns: 1fr 1fr; } .grid--3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .grid--3 { grid-template-columns: repeat(3,1fr); } .grid--4 { grid-template-columns: repeat(4,1fr); } }

/* Course / feature card bits */
.icon-badge { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: rgba(227, 30, 36,.1); color: var(--brand-red); margin-bottom: var(--space-2); font-size: 1.4rem; }
.card__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--ink-muted); font-size: .85rem; margin: 6px 0 var(--space-2); }
.card__price { font-family: var(--font-display); font-weight: 800; color: var(--ink-navy); font-size: 1.25rem; }
.card__foot { display: flex; gap: 10px; align-items: center; margin-top: var(--space-2); }

/* Method steps */
.steps { display: grid; gap: var(--space-2); counter-reset: step; }
.step { display: flex; gap: var(--space-2); align-items: flex-start; background: var(--surface-white); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--space-2); }
.step__num { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--ink-navy); color: #fff; font-family: var(--font-display); font-weight: 800; display: grid; place-items: center; }

/* Review card */
.review__stars { color: var(--star-gold); letter-spacing: 2px; font-size: 1.05rem; }
.review__by { font-weight: 700; color: var(--ink-navy); margin-top: var(--space-2); }
.review__src { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--ink-muted); }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: var(--space-2); }
@media (min-width: 720px) { .gallery-grid { grid-template-columns: repeat(3,1fr); } }
.gallery-item { position: relative; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4/3; background: linear-gradient(135deg,#2a3557,#0B1E45); color: #fff; display: grid; place-items: center; text-align: center; padding: 12px; }
.gallery-item span { font-weight: 600; font-size: .85rem; opacity: .9; z-index: 1; }
.gallery-item .tag { position: absolute; top: 8px; left: 8px; font-size: .65rem; background: rgba(255,255,255,.2); padding: 3px 8px; border-radius: 999px; z-index: 1; }

/* Forms */
.form { display: grid; gap: var(--space-2); }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .9rem; color: var(--ink-navy); }
.field .req { color: var(--brand-red); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 1rem; background: #fff; color: var(--ink-navy); transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand-red); box-shadow: 0 0 0 3px rgba(227, 30, 36,.12); }
.field textarea { min-height: 120px; resize: vertical; }
.field.two { grid-template-columns: 1fr; }
@media (min-width: 620px) { .form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); } }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.check-row input { width: auto; margin-top: 3px; }
.form-note { font-size: .82rem; color: var(--ink-muted); }

/* Accordion (FAQ) */
.acc { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: #fff; margin-bottom: 10px; }
.acc__q { width: 100%; text-align: left; background: none; border: 0; padding: 16px 18px; font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--ink-navy); cursor: pointer; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.acc__q::after { content: "+"; color: var(--brand-red); font-size: 1.4rem; font-weight: 700; flex: none; }
.acc.open .acc__q::after { content: "–"; }
.acc__a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.acc__a p { padding: 0 18px 16px; margin: 0; color: var(--ink-charcoal); }

/* Page hero (interior pages) */
.page-hero { background: linear-gradient(160deg, var(--surface-light), #eef1f6); padding: var(--space-8) 0 var(--space-6); position: relative; overflow: hidden; }
.page-hero .container { position: relative; z-index: 1; }
.breadcrumb { font-size: .85rem; color: var(--ink-muted); margin-bottom: var(--space-1); }
.breadcrumb a { color: var(--ink-muted); }

/* CTA band */
.cta-band { text-align: center; }
.cta-band .btn-row { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-navy); color: #B6BDCB; padding: var(--space-8) 0 var(--space-6); }
.footer-note { background: var(--brand-red); color: #fff; text-align: center; font-weight: 600; font-size: .92rem; padding: 10px var(--space-2); }
.footer-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.2fr; } }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: var(--space-2); }
.site-footer ul { list-style: none; display: grid; gap: 8px; }
.site-footer a { color: #B6BDCB; font-size: .92rem; }
.site-footer a:hover { color: var(--brand-red-tint); }
.social-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--space-2); }
.social-row a { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.08); display: grid; place-items: center; color: #fff; transition: background .18s, transform .18s; }
.social-row a:hover { background: var(--brand-red); transform: translateY(-2px); }
.social-row a svg { width: 19px; height: 19px; display: block; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: var(--space-4); padding-top: var(--space-3); font-size: .85rem; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }

/* ---------- Floating actions + chatbot ---------- */
.fab-stack {
  position: fixed; right: 16px; z-index: 115; bottom: calc(var(--bottomnav-h) + 20px); display: flex; flex-direction: column; gap: 12px;
  /* Own compositing layer: stops Android Chrome from clipping these icons
     while its address bar collapses/expands during scroll. */
  transform: translateZ(0); -webkit-transform: translateZ(0);
}
@media (min-width: 940px) { .fab-stack { bottom: 20px; } }
.fab { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; box-shadow: var(--shadow-lg); border: none; cursor: pointer; color: #fff; }
.fab--wa { background: #25D366; }
.fab--chat { background: var(--ink-navy); }
.fab svg { width: 26px; height: 26px; }

.chat-panel {
  position: fixed; right: 16px; z-index: 130; width: min(360px, calc(100vw - 32px));
  bottom: calc(var(--bottomnav-h) + 84px); max-height: 70vh; display: none; flex-direction: column;
  border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg);
  background: rgba(255,255,255,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.6);
}
@media (min-width: 940px) { .chat-panel { bottom: 88px; } }
.chat-panel.open { display: flex; }
.chat-head { background: var(--ink-navy); color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.chat-head strong { font-family: var(--font-display); }
.chat-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); }
.chat-head button { margin-left: auto; background: none; border: none; color: #fff; font-size: 1.3rem; cursor: pointer; }
.chat-body { padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font-size: .92rem; max-width: 90%; }
.chat-msg.bot { align-self: flex-start; }
.chat-msg.user { align-self: flex-end; background: var(--brand-red); color: #fff; border-color: transparent; }
.chat-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-choice { border: 1.5px solid var(--brand-red); color: var(--brand-red); background: #fff; border-radius: 999px; padding: 7px 13px; font-size: .82rem; font-weight: 600; cursor: pointer; font-family: var(--font-body); }
.chat-choice:hover { background: var(--brand-red); color: #fff; }

/* ---------- Popup notification (doc 22) ---------- */
.popup-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(16,24,40,.55); display: none; place-items: center; padding: 20px; }
.popup-overlay.open { display: grid; }
.popup { background: #fff; border-radius: 20px; max-width: 420px; width: 100%; padding: var(--space-4); text-align: center; box-shadow: var(--shadow-lg); position: relative; }
.popup__close { position: absolute; top: 12px; right: 14px; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--ink-muted); }
.popup__badge { display: inline-block; background: var(--brand-black); color: #fff; font-weight: 700; font-size: .75rem; padding: 5px 12px; border-radius: 999px; margin-bottom: var(--space-2); text-transform: uppercase; letter-spacing: .05em; }

/* ---------- Custom cursor (doc 16, desktop only) ---------- */
.cursor-glyph { position: fixed; pointer-events: none; z-index: 300; font-family: var(--font-display); font-weight: 700; color: var(--brand-red); opacity: .8; transform: translate(-50%,-50%); transition: opacity .5s ease; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Utilities ---------- */
.hp-field { position: absolute !important; left: -9999px !important; top: -9999px !important; }
.center { text-align: center; }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.muted { color: var(--ink-muted); }
.tick { color: var(--success); font-weight: 700; }

/* ---------- Reduced motion (doc 02 accessibility baseline) ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
