/* Mikado Jiu Jitsu — palette taken from the gym's own posters:
   cream paper, tatami sage, deep navy type. */

/* Self-hosted, so the first paint never waits on another server (fonts/LICENSE.txt). */
@font-face {
  font-family: 'Anton'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/anton-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('fonts/inter-latin.woff2') format('woff2');
}

:root {
  color-scheme: light;
  --paper: #ebe5d8;
  --paper-light: #f5f1e8;
  --ink: #17233a;
  --ink-soft: #4a556a;
  --navy: #12305b;
  --navy-deep: #0c2140;
  --sage: #8fb58c;
  --sage-soft: #c9dcc4;
  --tatami: #6f8d6a;
  --line: rgba(18, 48, 91, 0.16);

  /* Roles. Dark mode swaps these, not the brand colours above. */
  --bg: var(--paper);
  --surface: var(--paper-light);
  --surface-raised: #fff;
  --heading: var(--navy);
  --accent: var(--navy);
  --accent-hover: var(--navy-deep);
  --on-accent: #fff;
  --label: #486345;
  --tape-ink: var(--navy);
  --band-sage: var(--sage-soft);
  --band-navy: var(--navy);
  --footer-bg: var(--navy-deep);
  --header-bg: rgba(235, 229, 216, 0.92);
  --photo-block: var(--sage);
  --feature-bg: var(--paper-light);
  --feature-border: transparent;
  --card-shadow: none;
  --hero-glow: none;
  --photo-filter: none;
  --icon-moon: inline;
  --icon-sun: none;

  --whatsapp: #13803f;
  --whatsapp-deep: #0f6e3a;

  --radius: 18px;
  --gutter: clamp(16px, 5vw, 56px);
  --display: 'Anton', 'Haettenschweiler', 'Arial Narrow', Impact, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* Light by default; dark only when the visitor picks it (app.js). */
:root[data-theme='dark'] {
  color-scheme: dark;
  --ink: #e8e3d6;
  --ink-soft: #a3adbf;
  --line: rgba(232, 227, 214, 0.12);

  --bg: #0b1220;
  --surface: #121c2e;
  --surface-raised: #17233a;
  --heading: #f4efe4;
  --accent: #9fc89a;
  --accent-hover: #b7d9b2;
  --on-accent: #0c2140;
  --label: #8fbf8a;
  --tape-ink: var(--navy-deep);
  --band-sage: #12211d;
  --band-navy: #0f2747;
  --footer-bg: #070c16;
  --header-bg: rgba(11, 18, 32, 0.78);
  --photo-block: #2c4a35;
  --feature-bg: rgba(255, 255, 255, 0.07);
  --feature-border: rgba(159, 200, 154, 0.45);
  --card-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 40px -24px rgba(0, 0, 0, 0.7);
  --hero-glow: radial-gradient(60% 55% at 85% 20%, rgba(143, 181, 140, 0.14), transparent 70%),
    radial-gradient(50% 50% at 0% 0%, rgba(38, 76, 135, 0.28), transparent 70%);
  --photo-filter: brightness(0.92) saturate(0.95);
  --icon-moon: none;
  --icon-sun: inline;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.6 var(--body);
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }

h1, h2 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--heading);
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 6.2vw, 5rem); }
h2 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h3 { font-size: 1.15rem; line-height: 1.25; color: var(--heading); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 20;
  padding: 10px 16px; background: var(--accent); color: var(--on-accent); border-radius: 8px;
}
.skip-link:focus { left: 8px; }

/* --- Shared pieces --------------------------------------------------------- */

.kicker {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--label);
}

