/* ═══════════════════════════════════════════
   MADEIRA INTERNATIONAL CHESS FESTIVAL
   Stylesheet — "Monad" editorial style
   Warm parchment canvas · serif headings (400)
   · monospace UI · hairline borders · pills
═══════════════════════════════════════════ */

/* ── Design tokens ── */
:root {
  /* Colors */
  --color-parchment:       #f6f3f1;
  --color-lake-blue:       #2b59d1;
  --color-periwinkle-mist: #cfdaf5;
  --color-sky-blue:        #a0b5eb;
  --color-mint:            #a7fccd;
  --color-coral:           #ff9473;
  --color-gold:            #ecda98;
  --color-crimson:         #f37a0a;
  --color-off-black:       #242424;
  --color-ink:             #000000;
  --color-graphite:        #4e4d4d;
  --color-smoke:           #797776;
  --color-ash:             #cecac8;

  /* Type families */
  --font-mono:  'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-serif: 'Source Serif 4', ui-serif, Georgia, Cambria, 'Times New Roman', serif;

  /* Type scale */
  --text-caption:    12px;
  --text-body-sm:    14px;
  --text-body:       16px;
  --text-label:      18px;
  --text-body-lg:    20px;
  --text-subheading: 24px;
  --text-heading-sm: 32px;
  --text-heading:    40px;
  --text-heading-lg: 48px;
  --text-display:    80px;

  /* Spacing */
  --spacing-8:   8px;
  --spacing-16: 16px;
  --spacing-24: 24px;
  --spacing-32: 32px;
  --spacing-40: 40px;
  --spacing-64: 64px;
  --spacing-80: 80px;

  /* Layout */
  --page-max-width: 1432px;
  --content-width:  1120px;
  --card-padding:   40px;
  --nav-height:     80px;

  /* Radius */
  --radius-panel: 12px;   /* reading surfaces: cards, panels, tables */
  --radius-pill:  9999px; /* anything clickable */

  /* Footer surface (kept dark in both themes) */
  --footer-bg:    #242424;
  --footer-fg:    #f6f3f1;
  --footer-muted: rgba(246, 243, 241, 0.62);
  --footer-rule:  rgba(246, 243, 241, 0.16);

  /* Tints layered over surfaces */
  --tint-hover:   rgba(36, 36, 36, 0.06);
  --tint-rule:    rgba(36, 36, 36, 0.12);
  --tint-row:     rgba(207, 218, 245, 0.28);
  --wash-opacity: 0.45;

  --transition: 0.22s ease;
}

/* ── Dark theme — palette roles flip, layout is untouched ── */
[data-theme="dark"] {
  color-scheme: dark;

  --color-parchment:       #191816;  /* page canvas */
  --color-off-black:       #f2efe9;  /* primary text */
  --color-graphite:        #b3aea7;
  --color-smoke:           #8b8681;
  --color-ash:             #35322e;  /* hairlines */
  --color-periwinkle-mist: #232838;  /* elevated panels */
  --color-lake-blue:       #5c81ea;  /* lifted for contrast on dark */

  --footer-bg:    #0f0e0d;
  --footer-fg:    #f2efe9;
  --footer-muted: rgba(242, 239, 233, 0.6);
  --footer-rule:  rgba(242, 239, 233, 0.14);

  --tint-hover:   rgba(255, 255, 255, 0.07);
  --tint-rule:    rgba(255, 255, 255, 0.12);
  --tint-row:     rgba(255, 255, 255, 0.05);
  --wash-opacity: 0.22;
}

/* Decorative elements that need a nudge on the dark canvas */
/* The navy artwork disappears against dark, so flatten it to a white silhouette */
[data-theme="dark"] .hero-logo-bg {
  filter: brightness(0) invert(1);
  mix-blend-mode: normal;
  opacity: 0.14;
}

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--color-parchment);
  color: var(--color-off-black);
  font-family: var(--font-mono);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.025em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;          /* headings never go bold in this system */
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-off-black);
}

