/* =========================================================================
   POST-TROPICAL BANK — style.css
   ─────────────────────────────────────────────────────────────────────────
   1. Fonts          @font-face declarations
   2. Tokens         design tokens on :root
   3. Themes         [data-theme] blocks (palettes)
   4. Reset & base   minimal reset, base typography
   5. Site chrome    header + dropdowns
   6. Landing        wordmark + one-liner
   7. Principles     restaurant-menu card grid
   8. Time-Mesh      temporal map + events slider + tag filter
   9. About          team names, thanks, contact footer
  10. Canga          tldraw iframe with theme-aware blend
   ========================================================================= */


/* 1. FONTS ================================================================ */

@font-face {
  font-family: "BBB ReadMe";
  src: url("fonts/BBBReadMeVF.woff2") format("woff2-variations"),
       url("fonts/BBBReadMeVF.woff")  format("woff-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "BBB ReadMe";
  src: url("fonts/BBBReadMeItalicVF.woff2") format("woff2-variations"),
       url("fonts/BBBReadMeItalicVF.woff")  format("woff-variations");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Ortica Linear";
  src: url("fonts/OrticaLinear-Regular.woff2") format("woff2"),
       url("fonts/OrticaLinear-Regular.woff")  format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Ortica Linear";
  src: url("fonts/OrticaLinear-Light.woff2") format("woff2"),
       url("fonts/OrticaLinear-Light.woff")  format("woff");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Ortica Linear";
  src: url("fonts/OrticaLinear-Bold.woff2") format("woff2"),
       url("fonts/OrticaLinear-Bold.woff")  format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Ortica Angular";
  src: url("fonts/OrticaAngular-Bold.woff2") format("woff2"),
       url("fonts/OrticaAngular-Bold.woff")  format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Enby Gertrude";
  src: url("fonts/Enby_Gertrude_roman.woff2") format("woff2"),
       url("fonts/Enby_Gertrude_roman.woff")  format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Absans";
  src: url("fonts/Absans-Regular.woff2") format("woff2"),
       url("fonts/Absans-Regular.woff")  format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Maiz Uno";
  src: url("fonts/Maiz-uno-3-2-1.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Maiz Dos";
  src: url("fonts/Maiz-dos-3-2-1.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Maiz Tres";
  src: url("fonts/Maiz-tres-3-2-1.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Salsa";
  src: url("fonts/Salsa-BT-Redonda-3-2-1.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}


/* 2. TOKENS =============================================================== */

:root {
  /* Font families */
  --f-h1:      "Maiz Dos", "BBB ReadMe", "Ortica Angular", serif;
  --f-h2:      "Salsa", "Ortica Angular", "Ortica Linear", sans-serif;
  --f-body:    "Enby Gertrude", "Ortica Linear", system-ui, sans-serif;
  --f-details: "Ortica Linear", system-ui, sans-serif;

  /* Type scale — fluid (another bump: body + headers read larger) */
  --fs-xs:      clamp(0.95rem, 0.88rem + 0.4vw,  1.15rem);
  --fs-s:       clamp(1.15rem, 1.05rem + 0.55vw,  1.45rem);
  --fs-m:       clamp(1.4rem,  1.22rem + 0.9vw,  1.85rem);
  --fs-l:       clamp(2rem,    1.55rem + 1.8vw,  3.2rem);
  --fs-xl:      clamp(3.2rem,  2.35rem + 4vw,    5.5rem);
  --fs-display: clamp(5rem,    4rem   + 23vw,   46rem);

  /* Spacing — geometric */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 5rem;

  /* Stroke + shadow tokens (theme-aware via currentColor + d1/d2) */
  --stroke-h-width: clamp(1px, 0.18vw, 4px);
  /* Large-element shadow (landing oneliner, principles cards, etc.) */
  --shadow-h-offset: clamp(2px, 0.45vw, 10px);
  /* Small-element shadow (dropdown panels, slider arrows, event cards) */
  --shadow-sm-offset: clamp(2px, 0.25vw, 5px);
  /* Shadow blur: 0 = hard (brutalist). Themes can raise it for soft shadows. */
  --shadow-blur: 0;

  /* Borders + radius */
  --bw-thick: clamp(2px, 0.35vw, 6px);
  --bw-hair:  1px;
  /* Section dividers — hairline only (lighter than card/chrome borders). */
  --bw-section: 1px;
  --r-card:   0;
  /* Per-theme radius applied to surfaces that can be rounded (cards, panels) */
  --theme-radius: 0;

  /* Per-theme H1 font (themes override this) */
  --theme-h1-font: var(--f-h1);
  /* Per-theme H2 font — defaults to Salsa, but tropicalia and papagaio
     override below so they get a more distinctive typographic identity. */
  --theme-h2-font: var(--f-h2);

  /* Per-theme section density */
  --theme-section-pad-y: var(--sp-7);
  --theme-section-pad-x: var(--sp-4);

  /* Per-theme background overlay (image or gradient) for the landing */
  --landing-bg-image: none;

  /* A 5th theme color — used in spots where d1/d2/txt would otherwise repeat
     (e.g. dropdown summary border, dot accent rings) */
  --c-d3: currentColor;

  /* Motion */
  --t-fast: 120ms;
  --t-med:  280ms;
  --t-slow: 600ms;
  --ease:   cubic-bezier(.2,.7,.2,1);
}


/* 3. THEMES =============================================================== */
/* Each theme overrides the palette plus a handful of stylistic tokens so the
   themes feel structurally different, not just recoloured. */

/* BUBALU — rounded, soft, generous spacing, Maiz-led titles.
   Original palette: bg / txt / d1 / d2. --c-d3 = extra accent (never equals txt). */
[data-theme="bubalu"] {
  --c-bg:   #8284f7;
  --c-bg-2: #8284f7;
  --c-txt:  #000000;
  --c-d1:   #81faaa;
  --c-d2:   #fc75fc;
  --c-d3:   #ffd95a;
  color-scheme: light;

  --theme-h1-font: "Maiz Dos", "BBB ReadMe", "Ortica Angular", serif;
  --theme-radius: clamp(10px, 1.2vw, 24px);
  --shadow-h-offset: clamp(2px, 0.3vw, 7px);
  --shadow-sm-offset: clamp(1px, 0.15vw, 3px);
  --shadow-blur: 14px;
  --theme-section-pad-y: var(--sp-8);
  --theme-section-pad-x: var(--sp-5);
}

/* TROPICÁLIA — straight edges, hard shadows, dense spacing (brutalist default).
   Original palette. --c-d3 = cyan accent for borders/UI that must not repeat txt. */
[data-theme="tropicalia"] {
  --c-bg:   #707070;
  --c-bg-2: #707070;
  --c-txt:  #eaff00;
  --c-d1:   #fc75fc;
  --c-d2:   #2afe57;
  --c-d3:   #00d8ff;
  color-scheme: light;

  --theme-h1-font: "BBB ReadMe", "Ortica Angular", serif;
  --theme-h2-font: "BBB ReadMe", "Ortica Angular", serif;
  --theme-radius: 0;
  --shadow-h-offset: clamp(2px, 0.45vw, 10px);
  --shadow-sm-offset: clamp(2px, 0.25vw, 5px);
  --shadow-blur: 0;
  --theme-section-pad-y: var(--sp-6);
  --theme-section-pad-x: var(--sp-3);
}

/* PAPAGAIO — wireframe: thick borders, outline rings, Ortica H1, hatch corners.
   Original palette. --c-d3 = magenta for UI accents (≠ txt / d1 / d2). */
[data-theme="papagaio"] {
  --c-bg:   #6666ff;
  --c-bg-2: #6666ff;
  --c-txt:  #00ffcc;
  --c-d1:   #707070;
  --c-d2:   #d1fdc2;
  --c-d3:   #ff3da8;
  color-scheme: light;

  --theme-h1-font: "Ortica Angular", "BBB ReadMe", "Maiz Dos", sans-serif;
  --theme-h2-font: "Ortica Angular", "Ortica Linear", "BBB ReadMe", sans-serif;
  --theme-radius: 0;
  --shadow-h-offset: 0;
  --shadow-sm-offset: 0;
  --shadow-blur: 0;
  --bw-thick: clamp(3px, 0.55vw, 9px);
  --theme-section-pad-y: var(--sp-7);
  --theme-section-pad-x: var(--sp-4);
}

/* COMPRO ORO — earthy, no shadows, no borders, big solid colour blocks,
   Salsa title face, landing wears a background photograph. Red + yellow
   updated to the new spec (#e03b03 / #fce600). */
[data-theme="compro-oro"] {
  --c-bg:   #0e3b2c;
  --c-bg-2: #2b6a47;
  --c-txt:  #f3e7c2;
  --c-d1:   #e03b03;
  --c-d2:   #fce600;
  --c-d3:   #92341a;
  color-scheme: dark;

  --theme-h1-font: "Salsa", "BBB ReadMe", serif;
  --theme-radius: 0;
  --shadow-h-offset: 0;
  --shadow-sm-offset: 0;
  --shadow-blur: 0;
  --bw-thick: 0;
  --theme-section-pad-y: var(--sp-7);
  --theme-section-pad-x: var(--sp-5);
  --landing-bg-image: url("imgs/compro-oro-bg.jpg");
}

/* XUXA — original spec: bg #000, bg2 #00f, txt #fff, details1 #eaff00.
   --c-d2 / --c-d3 = blue + magenta accents (fills never reuse stroke colour). */
[data-theme="xuxa"] {
  --c-bg:   #000000;
  --c-bg-2: #0000ff;
  --c-txt:  #ffffff;
  --c-d1:   #eaff00;
  --c-d2:   #0000ff;
  --c-d3:   #ff3df0;
  color-scheme: dark;

  --theme-h1-font: "Salsa", "BBB ReadMe", serif;
  --theme-radius: 0;
  --shadow-h-offset: 0;
  --shadow-sm-offset: 0;
  --shadow-blur: 0;
  --bw-thick: 0;
  --theme-section-pad-y: var(--sp-7);
  --theme-section-pad-x: var(--sp-5);
}

/* PERIÓDICO — monochrome and minimalist. Cold near-black text on warm white;
   greys for all decoration. No shadows, no rounded corners, hairline rules. */
[data-theme="periodico"] {
  --c-bg:   #f5efe3;   /* warm white, slight cream */
  --c-bg-2: #ece6d8;   /* slightly cooler warm white for section variation */
  --c-txt:  #15171c;   /* cold near-black */
  --c-d1:   #4f535b;   /* cold mid-grey */
  --c-d2:   #2b2d34;   /* cold dark grey */
  --c-d3:   #9aa0a7;   /* cool light grey */
  color-scheme: light;

  --theme-h1-font: "BBB ReadMe", "Maiz Dos", serif;
  --theme-radius: 0;
  --shadow-h-offset: 0;
  --shadow-sm-offset: 0;
  --shadow-blur: 0;
  /* Keep --bw-thick small for periódico's hairline aesthetic */
  --bw-thick: clamp(1px, 0.12vw, 2px);
  --theme-section-pad-y: var(--sp-7);
  --theme-section-pad-x: var(--sp-5);
}


/* 4. RESET & BASE ========================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-block-start: 5rem; /* clear the fixed site-header */
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-txt);
  font-family: var(--f-body);
  font-size: var(--fs-m);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color var(--t-med) var(--ease),
              color var(--t-med) var(--ease);
}

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

h1, h2, h3, h4, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }

::selection { background: var(--c-d2); color: var(--c-txt); }

:focus-visible {
  outline: var(--bw-thick) solid var(--c-d1);
  outline-offset: 2px;
}

/* Headings — type assignments + the H1/H2 stroke + shadow contract */
h1, .h1 {
  font-family: var(--theme-h1-font);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.01em;
  color: var(--c-d2);
  -webkit-text-stroke: var(--stroke-h-width) var(--c-txt);
  text-shadow:
    var(--shadow-h-offset) var(--shadow-h-offset) var(--shadow-blur) var(--c-d1),
    calc(var(--shadow-h-offset) * 2) calc(var(--shadow-h-offset) * 2) var(--shadow-blur) var(--c-txt);
}

h2, .h2 {
  /* Use the per-theme H2 token so tropicalia / papagaio override the default. */
  font-family: var(--theme-h2-font, var(--f-h2));
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--c-d1);
  -webkit-text-stroke: calc(var(--stroke-h-width) * 0.6) var(--c-txt);
  text-shadow:
    calc(var(--shadow-h-offset) * 0.5) calc(var(--shadow-h-offset) * 0.5) var(--shadow-blur) var(--c-d2);
}

h3 {
  font-family: var(--theme-h2-font, var(--f-h2));
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--c-txt);
  line-height: 1;
}

small, .details {
  font-family: var(--f-details);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-txt);
}