.button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px; border: 2px solid var(--accent); border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font-weight: 600; text-decoration: none; text-align: center;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.button:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-2px); }
.button-ghost { background: transparent; color: var(--accent); }
.button-ghost:hover { background: var(--accent); color: var(--on-accent); }
.button-small { padding: 9px 18px; font-size: 0.9rem; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* "Next class" badge in the hero, filled in by app.js from the timetable. */
.next-class {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.92rem; color: var(--ink); text-decoration: none; box-shadow: var(--card-shadow);
}
/* Invisible, not removed, until app.js fills it in, so nothing below jumps. */
.next-class[hidden] { visibility: hidden; }
.next-class::before { content: ''; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--sage); }
.next-class.is-on-now::before { background: var(--whatsapp); box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.22); }
.next-class strong { color: var(--heading); }
.next-class:hover { border-color: var(--accent); }

/* WhatsApp is how most people here book, so it gets its own recognisable green. */
.button-whatsapp { gap: 8px; border-color: var(--whatsapp); background: var(--whatsapp); color: #fff; }
.button-whatsapp:hover { border-color: var(--whatsapp-deep); background: var(--whatsapp-deep); }
.whatsapp-icon { width: 22px; height: 22px; flex: none; }

.whatsapp-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 15;
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px 12px 14px;
  border-radius: 999px; background: var(--whatsapp); color: #fff;
  font-weight: 600; text-decoration: none;
  box-shadow: 0 10px 28px -8px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease, background 0.15s ease;
}
.whatsapp-float:hover { background: var(--whatsapp-deep); transform: translateY(-2px); }
.whatsapp-float .whatsapp-icon { width: 26px; height: 26px; }
@media (max-width: 640px) {
  .whatsapp-float { padding: 14px; }
  .whatsapp-float span { display: none; }
}

.text-link { font-weight: 600; color: var(--accent); text-underline-offset: 4px; }

.fine-print { margin-top: 20px; font-size: 0.9rem; color: var(--ink-soft); }

/* The torn-paper highlight from the gym's carousels. */
.tape {
  display: inline-block; padding: 0.04em 0.18em 0.08em; margin: 0.06em 0 0 -0.12em; white-space: nowrap;
  background: var(--sage); color: var(--tape-ink); transform: rotate(-1.2deg);
  clip-path: polygon(0 6%, 3% 0, 97% 3%, 100% 10%, 99% 92%, 96% 100%, 2% 97%, 0 90%);
}

/* --- Header ---------------------------------------------------------------- */

/* --- Announcement banner (Pages CMS) -------------------------------------- */

.announcement {
  position: relative; padding: 10px 52px; background: var(--band-navy); color: #e8edf5;
  text-align: center; font-size: 0.92rem; font-weight: 500; line-height: 1.45;
}
.announcement a { margin-left: 6px; color: var(--sage); font-weight: 700; text-underline-offset: 3px; white-space: nowrap; }
.announcement-close {
  position: absolute; top: 50%; right: 10px; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent;
  color: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.announcement-close:hover, .announcement-close:focus-visible { background: rgba(255, 255, 255, 0.12); }
.announcement-close[hidden] { display: none; }

.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 20px;
  padding: 12px var(--gutter);
  background: var(--header-bg); backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  text-decoration: none; color: var(--ink); white-space: nowrap;
}
.logo-mark { width: 64px; height: auto; flex: none; }

.site-nav { display: flex; gap: clamp(12px, 2.2vw, 28px); margin-left: auto; }
.site-nav a {
  font-size: 0.92rem; font-weight: 500; text-decoration: none; white-space: nowrap;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--sage); }
.site-nav a[aria-current='page'] { border-bottom-color: var(--accent); font-weight: 600; }

/* The toggle stays invisible until app.js can make it work, keeping its
   space so the header doesn't shift when it appears. */
