/* Spiral Academy pages: base styles, header, footer and small-screen behaviour.
   Section layouts are inline in each page; colours come from spiral-tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text-primary);
  background: #FFFFFF;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--crimson); }
a:hover { color: #A8363F; }
h1, h2, h3, h4 { font-family: 'Mulish', system-ui, sans-serif; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
details[open] .faq-mark::before { content: "–"; }
details:not([open]) .faq-mark::before { content: "+"; }
input[type=radio], input[type=checkbox] { accent-color: #1F2858; }
:focus-visible { outline: 3px solid var(--focus-ring-alpha, rgba(34,110,181,0.35)); outline-offset: 2px; }
[hidden] { display: none !important; }
input:not([type=radio]):not([type=checkbox]):not([type=file]), select, textarea {
  min-height: 48px; border-radius: 10px; border: 1px solid var(--border-default); background: #FFFFFF;
  padding: 0 14px; font: inherit; font-size: 15px; color: var(--text-primary); width: 100%;
}
textarea { padding: 12px 14px; min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--slate); box-shadow: 0 0 0 3px rgba(74,92,141,0.18); }

/* Header */
.ac-header { position: sticky; top: 0; z-index: 50; background: #FFFFFF; border-bottom: 1px solid var(--border-subtle); }
.ac-header-in { max-width: 1200px; margin: 0 auto; padding: 12px clamp(16px, 4vw, 40px); display: flex; align-items: center; gap: 28px; }
.ac-brand { display: flex; flex-shrink: 0; }
.ac-brand img { height: 46px; width: auto; display: block; }
.ac-nav { display: flex; gap: 22px; align-items: center; flex-grow: 1; font-size: 15px; font-weight: 500; }
.ac-nav a { color: var(--text-primary); text-decoration: none; white-space: nowrap; }
.ac-nav a:hover { color: var(--crimson); }
.ac-nav a[aria-current="page"] { color: var(--crimson); font-weight: 600; }
.ac-nav .ac-back { margin-left: auto; font-size: 14px; color: var(--grey-600); }
.ac-actions { display: flex; gap: 10px; align-items: center; }
.ac-enrol { display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border-radius: 12px; background: var(--navy); color: #FFFFFF !important; font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
.ac-enrol:hover { background: var(--navy-700); }
.ac-menu { display: none; min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border-default); background: #FFFFFF; font: inherit; font-size: 14px; font-weight: 600; color: var(--navy); cursor: pointer; }

@media (max-width: 960px) {
  .ac-header-in { flex-wrap: wrap; gap: 12px; }
  .ac-brand img { height: 38px; }
  .ac-actions { margin-left: auto; }
  .ac-menu { display: inline-flex; align-items: center; }
  .ac-nav { display: none; order: 3; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 6px 0 10px; }
  .ac-nav.open { display: flex; }
  .ac-nav a { padding: 12px 2px; border-top: 1px solid var(--border-subtle); }
  .ac-nav .ac-back { margin-left: 0; }
}
@media (max-width: 420px) {
  .ac-enrol { padding: 0 14px; }
}

/* Footer */
.ac-footer { background: var(--navy-900); color: var(--navy-100); }
.ac-footer-in { max-width: 1200px; margin: 0 auto; padding: 56px clamp(16px, 4vw, 40px) 28px; display: flex; flex-direction: column; gap: 36px; }
.ac-footer-top { display: flex; flex-wrap: wrap; gap: 40px; }
.ac-footer-brand { flex: 1 1 260px; max-width: 360px; display: flex; flex-direction: column; gap: 14px; font-size: 15px; line-height: 1.6; }
.ac-footer-brand img { height: 52px; width: auto; align-self: flex-start; }
.ac-footer-cols { flex: 2 1 480px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 28px; }
.ac-footer-col { display: flex; flex-direction: column; gap: 10px; font-size: 14px; min-width: 0; }
.ac-footer-col span.h { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; color: #FFFFFF; }
.ac-footer a { color: var(--navy-100); text-decoration: none; }
.ac-footer a:hover { color: #FFFFFF; }
.ac-footer-bottom { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 13px; }
.ac-footer-bottom .badge { background: #FFFFFF; border-radius: 8px; padding: 6px 10px; display: inline-flex; }
.ac-footer-bottom .badge img { height: 28px; width: auto; }

/* Track toggle on the course section */
.ac-toggle { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--grey-100); gap: 4px; align-self: flex-start; }
.ac-toggle button { min-height: 40px; padding: 0 18px; border-radius: 9px; border: none; background: transparent; font: inherit; font-size: 14px; font-weight: 600; color: var(--navy); cursor: pointer; }
.ac-toggle button[aria-pressed="true"] { background: var(--navy); color: #FFFFFF; }

/* Map */
.ac-map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; border-radius: 20px; display: block; }

/* WhatsApp button sits above the footer bottom on phones */
@media (max-width: 600px) {
  .ac-footer-in { padding-bottom: 88px; }
}

/* Anchored sections clear the sticky header */
[id] { scroll-margin-top: 84px; }

/* Hero: photo fills the right column */
.ac-hero-photo { width: 100%; height: 100%; min-height: 300px; object-fit: cover; border-radius: 20px; display: block; }

/* Shared bits for the cohort tiles */
.ac-over { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; color: var(--slate); }
.ac-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--success-strong); background: var(--success-subtle); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.ac-pill::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: currentColor; }

/* Next cohort tile under the hero buttons: solid Spiral navy */
.ac-next { background: var(--navy); color: #FFFFFF; border-radius: 20px; padding: 24px 26px; box-shadow: var(--shadow-4); }
.ac-next-in { display: flex; flex-direction: column; gap: 10px; }
.ac-next-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; }
.ac-next .ac-over { color: var(--rose-300); }
.ac-next .ac-pill { color: #FFFFFF; background: rgba(255,255,255,0.12); }
.ac-next .ac-pill::before { background: #6FD49A; }
.ac-next-date { font-family: 'Mulish', sans-serif; font-size: clamp(24px, 2.6vw, 30px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.ac-next-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px 20px; padding-top: 14px; margin-top: 4px; border-top: 1px solid rgba(255,255,255,0.16); }
.ac-next-grid div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ac-next-grid .k { font-size: 12px; color: var(--navy-200); }
.ac-next-grid .v { font-size: 15px; font-weight: 600; }
.ac-next-link { color: #FFFFFF !important; font-weight: 600; text-decoration: none; }

/* Cohort cards in the Dates section; the next one open is solid navy */
.ac-cohort { background: #FFFFFF; border: 1px solid var(--border-default); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ac-cohort-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ac-cohort .ac-over .nx { display: none; }
.ac-cohort h3 { font-size: 26px; line-height: 1.3; font-weight: 800; color: var(--navy); }
.ac-cohort .ac-sub { font-size: 15px; color: var(--slate-600); }
.ac-cohort .ac-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--border-subtle); font-size: 15px; }
.ac-cohort .ac-row .k { color: var(--slate-600); }
.ac-cohort .ac-row .v { font-weight: 600; text-align: right; }
.ac-cta-wrap { margin-top: auto; padding-top: 6px; }
.ac-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 22px; border-radius: 12px; border: 1.5px solid var(--navy-200); background: #FFFFFF; color: var(--navy) !important; font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap; }
.ac-cohort.is-next { background: var(--navy); border-color: var(--navy); color: #FFFFFF; box-shadow: var(--shadow-4); }
.ac-cohort.is-next .ac-over { color: var(--rose-300); }
.ac-cohort.is-next .ac-over .nx { display: inline; }
.ac-cohort.is-next h3 { color: #FFFFFF; }
.ac-cohort.is-next .ac-sub, .ac-cohort.is-next .ac-row .k { color: var(--navy-100); }
.ac-cohort.is-next .ac-row { border-top-color: rgba(255,255,255,0.16); }
.ac-cohort.is-next .ac-pill { color: #FFFFFF; background: rgba(255,255,255,0.12); }
.ac-cohort.is-next .ac-pill::before { background: #6FD49A; }
.ac-cohort.is-next .ac-cta { background: #FFFFFF; border-color: #FFFFFF; }
.ac-cohort.is-next .ac-cta:hover { background: var(--sky-100); }

/* Early-bird marker: a pill next to "Registration open" and a note with the terms */
.ac-pills { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.ac-pill.ac-pill-eb { color: var(--crimson-700); background: var(--crimson-50); }
.ac-pill.ac-pill-eb::before { background: var(--crimson); }
.ac-next .ac-pill.ac-pill-eb, .ac-cohort.is-next .ac-pill.ac-pill-eb { color: var(--navy); background: var(--crimson-100); }
.ac-next .ac-pill.ac-pill-eb::before, .ac-cohort.is-next .ac-pill.ac-pill-eb::before { background: var(--crimson); }
.ac-eb { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--crimson-50); color: var(--crimson-800); font-size: 13.5px; line-height: 1.45; }
.ac-eb-tag { flex-shrink: 0; margin-top: 1px; padding: 3px 7px; border-radius: 6px; background: var(--crimson); color: #FFFFFF; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; }
.ac-eb-dark, .ac-cohort.is-next .ac-eb { background: rgba(255,255,255,0.1); color: #FFFFFF; }
.ac-next .ac-eb { margin-top: 6px; }