p { color: var(--color-graphite); }

ul[role="list"] { list-style: none; }
ul:not([role]) { padding-left: 1.25rem; }

img { display: block; max-width: 100%; }

a {
  color: var(--color-off-black);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--color-ash);
  transition: text-decoration-color var(--transition);
}
a:hover { text-decoration-color: var(--color-off-black); }

button {
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--color-off-black);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--spacing-40);
}

.section { padding: var(--spacing-80) 0; }

.hidden { display: none !important; }

/* Shared micro-typography */
.section-title {
  font-size: clamp(2rem, 4.5vw, var(--text-heading-lg));
  margin-bottom: var(--spacing-40);
  max-width: 20ch;
}

.tbd-note {
  color: var(--color-smoke);
  font-size: var(--text-body-sm);
}

/* ═══════════════════════════════════════════
   BUTTONS — pill language, full radius
═══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
  font-weight: 500;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), opacity var(--transition);
}

/* The single saturated fill — one per screen */
.btn-primary {
  background: var(--color-lake-blue);
  color: #fff;
}
.btn-primary::after { content: '▸'; font-size: 0.9em; }
.btn-primary:hover { background: #2449ad; }

.btn-dark {
  background: var(--color-off-black);
  color: var(--color-parchment);
}
.btn-dark:hover { background: #3a3a3a; }

.btn-ghost {
  background: transparent;
  border-color: var(--color-off-black);
  color: var(--color-off-black);
}
.btn-ghost:hover { background: var(--tint-hover); }

.btn-large {
  min-height: 56px;
  padding: 18px 40px;
}

/* ═══════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-parchment);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}
.navbar.scrolled { border-bottom-color: var(--color-ash); }

.nav-inner {
  max-width: var(--page-max-width);
  margin: 0 auto;
  height: var(--nav-height);
  padding: 0 var(--spacing-40);
  display: flex;
  align-items: center;
  gap: var(--spacing-32);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Tournament emblem. The background is sized and offset to crop the wordmark
   out of the source art, leaving just the king — the brand text sits beside it */
.brand-logo,
.footer-logo {
  width: 42px;
  height: 38px;
  flex-shrink: 0;
  background: url('../assets/tournament_logo_transparent.png') no-repeat;
  background-size: 118% 172%;
  background-position: 53% 5%;
  font-size: 0;
}

/* Navy on a dark surface reads as a smudge, so flatten it to a white silhouette */
.footer-logo {
  width: 36px;
  height: 33px;
  filter: brightness(0) invert(1);
}
[data-theme="dark"] .brand-logo { filter: brightness(0) invert(1); }

.brand-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.brand-full {
  font-size: var(--text-body-sm);
  font-weight: 500;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--color-off-black);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--spacing-24);
  margin-left: auto;
}

.nav-link {
  font-size: var(--text-body-sm);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--color-graphite);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.nav-link:hover { color: var(--color-off-black); }
.nav-link.active {
  color: var(--color-off-black);
  border-bottom-color: var(--color-off-black);
}

/* Register sits in the nav as an off-black pill */
.nav-register {
  padding: 10px 22px;
  border: 1px solid var(--color-off-black);
  border-radius: var(--radius-pill);
  background: var(--color-off-black);
  color: var(--color-parchment);
}
.nav-register:hover { background: #3a3a3a; color: var(--color-parchment); }
/* .nav-link.active would otherwise paint dark text onto the dark pill */
.nav-register.active {
  border-bottom-color: var(--color-off-black);
  color: var(--color-parchment);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-16);
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--color-ash);
  border-radius: var(--radius-pill);
}

.lang-btn {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: var(--text-caption);
  letter-spacing: 0.04em;
  color: var(--color-smoke);
  transition: background var(--transition), color var(--transition);
}
.lang-btn:hover { color: var(--color-off-black); }
.lang-btn.active {
  background: var(--color-off-black);
  color: var(--color-parchment);
}

.lang-sep { display: none; }