.theme-toggle {
  display: inline-grid; place-items: center; flex: none;
  width: 40px; height: 40px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%;
  background: transparent; color: var(--heading); cursor: pointer;
  transition: background-color 0.2s ease, transform 0.3s ease;
}
.theme-toggle[hidden] { visibility: hidden; }
.theme-toggle:hover { background: var(--surface); transform: rotate(-15deg); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-moon { display: var(--icon-moon); }
.theme-toggle .icon-sun { display: var(--icon-sun); }

@media (max-width: 860px) {
  .site-header { flex-wrap: wrap; row-gap: 6px; }
  .site-header .button { margin-left: auto; }
  .site-nav {
    order: 3; flex: 1 1 calc(100% - 54px); min-width: 0; margin: 0;
    overflow-x: auto; scrollbar-width: none; padding-bottom: 2px;
  }
  .theme-toggle { order: 4; width: 34px; height: 34px; }
  html { scroll-padding-top: 120px; }
}

/* --- Hero ------------------------------------------------------------------ */

.hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(24px, 5vw, 72px); align-items: center;
  padding: clamp(32px, 6vw, 80px) var(--gutter) clamp(40px, 6vw, 88px);
  max-width: 1320px; margin: 0 auto;
}
main { background-image: var(--hero-glow); background-repeat: no-repeat; background-size: 100% 900px; }
.hero-copy { display: grid; gap: 22px; justify-items: start; }
.hero-sub { max-width: 54ch; font-size: 1.1rem; color: var(--ink-soft); }

.hero-photo { position: relative; }
.hero-photo::before {
  content: ''; position: absolute; inset: 18px -14px -14px 18px; z-index: -1;
  background: var(--photo-block); border-radius: var(--radius);
}
.hero-photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius);
}

.facts {
  display: flex; flex-wrap: wrap; gap: 14px 34px; margin-top: 6px; padding-top: 22px;
  border-top: 1px solid var(--line); width: 100%;
}
.facts li { font-size: 0.9rem; color: var(--ink-soft); }
.facts strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.35rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--heading); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-photo { margin-right: 14px; }
  .hero-photo img { aspect-ratio: 5 / 4; }
}

/* --- Sections -------------------------------------------------------------- */

.section { padding: clamp(56px, 8vw, 104px) var(--gutter); }
.section > * { max-width: 1208px; margin-left: auto; margin-right: auto; }
.section-head { display: grid; gap: 12px; margin-bottom: clamp(28px, 4vw, 48px); }
.lead { max-width: 60ch; font-size: 1.08rem; color: var(--ink-soft); }

.section-paper { background: var(--surface); }
.section-sage { background: var(--band-sage); }
.section-sage .kicker { color: var(--heading); }
.section-navy { background: var(--band-navy); color: #e8edf5; }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-navy .kicker { color: var(--sage); }
.section-navy .lead { color: #c3cee0; }

/* --- Programs -------------------------------------------------------------- */

.programs { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.program {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}
.program-photo { overflow: hidden; }
.program-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.5s ease; }
.program:hover .program-photo img { transform: scale(1.04); }
.program-body { display: grid; gap: 10px; padding: 22px; align-content: start; flex: 1; }
.program-body h3 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; letter-spacing: 0.02em; text-transform: uppercase; }
.program-when { font-size: 0.85rem; font-weight: 600; color: var(--label); }
.program-body .text-link { margin-top: auto; padding-top: 6px; }
.program-wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.program-wide .program-photo img { height: 100%; aspect-ratio: auto; min-height: 260px; }
.program-wide .program-body { padding: clamp(22px, 4vw, 40px); align-content: center; }
.program-wide .program-body > p:not(.program-when) { max-width: 52ch; }
@media (max-width: 640px) {
  .program-wide { grid-template-columns: 1fr; }
  .program-wide .program-photo img { aspect-ratio: 4 / 3; min-height: 0; }
}

/* --- Values ---------------------------------------------------------------- */

.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 28px 36px; }
.value { display: grid; gap: 8px; padding-top: 18px; border-top: 3px solid var(--accent); align-content: start; }

/* --- Timetable ------------------------------------------------------------- */