/* 5. SITE CHROME ========================================================== */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: color-mix(in srgb, var(--c-bg) 80%, transparent);
  border-block-end: var(--bw-section) solid var(--c-txt);
  backdrop-filter: blur(6px);
  /* Y position below the header chrome for viewport-fixed dropdown panels */
  --header-dropdown-top: calc(
    env(safe-area-inset-top, 0px)
    + var(--sp-3)
    + var(--sp-1) * 2
    + 1.35em
    + var(--sp-3)
    + var(--bw-hair)
  );
}

.site-header__brand {
  display: none; /* mobile-first: nav chrome only */
  font-family: var(--f-details);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-txt);
}
@media (min-width: 720px) {
  .site-header__brand { display: block; }
}
.site-header__brand b { color: var(--c-d2); font-weight: 700; }

.site-header__menus {
  display: flex;
  gap: var(--sp-2);
  align-items: stretch;
}

/* Dropdown — shared mechanics for theme + nav */
.dropdown {
  position: relative;
}
.dropdown__summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  font-family: var(--f-details);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-txt);
  background: var(--c-bg);
  /* Use d3 so the summary's border doesn't repeat the text colour */
  border: var(--bw-hair) solid var(--c-d3);
  border-radius: var(--theme-radius);
  cursor: pointer;
  user-select: none;
}
.dropdown__summary::-webkit-details-marker { display: none; }
.dropdown[open] > .dropdown__summary {
  background: var(--c-txt);
  color: var(--c-bg);
}
.dropdown__icon {
  inline-size: 1.1em;
  block-size: 1.1em;
  fill: currentColor;
  stroke: none;
  flex: 0 0 auto;
}