.theme-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid var(--color-ash);
  border-radius: var(--radius-pill);
  font-size: var(--text-body-sm);
  line-height: 1;
  color: var(--color-graphite);
  transition: color var(--transition), border-color var(--transition),
              background var(--transition);
}
.theme-btn:hover {
  color: var(--color-off-black);
  border-color: var(--color-off-black);
  background: var(--tint-hover);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-ash);
  border-radius: var(--radius-pill);
  padding: 0 10px;
}
.hamburger span {
  display: block;
  height: 1px;
  width: 100%;
  background: var(--color-off-black);
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ═══════════════════════════════════════════
   PAGE ROUTING
═══════════════════════════════════════════ */
.page { display: none; }
.page.active { display: block; }

/* ═══════════════════════════════════════════
   HERO — purely typographic, gradient washes
═══════════════════════════════════════════ */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(80px, 12vw, 160px) 0 clamp(64px, 9vw, 120px);
  text-align: center;
}

/* Coral → Sky atmospheric wash */
.hero-chess-bg {
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-58%);
  width: 900px;
  height: 620px;
  background: radial-gradient(circle at 30% 40%, rgba(255, 148, 115, 0.8), transparent 62%),
              radial-gradient(circle at 72% 55%, rgba(160, 181, 235, 0.8), transparent 60%);
  filter: blur(75px);
  opacity: var(--wash-opacity);
  pointer-events: none;
}

/* Sky → Mint counter-wash */
.hero-overlay {
  position: absolute;
  right: -160px;
  bottom: -220px;
  width: 620px;
  height: 480px;
  background: radial-gradient(circle at 50% 50%, rgba(167, 252, 205, 0.8), transparent 65%),
              radial-gradient(circle at 20% 70%, rgba(236, 218, 152, 0.7), transparent 60%);
  filter: blur(70px);
  opacity: var(--wash-opacity);
  pointer-events: none;
}

/* Logo watermark — layered over the gradient washes, clear of the hero text */
.hero-logo-bg {
  position: absolute;
  top: 50%;
  right: 5%;
  transform: translateY(-50%);
  width: clamp(240px, 26vw, 384px);
  aspect-ratio: 2958 / 3848;
  background: url('../assets/tournament_logo_transparent.png') center / contain no-repeat;
  mix-blend-mode: multiply;
  opacity: 0.8;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--spacing-40);
}

.hero-title {
  font-size: clamp(2.75rem, 7.5vw, var(--text-display));
  letter-spacing: -0.02em;
  margin-bottom: var(--spacing-32);
}
.hero-accent {
  display: block;
  font-style: normal;
  color: var(--color-graphite);
}

.hero-meta {
  font-size: var(--text-body);
  color: var(--color-graphite);
  margin-bottom: var(--spacing-40);
}
.hero-meta strong {
  font-weight: 500;
  color: var(--color-off-black);
}
.meta-sep { color: var(--color-ash); margin: 0 8px; }

.hero-cta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--spacing-16);
}

.hero-scroll-hint {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  margin-top: var(--spacing-64);
}
.scroll-line {
  display: block;
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, var(--color-ash), transparent);
}

/* ═══════════════════════════════════════════
   STATS STRIP
═══════════════════════════════════════════ */
.stats-strip {
  border-top: 1px solid var(--color-ash);
  border-bottom: 1px solid var(--color-ash);
  padding: var(--spacing-40) 0;
}

.stats-grid {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: var(--spacing-24);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-8);
  text-align: center;
}

.stat-num {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, var(--text-heading));
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: var(--text-caption);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-smoke);
}

.stat-divider {
  width: 1px;
  align-self: stretch;
  background: var(--color-ash);
}

/* ═══════════════════════════════════════════
   PROGRAMME LIST (home teaser)
═══════════════════════════════════════════ */
.events-teaser {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--color-ash);
}