.day-tabs { display: none; }
.days { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.day {
  position: relative; padding: 18px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--card-shadow);
}
.day.is-today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.day-name {
  font-family: var(--display); font-weight: 400; font-size: 1.5rem; letter-spacing: 0.03em;
  text-transform: uppercase; margin-bottom: 14px;
}
.day.is-today .day-name::after {
  content: 'Today'; position: absolute; top: -10px; right: 14px; padding: 4px 9px;
  background: var(--sage); border-radius: 999px;
  font: 700 0.62rem/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--navy-deep);
}
.lessons { display: grid; gap: 12px; }
.lesson { display: grid; gap: 1px; padding-top: 12px; border-top: 1px solid var(--line); }
.lesson-time { font-size: 0.78rem; font-weight: 600; color: var(--label); font-variant-numeric: tabular-nums; }
.lesson-name { font-weight: 600; line-height: 1.3; }
.lesson-level { font-size: 0.82rem; color: var(--ink-soft); }

@media (max-width: 1040px) {
  .days { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

  /* With JavaScript the days collapse into tabs. */
  .has-tabs .day-tabs {
    display: flex; gap: 8px; margin-bottom: 16px; padding-bottom: 4px;
    overflow-x: auto; scrollbar-width: none;
  }
  .day-tabs button {
    flex: none; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px;
    background: transparent; color: var(--ink); font: 600 0.9rem var(--body); cursor: pointer;
  }
  .day-tabs button[aria-selected='true'] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
  .has-tabs .days { display: block; }
  .has-tabs .day { display: none; padding: 22px; }
  .has-tabs .day.is-active { display: block; }
  .has-tabs .lesson { grid-template-columns: 9.5rem 1fr; column-gap: 12px; align-items: baseline; }
  .has-tabs .lesson-time { font-size: 0.85rem; }
  .has-tabs .lesson-level { grid-column: 2; }
}

/* --- Pricing --------------------------------------------------------------- */

.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.price-card {
  display: grid; gap: 6px; align-content: start; padding: 26px;
  background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}
.price-card h3 { font-family: var(--display); font-weight: 400; font-size: 1.7rem; letter-spacing: 0.02em; text-transform: uppercase; }
.plan { border-bottom: 1px solid var(--line); }
.plan:last-child { border-bottom: 0; }
.plan-link {
  display: flex; align-items: center; gap: 14px; margin: 0 -10px; padding: 14px 10px;
  border-radius: 10px; color: inherit; text-decoration: none; transition: background 0.15s ease;
}
.plan-link:hover, .plan-link:focus-visible { background: var(--band-sage); }
.plan-name { flex: 1; }
.plan-book {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--whatsapp); color: #fff;
}
.plan-book .whatsapp-icon { width: 19px; height: 19px; }
.plan-link:hover .plan-book { background: var(--whatsapp-deep); }
.plan small { display: block; font-size: 0.8rem; font-weight: 400; color: var(--ink-soft); }
.plan-name { font-weight: 500; }
.plan-price { flex: none; text-align: right; font-weight: 700; color: var(--heading); font-variant-numeric: tabular-nums; }
.price-notes { display: grid; gap: 8px; padding-top: 10px; font-size: 0.85rem; color: var(--ink-soft); }

/* --- Story ----------------------------------------------------------------- */

.story { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.founder { position: sticky; top: 100px; }
.founder img { width: 100%; border-radius: var(--radius); }
.founder figcaption { margin-top: 14px; font-size: 0.92rem; color: var(--ink-soft); }
.founder figcaption strong { display: block; font-size: 1.1rem; color: var(--heading); }

.chapters { display: grid; gap: 0; border-left: 2px solid var(--sage); }
.chapter { position: relative; padding: 0 0 26px 26px; }
.chapter::before {
  content: ''; position: absolute; left: -8px; top: 6px; width: 14px; height: 14px;
  background: var(--bg); border: 3px solid var(--accent); border-radius: 50%;
}
.chapter-year { font-family: var(--display); font-size: 1.3rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--heading); }
.chapter p { margin-top: 4px; color: var(--ink-soft); }