.dropdown__panel {
  position: absolute;
  inset-block-start: calc(100% + var(--bw-hair));
  z-index: 11;
  min-inline-size: 14rem;
  background: var(--c-bg);
  border: max(var(--bw-thick), 1px) solid var(--c-txt);
  border-radius: var(--theme-radius);
  box-shadow: var(--shadow-sm-offset) var(--shadow-sm-offset) var(--shadow-blur) var(--c-d2);
  padding: var(--sp-2);
  display: grid;
  gap: var(--sp-1);
}
/* Header dropdown geometry: anchor every panel to the INLINE-START edge of its
   <details>, growing toward inline-end — same behaviour as Sections. The old
   theme/lang inset-inline-end rule made panels spill left past the viewport
   on phones. Narrow viewports additionally pin panels with fixed positioning
   and horizontal inset so nothing clips off-screen. */
.site-header__menus .dropdown > .dropdown__panel {
  inset-inline-start: 0;
  inset-inline-end: auto;
}

@media (max-width: 600px) {
  .site-header__menus .dropdown > .dropdown__panel {
    position: fixed;
    z-index: 20;
    left: max(var(--sp-3), env(safe-area-inset-left, 0px));
    right: max(var(--sp-3), env(safe-area-inset-right, 0px));
    inset-inline-start: unset;
    inset-inline-end: unset;
    inset-block-start: unset;
    top: var(--header-dropdown-top);
    width: auto;
    min-inline-size: 0;
    max-inline-size: none;
    max-block-size: calc(100dvh - var(--header-dropdown-top) - var(--sp-4));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Tongue / language option rows — same compact treatment as .theme-option
   but a simpler 2-column layout (code badge + label). */
.lang-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-3);
  align-items: center;
  width: 100%;
  padding: var(--sp-2) var(--sp-3);
  font: inherit;
  font-family: var(--f-details);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: start;
  color: var(--c-txt);
  background: transparent;
  border: var(--bw-hair) solid transparent;
  cursor: pointer;
}
.lang-option:hover,
.lang-option:focus-visible {
  border-color: var(--c-txt);
  outline: none;
}
.lang-option[aria-pressed="true"] {
  background: transparent;
  color: var(--c-txt);
  border-color: var(--c-txt);
  box-shadow: inset 3px 0 0 0 var(--c-d1);
}
.lang-option__code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 2.2em;
  padding: 0.15em 0.5em;
  border: var(--bw-hair) solid currentColor;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

/* Mobile: chrome is icon-only to keep the header compact as menus grow.
   Hide the .dropdown__label spans below the small breakpoint. */
@media (max-width: 600px) {
  .dropdown__label { display: none; }
  .dropdown__summary { padding-inline: var(--sp-2); }
  .dropdown__icon {
    inline-size: 1.25em;
    block-size: 1.25em;
  }
}

/* Theme option row — own palette swatches so it's always recognisable */
.theme-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--sp-3);
  align-items: center;
  width: 100%;
  padding: var(--sp-2) var(--sp-3);
  font: inherit;
  font-family: var(--f-details);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: start;
  color: var(--c-txt);
  background: transparent;
  border: var(--bw-hair) solid transparent;
  cursor: pointer;
}
.theme-option:hover,
.theme-option:focus-visible {
  border-color: var(--c-txt);
  outline: none;
}
/* Selected state: keep the row's text colour bound to the CURRENT theme's
   --c-txt so labels stay legible regardless of which option is highlighted.
   The selection is communicated via a thin inset ring + a left marker bar
   instead of inverting fg/bg, which previously made some labels unreadable. */