.events-teaser-bg {
  position: absolute;
  left: -220px;
  top: 20%;
  width: 620px;
  height: 460px;
  background: radial-gradient(circle at 50% 50%, rgba(160, 181, 235, 0.7), transparent 62%),
              radial-gradient(circle at 70% 30%, rgba(167, 252, 205, 0.6), transparent 60%);
  filter: blur(75px);
  opacity: var(--wash-opacity);
  pointer-events: none;
}

.events-teaser .container { position: relative; z-index: 1; }

.programme-list { border-top: 1px solid var(--color-ash); }

.programme-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: var(--spacing-24);
  padding: var(--spacing-40) 0;
  border-bottom: 1px solid var(--color-ash);
  cursor: pointer;
  transition: opacity var(--transition);
}
.programme-row:hover { opacity: 0.7; }
.programme-row:hover .prog-arrow { transform: translateX(6px); }

.prog-num {
  font-size: var(--text-caption);
  letter-spacing: 0.08em;
  color: var(--color-smoke);
}

.prog-body h3 {
  font-size: var(--text-subheading);
  margin-bottom: 6px;
}
.prog-body p {
  font-size: var(--text-body-sm);
  color: var(--color-graphite);
}

.prog-date {
  font-size: var(--text-body-sm);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-smoke);
}

.prog-arrow {
  color: var(--color-off-black);
  transition: transform var(--transition);
}

.section-cta { margin-top: var(--spacing-40); }

/* ═══════════════════════════════════════════
   REGISTRATION CTA BAND
═══════════════════════════════════════════ */
.reg-cta-section { padding-bottom: var(--spacing-80); }

.reg-cta-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--card-padding);
  border: 1px solid var(--color-ash);
  border-radius: var(--radius-panel);
}

/* ═══════════════════════════════════════════
   PAGE HERO (inner pages)
═══════════════════════════════════════════ */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 9vw, 120px) 0 var(--spacing-64);
  border-bottom: 1px solid var(--color-ash);
}

.page-hero-bg {
  position: absolute;
  right: -180px;
  top: -160px;
  width: 640px;
  height: 460px;
  background: radial-gradient(circle at 50% 50%, rgba(255, 148, 115, 0.7), transparent 62%),
              radial-gradient(circle at 25% 70%, rgba(160, 181, 235, 0.75), transparent 60%);
  filter: blur(75px);
  opacity: var(--wash-opacity);
  pointer-events: none;
}

.page-hero .container { position: relative; z-index: 1; }

.page-hero h1 {
  font-size: clamp(2.5rem, 6vw, var(--text-display));
  margin-bottom: var(--spacing-16);
}
.page-hero p {
  font-size: var(--text-body-lg);
  color: var(--color-graphite);
  max-width: 56ch;
}

/* ═══════════════════════════════════════════
   EVENT CARDS
═══════════════════════════════════════════ */
.event-card {
  border: 1px solid var(--color-ash);
  border-radius: var(--radius-panel);
  padding: var(--card-padding);
  margin-bottom: var(--spacing-32);
}
.event-card:last-child { margin-bottom: 0; }

.event-card-header { margin-bottom: var(--spacing-24); }

.event-card-header h2 {
  font-size: var(--text-heading-sm);
}

.event-card-body > p {
  font-size: var(--text-body);
  line-height: 1.65;
  max-width: 72ch;
  margin-bottom: var(--spacing-32);
}

/* Key/value spec list — periwinkle panel lifts it out of the body copy */
.event-details {
  background: var(--color-periwinkle-mist);
  border-radius: var(--radius-panel);
  padding: var(--spacing-16) var(--spacing-40);
  margin-bottom: var(--spacing-32);
}

.detail-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--spacing-24);
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--tint-rule);
  font-size: var(--text-body-sm);
}
.detail-item:last-child { border-bottom: none; }

.detail-label {
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-off-black);
}

.detail-value { color: var(--color-off-black); }

.event-note {
  font-size: var(--text-body-sm);
  color: var(--color-graphite);
  max-width: 72ch;
}