.quote { margin-top: 12px; padding: 24px 26px; background: var(--band-sage); border-radius: var(--radius); }
.quote p { font-size: 1.2rem; font-weight: 600; line-height: 1.4; color: var(--heading); }
.quote cite { display: block; margin-top: 8px; font-size: 0.88rem; font-style: normal; color: var(--ink-soft); }

@media (max-width: 860px) {
  .story { grid-template-columns: 1fr; }
  .founder { position: static; max-width: 420px; }
}

/* --- First class FAQ ------------------------------------------------------ */

.faq { display: grid; gap: 12px; }
.faq-item {
  max-width: 860px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--card-shadow);
}
.faq-item summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 22px; cursor: pointer; list-style: none;
  font-weight: 600; color: var(--heading);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; flex: none; font: 400 1.6rem/1 var(--body); color: var(--label);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 22px 20px; color: var(--ink-soft); max-width: 70ch; }

/* --- Coaches --------------------------------------------------------------- */

.coaches { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.coach {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}
.coach-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.coach:only-child { max-width: 380px; }
.coach-body { display: grid; gap: 6px; padding: 22px; align-content: start; }
.coach-body h3 { font-family: var(--display); font-weight: 400; font-size: 1.7rem; letter-spacing: 0.02em; text-transform: uppercase; }
.coach-role { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--label); }
.coach-belt { font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.coach-body p:last-child { color: var(--ink-soft); }

/* --- Testimonials ---------------------------------------------------------- */

.testimonials { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.review-ask { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 22px; margin-top: 32px; text-align: center; }
.review-ask p { font-weight: 600; color: var(--heading); }
.testimonial figure {
  display: grid; gap: 14px; height: 100%; padding: 26px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--card-shadow);
}
.testimonial blockquote { margin: 0; }
.testimonial blockquote p { color: var(--ink); line-height: 1.55; }
.testimonial blockquote p::before { content: '“'; display: block; height: 0.7em; font: 400 3rem/1 var(--display); color: var(--sage); }
.testimonial figcaption { align-self: end; font-size: 0.88rem; color: var(--ink-soft); }
.testimonial figcaption strong { color: var(--heading); }

/* --- Results -------------------------------------------------------------- */

.results { display: grid; gap: 22px; }
.result-headline {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); overflow: hidden;
  background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}
.result-photo img { width: 100%; height: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.result-body { display: grid; gap: 14px; align-content: center; padding: clamp(24px, 4vw, 48px); }
.result-event { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--label); }
.result-place { font-size: 1.1rem; color: var(--ink-soft); }
.result-place strong {
  display: block; font: 400 clamp(4rem, 9vw, 6.5rem)/0.9 var(--display); color: var(--heading);
}
.medals { display: flex; flex-wrap: wrap; gap: 10px; }
.medal {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 16px; border-radius: 999px;
  font-size: 0.85rem; font-weight: 600; color: #1d2433;
}
.medal strong { font: 400 1.5rem/1 var(--display); }
.medal-gold { background: #f2d36b; }
.medal-silver { background: #d5dae2; }
.medal-bronze { background: #e3b48a; }
.result-body > p:not([class]) { color: var(--ink-soft); max-width: 52ch; }
.result-squad { font-size: 0.9rem; font-weight: 600; color: var(--ink); }

.result-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.result-item {
  display: grid; gap: 6px; align-content: start; padding: 20px;
  background: var(--surface-raised); border: 1px solid var(--line); border-radius: 14px;
}
.result-item h3 { font-family: var(--display); font-weight: 400; font-size: 1.35rem; letter-spacing: 0.02em; text-transform: uppercase; }
.result-item p:last-child { font-size: 0.92rem; color: var(--ink-soft); }
.result-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.78rem; font-weight: 600; color: var(--label); }
.result-badge { padding: 3px 10px; border-radius: 999px; background: var(--sage); color: var(--navy-deep); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; }

@media (max-width: 760px) {
  .result-headline { grid-template-columns: 1fr; }
  .result-photo img { aspect-ratio: 4 / 3; }
}

/* --- Class pages (kids, Gi, No Gi, MMA) ------------------------------------- */

.class-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 22px; align-items: start; }
.class-layout .price-grid { grid-template-columns: 1fr; }
.class-slots { display: grid; gap: 14px; }
.class-slot {
  display: grid; gap: 4px; padding: 22px 24px;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--sage);
  border-radius: 14px; box-shadow: var(--card-shadow);
}
.class-slot h3 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; letter-spacing: 0.02em; text-transform: uppercase; }
.class-slot-name { font-weight: 600; color: var(--ink); }
.class-slot-book { justify-self: start; margin-top: 10px; }
.class-slot-when { font-weight: 600; color: var(--label); font-variant-numeric: tabular-nums; }

