/* Chik Consulting — site styles. Tokens come from brand.css (loaded first). */
:root {
  --measure: 66ch;
  --step--2: 0.75rem;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.9rem, 3.6vw, 2.6rem);
  --step-4: clamp(2.6rem, 6.2vw, 4.75rem);
  --section: clamp(var(--space-6), 9vw, 7.5rem);
  --gutter: var(--space-6);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
}
img { max-width: 100%; display: block; }
a { color: var(--chik-teal); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--chik-teal); outline-offset: 3px; }

h1, h2 { font-family: var(--font-display); font-weight: 500; line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 0.55em; }
h1 { font-size: var(--step-4); }
h1 em { font-style: italic; display: block; }
h2 { font-size: var(--step-3); }
h3 { font-family: var(--font-sans); font-weight: 500; font-size: var(--step-1); line-height: 1.3; margin: 0 0 0.4em; }
p { margin: 0 0 1em; max-width: var(--measure); }
strong, b { font-weight: 500; }

.label { display: block; font-size: var(--step--2); text-transform: uppercase; letter-spacing: 0.18em; color: var(--ink-muted); font-weight: 500; }
.rule::before { content: ""; display: block; width: 56px; height: 2px; background: var(--chik-teal); margin-bottom: var(--space-4); }

.wrap { width: min(1160px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brand-indigo); color: var(--on-brand); padding: .6rem 1rem; z-index: 50; }
.skip:focus { left: 1rem; top: 1rem; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 80px; gap: 1rem; }
.brand img { height: 40px; width: auto; }
.nav ul { list-style: none; display: flex; gap: 1.75rem; margin: 0; padding: 0; align-items: center; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: .98rem; }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--chik-teal); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .45rem .8rem; font: inherit; font-weight: 500; color: var(--ink); }
.nav-logo { display: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .5rem; font: inherit; font-weight: 500; text-decoration: none; padding: .8rem 1.3rem; border-radius: var(--radius-sm); border: 1px solid var(--brand-indigo); color: var(--brand-indigo); background: transparent; cursor: pointer; }
.btn:hover { background: var(--brand-indigo); color: var(--on-brand); }
.btn-primary { background: var(--brand-indigo); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-indigo-deep); border-color: var(--brand-indigo-deep); color: var(--on-brand); }
.btn-wa { background: var(--chik-teal); border-color: var(--chik-teal); color: #fff; }
.btn-wa:hover { background: #255955; border-color: #255955; color: #fff; }
.btn-small { padding: .5rem .95rem; font-size: var(--step--1); }
.nav a.btn-wa, .nav a.btn-wa:hover { color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: var(--space-5); }

/* Star watermark */
.has-star { position: relative; overflow: hidden; isolation: isolate; }
.has-star::after { content: ""; position: absolute; z-index: -1; pointer-events: none; background: url("logos/star-indigo.svg") center / contain no-repeat; opacity: .07; }
.hero.has-star::after { width: min(620px, 60vw); aspect-ratio: 515 / 475; right: -8%; top: -6%; }
.cta-band.has-star::after { background-image: url("logos/star-white.svg"); width: 380px; aspect-ratio: 515 / 475; right: -60px; bottom: -120px; opacity: .08; }

/* Hero */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 var(--section); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero-lede { font-size: var(--step-1); color: var(--ink-muted); max-width: 34ch; }

/* The Monday sheet: the signature element */
.sheet { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); }
.sheet-bar { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1.2rem; border-bottom: 1px solid var(--line); }
.sheet-bar strong { font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; }
.sheet-body { padding: 1.1rem 1.2rem 1.4rem; }
.task { display: grid; grid-template-columns: 4.2rem 1fr; gap: .8rem; padding: .6rem 0; border-bottom: 1px solid var(--line); font-size: .98rem; }
.task:last-of-type { border-bottom: 0; }
.task time { color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.task span { justify-self: start; }
.task.done span { text-decoration: line-through; text-decoration-color: var(--ink-muted); color: var(--ink-muted); }
.task.now span { background: var(--teal-soft); padding: 0 .3em; margin-left: -.3em; border-radius: var(--radius-sm); }
.prompt { margin-top: 1rem; background: var(--surface); border-left: 2px solid var(--chik-teal); padding: .9rem 1rem; font-size: .95rem; }
.prompt .label { margin-bottom: .45rem; }
.prompt-text { min-height: 4.8em; white-space: pre-wrap; }
.caret { display: inline-block; width: 2px; height: 1.05em; background: var(--ink); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Proof strip */
.proof { background: var(--brand-indigo-deep); color: var(--on-brand); }
.proof ul { list-style: none; margin: 0; padding: var(--space-5) 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.proof li { font-size: var(--step--1); color: #cfd0e6; }
.proof b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 2rem; color: var(--on-brand); line-height: 1.1; margin-bottom: .2rem; }

/* Sections */
.section { padding: var(--section) 0; }
.section-tight { padding-top: 0; }
.section-white { background: var(--surface-raised); border-block: 1px solid var(--line); }
.section-head { max-width: 46rem; margin-bottom: var(--space-5); }
.section-head p { color: var(--ink-muted); font-size: var(--step-1); }

.split { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.big-quote { font-family: var(--font-display); font-weight: 500; font-size: var(--step-3); line-height: 1.15; max-width: 16ch; margin: 0; }
.big-quote em { font-style: italic; }

/* Tracks list on home */
.tracks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.tracks li { display: grid; grid-template-columns: 15rem 1fr auto; gap: 1.5rem; align-items: baseline; padding: 1.3rem 0; border-bottom: 1px solid var(--line); }
.tracks h3 { margin: 0; }
.tracks p { margin: 0; color: var(--ink-muted); }
.tracks a { white-space: nowrap; font-weight: 500; }

/* Steps (true sequences only) */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step); font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--chik-teal); }
.steps h3 { margin-bottom: .2rem; }
.steps p { margin: 0; color: var(--ink-muted); }

.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5) var(--space-6); }
.principles > div { border-top: 1px solid var(--line); padding-top: var(--space-3); }
.principles p { color: var(--ink-muted); margin: 0; }