.event-subtitle {
  font-size: var(--text-subheading);
  margin: var(--spacing-40) 0 var(--spacing-16);
}

.event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-16);
  margin-top: var(--spacing-40);
}

/* ═══════════════════════════════════════════
   TABLES (fees, schedule, prizes)
═══════════════════════════════════════════ */
.fees-table {
  border: 1px solid var(--color-ash);
  border-radius: var(--radius-panel);
  overflow: hidden;
}

.fee-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--spacing-24);
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--color-ash);
  font-size: var(--text-body-sm);
  transition: background var(--transition);
}
.fee-row:last-child { border-bottom: none; }
.fee-row:not(.fee-header):not(.fee-total):hover { background: var(--tint-row); }

.fee-header {
  background: var(--color-periwinkle-mist);
  font-size: var(--text-caption);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-off-black);
}

.fee-total {
  background: var(--color-periwinkle-mist);
  font-weight: 500;
}

.fee-amount {
  font-weight: 500;
  color: var(--color-off-black);
}

.fee-note {
  position: relative;
  margin-top: 12px;
  padding-left: 20px;
  font-size: var(--text-body-sm);
  color: var(--color-graphite);
}
.fee-note::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--color-ash);
}

/* ═══════════════════════════════════════════
   REGULATIONS
═══════════════════════════════════════════ */
.regs-container { max-width: 820px; }

.regs-downloads h2 {
  font-size: var(--text-heading-sm);
  margin-bottom: 12px;
}
.regs-downloads > p {
  font-size: var(--text-body-sm);
  margin-bottom: var(--spacing-24);
}

.download-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-16);
}

.btn-download {
  display: flex;
  text-decoration: none;
  color: inherit;
  align-items: center;
  gap: var(--spacing-16);
  min-width: 220px;
  padding: 20px 28px;
  background: transparent;
  border: 1px solid var(--color-ash);
  border-radius: var(--radius-pill);
  text-align: left;
  transition: background var(--transition), border-color var(--transition);
}
.btn-download:hover {
  border-color: var(--color-off-black);
  background: var(--tint-hover);
}

.dl-lang {
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--color-off-black);
}

.dl-info { display: flex; flex-direction: column; }
.dl-info strong {
  font-size: var(--text-body-sm);
  font-weight: 500;
}
.dl-info small {
  font-size: var(--text-caption);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-smoke);
}

/* ═══════════════════════════════════════════
   CONTACTS
═══════════════════════════════════════════ */
.contacts-layout {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 620px;
}

.contact-info-panel h2 {
  font-size: var(--text-heading-sm);
  margin-bottom: var(--spacing-32);
}

.contact-item {
  display: flex;
  gap: var(--spacing-16);
  align-items: flex-start;
  padding: var(--spacing-24) 0;
  border-bottom: 1px solid var(--color-ash);
}
.contact-item:first-of-type { border-top: 1px solid var(--color-ash); }

.contact-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-ash);
  border-radius: var(--radius-pill);
  font-size: var(--text-body-sm);
  color: var(--color-off-black);
}

.contact-detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.contact-label {
  font-size: var(--text-caption);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-smoke);
}

.contact-value {
  font-size: var(--text-body-sm);
  color: var(--color-off-black);
  overflow-wrap: anywhere;
}

/* ═══════════════════════════════════════════
   REGISTRATION PAGE
═══════════════════════════════════════════ */
.reg-block {
  padding-bottom: var(--spacing-64);
  margin-bottom: var(--spacing-64);
  border-bottom: 1px solid var(--color-ash);
}
.reg-block:last-of-type {
  border-bottom: none;
  margin-bottom: var(--spacing-32);
}

.reg-block h2 {
  font-size: var(--text-heading-sm);
  margin-bottom: 12px;
}

.reg-note {
  font-size: var(--text-body-sm);
  color: var(--color-graphite);
  margin-bottom: var(--spacing-32);
  max-width: 68ch;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-24);
}