.kids-competing { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(24px, 5vw, 56px); align-items: center; }
.kids-podium img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.kids-competing-copy { display: grid; gap: 16px; justify-items: start; }
.kids-competing-copy p:not(.lead) { color: #c3cee0; max-width: 60ch; }
.section-navy .text-link { color: var(--sage); }

@media (max-width: 860px) {
  .class-layout, .kids-competing { grid-template-columns: 1fr; }
  .kids-podium { max-width: 360px; }
}

/* --- Gallery page ----------------------------------------------------------- */

.gallery-intro { padding-bottom: 0; }
.gallery-intro .section-head { margin-bottom: 24px; }
.gallery-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.gallery-filters[hidden] { visibility: hidden; }
.gallery-filters button {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font: inherit; font-weight: 600; color: var(--ink);
}
.gallery-filters button span { font-size: 0.8rem; font-weight: 500; color: var(--ink-soft); }
.gallery-filters button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.gallery-filters button[aria-pressed="true"] span { color: inherit; opacity: 0.8; }

.photo-section { padding-top: clamp(24px, 4vw, 40px); }
.photo-grid { columns: 3 260px; column-gap: 12px; }
.photo-grid li { break-inside: avoid; margin-bottom: 12px; }
.photo-grid li[hidden] { display: none; }
.photo-link { display: block; overflow: hidden; border-radius: 14px; }
.photo-link img { display: block; width: 100%; height: auto; transition: transform 0.4s ease; }
.photo-link:hover img, .photo-link:focus-visible img { transform: scale(1.03); }
@media (max-width: 560px) { .photo-grid { columns: 2; column-gap: 8px; } .photo-grid li { margin-bottom: 8px; } }

.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 56px 64px 24px;
  border: 0; background: rgba(6, 12, 24, 0.94); color: #e8edf5;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(6, 12, 24, 0.85); }
.lightbox figure { display: grid; gap: 14px; justify-items: center; max-width: 100%; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); width: auto; height: auto; border-radius: 10px; filter: none; }
.lightbox figcaption { max-width: 70ch; text-align: center; font-size: 0.92rem; color: #c3cee0; }
.lightbox button {
  position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; cursor: pointer;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 2rem; line-height: 1;
}
.lightbox button:hover, .lightbox button:focus-visible { background: rgba(255, 255, 255, 0.22); }
.lightbox-close { top: 12px; right: 12px; }
.lightbox-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 10px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .lightbox { padding: 60px 12px 84px; }
  .lightbox img { max-height: calc(100vh - 230px); }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 16px; transform: none; }
  .lightbox-prev { left: calc(50% - 60px); }
  .lightbox-next { right: calc(50% - 60px); }
}

/* --- Coach pages ---------------------------------------------------------- */

.coach-more { margin-top: 4px; }

