/* ==========================================================================
   MK Stars · site styles. Mobile-first, one file, no build step.
   Palette taken from the logo: deep purple, rainbow arc, gold stars.
   ========================================================================== */

:root {
  --purple: #5A2D82;
  --purple-deep: #43215F;
  --purple-soft: #7A4FA6;
  --lilac: #EFE4F7;
  --lilac-2: #DCC8EE;
  --cream: #FFFFFF;
  --cream-soft: #FBF8FD;
  --paper: #FFFFFF;
  --gold: #F2B705;
  --ink: #2B2140;
  --muted: #5E5670;
  --line: #E6DCEF;
  --red: #E4573D; --orange: #F28C28; --yellow: #F2B705;
  --green: #3BA776; --blue: #3F7FBF; --pink: #E06A9F;
  --ok: #2E7D5B; --ok-bg: #E4F5EC;
  --warn: #8A5A00; --warn-bg: #FFF1D6;
  --bad: #A8322B; --bad-bg: #FDE7E4;
  --info: #2F5E8E; --info-bg: #E6F0FA;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px rgba(90, 45, 130, .10);
  --font-head: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 72rem;
  --gutter: 1rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  padding-bottom: 5.5rem; /* room for sticky CTA on phones */
}
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--purple); line-height: 1.15; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 6vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4.5vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--purple); text-decoration-thickness: .08em; text-underline-offset: .15em; }
a:hover { color: var(--purple-deep); }
.muted { color: var(--muted); }
.small { font-size: .9375rem; }
.lead { font-size: 1.2rem; }
ul, ol { padding-left: 1.25rem; }
blockquote { margin: 0; padding: 1rem 1.25rem; border-left: 5px solid var(--gold); background: var(--paper); border-radius: var(--radius-sm); font-size: 1.15rem; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: absolute; left: -999px; top: .5rem; background: var(--purple); color: #fff; padding: .5rem 1rem; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: .5rem; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.section { padding: 2.25rem 0; }
.section--tint { background: var(--cream-soft); }
.section--paper { background: var(--paper); }
.section--intro { padding-bottom: 0; }
.section--intro + .section { padding-top: 1.5rem; }

/* ---------- header ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 0; }
.brand img { width: 150px; height: auto; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; flex-direction: column; }
.nav-list a { display: block; padding: .6rem .75rem; border-radius: var(--radius-sm); font-weight: 700; text-decoration: none; }
.nav-list a:hover, .nav-list a[aria-current="page"] { background: var(--lilac); }
.nav-list--wide { display: none; }
.nav-toggle summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; padding: .6rem .9rem; border-radius: var(--radius-sm); border: 2px solid var(--lilac-2); color: var(--purple); }
.nav-toggle summary::-webkit-details-marker { display: none; }
.nav-toggle[open] summary { background: var(--lilac); }
.nav-toggle .nav-list { position: absolute; right: var(--gutter); left: var(--gutter); top: calc(100% + .5rem); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem; box-shadow: var(--shadow); }
.burger { width: 18px; height: 2px; background: currentColor; position: relative; display: inline-block; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; }
.burger::before { top: -6px; } .burger::after { top: 6px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; padding: .85rem 1.4rem; border-radius: 999px; border: 2px solid transparent; text-decoration: none; cursor: pointer; line-height: 1.1; min-height: 48px; transition: transform .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--purple); color: #fff; }
.btn--primary:hover { background: var(--purple-deep); color: #fff; }
.btn--secondary { background: var(--paper); color: var(--purple); border-color: var(--purple); }
.btn--secondary:hover { background: var(--lilac); }
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--ghost { background: transparent; color: var(--purple); }
.btn--sm { padding: .55rem 1rem; min-height: 40px; font-size: .95rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* ---------- hero ---------- */
.hero { background: radial-gradient(120% 90% at 85% 10%, #6E3A9E 0%, var(--purple-deep) 55%, #35194D 100%); color: #fff; padding: 2.5rem 0 3rem; position: relative; overflow: hidden; }
.hero h1 { color: #fff; }
.hero-inner { display: grid; gap: 1.5rem; align-items: center; }
.hero h1 { margin-bottom: .35em; }
.hero .tagline { font-family: var(--font-head); color: var(--gold); font-size: 1.2rem; font-weight: 800; margin-bottom: 1rem; letter-spacing: .02em; }
.hero-art { width: min(300px, 70%); margin-inline: auto; }
.hero blockquote { background: rgba(255,255,255,.08); border-left-color: var(--gold); color: #fff; font-size: 1.1rem; }
.hero .btn--secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.hero .btn--secondary:hover { background: rgba(255,255,255,.12); color: #fff; }
.hero .btn--primary { background: var(--gold); color: var(--ink); }
.hero .btn--primary:hover { background: #FFC933; color: var(--ink); }
.stars-deco { margin-bottom: .5rem; }

.hero-art .float { animation: float 6s ease-in-out infinite; transform-origin: center; }
.hero-art .float:nth-child(2) { animation-delay: -2s; }
.hero-art .float:nth-child(3) { animation-delay: -4s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---------- cards & grids ---------- */
.grid { display: grid; gap: 1rem; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: 0 4px 14px rgba(90, 45, 130, .06); }
.card h3 { margin-top: 0; }
.card--tint { background: var(--cream-soft); border-color: var(--line); box-shadow: none; }
.card--outline { box-shadow: none; }
.step { display: grid; grid-template-columns: 2.5rem 1fr; gap: .9rem; align-items: start; }
.step-num { width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; color: #fff; }
.step:nth-child(1) .step-num { background: var(--red); }
.step:nth-child(2) .step-num { background: var(--orange); }
.step:nth-child(3) .step-num { background: var(--green); }
.step:nth-child(4) .step-num { background: var(--blue); }
.step:nth-child(5) .step-num { background: var(--pink); }
.step:nth-child(6) .step-num { background: var(--purple); }
.step p { margin: 0; }
.colour-wheel { width: min(220px, 60%); margin-inline: auto; }

.rainbow-bar { height: 8px; background: linear-gradient(90deg, var(--red), var(--orange), var(--yellow), var(--green), var(--blue), var(--pink)); }
.rainbow-rule { height: 5px; width: 120px; border-radius: 4px; background: linear-gradient(90deg, var(--red), var(--orange), var(--yellow), var(--green), var(--blue), var(--pink)); margin: .25rem 0 1.25rem; }

/* ---------- pills / badges ---------- */
.pill { display: inline-block; font-size: .85rem; font-weight: 700; padding: .2rem .7rem; border-radius: 999px; background: var(--lilac); color: var(--purple-deep); white-space: nowrap; }
.pill--ok { background: var(--ok-bg); color: var(--ok); }
.pill--warn { background: var(--warn-bg); color: var(--warn); }
.pill--bad { background: var(--bad-bg); color: var(--bad); }
.pill--info { background: var(--info-bg); color: var(--info); }

/* ---------- flashes / banners ---------- */
.flash, .banner { padding: .9rem 1.1rem; border-radius: var(--radius-sm); margin: 1rem 0; border: 1px solid transparent; }
.flash--success, .banner--ok { background: var(--ok-bg); color: var(--ok); border-color: #BFE5D0; }
.flash--info, .banner--info { background: var(--info-bg); color: var(--info); border-color: #C5D9EE; }
.flash--error, .banner--bad { background: var(--bad-bg); color: var(--bad); border-color: #F3C1BC; }
.banner--warn { background: var(--warn-bg); color: var(--warn); border-color: #F3DFAE; }

/* ---------- forms ---------- */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; margin-bottom: .35rem; }
.field .req { color: var(--pink); }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="number"],
.field input[type="date"], .field input[type="datetime-local"], .field input[type="url"], .field select, .field textarea {
  width: 100%; font: inherit; padding: .75rem .9rem; border: 2px solid var(--lilac-2); border-radius: var(--radius-sm); background: var(--paper); color: var(--ink); min-height: 48px;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--purple); outline: none; box-shadow: 0 0 0 3px rgba(90,45,130,.15); }
.field--error input, .field--error textarea, .field--error select { border-color: var(--bad); }
.field .help { font-size: .9rem; color: var(--muted); margin: .35rem 0 0; }
.field .error { color: var(--bad); font-weight: 700; margin: .35rem 0 0; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 600; }
.check input { width: 1.35rem; height: 1.35rem; margin-top: .2rem; accent-color: var(--purple); flex: none; }
.form-card { max-width: 38rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
legend { font-family: var(--font-head); color: var(--purple); font-size: 1.2rem; font-weight: 800; margin-bottom: .75rem; }

/* ---------- classes page ---------- */
.session-list { display: grid; gap: .9rem; }
.session { display: grid; gap: .6rem; grid-template-columns: 1fr; }
.session-when { font-family: var(--font-head); font-size: 1.15rem; color: var(--purple); font-weight: 600; margin: 0; }
.session-meta { margin: 0; color: var(--muted); font-size: .95rem; }
.session-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.price { font-weight: 800; }
.term-card { border: 2px solid var(--lilac-2); }
.term-card .term-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; align-items: baseline; }

/* ---------- booking summary ---------- */
.summary { background: var(--lilac); border-radius: var(--radius); padding: 1rem 1.25rem; }
.summary dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: 0; }
.summary dt { font-weight: 700; color: var(--purple-deep); }
.summary dd { margin: 0; }
.ref { font-family: var(--font-head); font-size: 1.6rem; letter-spacing: .06em; color: var(--purple); }
.status-hero { text-align: center; padding: 1.5rem 1rem; }
.status-icon { width: 72px; height: 72px; margin: 0 auto 1rem; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 5px solid var(--lilac-2); border-top-color: var(--purple); margin: 0 auto 1rem; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- FAQ ---------- */
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .25rem 1rem; margin-bottom: .6rem; }
.faq summary { cursor: pointer; font-weight: 700; padding: .6rem 0; color: var(--purple); }
.faq details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: .5rem; }

/* ---------- footer ---------- */
.site-footer { margin-top: 3rem; background: var(--paper); border-top: 1px solid var(--line); }
.footer-inner { display: grid; gap: 1.25rem; padding: 2rem 0; }
.footer-brand { font-family: var(--font-head); color: var(--purple); font-weight: 600; margin-bottom: .25rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }

/* ---------- sticky CTA (phones) ---------- */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; padding: .75rem var(--gutter) calc(.75rem + env(safe-area-inset-bottom)); background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-top: 1px solid var(--line); z-index: 40; }
body.no-sticky .sticky-cta { display: none; }
body.no-sticky { padding-bottom: 2rem; }

/* ---------- tables (organiser) ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; background: var(--paper); border-radius: var(--radius-sm); overflow: hidden; }
th, td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--lilac); color: var(--purple-deep); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- organiser ---------- */
.org-nav { display: flex; flex-wrap: wrap; gap: .4rem; padding: .75rem 0; }
.org-nav a { padding: .45rem .8rem; border-radius: 999px; font-weight: 700; text-decoration: none; background: var(--paper); border: 1px solid var(--line); font-size: .95rem; }
.org-nav a[aria-current="page"] { background: var(--purple); color: #fff; border-color: var(--purple); }
.stat-grid { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); }
.stat { background: var(--paper); border-radius: var(--radius-sm); padding: .9rem 1rem; border: 1px solid var(--line); }
.stat b { display: block; font-family: var(--font-head); font-size: 1.8rem; color: var(--purple); }
.inline-form { display: inline; }
.actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.testmode { background: var(--warn-bg); color: var(--warn); text-align: center; font-weight: 700; padding: .4rem; font-size: .9rem; }
.policy-preview { background: var(--warn-bg); color: var(--warn); border: 1px dashed var(--warn); padding: .75rem 1rem; border-radius: var(--radius-sm); }
.prose { max-width: 46rem; }
.prose h2 { margin-top: 1.75rem; }
.prose strong { color: var(--purple-deep); }

/* ---------- utilities ---------- */
.center { text-align: center; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mb-0 { margin-bottom: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ==========================================================================
   Tablet & laptop
   ========================================================================== */
@media (min-width: 640px) {
  :root { --gutter: 1.5rem; }
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .session { grid-template-columns: 1fr auto; align-items: center; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-inner { grid-template-columns: 1fr auto; }
}
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .sticky-cta { display: none; }
  .nav-toggle { display: none; }
  .nav-list--wide { display: flex; flex-direction: row; align-items: center; gap: .25rem; }
  .brand img { width: 220px; }
  .hero { padding: 3.5rem 0 4rem; }
  .hero-inner { grid-template-columns: 1.15fr .85fr; gap: 3rem; }
  .hero-art { width: 100%; max-width: 400px; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .section { padding: 3.5rem 0; }
  .two-col { display: grid; grid-template-columns: 1.2fr .8fr; gap: 3rem; align-items: start; }
}

/* ==========================================================================
   Reduced motion & print
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .spinner { animation: none; border-top-color: var(--lilac-2); }
}
@media print {
  .site-header, .site-footer, .sticky-cta, .org-nav, .no-print, .flash { display: none !important; }
  body { background: #fff; padding: 0; }
  table { font-size: 11pt; }
}
