/* ===========================================================================
   base.css — shared design system for every user-facing page (public + guest).
   The four theme files in /css/themes/ only override a handful of :root
   tokens on top of this, so all pages stay visually consistent.

   Type: titles use "Alubia Modern Sans Serif" and body uses "Circular".
   Those are the couple's licensed fonts — drop their .woff2 files into
   /fonts/ (see /fonts/README.md) to activate them. Until then we fall back
   to self-hosted open-source faces that match the same look:
     Jost      ≈ Alubia Modern Sans Serif  (geometric display sans)
     Manrope   ≈ Circular                   (friendly geometric body sans)
   =========================================================================== */

/* --- Self-hosted fallback faces (SIL Open Font License) ------------------- */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 100 900;           /* variable */
  font-display: swap;
  src: url('/fonts/jost-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;           /* variable */
  font-display: swap;
  src: url('/fonts/manrope-latin.woff2') format('woff2');
}

/* --- Couple's licensed fonts (optional) -----------------------------------
   Un-comment once you have placed the real files in /fonts/. The families are
   already first in the stacks below, so they take priority automatically.
@font-face {
  font-family: 'Alubia Modern Sans Serif';
  font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/fonts/alubia-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Circular';
  font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('/fonts/circular-latin.woff2') format('woff2');
}
--------------------------------------------------------------------------- */

/* --- Palette & tokens ------------------------------------------------------ */
:root {
  --bg: #f6f4f1;                 /* warm ivory */
  --surface: #ffffff;
  --text: #262320;               /* warm near-black */
  --muted: #6b6f76;              /* slate gray (reference secondary) */
  --accent: #b07d73;             /* dusty rosewood */
  --accent-strong: #93615a;      /* hover / emphasis */
  --accent-soft: rgba(176, 125, 115, 0.14);
  --gold: #b3946a;               /* champagne, used sparingly */
  --border: #e8e3dc;
  --font-display: 'Alubia Modern Sans Serif', 'Jost', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Circular', 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 4px;
  --shadow: 0 12px 40px rgba(38, 35, 32, 0.08);
  --shadow-soft: 0 2px 14px rgba(38, 35, 32, 0.06);
  --header-h: 68px;
}

/* --- Reset / base ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
/* clip (not hidden) so the full-bleed hero can't create a horizontal scrollbar
   while still letting position:sticky resolve against the viewport. */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-strong); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--text); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
  color: var(--text);
}
p { margin: 0 0 1.15em; }
::selection { background: var(--accent-soft); }

/* --- Header / navigation --------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  /* Type colors are variables so the header can sit light-on-photo over a
     hero and switch to the solid surface once scrolled (see body.has-hero). */
  --hdr-text: var(--text);
  --hdr-muted: var(--muted);
  --hdr-line: var(--accent);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-soft);
}
/* Unscrolled header on a hero page: light type over the photo. */
body.has-hero .site-header:not(.is-scrolled) {
  --hdr-text: #fff;
  --hdr-muted: rgba(255, 255, 255, 0.8);
  background: linear-gradient(180deg, rgba(24, 20, 16, 0.42), rgba(24, 20, 16, 0));
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.header-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 24px; height: var(--header-h);
  /* The empty first column balances the language flags, so the nav stays
     centered — a fixed proportional position — regardless of how long its
     labels are in the active language. */
  display: grid; grid-template-columns: 1fr auto 1fr; grid-template-areas: "spc nav flags";
  align-items: center; column-gap: 24px;
}
.main-nav { grid-area: nav; justify-self: center; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 26px; align-items: center; flex-wrap: nowrap; }
.main-nav a {
  position: relative; color: var(--hdr-muted); font-size: .82rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; padding: 6px 0; white-space: nowrap;
  transition: color .2s ease;
}
.main-nav a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 1.5px;
  background: var(--hdr-line); transition: right .28s cubic-bezier(.22,.61,.36,1);
}
.main-nav a:hover { color: var(--hdr-text); }
.main-nav a:hover::after, .main-nav a.active::after { right: 0; }
.main-nav a.active { color: var(--hdr-text); }