/* The lineage reads as a chain of teachers, ending at the coach on the tape. */
.lineage { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 0; counter-reset: lineage; }
.lineage li {
  display: inline-flex; align-items: center; font-weight: 600; color: var(--ink);
}
.lineage li:not(:last-child)::after { content: '→'; margin: 0 14px; color: var(--label); font-weight: 400; }
.lineage .is-current {
  padding: 0.1em 0.4em; font-family: var(--display); font-weight: 400; font-size: 1.5rem; letter-spacing: 0.02em;
  text-transform: uppercase; background: var(--sage); color: var(--tape-ink); transform: rotate(-1.5deg);
  clip-path: polygon(0 6%, 3% 0, 97% 3%, 100% 10%, 99% 92%, 96% 100%, 2% 97%, 0 90%);
}

/* The journey: a line down the left with the year beside each step. */
.journey { display: grid; gap: 0; }
.journey-step {
  display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 28px;
  position: relative; padding-bottom: 40px;
}
.journey-step::before {
  content: ''; position: absolute; left: 132px; top: 10px; bottom: -10px; width: 2px; background: var(--line);
}
.journey-step:last-child::before { display: none; }
.journey-step::after {
  content: ''; position: absolute; left: 127px; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--sage); box-shadow: 0 0 0 4px var(--bg);
}
.journey-year {
  text-align: right; font-family: var(--display); font-size: 1.6rem; line-height: 1; letter-spacing: 0.02em; color: var(--heading);
}
.journey-body { display: grid; gap: 8px; padding-left: 18px; justify-items: start; }
.journey-body h3 { font-size: 1.15rem; }
.journey-body > p { max-width: 62ch; color: var(--ink-soft); }
.journey-photo { margin-top: 10px; width: min(100%, 460px); }
.journey-photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; box-shadow: var(--card-shadow); }
@media (max-width: 640px) {
  .journey-step { grid-template-columns: 1fr; gap: 6px; padding-left: 26px; }
  .journey-step::before { left: 5px; }
  .journey-step::after { left: 0; }
  .journey-year { text-align: left; font-size: 1.4rem; }
  .journey-body { padding-left: 0; }
}