.theme-option[aria-pressed="true"] {
  background: transparent;
  color: var(--c-txt);
  border-color: var(--c-txt);
  box-shadow: inset 3px 0 0 0 var(--c-d1);
}
.theme-option__swatch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  inline-size: 1.5em;
  block-size: 1.5em;
  border: var(--bw-hair) solid var(--c-txt);
  flex: 0 0 auto;
}
.theme-option[aria-pressed="true"] .theme-option__swatch {
  border-color: var(--c-bg);
}
.theme-option__swatch i {
  display: block;
  background: var(--swatch-color, currentColor);
}
.theme-option__tod {
  inline-size: 1.1em;
  block-size: 1.1em;
  fill: currentColor;
  opacity: 0.85;
  flex: 0 0 auto;
}
.theme-option__tod[data-tod-icon="night"] { fill: currentColor; }

/* Styles menu: every row’s *name* and day/night icon must track the ACTIVE
   site theme (--c-txt only). No accents, no swatch-derived tints — otherwise
   some palette combinations made labels look multi-coloured or illegible.
   • Native <button> colouring and SVG default black fills are overridden. */
.dropdown--theme .theme-option,
.dropdown--theme .theme-option__label {
  color: var(--c-txt);
  -webkit-text-fill-color: var(--c-txt);
}
.dropdown--theme .theme-option__tod {
  color: var(--c-txt);
  opacity: 1;
}
.dropdown--theme .theme-option__tod circle {
  fill: currentColor;
}
.dropdown--theme .theme-option__tod path {
  fill: currentColor;
}
.dropdown--theme .theme-option__tod [stroke],
.dropdown--theme .theme-option__tod g {
  stroke: currentColor;
}

/* Navigation option */
.nav-option {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  font-family: var(--f-details);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-txt);
  text-decoration: none;
  border: var(--bw-hair) solid transparent;
}
.nav-option:hover,
.nav-option:focus-visible {
  border-color: var(--c-txt);
  background: var(--c-d1);
  color: var(--c-txt);
  outline: none;
}
.nav-option__num {
  font-variant-numeric: tabular-nums;
  color: var(--c-d2);
}


/* 6. LANDING ============================================================== */

.landing {
  position: relative;
  min-block-size: 100svh;
  block-size: 100svh;
  max-block-size: 100svh;
  padding: clamp(3.5rem, 7vw, 5rem) var(--sp-4) 0;
  /* Hero: logo + title stack fills available space; marquee anchors to bottom */
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: stretch;
  overflow: clip;
  isolation: isolate;
  background:
    var(--landing-bg-image, none),
    linear-gradient(180deg, var(--c-bg) 0%, var(--c-bg-2) 100%);
  background-size: cover, auto;
  background-position: center, center;
  background-repeat: no-repeat;
}

.landing__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(var(--sp-2), 2vh, var(--sp-4));
  min-block-size: 0;
  max-block-size: 100%;
  overflow: hidden;
}

/* Munda logo — masked with theme text colour so it adapts per theme.
   Sized against viewport height so logo + title + marquee always fit. */
.landing-logo {
  /* Larger floor (especially for mobile) and a generous upper bound.
     Uses min(vw, vh) so the logo scales with the smaller viewport axis. */
  inline-size: clamp(180px, min(28vw, 30vh), 360px);
  aspect-ratio: 141 / 162;
  flex: 0 0 auto;
  background-color: var(--c-txt);
  -webkit-mask: url("imgs/munda-logo.svg") center / contain no-repeat;
          mask: url("imgs/munda-logo.svg") center / contain no-repeat;
  pointer-events: none;
}
/* On compro-oro the photo bg behind the logo can wash it; add a faint backplate */
[data-theme="compro-oro"] .landing,
[data-theme="xuxa"] .landing {
  /* Vignette over the bg image / gradient improves legibility for title + logo */
}
[data-theme="compro-oro"] .landing::before,
[data-theme="xuxa"] .landing::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1; /* sits behind landing content but inside the isolated stack */
  pointer-events: none;
  background: radial-gradient(ellipse at 30% 40%, transparent 0%,
    color-mix(in srgb, var(--c-bg) 65%, transparent) 70%,
    color-mix(in srgb, var(--c-bg) 85%, transparent) 100%);
}
[data-theme="xuxa"] .landing {
  background:
    radial-gradient(ellipse at 20% 20%, var(--c-d1) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, var(--c-d3) 0%, transparent 50%),
    linear-gradient(180deg, var(--c-bg-2) 0%, var(--c-bg) 100%);
}

.landing-name {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-wrap: nowrap;
  inline-size: 100%;
  text-transform: uppercase;
  /* Consistent vertical rhythm. JS scales each word so the title fits both the
     row width and the hero's available height (logo + marquee accounted for). */
  line-height: 0.95;
  min-block-size: 0;
  flex: 0 1 auto;
}

.landing-name__row {
  display: flex;
  justify-content: center;
  inline-size: 100%;
  /* No clipping — JS sizes words to fit; if anything spills it should be
     visible rather than cropped. A slight vertical overlap between rows is OK. */
  overflow: visible;
}

.landing-name__word,
.landing-name___word {
  display: inline-block;
  line-height: inherit;
  letter-spacing: 0.04em;
  white-space: nowrap;
  margin-bottom: -0.1em;
  padding-inline: var(--sp-2);
  text-transform: uppercase;
}
/* Each word uses a distinct accent so no two rows repeat a colour */
.landing-name__word[data-slot="noun"] { color: var(--c-d2); }
.landing-name__word[data-slot="adj1"] { font-style: italic; color: var(--c-d1); }
.landing-name__word[data-slot="adj2"] { color: var(--c-d3); }

/* Marquee — flush with the bottom of the landing, scrolling proverbs.
   Track is duplicated content so the translateX loop is seamless. */
.landing-marquee {
  align-self: end;
  inline-size: 100%;
  margin-inline: calc(var(--sp-4) * -1); /* extend to viewport edges */
  padding-block: var(--sp-3);
  border-block: var(--bw-hair) solid var(--c-txt);
  background: color-mix(in srgb, var(--c-bg) 70%, transparent);
  overflow: hidden;
  font-family: var(--f-details);
  font-size: var(--fs-s);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-txt);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.landing-marquee__track {
  display: inline-flex;
  gap: var(--sp-7);
  white-space: nowrap;
  animation: marquee-scroll 45s linear infinite;
  will-change: transform;
}
/* Pause animation on hover only — clicking the marquee no longer toggles it. */
.landing-marquee:hover .landing-marquee__track {
  animation-play-state: paused;
}
.landing-marquee__item {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-7);
  padding-inline: 0;
}
/* Bullet between proverbs is rendered via ::after so we don't duplicate text */
.landing-marquee__item::after {
  content: "✦";
  color: var(--c-d2);
  font-size: 0.8em;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .landing-marquee__track { animation: none; }
}