.step {
  padding: var(--card-padding);
  border: 1px solid var(--color-ash);
  border-radius: var(--radius-panel);
}

.step-num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: var(--spacing-24);
  border: 1px solid var(--color-ash);
  border-radius: var(--radius-pill);
  font-size: var(--text-body-sm);
  color: var(--color-off-black);
}

.step h3 {
  font-size: var(--text-subheading);
  margin-bottom: 12px;
}

.step p {
  font-size: var(--text-body-sm);
  line-height: 1.65;
}

.required-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px var(--spacing-40);
  margin-bottom: var(--spacing-24);
  padding-left: 0;
  list-style: none;
}

.required-list li {
  position: relative;
  padding-left: 22px;
  font-size: var(--text-body-sm);
  color: var(--color-graphite);
}
.required-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--color-ash);
}

.reg-doc-note {
  padding: var(--spacing-24) var(--spacing-32);
  background: var(--color-periwinkle-mist);
  border-radius: var(--radius-panel);
  font-size: var(--text-body-sm);
  color: var(--color-off-black);
}

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-fg);
  padding: var(--spacing-80) 0 var(--spacing-32);
  margin-top: var(--spacing-80);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--spacing-40);
  padding-bottom: var(--spacing-64);
}

.footer-brand { display: flex; flex-direction: column; gap: var(--spacing-16); }

.footer-location {
  font-size: var(--text-body-sm);
  color: var(--footer-muted);
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--footer-muted);
  margin-bottom: var(--spacing-16);
}

.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 10px; }

.footer-col button,
.footer-col a,
.footer-col p {
  font-size: var(--text-body-sm);
  color: var(--footer-fg);
  text-decoration: none;
  transition: opacity var(--transition);
}
.footer-col button:hover,
.footer-col a:hover { opacity: 0.65; }
.footer-col p { margin-bottom: 10px; overflow-wrap: anywhere; }

.footer-bottom {
  padding-top: var(--spacing-24);
  border-top: 1px solid var(--footer-rule);
}
.footer-bottom p {
  font-size: var(--text-caption);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--footer-muted);
}

/* ═══════════════════════════════════════════
   SCROLL REVEAL
═══════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .contacts-layout { grid-template-columns: 1fr; gap: var(--spacing-40); }
  .steps-grid { grid-template-columns: 1fr; }
  /* No room beside centred text at this width, so it falls back behind it */
  .hero-logo-bg {
    right: auto;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(240px, 60vw, 380px);
    opacity: 0.16;
  }
  [data-theme="dark"] .hero-logo-bg { opacity: 0.12; }
}

@media (max-width: 860px) {
  .container,
  .nav-inner { padding-left: var(--spacing-24); padding-right: var(--spacing-24); }

  .hamburger { display: flex; }

  .nav-links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--spacing-16) var(--spacing-24) var(--spacing-32);
    background: var(--color-parchment);
    border-bottom: 1px solid var(--color-ash);
  }
  .nav-links.open { display: flex; }
  .nav-link {
    padding: 14px 0;
    border-bottom: 1px solid var(--color-ash);
    text-align: left;
  }
  .nav-link.active { border-bottom-color: var(--color-ash); }
  .nav-register {
    margin-top: var(--spacing-16);
    text-align: center;
    border-bottom: 1px solid var(--color-off-black);
  }

  .navbar { position: relative; }

  .programme-row { grid-template-columns: auto 1fr auto; row-gap: 12px; }
  .prog-arrow { display: none; }
  .required-list { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .section { padding: var(--spacing-64) 0; }
  .event-card,
  .step,
  .reg-cta-inner { padding: var(--spacing-24); }
  .event-details { padding: var(--spacing-8) var(--spacing-24); }
  .detail-item { grid-template-columns: 1fr; gap: 4px; }
  .stats-grid { flex-wrap: wrap; gap: var(--spacing-32); }
  .stat-divider { display: none; }
  .hero-cta .btn,
  .fee-row { padding: 14px 18px; }
}
