/* Shared design system for the course pages (index.html, turbo.html). All design decisions live in these tokens. */
:root {
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --paper: #ffffff;
  --mist: #f5f5f7;
  --night: #000000;
  --night-ink: #f5f5f7;
  --night-ink-2: #a1a1a6;
  --line: #d2d2d7;
  --accent: #d70015;        /* CTAs only */
  --accent-press: #b40012;

  --font: "Alexandria", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --fs-hero: clamp(48px, 9vw, 96px);
  --fs-h2: clamp(36px, 6vw, 64px);
  --fs-h3: clamp(28px, 4vw, 40px);
  --fs-lead: clamp(19px, 2.2vw, 24px);
  --fs-body: 17px;
  --w-head: 800;
  --fs-small: 14px;

  /* 8px scale */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 40px; --s6: 48px; --s8: 64px; --s9: 72px; --s12: 96px; --s15: 120px;
  --section: var(--s9);
  --gutter: 20px;
  --text-max: 980px;
  --media-max: 1200px;

  --radius: 20px;
  --pill: 980px;
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
  --header-h: 52px;
}
@media (min-width: 768px) { :root { --section: var(--s15); --gutter: 32px; --fs-body: 18px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: var(--w-head); line-height: 1.3; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
section[id] { scroll-margin-top: var(--header-h); }

.skip-link {
  position: absolute; inset-inline-start: var(--s2); top: -64px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: var(--s1) var(--s2); border-radius: var(--pill);
}
.skip-link:focus { top: var(--s1); }

.wrap { width: 100%; max-width: calc(var(--text-max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-wide { width: 100%; max-width: calc(var(--media-max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.section { padding-block: var(--section); }
.section--mist { background: var(--mist); }
.section--night { background: var(--night); color: var(--night-ink); }

.eyebrow { font-size: var(--fs-small); font-weight: 600; color: var(--ink-2); margin-block-end: var(--s1); }
.section--night .eyebrow { color: var(--night-ink-2); }
.h2 { font-size: var(--fs-h2); }
.h3 { font-size: var(--fs-h3); }
.lead { font-size: var(--fs-lead); color: var(--ink-2); line-height: 1.7; margin-block-start: var(--s2); }
.section--night .lead { color: var(--night-ink-2); }
.center { text-align: center; }
.center .lead { margin-inline: auto; max-width: 34ch; }
.head { margin-block-end: var(--s6); }
@media (min-width: 768px) { .head { margin-block-end: var(--s8); } }
/* Tight tracking only for Latin runs: negative tracking breaks Arabic joins. */
.latin { letter-spacing: -0.01em; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s1);
  min-height: 48px; padding: 12px 28px; border-radius: var(--pill); border: 0;
  font: inherit; font-size: 17px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color 180ms var(--ease), transform 180ms var(--ease), opacity 180ms var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-press); }
.btn-primary:disabled { opacity: 0.6; cursor: progress; }
.btn-sm { min-height: 32px; padding: 6px 16px; font-size: 14px; }
.link { color: inherit; font-weight: 600; text-decoration: none; border-block-end: 1px solid currentColor; transition: opacity 180ms var(--ease); }
.link:hover { opacity: 0.7; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(0, 0, 0, 0.92); color: var(--night-ink);
  transition: background-color 300ms var(--ease);
}
.site-header.is-scrolled { background: rgba(22, 22, 23, 0.72); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.logo { display: inline-flex; align-items: center; height: 100%; text-decoration: none; }
.logo img { height: 40px; width: auto; }
.logo-fallback { display: none; font-weight: 800; letter-spacing: 0.02em; }
.logo--nomark .logo-fallback { display: inline; }
.header-nav { display: flex; align-items: center; gap: var(--s3); font-size: 13px; }
.header-nav a:not(.btn) { color: var(--night-ink-2); text-decoration: none; transition: color 180ms var(--ease); }
.header-nav a:not(.btn):hover { color: var(--night-ink); }
.header-nav .hide-sm { display: none; }
@media (min-width: 768px) { .header-nav .hide-sm { display: inline; } }

/* Hero */
.hero { padding-block: var(--s8) 0; overflow: hidden; }
@media (min-width: 768px) { .hero { padding-block-start: var(--s12); } }
.hero h1 { font-size: var(--fs-hero); line-height: 1.2; }
.hero .lead { max-width: 30ch; }
.hero-date { margin-block-start: var(--s3); font-size: var(--fs-small); color: var(--night-ink-2); }
.hero-date strong { color: var(--night-ink); font-weight: 600; }
.hero-actions { margin-block-start: var(--s4); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--s3); }
.hero-media { margin: var(--s8) auto 0; padding-block-end: var(--section); }
.hero-media figure { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; background: #111; }
@media (min-width: 768px) { .hero-media figure { aspect-ratio: 16 / 9; } }
.hero-media img { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 40%; will-change: transform; }

/* Feature rows ("what you'll master") */
.feature { display: grid; gap: var(--s5); align-items: center; }
.feature figure { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; background: var(--line); }
.feature img { width: 100%; height: 100%; object-fit: cover; }
.feature .h2 { font-size: var(--fs-h3); }
@media (min-width: 900px) {
  .feature { grid-template-columns: 1fr 1fr; gap: var(--s12); }
  .feature .h2 { font-size: clamp(36px, 4.2vw, 56px); }
  .feature--flip figure { order: -1; }
}

/* Workshop grid */
.grid { display: grid; gap: var(--s2); grid-template-columns: 1fr 1fr; }
.grid figure { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; background: var(--line); }
.grid figure.wide { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.grid img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, 1fr); gap: var(--s3); } }

/* Program */
.days { list-style: none; margin: 0; padding: 0; border-block-start: 1px solid var(--line); }
.day { display: grid; grid-template-columns: 88px 1fr; gap: var(--s2); padding-block: var(--s3); border-block-end: 1px solid var(--line); align-items: baseline; }
.day-n { font-size: var(--fs-small); font-weight: 700; color: var(--ink-2); }
.day-t { font-size: clamp(19px, 2.4vw, 24px); font-weight: 700; line-height: 1.5; }
@media (min-width: 768px) { .day { grid-template-columns: 160px 1fr; padding-block: var(--s4); } }

/* Placeholders: content the academy still has to supply. Easy to spot, easy to grep (class="ph"). */
.ph { outline: 2px dashed #c9a400; outline-offset: 4px; background: #fffbe6; color: #6b5800; border-radius: 6px; padding-inline: 6px; font-weight: 600; }
.ph-note { margin-block-start: var(--s3); font-size: var(--fs-small); }

/* Testimonials */
.videos { display: grid; gap: var(--s3); grid-template-columns: 1fr; }
@media (min-width: 640px) { .videos { grid-template-columns: repeat(3, 1fr); } }
.video-card {
  margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 9 / 16; background: var(--mist);
  display: grid; place-items: center; text-align: center; padding: var(--s3);
  border: 2px dashed #c9a400; color: #6b5800; font-size: var(--fs-small); font-weight: 600;
}
@media (max-width: 639px) { .video-card { aspect-ratio: 4 / 3; } }

/* Pricing */
.price-card { max-width: 560px; margin-inline: auto; text-align: center; }
.price { margin-block-start: var(--s4); font-size: clamp(48px, 8vw, 80px); font-weight: var(--w-head); line-height: 1.2; }
.price-unit { font-size: var(--fs-lead); font-weight: 600; color: var(--ink-2); }
.deposit { margin-block-start: var(--s2); font-size: var(--fs-lead); color: var(--ink-2); }
.includes { list-style: none; margin: var(--s5) 0 0; padding: 0; display: grid; gap: var(--s1); color: var(--ink); }
.includes li { padding-block: var(--s1); border-block-end: 1px solid var(--line); }
.includes li:last-child { border-block-end: 0; }
.price-card .btn { margin-block-start: var(--s5); min-width: 240px; }
.call { margin-block-start: var(--s3); font-size: var(--fs-small); color: var(--ink-2); }

/* Signup form (markup and field names are shared with assets/script.js) */
.signup-form { max-width: 640px; margin-inline: auto; display: grid; gap: var(--s3); }
.form-row { display: grid; gap: var(--s1); }
.form-row label { font-size: 15px; font-weight: 600; }
.signup-form input[type="text"], .signup-form input[type="tel"], .signup-form input[type="email"], .signup-form textarea {
  width: 100%; font: inherit; font-size: 17px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  transition: border-color 180ms var(--ease);
}
.signup-form input:focus, .signup-form textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(29, 29, 31, 0.12); }
.signup-form input[type="tel"] { direction: ltr; text-align: end; }
.signup-form textarea { resize: vertical; min-height: 96px; }
.choice-group { display: flex; flex-wrap: wrap; gap: var(--s1); }
.choice-btn {
  min-height: 44px; padding: 10px 18px; border-radius: var(--pill); border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); font: inherit; font-size: 15px; cursor: pointer;
  transition: background-color 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease);
}
.choice-btn:hover { border-color: var(--ink); }
.choice-btn.selected { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.invalid, .choice-group.invalid .choice-btn { border-color: var(--accent) !important; }
.field-error { min-height: 0; font-size: var(--fs-small); color: var(--accent); }
.field-error:empty { display: none; }
.signup-form .btn { width: 100%; margin-block-start: var(--s1); }
.form-message { text-align: center; font-weight: 600; min-height: 1.6em; }
.form-message.success { color: #1a7f37; }
.form-message.error { color: var(--accent); }

/* FAQ */
.faq-list { border-block-start: 1px solid var(--line); }
.faq-item { border-block-end: 1px solid var(--line); }
.faq-question {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: var(--s2);
  padding-block: var(--s3); background: none; border: 0; font: inherit; font-size: clamp(17px, 2vw, 21px);
  font-weight: 700; color: var(--ink); text-align: start; cursor: pointer; line-height: 1.5;
}
.faq-icon { flex-shrink: 0; width: 20px; height: 20px; position: relative; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; inset-inline-start: 3px; top: 9px; width: 14px; height: 2px; background: currentColor; border-radius: 1px; transition: transform 300ms var(--ease); }
.faq-icon::after { transform: rotate(90deg); }
.faq-item[data-open="true"] .faq-icon::after { transform: rotate(0deg); }
.faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 400ms var(--ease); }
.faq-item[data-open="true"] .faq-answer { grid-template-rows: 1fr; }
.faq-answer-inner { overflow: hidden; color: var(--ink-2); }
.faq-answer-inner p { padding-block-end: var(--s3); max-width: 60ch; }

/* Final CTA + footer */
.final .btn { margin-block-start: var(--s4); }
.site-footer { background: var(--night); color: var(--night-ink-2); font-size: 13px; padding-block: var(--s5); }
.footer-inner { display: grid; gap: var(--s3); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); }
.footer-links a { text-decoration: none; color: var(--night-ink); }
.footer-links a:hover { text-decoration: underline; }
.site-footer .logo { height: auto; }
.site-footer .logo img { height: 32px; }
.footer-line { border-block-start: 1px solid #333336; padding-block-start: var(--s2); }

/* Reveal on scroll (toggled by assets/script.js) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-media img { transform: none !important; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
.nowrap { white-space: nowrap; }
.aside { margin-block-start: var(--s4); font-size: var(--fs-small); color: var(--ink-2); }

/* Course hub (index.html) */
.hero--text { padding-block-end: var(--section); }
.course-grid { display: grid; gap: var(--s6); }
@media (min-width: 768px) { .course-grid { grid-template-columns: 1fr 1fr; gap: var(--s4); } }
.course-card { display: grid; gap: var(--s3); align-content: start; }
.course-card-media { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; background: var(--line); }
.course-card-media img { width: 100%; height: 100%; object-fit: cover; }
.course-card-meta { font-size: var(--fs-small); color: var(--ink-2); }
.course-card-desc { color: var(--ink-2); margin-block: var(--s1) var(--s3); max-width: 46ch; }
.course-card .h3 { margin-block-start: 4px; }
.about-text { max-width: 40ch; }