/* Oneliner — now its own section directly after the landing (after the fold). */
.oneliner {
  padding: var(--theme-section-pad-y) var(--theme-section-pad-x) calc(var(--theme-section-pad-y) * 1.2);
  background: var(--c-bg);
  border-block-start: var(--bw-section) solid var(--c-txt);
}
.oneliner__text {
  margin: 0;
  font-family: var(--f-body);
  font-size: clamp(1.85rem, 1.0rem + 3.5vw, 3.75rem);
  line-height: 1.12;
  color: var(--c-txt);
  text-wrap: pretty;
  max-inline-size: min(92vw, 100rem);
  margin-inline: auto;
  text-align: center;
}
.oneliner__text b {
  font-weight: 400;
  font-style: italic;
  color: var(--c-d2);
  -webkit-text-stroke: 1px var(--c-txt);
}

/* Prelude — same surface treatment as .oneliner (it carries both classes).
   The closing line is wrapped in <em> to read as a quieter italic coda. */
.prelude__text em {
  display: inline;
  font-style: italic;
  color: var(--c-d1);
  -webkit-text-stroke: 0;
}


/* 7. PRINCIPLES =========================================================== */

.principles {
  padding: var(--theme-section-pad-y) var(--theme-section-pad-x) calc(var(--theme-section-pad-y) * 1.2);
  background: var(--c-bg);
  border-block-start: var(--bw-section) solid var(--c-txt);
}
/* Sections separator falls back to a colour band when --bw-thick is 0 */
[data-theme="compro-oro"] .principles,
[data-theme="xuxa"] .principles,
[data-theme="compro-oro"] .time-mesh,
[data-theme="xuxa"] .time-mesh,
[data-theme="compro-oro"] .about,
[data-theme="xuxa"] .about {
  box-shadow: inset 0 var(--sp-2) 0 var(--c-d1);
}

/* PAPAGAIO — outline rings replace drop shadows.
   We use a layered outline trick: a thick outline at a positive offset acts
   like a flat "ring" around the surface, distinct from a fill-and-shadow. */
[data-theme="papagaio"] .oneliner,
[data-theme="papagaio"] .event-card,
[data-theme="papagaio"] .dropdown__panel,
[data-theme="papagaio"] .time-mesh__nav {
  outline: var(--bw-hair) solid var(--c-d2);
  outline-offset: var(--sp-2);
}
[data-theme="papagaio"] .principle::before {
  /* Wireframe hatched accent corner */
  content: "";
  position: absolute;
  inset-block-end: 0;
  inset-inline-end: 0;
  inline-size: 40%;
  block-size: 30%;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(135deg,
      transparent 0 8px,
      var(--card-accent, var(--c-d2)) 8px 10px);
  opacity: 0.55;
}

.principles__header {
  display: grid;
  gap: var(--sp-4);
  margin-block-end: var(--sp-6);
  max-inline-size: 60ch;
}

.principles__intro {
  font-family: var(--f-body);
  font-size: var(--fs-m);
  line-height: 1.45;
  color: var(--c-txt);
}

.principles__grid {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: 1fr;
  /* Borders removed in all themes — cards stand on their own with a dotted
     top line each (see .principle border-block-start below). */
}

@media (min-width: 720px) {
  .principles__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .principles__grid { grid-template-columns: repeat(3, 1fr); }
}

.principle {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-4) var(--sp-5);
  background: var(--c-bg);
  isolation: isolate;
  /* Top dotted line — survives even though the grid border was removed */
  border-block-start: var(--bw-hair) dotted var(--c-txt);
}

/* Card colour rotation borrows from a paper menu — alternating accents.
   Third accent uses --c-d3 so the title's fill never matches its stroke. */
.principle:nth-child(3n+1) { --card-accent: var(--c-d1); }
.principle:nth-child(3n+2) { --card-accent: var(--c-d2); }
.principle:nth-child(3n)   { --card-accent: var(--c-d3); }

.principle__title {
  font-family: var(--f-h2);
  font-size: var(--fs-l);
  font-weight: 700;
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--card-accent);
  -webkit-text-stroke: calc(var(--stroke-h-width) * 0.5) var(--c-txt);
}

.principle__body {
  font-family: var(--f-body);
  font-size: var(--fs-s);
  line-height: 1.45;
  color: var(--c-txt);
}

/* Decorative menu sticker on every other card */
.principle:nth-child(even)::after {
  content: "·";
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-4);
  font-family: var(--f-h1);
  font-size: var(--fs-xl);
  line-height: 1;
  color: var(--card-accent);
  pointer-events: none;
  opacity: 0.5;
}


/* 8. TIME-MESH =========================================================== */

.time-mesh {
  --map-w-mobile: 1800px;
  --map-w-desktop: 3600px;
  --map-w: var(--map-w-mobile);
  --map-h: clamp(340px, 46vh, 500px);
  --band-planetary:    16%;
  --band-intertropical: 50%;
  --band-local:        82%;
  --dot-size: clamp(14px, 1.6vw, 22px);

  padding: var(--theme-section-pad-y) 0 calc(var(--theme-section-pad-y) * 1.3);
  background: var(--c-bg);
  border-block-start: var(--bw-section) solid var(--c-txt);
}

@media (min-width: 900px) {
  .time-mesh { --map-w: var(--map-w-desktop); }
}

.time-mesh__header {
  padding-inline: var(--sp-4);
  display: grid;
  gap: var(--sp-4);
  max-inline-size: 60ch;
  margin-block-end: var(--sp-5);
}
.time-mesh__intro {
  font-family: var(--f-body);
  font-size: var(--fs-m);
  color: var(--c-txt);
}