.coach-quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.coach-quote {
  display: grid; gap: 14px; align-content: space-between; padding: 26px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: var(--radius);
}
.coach-quote blockquote p { font-size: 1.12rem; line-height: 1.55; color: #fff; }
.coach-quote figcaption { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; color: var(--sage); }
.section-navy .fine-print { color: #c3cee0; }

/* --- Events ---------------------------------------------------------------- */

.events { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.event {
  display: grid; gap: 8px; align-content: start; padding: 24px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
}
.event p { color: #c3cee0; font-size: 0.95rem; }
.event .event-when { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; color: var(--sage); }
.event .event-fees { font-weight: 600; color: #fff; }
.event.is-upcoming { grid-column: 1 / -1; background: var(--feature-bg); border-color: var(--feature-border); }
.event.is-upcoming > p:not(.event-when) { max-width: 70ch; }
.event.is-upcoming h3 { color: var(--heading); }
.event.is-upcoming p { color: var(--ink-soft); }
.event.is-upcoming .event-when { color: var(--label); }
.event.is-upcoming .event-fees { color: var(--heading); }
.event-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 6px; }
.event.is-upcoming .text-link { color: var(--accent); }
.is-past .event-register, .is-past .add-calendar { display: none; }

/* "Add to calendar": a button that opens a two-item menu, no script needed. */
.add-calendar { position: relative; }
.add-calendar summary {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; list-style: none; cursor: pointer;
  border: 2px solid var(--accent); border-radius: 999px; font-weight: 600; color: var(--accent);
}
.add-calendar summary::-webkit-details-marker { display: none; }
.add-calendar summary::after { content: '▾'; font-size: 0.8em; }
.add-calendar[open] summary, .add-calendar summary:hover { background: var(--accent); color: var(--on-accent); }
.add-calendar-menu {
  position: absolute; z-index: 5; top: calc(100% + 8px); left: 0; display: grid; min-width: 210px; padding: 6px;
  background: var(--surface-raised); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--card-shadow);
}
.add-calendar-menu a { padding: 10px 14px; border-radius: 10px; font-weight: 600; color: var(--heading); text-decoration: none; }
.add-calendar-menu a:hover, .add-calendar-menu a:focus-visible { background: var(--band-sage); }

/* --- Seminar pages ---------------------------------------------------------- */

.seminar-hero .tape { white-space: normal; }
/* Posters carry their own text, so they keep their 4:5 shape on phones too. */
.seminar-hero .hero-photo img { aspect-ratio: 4 / 5; }
.seminar-past-note { display: none; font-weight: 600; color: var(--heading); }
.is-past .seminar-past-note { display: block; }
.seminar-about { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: clamp(24px, 5vw, 56px); align-items: start; }
.seminar-bio { display: grid; gap: 16px; max-width: 65ch; font-size: 1.05rem; color: var(--ink); }
.seminar-highlights {
  padding: 26px; background: var(--surface-raised); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--card-shadow);
}
.seminar-highlights h3 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; letter-spacing: 0.02em; text-transform: uppercase; margin-bottom: 10px; }
.seminar-highlights li { padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.seminar-highlights li:last-child { border-bottom: 0; }
@media (max-width: 860px) { .seminar-about { grid-template-columns: 1fr; } }
.badge {
  justify-self: start; padding: 4px 10px; border-radius: 999px; background: var(--sage);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--navy-deep);
}

/* --- Gallery --------------------------------------------------------------- */

.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gallery img { width: 100%; height: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; }
@media (max-width: 640px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --- Visit and footer ------------------------------------------------------ */

/* The not-found page: a big taped "404" over the hero photo. */
.not-found-code {
  position: absolute; right: -22px; top: 26px; padding: 0.02em 0.22em 0.06em;
  font-family: var(--display); font-size: clamp(3.2rem, 8vw, 6.5rem); line-height: 1; letter-spacing: 0.02em;
  background: var(--sage); color: var(--tape-ink); transform: rotate(4deg);
  clip-path: polygon(0 6%, 3% 0, 97% 3%, 100% 10%, 99% 92%, 96% 100%, 2% 97%, 0 90%);
  box-shadow: var(--card-shadow);
}
/* The photo's subject is the person on the bottom, so the wide phone crop keeps the lower part. */
.not-found .hero-photo img { object-position: center 75%; }
@media (max-width: 860px) { .not-found-code { right: -8px; top: 14px; } }

.visit { text-align: center; }
.visit .section-head { justify-items: center; }
.visit .actions { justify-content: center; }

.visit-map {
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: stretch;
  margin-top: clamp(32px, 5vw, 48px); overflow: hidden; text-align: left;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--card-shadow);
}
.visit-map address {
  display: grid; align-content: center; gap: 4px; padding: clamp(24px, 4vw, 40px);
  font-style: normal; line-height: 1.6; color: var(--ink-soft);
}
.visit-map address strong {
  font-family: var(--display); font-weight: 400; font-size: 1.6rem; letter-spacing: 0.02em;
  text-transform: uppercase; color: var(--heading);
}
.visit-map iframe { display: block; width: 100%; min-height: 320px; height: 100%; border: 0; }
@media (max-width: 760px) {
  .visit-map { grid-template-columns: 1fr; }
  .visit-map iframe { min-height: 260px; }
}

.site-footer {
  display: grid; gap: 10px; justify-items: center; text-align: center;
  padding: 44px var(--gutter); background: var(--footer-bg); color: #c3cee0; font-size: 0.9rem;
}
.site-footer .brand { color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin-bottom: 6px; }
.footer-instagram { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; text-underline-offset: 4px; }
.footer-instagram svg { width: 22px; height: 22px; }
.footer-links a { color: #fff; font-weight: 600; text-underline-offset: 4px; }

main img { filter: var(--photo-filter); }
/* <picture> only chooses the file; the <img> inside lays out as before. */
picture { display: contents; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