/* Language switcher — flag chips */
.lang-flags { grid-area: flags; display: flex; gap: 6px; align-items: center; justify-self: end; }
.lang-flag {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  font-size: 1.02rem; line-height: 1;
  border: 1px solid transparent; background: transparent;
  transition: transform .18s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.lang-flag:hover { transform: translateY(-2px); background: var(--surface); border-color: var(--border); }
.lang-flag.active {
  background: var(--surface); border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* --- Footer ---------------------------------------------------------------- */
.site-footer { background: #211f1d; color: #c9c4bd; margin-top: 0; }
.footer-inner {
  max-width: 1180px; margin: 0 auto; padding: 40px 24px; text-align: center;
  font-size: .9rem; letter-spacing: .03em;
}
.footer-inner a { color: #e7c9a6; }

/* Aquarelle footer art: the bottom-anchored watercolour the page ends on,
   plus the paper field masked by its ink (see /css/themes/watercolor.css
   and the footer partial). Hidden for every other theme so the base markup
   stays cheap. */
.footer-art,
.footer-field { display: none; }

/* --- Page layout & blocks -------------------------------------------------- */
.page-main { max-width: 820px; margin: 0 auto; padding: 72px 24px 96px; }
.block { margin-bottom: 64px; position: relative; }
.block:last-child { margin-bottom: 0; }

/* Section heading — centered, like the reference site */
.block-heading { text-align: center; }
.block-heading h2 {
  font-size: clamp(1.9rem, 5vw, 2.7rem); font-weight: 500; letter-spacing: .01em;
}
.block-heading h2::before {
  content: ''; display: block; width: 42px; height: 2px; background: var(--accent);
  margin: 0 auto 20px; border-radius: 2px;
}

.block-text p { max-width: 68ch; color: #3a3733; }
.block-text p:last-child { margin-bottom: 0; }
/* The text block below the hero is part of the invitation, not body copy:
   centre the paragraph box between the side margins, but let the text flow
   naturally (straight left edge) instead of centring every line — line
   breaks no longer make the block look off-centre, at any width or for any
   wording. width: fit-content shrinks a short paragraph to its text width
   so even a single line stays centred under the hero; longer paragraphs
   cap at 68ch (above). text-wrap: pretty keeps the last line from ending
   on a lone word. Scoped to hero-led pages (the only pages that carry
   .block-hero), so long-form text on the other pages is unaffected. */
.block-hero ~ .block-text p {
  width: fit-content; margin: 0 auto; text-wrap: pretty;
}

/* Image */
.block-image figure, .block-map figure { margin: 0; }
.block-image img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow-soft);
}
.block-image figcaption, .block-map figcaption {
  text-align: left; color: var(--muted); font-size: .82rem; margin-top: 12px;
  letter-spacing: .04em;
}

/* Map */
.block-map iframe { width: 100%; height: 400px; border: 0; display: block; border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.map-link { display: inline-block; margin-top: 12px; font-size: .9rem; font-weight: 500; letter-spacing: .04em; }

/* Gallery */
.block-gallery .gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px;
}
.block-gallery figure { margin: 0; }
.block-gallery a { display: block; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.block-gallery img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform .6s cubic-bezier(.22,.61,.36,1), filter .6s ease;
}
.block-gallery a:hover img { transform: scale(1.05); }

/* Schedule */
.block-schedule ol.schedule-list { list-style: none; margin: 0; padding: 0; }
.block-schedule li {
  display: grid; grid-template-columns: 96px 1fr; gap: 24px; align-items: baseline;
  padding: 22px 0; border-bottom: 1px solid var(--border); position: relative;
}
.block-schedule li:last-child { border-bottom: 0; }
.schedule-time {
  font-family: var(--font-display); font-weight: 500; font-size: 1.35rem; color: var(--accent-strong);
  letter-spacing: .02em;
}
.schedule-body h3 { margin: 0 0 4px; font-size: 1.18rem; font-weight: 500; letter-spacing: .01em; }
.schedule-body p { margin: 0; color: var(--muted); }

/* --- Hero (home landing) --------------------------------------------------- */
.block-hero {
  position: relative; min-height: min(92vh, 880px); overflow: hidden;
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: #fff;
  /* Full-bleed: break out of the centered .page-main column. */
  width: 100vw; margin-left: calc(50% - 50vw);
  /* Keeps the standard 64px block gap below the hero (no margin-bottom: 0
     override), so the banner and the invitation text below it sit with
     even, proportioned breathing room — the same gap the text has to the
     next block. */
  margin-bottom: 64px;
}
/* When the hero leads the page, cancel the container's top padding so it sits
   flush directly under the sticky header (no ivory band above it). */
.page-main > .block-hero:first-child { margin-top: -72px; }
.hero-media {
  position: absolute; inset: -14% 0; z-index: 0; will-change: transform;
  /* --hero-base is set by site.js when a custom color is chosen in the admin.
     The default warm gradient (the var fallback) doubles as the backdrop while
     the photo loads and when no photo/color is set, so it never flashes white. */
  background: var(--hero-base, linear-gradient(160deg, #262019 0%, #3a2f27 48%, #55433a 100%));
}
/* Soft tint of the chosen color laid over the photo (transparent by default). */
.hero-media::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: var(--hero-tint, transparent);
}
.hero-img {
  width: 100%; height: 100%; object-fit: cover;
  animation: heroBreathe 22s ease-in-out infinite alternate; /* slow ambient zoom */
}
@keyframes heroBreathe { from { transform: scale(1.05); } to { transform: scale(1.11); } }
.js .hero-img { opacity: 0; transition: opacity .9s ease; }
.js .hero-img.is-loaded { opacity: 1; }
.hero-img.is-broken { display: none; }
.block-hero.no-image .hero-media {
  background: var(--hero-base,
    radial-gradient(62% 52% at 50% 36%, rgba(201, 167, 122, 0.3), transparent 72%),
    linear-gradient(160deg, #262019 0%, #3a2f27 48%, #55433a 100%));
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(24,20,17,.42) 0%, rgba(24,20,17,.16) 38%, rgba(24,20,17,.6) 100%);
}
.hero-content { position: relative; z-index: 2; padding: 56px 24px 96px; max-width: 920px; }
/* Aquarelle-only paper field (see themes/watercolor.css): every other theme
   keeps it hidden. */
.hero-field { display: none; }
.hero-kicker {
  font-family: var(--font-body); font-weight: 500; text-transform: uppercase;
  letter-spacing: .34em; font-size: .78rem; color: #ecdcc7; margin: 0 0 22px; padding-left: .34em;
}
.hero-names {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(2.9rem, 11vw, 6.4rem); line-height: 1.02; letter-spacing: -0.015em;
  margin: 0 0 .28em; text-shadow: 0 2px 30px rgba(0,0,0,.28);
}
.hero-date {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.05rem, 3vw, 1.5rem); letter-spacing: .2em; text-transform: uppercase;
  color: #f2e7d8; margin: 0 0 26px; padding-left: .2em;
}
/* Live countdown under the date (driven by site.js from data-countdown).
   Neutral here so it reads on every theme's photo hero; themes refine it. */
.hero-countdown {
  display: flex; justify-content: center; gap: clamp(18px, 5vw, 40px);
  margin: 0 0 26px;
}
.hero-countdown .cd-cell { display: flex; flex-direction: column; min-width: 40px; }
.hero-countdown .cd-val {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.8rem, 5vw, 2.7rem); line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.hero-countdown .cd-unit {
  font-size: .7rem; letter-spacing: .24em; text-transform: uppercase;
  color: rgba(255, 255, 255, .78); margin-top: 6px;
}
.hero-rule { width: 64px; height: 1px; background: var(--gold); margin: 0 auto 26px; opacity: .9; }
.hero-loc { font-size: 1.02rem; letter-spacing: .03em; color: rgba(255,255,255,.86); margin: 0 0 34px; }
.hero-cta {
  display: inline-block; padding: 13px 34px; border-radius: 999px;
  font-family: var(--font-body); font-weight: 600; font-size: .82rem; letter-spacing: .16em; text-transform: uppercase;
  color: #fff; border: 1.5px solid rgba(255,255,255,.75); background: rgba(255,255,255,.04);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}
.hero-cta:hover { background: #fff; color: var(--text); border-color: #fff; transform: translateY(-2px); }
.hero-scroll {
  position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 2;
  width: 1px; height: 46px; overflow: hidden; opacity: .7;
}
.hero-scroll::after {
  content: ''; position: absolute; left: 0; top: -46px; width: 1px; height: 46px;
  background: linear-gradient(rgba(255,255,255,0), #fff);
  animation: heroScroll 2.2s cubic-bezier(.22,.61,.36,1) infinite;
}
@keyframes heroScroll { 0% { top: -46px; } 60%, 100% { top: 46px; } }

/* --- Forms (shared with guest area) ---------------------------------------- */
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.field-help { color: var(--muted); font-size: .85rem; margin: 8px 0 0; line-height: 1.5; }
input[type='text'], input[type='email'], input[type='password'], input[type='number'],
input[type='date'], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 96px; }

.btn {
  display: inline-block; font-family: var(--font-body); font-weight: 600; cursor: pointer; text-align: center;
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
  border-radius: 999px; padding: 12px 28px; letter-spacing: .1em; font-size: .8rem; text-transform: uppercase;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.btn-small { padding: 7px 15px; font-size: .72rem; }
.btn-ghost { background: transparent; color: var(--accent-strong); border-color: var(--border); }
.btn-ghost:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-danger { background: transparent; color: #b3261e; border-color: #e4b4b0; }
.btn-danger:hover { background: #b3261e; border-color: #b3261e; color: #fff; }

.alert { border-radius: var(--radius); padding: 13px 16px; margin-bottom: 20px; font-size: .95rem; border: 1px solid transparent; }
.alert-error { background: #fdeceb; color: #b3261e; border-color: #f2c1bd; }
.alert-success { background: #ecf7ee; color: #1e6b30; border-color: #b5dfbf; }

/* --- Guest area ------------------------------------------------------------- */
.auth-wrap { min-height: calc(100vh - 220px); display: grid; place-items: center; padding: 56px 24px; }
.auth-card {
  width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px); box-shadow: var(--shadow); padding: 44px 40px; text-align: center;
}
.auth-card h1 { font-size: 1.7rem; font-weight: 400; margin-bottom: 8px; }
.auth-card .lead { color: var(--muted); font-size: .95rem; margin: 0 0 26px; }
.auth-card .btn { width: 100%; }

.family-head { max-width: 860px; margin: 0 auto; padding: 48px 24px 8px; }
.family-head h1 { font-size: 2rem; font-weight: 400; }
.family-head p { color: var(--muted); margin: 6px 0 0; }

.badge { display: inline-block; font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; border-radius: 999px; padding: 5px 13px; white-space: nowrap; }
.badge-yes { background: #ecf7ee; color: #1e6b30; border: 1px solid #b5dfbf; }
.badge-no { background: #fdeceb; color: #b3261e; border: 1px solid #f2c1bd; }
.badge-pending { background: #f0efed; color: var(--muted); border: 1px solid var(--border); }

.rsvp-save { text-align: center; padding: 0 24px 36px; }
/* A "name unknown" guest's name is an editable field on the RSVP (the couple
   doesn't know it yet); the dashed border signals "fill this in". The
   padding mirrors the neighbouring controls inside the person chip (the
   segmented toggle uses 6px 13px), so the box sits flush with them. */
.fillin-name {
  flex: 1 1 240px; min-width: 0; font-size: 1rem; font-weight: 500;
  padding: 6px 13px; border-style: dashed; background: transparent;
}

/* --- Simplified RSVP: one row of people + family logistics + requests ------- */
#rsvp-form { max-width: 860px; margin: 0 auto; padding: 24px 24px 8px; }
/* The person entries wrap onto lines; centered as a whole so every row —
   whether or not an entry carries the children's-menu checkbox — sits
   uniformly. */
.rsvp-people-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.person-chip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 14px 7px 12px; box-shadow: var(--shadow-soft);
}
.person-name { font-size: 1rem; font-weight: 500; }
.person-chip .fillin-name { flex: 0 1 auto; min-width: 150px; max-width: 240px; font-size: 1rem; }
/* Compact coming / not-coming toggle. The :has() rule gives live feedback on
   click; the .is-on class mirrors the saved state for browsers without :has(). */
.seg-control { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--surface); }
.person-chip label.seg {
  position: relative; display: inline-flex; align-items: center; padding: 6px 13px;
  font-size: .82rem; font-weight: 600; color: var(--muted); text-transform: none;
  letter-spacing: .02em; margin: 0; cursor: pointer; transition: background .15s ease, color .15s ease;
}
.person-chip label.seg + label.seg { border-left: 1px solid var(--border); }
.person-chip label.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.person-chip label.seg.is-on, .person-chip label.seg:has(input:checked) { background: var(--accent); color: #fff; }
/* The "young child" checkbox on each person chip: children's menu + babysitter. */
.child-flag {
  display: inline-flex; align-items: center; gap: 5px; margin: 0; cursor: pointer;
  font-size: .78rem; color: var(--muted); white-space: nowrap;
}
.child-flag input { width: 14px; height: 14px; margin: 0; accent-color: var(--accent); }
.rsvp-logistics { padding-top: 4px; }

.footer-note { text-align: center; color: var(--muted); font-size: .9rem; max-width: 860px; margin: 0 auto; padding: 0 24px 52px; }

/* --- Error / empty ---------------------------------------------------------- */
.error-wrap { min-height: calc(100vh - 140px); display: grid; place-items: center; padding: 32px; text-align: center; }
.error-wrap h1 { font-size: clamp(3rem, 12vw, 5rem); color: var(--accent); margin-bottom: 12px; font-weight: 300; }
.error-wrap p { color: var(--muted); margin: 0 0 28px; max-width: 46ch; }

/* --- Motion (progressive enhancement — only when JS is on) ------------------ */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .65s cubic-bezier(.22,.61,.36,1); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Hero children fade up in sequence. Delays are per element class (not inline
   style attributes — the CSP's style-src 'self' blocks those). */
.js .block-hero [data-hero] {
  opacity: 0; transform: translateY(18px);
  transition: opacity .8s ease, transform .85s cubic-bezier(.22,.61,.36,1);
  transition-delay: 140ms;
}
.js .block-hero.is-ready [data-hero] { opacity: 1; transform: none; }
.js .block-hero .hero-names[data-hero] { transition-delay: 230ms; }
.js .block-hero .hero-date[data-hero]  { transition-delay: 320ms; }
.js .block-hero .hero-countdown[data-hero] { transition-delay: 390ms; }
.js .block-hero .hero-rule[data-hero]  { transition-delay: 460ms; }
.js .block-hero .hero-loc[data-hero]   { transition-delay: 500ms; }
.js .block-hero .hero-cta[data-hero]   { transition-delay: 590ms; }

/* --- Reduced motion --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-reveal], .js .block-hero [data-hero] { opacity: 1 !important; transform: none !important; }
  .js .hero-img { opacity: 1 !important; }
  .hero-media { transform: none !important; }
}

/* --- Responsive ------------------------------------------------------------- */
@media (max-width: 1080px) {
  /* Tighten the nav so longer (fr / tl) labels still fit on one line. */
  .main-nav ul { gap: 16px; }
  .main-nav a { font-size: .76rem; letter-spacing: .09em; }
}
@media (max-width: 720px) {
  /* Stack the nav onto its own centered line under the language flags. */
  .header-inner {
    height: auto; padding: 12px 18px; column-gap: 10px; row-gap: 10px;
    grid-template-columns: 1fr auto;
    grid-template-areas: "spc flags" "nav nav";
  }
  .lang-flags { grid-area: flags; }
  .main-nav { grid-area: nav; width: 100%; }
  .main-nav ul { flex-wrap: wrap; justify-content: center; gap: 16px; }
  .page-main { padding: 52px 20px 72px; }
  .page-main > .block-hero:first-child { margin-top: -52px; }
  .block-schedule li { grid-template-columns: 78px 1fr; gap: 14px; }
  .hero-content { padding-bottom: 76px; }
}