/* Scale legend */
.scale-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  padding-inline: var(--sp-4);
  margin-block-end: var(--sp-4);
  font-family: var(--f-details);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-txt);
}
.scale-legend__item {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
.scale-legend__dot {
  inline-size: 0.9em;
  block-size: 0.9em;
  border: var(--bw-hair) solid var(--c-txt);
  border-radius: 50%;
}
.scale-legend__dot[data-scale="planetary"]    { background: var(--c-d2); }
.scale-legend__dot[data-scale="intertropical"] { background: var(--c-d1); }
.scale-legend__dot[data-scale="local"]        { background: var(--c-d3); }

/* Tag filter — currently hidden by HTML comment.
   The block below is kept for an easy restore. */
.tag-filter {
  margin: 0 var(--sp-4) var(--sp-5);
  border: var(--bw-thick) solid var(--c-txt);
  background: var(--c-bg);
}
.tag-filter__summary {
  list-style: none;
  cursor: pointer;
  padding: var(--sp-3) var(--sp-4);
  font-family: var(--f-details);
  font-size: var(--fs-s);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-txt);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  user-select: none;
}
.tag-filter__summary::-webkit-details-marker { display: none; }
.tag-filter__summary::after {
  content: "+";
  font-family: var(--f-h2);
  font-size: 1.4em;
  line-height: 1;
}
.tag-filter[open] .tag-filter__summary::after { content: "−"; }
.tag-filter__count {
  font-family: var(--f-details);
  color: var(--c-d2);
}
.tag-filter__count[data-empty="true"] { opacity: 0.5; }
.tag-filter__panel {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding: 0 var(--sp-4) var(--sp-4);
  border-block-start: var(--bw-hair) solid var(--c-txt);
  padding-block-start: var(--sp-3);
}
.tag-filter__option {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.tag-filter__option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.tag-filter__option span {
  font-family: var(--f-details);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--sp-1) var(--sp-3);
  border: var(--bw-hair) solid var(--c-txt);
  color: var(--c-txt);
}
.tag-filter__option:hover span,
.tag-filter__option input:focus-visible + span {
  background: var(--c-d1);
}
.tag-filter__option input:checked + span {
  background: var(--c-txt);
  color: var(--c-bg);
}
.tag-filter__actions {
  margin-inline-start: auto;
  display: flex;
  gap: var(--sp-2);
}
.tag-filter__action {
  font-family: var(--f-details);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--sp-1) var(--sp-3);
  background: transparent;
  color: var(--c-txt);
  border: var(--bw-hair) solid var(--c-txt);
  cursor: pointer;
}
.tag-filter__action:hover { background: var(--c-d2); }

/* Temporal map ------------------------------------------------------------ */

.time-mesh__map-wrap {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  border-block: var(--bw-thick) solid var(--c-txt);
  background: var(--c-bg-2, var(--c-bg));
  scrollbar-color: var(--c-txt) transparent;
}
.time-mesh__map-wrap::-webkit-scrollbar { block-size: 10px; }
.time-mesh__map-wrap::-webkit-scrollbar-thumb { background: var(--c-txt); }

.time-mesh__map {
  position: relative;
  inline-size: var(--map-w);
  block-size: var(--map-h);
  isolation: isolate;
}

/* Background serpent waves — fill, layered */
.time-mesh__serpents {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  z-index: 0;
  pointer-events: none;
}
.time-mesh__serpents path {
  stroke: none;
  transition: opacity var(--t-med) var(--ease);
}
.serpent-a { fill: var(--c-d1);  opacity: 0.85; }
.serpent-b { fill: var(--c-d2);  opacity: 0.55; }
.serpent-c { fill: var(--c-txt); opacity: 0.18; }

/* Swirling wind currents — spiral paths that flash in and out */
.time-mesh__swirls {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  z-index: 1;
  pointer-events: none;
}
.time-mesh__swirls path {
  fill: none;
  stroke: var(--c-d3);
  stroke-width: 1.4;
  stroke-linecap: round;
  opacity: 0;
  animation: swirl-pulse var(--swirl-dur, 11s) ease-in-out infinite;
  animation-delay: var(--swirl-delay, 0s);
}
.time-mesh__swirls path:nth-child(3n) { stroke: var(--c-d2); }
.time-mesh__swirls path:nth-child(3n+1) { stroke: var(--c-d1); }
@keyframes swirl-pulse {
  0%, 100% { opacity: 0; stroke-dashoffset: 0; }
  8%       { opacity: 0.65; }
  18%      { opacity: 0.3; }
  28%      { opacity: 0; }
}
.time-mesh__map[data-pulse="true"] .time-mesh__swirls path {
  animation-duration: 4s;
}
@media (prefers-reduced-motion: reduce) {
  .time-mesh__swirls path { animation: none; opacity: 0.25; }
}

/* ITCZ currents — animated stroked paths */
.time-mesh__currents {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  z-index: 1;
  pointer-events: none;
}
.time-mesh__currents path {
  fill: none;
  stroke: var(--c-txt);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-dasharray: 2 14;
  opacity: 0.35;
  animation: itcz-drift var(--itcz-dur, 24s) linear infinite;
}
.time-mesh__currents path:nth-child(2n) {
  stroke: var(--c-d2);
  stroke-dasharray: 4 22;
  animation-direction: reverse;
  opacity: 0.45;
}
.time-mesh__currents path:nth-child(3n) {
  stroke: var(--c-d1);
  stroke-dasharray: 8 30;
  opacity: 0.5;
}
@keyframes itcz-drift {
  to { stroke-dashoffset: -240; }
}
.time-mesh__map[data-pulse="true"] .time-mesh__currents path {
  --itcz-dur: 6s;
  opacity: 0.85;
}
@media (prefers-reduced-motion: reduce) {
  .time-mesh__currents path { animation: none; }
}

/* Year axis ticks — lifted above the horizontal scrollbar */
.time-mesh__axis {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 18px; /* clearance for the wrap's horizontal scrollbar */
  block-size: 28px;
  z-index: 2;
  pointer-events: none;
  font-family: var(--f-details);
  font-size: var(--fs-xs);
  color: var(--c-txt);
}
.time-mesh__tick {
  position: absolute;
  inset-block: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
  gap: 2px;
}
.time-mesh__tick::before {
  content: "";
  block-size: 8px;
  inline-size: 1px;
  background: var(--c-txt);
}