.sectors { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; padding: 0; margin: 0; }
.sectors li { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .45rem .95rem; font-size: var(--step--1); font-weight: 500; }

/* Trainer */
.trainer { display: grid; grid-template-columns: 220px 1fr; gap: var(--space-5); align-items: start; }
.portrait { aspect-ratio: 4 / 5; background: var(--surface); border: 1px dashed var(--ink-muted); border-radius: var(--radius-md); display: grid; place-items: center; color: var(--ink-muted); font-size: var(--step--1); text-align: center; padding: 1rem; }
.role { color: var(--ink-muted); font-weight: 500; }
.creds { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: var(--space-4) 0 0; list-style: none; }
.creds li { background: var(--surface); border: 1px solid var(--line); padding: .25rem .7rem; border-radius: var(--radius-sm); font-size: var(--step--1); }

/* CTA band */
.cta-band { background: var(--brand-indigo-deep); color: var(--on-brand); padding: clamp(3rem, 7vw, 5rem) 0; }
.cta-band .wrap { display: flex; justify-content: space-between; align-items: end; gap: 2rem; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 .4rem; max-width: 18ch; }
.cta-band p { margin: 0; color: #cfd0e6; }
.cta-band .actions { margin-top: 0; }
.cta-band .btn { border-color: var(--on-brand); color: var(--on-brand); }
.cta-band .btn:hover { background: var(--on-brand); color: var(--brand-indigo-deep); }
.cta-band .btn-wa { background: var(--chik-teal); border-color: var(--chik-teal); color: #fff; }
.cta-band .btn-wa:hover { background: #255955; border-color: #255955; color: #fff; }

/* Page header */
.page-head { padding: clamp(3rem, 6vw, 5rem) 0 var(--space-5); }
.page-head p { font-size: var(--step-1); color: var(--ink-muted); max-width: 44ch; }

/* Programmes */
.track { display: grid; grid-template-columns: 16rem 1fr; gap: 2rem; padding: var(--space-5) 0; border-top: 1px solid var(--ink); }
.track h2 { font-size: var(--step-2); }
.track-intro p { color: var(--ink-muted); font-size: .98rem; }
.course { display: grid; grid-template-columns: 1fr 9rem; gap: .3rem 1.5rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.course:first-child { padding-top: 0; }
.course h3 { margin: 0; font-size: 1.12rem; }
.course .meta { text-align: right; font-size: var(--step--1); color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.course p { margin: 0; color: var(--ink-muted); font-size: .98rem; grid-column: 1 / -1; }
.editions { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.edition { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4); }
.edition::before { content: ""; display: block; width: 28px; height: 1px; background: var(--chik-teal); margin-bottom: var(--space-3); }
.edition p { color: var(--ink-muted); margin: 0; font-size: .98rem; }
.note { background: var(--teal-soft); border-radius: var(--radius-md); padding: var(--space-4); max-width: 46rem; }
.note p:last-child { margin: 0; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(2rem, 6vw, 5rem); }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.contact-list .label { margin-bottom: .3rem; }
.contact-list a { font-size: var(--step-1); font-weight: 500; text-decoration: none; }
form { display: grid; gap: 1rem; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); padding: clamp(1.25rem, 3vw, 2rem); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label { display: grid; gap: .35rem; font-weight: 500; font-size: .95rem; }
input, select, textarea { font: inherit; font-weight: 400; padding: .7rem .8rem; border: 1px solid #b8b3a6; border-radius: var(--radius-sm); background: var(--surface-raised); color: var(--ink); width: 100%; }
textarea { min-height: 7rem; resize: vertical; }
.form-help { font-size: var(--step--1); color: var(--ink-muted); margin: 0; }
.form-error { color: #9b2c2c; font-size: var(--step--1); margin: 0; min-height: 1.2em; }

/* Footer */
.site-footer { background: var(--brand-indigo-deep); color: #cfd0e6; padding: var(--space-6) 0 var(--space-5); font-size: var(--step--1); }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer img { height: 34px; width: auto; margin-bottom: var(--space-4); }
.site-footer a { color: var(--on-brand); text-decoration: none; }
.site-footer a:hover { color: var(--chik-teal-on-dark); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.site-footer .label { color: var(--chik-teal-on-dark); margin-bottom: var(--space-3); }
.legal { grid-column: 1 / -1; border-top: 1px solid #34337a; padding-top: 1.2rem; margin-top: 1rem; max-width: none; }

/* Floating WhatsApp */
.wa-float { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 30; background: var(--chik-teal); color: #fff; text-decoration: none; font-weight: 500; padding: .8rem 1.15rem; border-radius: var(--radius-full); display: inline-flex; gap: .5rem; align-items: center; }
.wa-float:hover { background: #255955; color: #fff; }
.wa-float svg { width: 20px; height: 20px; }

/* Responsive */
@media (max-width: 900px) {
  :root { --gutter: var(--space-5); }
  .hero .wrap, .split, .contact-grid, .track { grid-template-columns: 1fr; }
  .proof ul { grid-template-columns: repeat(2, 1fr); }
  .tracks li { grid-template-columns: 1fr; gap: .3rem; }
  .editions { grid-template-columns: 1fr; }
  .trainer { grid-template-columns: 1fr; }
  .portrait { max-width: 220px; }
  .site-footer .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --gutter: 24px; }
  .site-header .wrap { min-height: 64px; }
  .brand img { height: 30px; }
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: flex-start; padding: 1rem 24px 1.5rem; gap: 1rem; }
  .principles, .field-row { grid-template-columns: 1fr; }
  .course { grid-template-columns: 1fr; }
  .course .meta { text-align: left; }
  .wa-float span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .caret { animation: none; }
}

/* CTA band sits directly above the footer: separate the two indigo grounds */
.cta-band + .site-footer, main:has(> .cta-band:last-child) + .site-footer { border-top: 1px solid #34337a; }

/* Parallax: driven by --py (px), set in main.js. Off when reduced motion is preferred. */
.has-star::after { transform: translate3d(0, var(--py, 0px), 0) rotate(calc(var(--py, 0px) * 0.04deg)); will-change: transform; }
.hero .sheet { transform: translate3d(0, calc(var(--py, 0px) * -0.35), 0); will-change: transform; }
@media (max-width: 900px) { .hero .sheet { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .has-star::after, .hero .sheet { transform: none !important; }
}

/* Rounded buttons */
.btn, .nav-toggle { border-radius: var(--radius-full); }
.btn { padding-inline: 1.5rem; }
.big-quote em { display: block; }

/* FAQ */
.faq { border-top: 1px solid var(--ink); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; padding: 1.1rem 0; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--chik-teal); }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item summary h3 { margin: 0; font-size: 1.08rem; }
.faq-item p { color: var(--ink-muted); margin: 0 0 1.2rem; }

/* ---------- Photos ---------- */
figure { margin: 0; }
figure img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-md); }
.room-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 220px)); gap: var(--space-3); }
.room-grid figure:nth-child(1) { grid-row: span 2; }
.room-grid figure:nth-child(2) { grid-row: span 2; }
.room-caption { color: var(--ink-muted); font-size: var(--step--1); margin-top: var(--space-3); }
.portrait-img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-radius: var(--radius-md); }
.wide-photo img { aspect-ratio: 21 / 8; }
.side-photo { margin-top: var(--space-5); }
.side-photo img { aspect-ratio: 4 / 3; }
.page-photo { padding-bottom: 0; }
@media (max-width: 900px) {
  .room-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .room-grid figure:nth-child(1) { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 4 / 3; }
  .room-grid figure:nth-child(2) { grid-row: span 2; }
  .room-grid figure:nth-child(n+3) { aspect-ratio: 4 / 3; }
  .wide-photo img { aspect-ratio: 16 / 9; }
}

/* ---------- Icons ---------- */
.icon { width: 30px; height: 30px; color: var(--chik-teal); display: block; margin-bottom: var(--space-2); }

/* ---------- Theme toggle ---------- */
.site-header .wrap { gap: .75rem; }
.brand { margin-right: auto; }
.theme-toggle { order: 3; width: 40px; height: 40px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius-full); background: transparent; color: var(--ink); cursor: pointer; flex: none; }
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .i-sun { display: none; }
.nav { order: 2; }
.nav-toggle { order: 4; }
.logo-dark { display: none; }

/* ---------- Dark theme ---------- */
[data-theme="dark"] {
  --surface: #0f0f2e;
  --surface-raised: #17173f;
  --ink: #eeece6;
  --ink-muted: #b4b7cb;
  --line: #2c2b63;
  --brand-indigo-deep: #1e1d63;
  --chik-teal: #7fb8b1;
  --teal-soft: #1d3a3c;
}
[data-theme="dark"] body { background: var(--surface); }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }
[data-theme="dark"] .btn { border-color: var(--ink); color: var(--ink); }
[data-theme="dark"] .btn:hover { background: var(--ink); color: #1c1b5e; }
[data-theme="dark"] .btn-primary { background: var(--ink); color: #1c1b5e; border-color: var(--ink); }
[data-theme="dark"] .btn-primary:hover { background: #ffffff; border-color: #ffffff; }
[data-theme="dark"] .btn-wa, [data-theme="dark"] .wa-float, [data-theme="dark"] .cta-band .btn-wa { background: #2f6f6a; border-color: #2f6f6a; color: #fff; }
[data-theme="dark"] .btn-wa:hover, [data-theme="dark"] .wa-float:hover { background: #3a847e; border-color: #3a847e; color: #fff; }
[data-theme="dark"] .icon { color: var(--chik-teal); }
[data-theme="dark"] .hero.has-star::after { background-image: url("logos/star-white.svg"); opacity: .06; }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { background: var(--surface); border-color: #46457e; }
[data-theme="dark"] .form-error { color: #f2a5a5; }
[data-theme="dark"] .tracks, [data-theme="dark"] .track, [data-theme="dark"] .faq { border-top-color: var(--ink-muted); }
[data-theme="dark"] .site-footer, [data-theme="dark"] .proof { border-block: 1px solid var(--line); }
[data-theme="dark"] figure img { filter: brightness(.92); }
.portrait-img { height: auto; }
img { height: auto; }
figure img { height: 100%; }
.wide-photo img, .side-photo img { height: auto; }