/* Event dots */
.time-mesh__dot {
  position: absolute;
  inline-size: var(--dot-size);
  block-size: var(--dot-size);
  border-radius: 50%;
  border: var(--bw-hair) solid var(--c-txt);
  background: var(--dot-fill, var(--c-txt));
  padding: 0;
  margin: 0;
  cursor: pointer;
  transform: translate(-50%, -50%);
  z-index: 3;
  transition:
    inline-size var(--t-fast) var(--ease),
    block-size var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease);
}
.time-mesh__dot[data-scale="planetary"]     { --dot-fill: var(--c-d2); }
.time-mesh__dot[data-scale="intertropical"] { --dot-fill: var(--c-d1); }
.time-mesh__dot[data-scale="local"]         { --dot-fill: var(--c-d3); }

.time-mesh__dot:hover,
.time-mesh__dot:focus-visible {
  outline: none;
  box-shadow: 0 0 0 calc(var(--dot-size) * 0.25) color-mix(in srgb, var(--dot-fill) 60%, transparent);
}
.time-mesh__dot[aria-pressed="true"] {
  inline-size: calc(var(--dot-size) * 1.6);
  block-size: calc(var(--dot-size) * 1.6);
  box-shadow:
    0 0 0 calc(var(--dot-size) * 0.25) var(--c-bg),
    0 0 0 calc(var(--dot-size) * 0.4) var(--c-txt);
  z-index: 4;
}
.time-mesh__dot[data-hidden="true"] {
  opacity: 0.12;
  pointer-events: none;
}

/* Slider ------------------------------------------------------------------ */

.time-mesh__slider {
  position: relative;
  margin-block-start: var(--sp-5);
}

.time-mesh__cards {
  position: relative; /* anchors .event-card.offsetLeft so JS centering math is reliable */
  display: flex;
  gap: var(--sp-4);
  /* Side padding equal to ~half a viewport width minus half a card width so
     the first and last cards can be centered cleanly when scrolled. */
  padding-block: var(--sp-4);
  padding-inline: max(var(--sp-4), calc((100vw - min(85vw, 28rem)) / 2));
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--c-txt) transparent;
}
.time-mesh__cards::-webkit-scrollbar { block-size: 8px; }
.time-mesh__cards::-webkit-scrollbar-thumb { background: var(--c-txt); }

.time-mesh__nav {
  position: absolute;
  inset-block-start: 50%;
  transform: translateY(-50%);
  z-index: 5;
  inline-size: auto;
  block-size: auto;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: var(--c-txt);
  font-family: var(--f-h2);
  font-size: clamp(1.7rem, 1rem + 1.6vw, 2.6rem);
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  padding: 0;
  transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.time-mesh__nav:hover { color: var(--c-d1); }
.time-mesh__nav:active {
  color: var(--c-d2);
  transform: translateY(-50%) scale(0.96);
}
.time-mesh__nav--prev { inset-inline-start: var(--sp-2); }
.time-mesh__nav--next { inset-inline-end:   var(--sp-2); }

/* Event card */
.event-card {
  flex: 0 0 min(85vw, 28rem);
  scroll-snap-align: center;
  display: grid;
  grid-template-rows: auto auto auto auto;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--c-bg);
  color: var(--c-txt);
  border: max(var(--bw-thick), 1px) solid var(--c-d3);
  border-radius: var(--theme-radius);
  box-shadow: var(--shadow-sm-offset) var(--shadow-sm-offset) var(--shadow-blur) var(--scale-color, var(--c-d2));
  position: relative;
  isolation: isolate;
  transition:
    flex-basis var(--t-med) var(--ease),
    background-color var(--t-med) var(--ease),
    color var(--t-med) var(--ease),
    border-color var(--t-med) var(--ease);
}
@media (min-width: 720px) {
  .event-card { flex-basis: 24rem; }
}
.event-card[data-scale="planetary"]     { --scale-color: var(--c-d2); }
.event-card[data-scale="intertropical"] { --scale-color: var(--c-d1); }
.event-card[data-scale="local"]         { --scale-color: var(--c-d3); }

/* Active state: the card grows, flips to the scale colour, and inverts type
   to the bg colour for legibility. */
.event-card[data-active="true"] {
  flex-basis: min(94vw, 36rem);
  background: var(--scale-color);
  color: var(--c-bg);
  border-color: var(--c-txt);
}
@media (min-width: 720px) {
  .event-card[data-active="true"] { flex-basis: 36rem; }
}
.event-card[data-active="true"] .event-card__title,
.event-card[data-active="true"] .event-card__body,
.event-card[data-active="true"] .event-card__meta,
.event-card[data-active="true"] .event-card__meta > span,
.event-card[data-active="true"] .event-card__year,
.event-card[data-active="true"] .event-card__scale,
.event-card[data-active="true"] .event-card__more summary {
  color: var(--c-bg);
}
.event-card[data-active="true"] .event-card__scale,
.event-card[data-active="true"] .event-card__more summary {
  border-color: var(--c-bg);
}
.event-card[data-hidden="true"] { display: none; }

/* Collapsible description — auto-opens when the card is active */
.event-card__more {
  margin: 0;
}
.event-card__more > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--f-details);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-txt);
  padding: var(--sp-1) var(--sp-3);
  border: var(--bw-hair) solid var(--c-d3);
  border-radius: var(--theme-radius);
  user-select: none;
}
.event-card__more > summary::-webkit-details-marker { display: none; }
.event-card__more > summary::after {
  content: "+";
  font-family: var(--f-h2);
  font-size: 1.2em;
  line-height: 0.8;
}
.event-card__more[open] > summary::after { content: "−"; }

.event-card__media {
  margin: 0;
  aspect-ratio: 16 / 10;
  background: var(--scale-color);
  border: var(--bw-hair) solid var(--c-txt);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-family: var(--f-h1);
  color: var(--c-bg);
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1;
  -webkit-text-stroke: 1px var(--c-txt);
}
.event-card__media svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; opacity: 0.6; }

.event-card__meta {
  font-family: var(--f-details);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-txt);
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  align-items: baseline;
}
.event-card__year {
  font-family: var(--f-h2);
  color: var(--scale-color);
  font-size: var(--fs-m);
}
.event-card__scale {
  margin-inline-start: auto;
  padding: 2px var(--sp-2);
  border: var(--bw-hair) solid var(--c-txt);
  color: var(--scale-color);
}

.event-card__title {
  font-family: var(--f-h2);
  font-size: var(--fs-l);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--c-txt);
  line-height: 0.95;
}

.event-card__body {
  font-family: var(--f-body);
  font-size: var(--fs-s);
  line-height: 1.4;
  color: var(--c-txt);
  padding-block-start: var(--sp-2);
}

.event-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  padding: 0;
  list-style: none;
}
.event-card__tags li {
  font-family: var(--f-details);
  font-size: calc(var(--fs-xs) * 0.92);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-txt);
  padding: 1px var(--sp-2);
  border: var(--bw-hair) solid var(--c-txt);
}
.event-card__tags li[data-matched="true"] {
  background: var(--c-d1);
}

/* Counter shown next to slider */
.time-mesh__counter {
  font-family: var(--f-details);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-txt);
  padding: var(--sp-2) var(--sp-4);
}


/* 9. ABOUT =============================================================== */

.about {
  padding: var(--theme-section-pad-y) var(--theme-section-pad-x) calc(var(--theme-section-pad-y) * 1.4);
  background: var(--c-bg);
  border-block-start: var(--bw-section) solid var(--c-txt);
  display: grid;
  gap: var(--sp-6);
}

.about__header {
  display: grid;
  gap: var(--sp-4);
  max-inline-size: 60ch;
}
.about__intro {
  font-family: var(--f-body);
  font-size: var(--fs-m);
  color: var(--c-txt);
}

.about__grid {
  display: grid;
  gap: var(--sp-6);
}
@media (min-width: 800px) {
  .about__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-7); }
}

.about__block h3 {
  font-family: var(--f-h2);
  font-size: var(--fs-l);
  margin-block-end: var(--sp-3);
  color: var(--c-txt);
  -webkit-text-stroke: 0;
  text-shadow: none;
}

.about__names {
  display: grid;
  gap: 0;
}
.about__names li {
  font-family: var(--f-h2);
  font-size: var(--fs-m);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-txt);
  padding-block: var(--sp-3);
  border-block-end: var(--bw-hair) dotted var(--c-txt);
}
.about__names li:first-child { border-block-start: var(--bw-hair) dotted var(--c-txt); }

.about__confab-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
  gap: var(--sp-3);
  padding: 0;
  list-style: none;
}
.about__confab-list li {
  display: grid;
  gap: var(--sp-2);
  padding: var(--sp-3);
  border: var(--bw-hair) solid var(--c-txt);
  background: var(--c-bg);
  font-family: var(--f-details);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-txt);
  text-align: center;
}
.logo-placeholder {
  display: block;
  aspect-ratio: 1;
  inline-size: 100%;
  background:
    repeating-linear-gradient(45deg,
      var(--c-d1) 0 6px,
      var(--c-bg) 6px 12px);
  border: var(--bw-hair) solid var(--c-txt);
}
.about__confab-list li:nth-child(3n) .logo-placeholder {
  background: repeating-linear-gradient(135deg, var(--c-d2) 0 6px, var(--c-bg) 6px 12px);
}
.about__confab-list li:nth-child(5n) .logo-placeholder {
  background: repeating-linear-gradient(90deg, var(--c-txt) 0 4px, var(--c-bg) 4px 12px);
}

.about__confab-note {
  margin-block-start: var(--sp-4);
  font-family: var(--f-details);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-txt);
  opacity: 0.7;
}

/* Inline thanks — comma-separated paragraph */
.about__thanks-inline {
  font-family: var(--f-body);
  font-size: var(--fs-m);
  line-height: 1.5;
  color: var(--c-txt);
  text-wrap: pretty;
}

/* Contact footer — a thin strip at the bottom of About */
.about__contact {
  margin-block-start: var(--sp-6);
  padding-block-start: var(--sp-3);
  border-block-start: var(--bw-hair) solid var(--c-d3);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-3);
  font-family: var(--f-details);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-txt);
}
.about__contact-label { opacity: 0.7; }
.about__contact-email {
  color: var(--c-d2);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
.about__contact-email:hover { color: var(--c-d1); }


/* 10. CANGA ============================================================== */

.canga {
  padding: var(--sp-7) 0 var(--sp-8);
  background: var(--c-bg);
  border-block-start: var(--bw-thick) solid var(--c-txt);
}
.canga__header {
  padding-inline: var(--sp-4);
  display: grid;
  gap: var(--sp-4);
  margin-block-end: var(--sp-5);
  max-inline-size: 60ch;
}
.canga__intro {
  font-family: var(--f-body);
  font-size: var(--fs-m);
  color: var(--c-txt);
}
.canga__intro em {
  font-style: italic;
  color: var(--c-d2);
}

.canga__frame-wrap {
  position: relative;
  margin-inline: var(--sp-4);
  border: var(--bw-thick) solid var(--c-txt);
  box-shadow: var(--shadow-h-offset) var(--shadow-h-offset) 0 var(--c-d2);
  background: var(--c-bg);
  isolation: isolate;        /* confines mix-blend to this stack */
  overflow: hidden;
  block-size: 70vh;
  min-block-size: 400px;
  max-block-size: 760px;
}
.canga__frame {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  border: 0;
  background: #ffffff;
}
/* Light themes: multiply a same-origin mask of `--c-bg` onto the iframe so
   white tldraw bg multiplies to bg-color (invisible) and strokes survive. */
.canga__blend {
  position: absolute;
  inset: 0;
  background: var(--c-bg);
  mix-blend-mode: multiply;
  pointer-events: none;
}
/* XUXA (dark): we want white→black, dark strokes→light.
   `difference` against a white mask flips luminance — pixels at white become 0
   (matches the black wrap bg) and dark strokes become bright. */
[data-theme="xuxa"] .canga__blend {
  background: #ffffff;
  mix-blend-mode: difference;
}
