/* =========================================================================
   Ada Ndi Igbo (Miss Igbo) Ireland & Europe
   Single stylesheet — design tokens, layout primitives, components.

   Visual direction: "ink & gold ceremonial".
   Deep indigo-black grounds, antique gold hairlines and uli tracery,
   coral-bead accents, warm nzu-chalk ivory for long reading sections.

   Structure of this file:
     1. Tokens
     2. Reset & base
     3. Typography
     4. Layout primitives (container, band, grid)
     5. Ornament (uli rules, bead dividers, texture)
     6. Components (nav, hero, buttons, cards, placeholders, forms, footer)
     7. Utilities
     8. Motion & reduced-motion
   ========================================================================= */

/* ---------- 1. Tokens ---------------------------------------------------- */

:root {
  /* Palette — each colour named for the thing it comes from.
     mgbaji  : the coral bead regalia of Igbo titleholders
     ofo/brass: antique gold of ceremonial fittings
     isi agu : the deep ground of the lion-head cloth
     nzu     : the white chalk offered in welcome
     omu     : young palm frond
  */
  --coral: #b3392b;
  --coral-bright: #d4573f;
  --coral-deep: #7d2419;

  --gold: #c9a227;
  --gold-bright: #e3c05a;
  --gold-dim: rgba(201, 162, 39, 0.35);
  --gold-hair: rgba(201, 162, 39, 0.22);

  --ink: #120e1c;
  --ink-deep: #0a0710;
  --ink-raised: #1b1526;
  --ink-veil: rgba(10, 7, 16, 0.72);

  --nzu: #f7f1e6;
  --nzu-warm: #efe5d4;
  --clay: #9c6748;
  --palm: #1f4636;
  --palm-bright: #3f9d76;

  /* Semantic roles — components reference these, not raw colours. */
  --bg: var(--ink);
  --fg: var(--nzu);
  --fg-muted: rgba(247, 241, 230, 0.66);
  --fg-faint: rgba(247, 241, 230, 0.42);
  --rule: var(--gold-hair);
  --surface: var(--ink-raised);

  /* Type */
  --font-display: "Fraunces", "Playfair Display", "Iowan Old Style",
    "Palatino Linotype", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  /* Fluid type scale — clamp(min, preferred, max) */
  --step--1: clamp(0.83rem, 0.79rem + 0.18vw, 0.92rem);
  --step-0: clamp(1rem, 0.95rem + 0.24vw, 1.13rem);
  --step-1: clamp(1.2rem, 1.11rem + 0.44vw, 1.5rem);
  --step-2: clamp(1.44rem, 1.28rem + 0.78vw, 2rem);
  --step-3: clamp(1.73rem, 1.45rem + 1.36vw, 2.66rem);
  --step-4: clamp(2.07rem, 1.61rem + 2.3vw, 3.55rem);
  --step-5: clamp(2.49rem, 1.72rem + 3.83vw, 4.73rem);

  /* Space */
  --space-2xs: 0.375rem;
  --space-xs: 0.625rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 9rem;

  /* Measure & structure */
  --measure: 62ch;
  --container: 74rem;
  --container-narrow: 46rem;
  --radius: 2px;
  --radius-lg: 4px;

  --transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- 2. Reset & base --------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

/* The hidden attribute must beat every display rule below it. Without this,
   `display: block` on images and `display: flex` on placeholders silently
   defeat element.hidden, and both states render at once. */
[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration-color: var(--gold-dim);
  text-underline-offset: 0.25em;
  transition: color var(--transition), text-decoration-color var(--transition);
}

a:hover {
  text-decoration-color: var(--gold);
}

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
  border-radius: var(--radius);
}

::selection {
  background: var(--coral);
  color: var(--nzu);
}

/* Skip link — first focusable element on every page. */
.skip-link {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -120%);
  z-index: 200;
  padding: var(--space-xs) var(--space-m);
  background: var(--gold);
  color: var(--ink-deep);
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--transition);
}

.skip-link:focus-visible {
  transform: translate(-50%, 0);
}

/* ---------- 3. Typography ------------------------------------------------ */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-s);
  text-wrap: balance;
}

h1 {
  font-size: var(--step-5);
}
h2 {
  font-size: var(--step-4);
}
h3 {
  font-size: var(--step-2);
}
h4 {
  font-size: var(--step-1);
}

p,
li {
  text-wrap: pretty;
}

p {
  margin: 0 0 var(--space-s);
  max-width: var(--measure);
}

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--fg-muted);
}

/* Small caps eyebrow above section headings. */
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 var(--space-xs);
}

/* Igbo phrase set alongside its English gloss.
   Always wrapped in <span lang="ig"> in the markup. */
.igbo {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--gold-bright);
}

.gloss {
  color: var(--fg-faint);
  font-style: normal;
}

blockquote {
  margin: var(--space-l) 0;
  padding-left: var(--space-m);
  border-left: 2px solid var(--gold);
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-style: italic;
  line-height: 1.35;
  color: var(--fg);
}

blockquote cite {
  display: block;
  margin-top: var(--space-s);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

/* ---------- 4. Layout primitives ---------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-m);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* A full-width horizontal band. Bands alternate ground colour so the page
   has rhythm instead of one flat scroll. */
.band {
  padding-block: var(--space-2xl);
  position: relative;
}

.band--tight {
  padding-block: var(--space-xl);
}

.band--ink {
  background: var(--ink);
  color: var(--nzu);
}

.band--ink-deep {
  background: var(--ink-deep);
  color: var(--nzu);
}

/* Ivory band — flips every semantic role so long reading sections are
   comfortable and the site never becomes a wall of dark. */
.band--nzu {
  background: var(--nzu);
  --fg: #1a1420;
  --fg-muted: #4a4152;
  --fg-faint: #6c6275;
  --rule: rgba(179, 57, 43, 0.22);
  --surface: #ffffff;
  color: var(--fg);
}

.band--nzu .eyebrow {
  color: var(--coral);
}

.band--nzu .igbo {
  color: var(--coral-deep);
}

.band--coral {
  background: var(--coral-deep);
  --fg: var(--nzu);
  --fg-muted: rgba(247, 241, 230, 0.78);
  --rule: rgba(247, 241, 230, 0.25);
  --surface: rgba(0, 0, 0, 0.16);
  color: var(--fg);
}

.band--coral .eyebrow {
  color: var(--gold-bright);
}

.grid {
  display: grid;
  gap: var(--space-m);
}

/* Grid and flex children default to min-width:auto, so an item with a wide
   intrinsic size — an image with width/height attributes, a button wrapping
   one — refuses to shrink and pushes the track past its column. */
.grid > * {
  min-width: 0;
}

@media (min-width: 40rem) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 52rem) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
  /* Asymmetric split for text-beside-image sections. */
  .grid--split {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
  }
}

.stack > * + * {
  margin-block-start: var(--space-s);
}

.stack--l > * + * {
  margin-block-start: var(--space-l);
}

.section-head {
  max-width: var(--measure);
  margin-bottom: var(--space-l);
}

/* ---------- 5. Ornament -------------------------------------------------- */

/* Uli-inspired rule: a hairline interrupted by a small lozenge, echoing the
   curvilinear line-work of traditional Igbo wall and body painting.
   The full drawn motif set arrives in Phase 2. */
.rule {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  margin-block: var(--space-l);
  border: 0;
  padding: 0;
}

.rule::before,
.rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

/* Coral bead — used as the centre of a rule and as a list marker. */
.rule__bead {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--coral-bright);
  box-shadow: 0 0 0 3px rgba(179, 57, 43, 0.18);
}

/* Bead-marked list. */
.bead-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: var(--measure);
}

.bead-list li {
  position: relative;
  padding-left: var(--space-m);
  margin-bottom: var(--space-xs);
}

.bead-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral-bright);
}

/* Woven ground evoking akwete cloth — a very low-contrast diagonal weave
   laid over ink bands so large dark areas are not dead flat. */
.textured {
  position: relative;
  isolation: isolate;
}

.textured::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  background-image: repeating-linear-gradient(
      45deg,
      rgba(201, 162, 39, 0.035) 0 1px,
      transparent 1px 9px
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(201, 162, 39, 0.03) 0 1px,
      transparent 1px 9px
    );
}

/* ---------- 6. Components ------------------------------------------------ */

/* --- Site header & nav --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 7, 16, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gold-hair);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  min-height: 4.5rem;
}

/* Wordmark gives Ireland and Europe equal billing, per the brand decision. */
.wordmark {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
  color: var(--nzu);
  flex: none;
}

.wordmark__mark {
  width: 2rem;
  height: 2rem;
  flex: none;
  color: var(--gold);
}

.wordmark__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.wordmark__name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.wordmark__region {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  background: transparent;
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  color: var(--nzu);
  font: inherit;
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}

.nav-toggle:hover {
  border-color: var(--gold);
}

.nav-toggle__bars {
  display: block;
  width: 16px;
  height: 10px;
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: currentColor;
}

.nav-toggle__bars::before {
  top: 0;
}
.nav-toggle__bars::after {
  bottom: 0;
}

.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-m);
}

.site-nav__link {
  display: inline-block;
  padding-block: 0.35rem;
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg-muted);
  border-bottom: 1px solid transparent;
}

.site-nav__link:hover {
  color: var(--nzu);
  border-bottom-color: var(--gold-dim);
}

/* Set by site.js from the current path. */
.site-nav__link[aria-current="page"] {
  color: var(--nzu);
  border-bottom-color: var(--gold);
}

/* Mobile: nav collapses behind the toggle. The breakpoint is set by the width
   at which eight uppercase nav items plus the wordmark stop fitting on one
   line, not by a device size. */
@media (max-width: 68rem) {
  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--ink-deep);
    border-bottom: 1px solid var(--gold-hair);
    padding: var(--space-s) var(--space-m) var(--space-m);
  }

  .site-nav[hidden] {
    display: none;
  }

  .site-nav__list {
    flex-direction: column;
    gap: 0;
  }

  .site-nav__link {
    display: block;
    padding-block: var(--space-xs);
    border-bottom: 1px solid var(--gold-hair);
  }
}

@media (min-width: 68.0625rem) {
  .nav-toggle {
    display: none;
  }

  /* The [hidden] attribute is managed for small screens; on wide screens the
     nav is always shown regardless of its value. */
  .site-nav[hidden] {
    display: block;
  }
}

/* --- Buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  padding: 0.85rem 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
    border-color var(--transition), transform var(--transition);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--coral);
  color: var(--nzu);
}

.btn--primary:hover {
  background: var(--coral-bright);
  color: var(--nzu);
}

.btn--gold {
  background: var(--gold);
  color: var(--ink-deep);
}

.btn--gold:hover {
  background: var(--gold-bright);
}

.btn--ghost {
  background: transparent;
  border-color: var(--gold-dim);
  color: inherit;
}

.btn--ghost:hover {
  border-color: var(--gold);
  color: inherit;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  margin-top: var(--space-m);
}

/* --- Hero --- */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(86vh, 46rem);
  padding-block: var(--space-2xl) var(--space-xl);
  background: var(--ink-deep);
  overflow: hidden;
}

/* Placeholder ground until a real photograph is supplied. Replaced in
   CONTENT.md step 1 with a background-image on .hero. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      ellipse at 70% 20%,
      rgba(179, 57, 43, 0.4),
      transparent 60%
    ),
    radial-gradient(ellipse at 20% 80%, rgba(201, 162, 39, 0.22), transparent 55%),
    linear-gradient(160deg, #1d1329 0%, #0a0710 70%);
}

/* Scrim keeps text legible once a real photo sits behind it. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 7, 16, 0.95) 0%,
    rgba(10, 7, 16, 0.6) 45%,
    rgba(10, 7, 16, 0.25) 100%
  );
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero__inner {
  width: 100%;
}

.hero__content {
  max-width: 44rem;
}

.hero__title {
  margin-bottom: var(--space-m);
}

/* The event date/venue line — the headline element, since the site's job is
   filling the room. */
.hero__event {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-xs) var(--space-m);
  padding-block: var(--space-s);
  border-top: 1px solid var(--gold-dim);
  border-bottom: 1px solid var(--gold-dim);
  margin-bottom: var(--space-m);
  font-size: var(--step-1);
}

.hero__date {
  font-family: var(--font-display);
  color: var(--gold-bright);
  font-weight: 600;
}

.hero__venue {
  color: var(--fg-muted);
}

/* --- Cards --- */

.card {
  padding: var(--space-m);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition), transform var(--transition);
}

.card > :last-child {
  margin-bottom: 0;
}

.card--link:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.card__title {
  margin-bottom: var(--space-2xs);
}

.card__meta {
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-xs);
}

/* Numbered cultural beat — used for the "why this night matters" trio. */
.beat__index {
  font-family: var(--font-display);
  font-size: var(--step-3);
  color: var(--gold-dim);
  line-height: 1;
  display: block;
  margin-bottom: var(--space-xs);
}

/* --- Placeholder blocks ---
   Every unsupplied image and copy block is visibly marked so nothing
   provisional can be mistaken for finished content. See CONTENT.md. */

.ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  text-align: center;
  padding: var(--space-m);
  border: 1px dashed var(--gold-dim);
  border-radius: var(--radius-lg);
  background: repeating-linear-gradient(
    -45deg,
    rgba(201, 162, 39, 0.05) 0 8px,
    transparent 8px 16px
  );
  color: var(--fg-faint);
  font-size: var(--step--1);
  line-height: 1.4;
}

.ph__label {
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-size: 0.68rem;
}

/* Capped so an empty portrait slot does not tower over the text beside it.
   Real photographs replace the whole block and set their own width. */
.ph--portrait {
  aspect-ratio: 3 / 4;
  width: 100%;
  max-width: 24rem;
  margin-inline: auto;
}
.ph--landscape {
  aspect-ratio: 3 / 2;
}
.ph--square {
  aspect-ratio: 1 / 1;
}
.ph--wide {
  aspect-ratio: 16 / 7;
}
.ph--logo {
  aspect-ratio: 5 / 2;
}

/* Inline note to the site owner, stripped once real copy lands. */
.todo {
  display: block;
  margin: var(--space-xs) 0;
  padding: var(--space-xs) var(--space-s);
  border-left: 3px solid var(--gold);
  background: rgba(201, 162, 39, 0.08);
  font-size: var(--step--1);
  color: var(--fg-muted);
  max-width: var(--measure);
}

.todo strong {
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.68rem;
}

/* --- Definition rows (pageant rules, ticket tiers, sponsor tiers) --- */

.deflist {
  margin: 0;
  border-top: 1px solid var(--rule);
}

.deflist__row {
  display: grid;
  gap: var(--space-2xs) var(--space-m);
  padding-block: var(--space-s);
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 44rem) {
  .deflist__row {
    grid-template-columns: 14rem 1fr;
  }
}

.deflist__term {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  margin: 0;
}

.deflist__desc {
  margin: 0;
  color: var(--fg-muted);
}

/* --- Forms --- */

.field {
  display: block;
  margin-bottom: var(--space-m);
  max-width: 34rem;
}

.field__label {
  display: block;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-2xs);
}

.field__hint {
  display: block;
  font-size: var(--step--1);
  color: var(--fg-faint);
  margin-bottom: var(--space-2xs);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

.field__control {
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  color: inherit;
  font: inherit;
  transition: border-color var(--transition), background var(--transition);
}

.band--nzu .field__control {
  background: #fff;
}

.field__control:focus {
  border-color: var(--gold);
  outline: none;
}

.field__control:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

textarea.field__control {
  min-height: 8rem;
  resize: vertical;
}

/* Honeypot — hidden from people, visible to bots. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Footer --- */

.site-footer {
  background: var(--ink-deep);
  border-top: 1px solid var(--gold-hair);
  padding-block: var(--space-xl) var(--space-m);
  font-size: var(--step--1);
}

.site-footer__grid {
  display: grid;
  gap: var(--space-l);
  margin-bottom: var(--space-l);
}

@media (min-width: 44rem) {
  .site-footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.site-footer h2 {
  font-size: var(--step-0);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--font-body);
  color: var(--gold);
  margin-bottom: var(--space-xs);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: var(--space-2xs);
}

.site-footer a {
  color: var(--fg-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--nzu);
  text-decoration: underline;
}

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s) var(--space-m);
  justify-content: space-between;
  padding-top: var(--space-m);
  border-top: 1px solid var(--gold-hair);
  color: var(--fg-faint);
}

/* ---------- 7. Utilities ------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.center {
  text-align: center;
}

.center p,
.center .lede {
  margin-inline: auto;
}

.flow-tight > * + * {
  margin-block-start: var(--space-xs);
}

.muted {
  color: var(--fg-muted);
}

/* ---------- 8. Motion ---------------------------------------------------- */

/* Reveal-on-scroll is wired in Phase 2; the resting state lives here so the
   class can be applied to markup now without hiding content from anyone
   whose JavaScript never runs. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .btn:hover,
  .card--link:hover {
    transform: none;
  }
}

/* =========================================================================
   9. Phase 2 components
   Motifs, photographs, lightbox, countdown, form states, language toggle,
   scroll reveal. Everything below reads the tokens declared in section 1.
   ========================================================================= */

/* ---- Uli motifs --------------------------------------------------------
   The sprite is inlined into every page rather than referenced across files:
   Safari does not resolve external <use> targets, and neither does file://.
*/

.uli {
  display: block;
  fill: none;
  color: var(--gold);
}

.band--nzu .uli {
  color: var(--coral);
}

.band--coral .uli {
  color: var(--gold-bright);
}

/* Divider standing in for a section break. */
.uli-rule {
  width: min(15rem, 60%);
  height: auto;
  margin: var(--space-l) auto;
  opacity: 0.75;
}

.uli-rule--start {
  margin-inline: 0 auto;
}

.uli-rule--light {
  width: min(10rem, 45%);
  margin-block: var(--space-m);
  opacity: 0.55;
}

/* Large loose tracery laid over the hero photograph. */
.uli-tracery {
  position: absolute;
  inset: auto -6% -8% auto;
  width: min(34rem, 78%);
  height: auto;
  opacity: 0.14;
  color: var(--gold-bright);
  pointer-events: none;
  z-index: 1;
}

/* Card corner flourish — decorative only, hidden from assistive tech. */
.uli-corner {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 1.6rem;
  height: 1.6rem;
  opacity: 0.35;
  pointer-events: none;
}

.card {
  position: relative;
}

/* ---- Photographs -------------------------------------------------------
   Every photograph sits in a slot with a fixed filename (see CONTENT.md).
   The image is the default state, because that is the finished site. If the
   file is not in assets/img/ yet, site.js swaps in the marked placeholder,
   so the page is correct both before and after the photographs arrive.
*/

.shot {
  margin: 0;
  position: relative;
}

.shot img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--rule);
  object-fit: cover;
}

.shot--portrait img {
  aspect-ratio: 3 / 4;
  max-width: 24rem;
  margin-inline: auto;
}

.shot--landscape img {
  aspect-ratio: 3 / 2;
}

.shot--square img {
  aspect-ratio: 1 / 1;
}

.shot figcaption {
  margin-top: var(--space-2xs);
  font-size: var(--step--1);
  color: var(--fg-faint);
}

.shot__credit {
  display: block;
  font-style: italic;
}

/* ---- Gallery grid & lightbox ------------------------------------------- */

.gallery-item {
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: var(--radius-lg);
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-item:hover {
  transform: translateY(-2px);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--rule);
}

.gallery-item[disabled] {
  cursor: default;
}

.lightbox {
  width: min(94vw, 74rem);
  max-width: none;
  max-height: 94vh;
  padding: 0;
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-lg);
  background: var(--ink-deep);
  color: var(--nzu);
  overflow: hidden;
}

.lightbox::backdrop {
  background: rgba(6, 4, 10, 0.9);
}

.lightbox__figure {
  margin: 0;
  display: grid;
  gap: 0;
}

.lightbox__img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background: #000;
  display: block;
}

.lightbox__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-m);
  padding: var(--space-s) var(--space-m);
  border-top: 1px solid var(--gold-hair);
  font-size: var(--step--1);
  color: var(--fg-muted);
}

.lightbox__count {
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  letter-spacing: 0.1em;
}

.lightbox__controls {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-xs);
  pointer-events: none;
}

.lightbox__btn {
  pointer-events: auto;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  background: rgba(10, 7, 16, 0.8);
  color: var(--nzu);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.lightbox__btn:hover {
  background: var(--coral);
  border-color: var(--coral);
}

.lightbox__close {
  position: absolute;
  top: var(--space-xs);
  right: var(--space-xs);
  z-index: 2;
}

/* ---- Countdown ---------------------------------------------------------
   One source of truth: the target is the data-event-datetime attribute on
   the hero. With no date set, or with JavaScript off, this never renders and
   the plain date line carries the hero on its own.
*/

.countdown {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  margin-bottom: var(--space-m);
}

.countdown[hidden] {
  display: none;
}

.countdown__unit {
  min-width: 4.5rem;
  padding: var(--space-xs) var(--space-s);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  background: rgba(10, 7, 16, 0.5);
  text-align: center;
}

.countdown__value {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 600;
  line-height: 1;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
}

.countdown__label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

/* Day-of and after states replace the units with a single line. */
.countdown__message {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-style: italic;
  color: var(--gold-bright);
}

/* ---- Form validation ---------------------------------------------------- */

.field__control[aria-invalid="true"] {
  border-color: var(--coral-bright);
  background: rgba(179, 57, 43, 0.08);
}

.field__error {
  display: block;
  margin-top: var(--space-2xs);
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--coral-bright);
}

.band--nzu .field__error {
  color: var(--coral-deep);
}

.field__error:empty {
  display: none;
}

/* Summary announced when a submit is rejected. */
.form-status {
  margin-bottom: var(--space-m);
  padding: var(--space-s) var(--space-m);
  border-left: 3px solid var(--coral);
  background: rgba(179, 57, 43, 0.12);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.form-status:empty {
  display: none;
}

.form-status--ok {
  border-left-color: var(--palm-bright, #3f9d76);
  background: rgba(63, 157, 118, 0.14);
}

.form-status h3 {
  margin-bottom: var(--space-2xs);
}

.form-status ul {
  margin: 0;
  padding-left: var(--space-m);
}

/* ---- Language toggle ---------------------------------------------------- */

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  overflow: hidden;
  flex: none;
}

.lang-toggle button {
  padding: 0.4rem 0.6rem;
  border: 0;
  background: transparent;
  color: var(--fg-muted);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.lang-toggle button:hover {
  color: var(--nzu);
}

.lang-toggle button[aria-pressed="true"] {
  background: var(--gold);
  color: var(--ink-deep);
}

/* The header now carries logo, seven links and the toggle. */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-s);
}

/* ---- Scroll reveal -----------------------------------------------------
   Content is visible by default. site.js adds .reveal-ready only once it is
   running, so nothing is ever hidden from a visitor without JavaScript.
*/

.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 620ms ease, transform 620ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

.reveal-ready .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal-ready .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .gallery-item:hover {
    transform: none;
  }
}

/* ---- Press & get-involved ----------------------------------------------- */

.kit-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  padding: var(--space-s) 0;
  border-bottom: 1px solid var(--rule);
}

.kit-item h3 {
  margin: 0;
}

.kit-item p {
  margin: 0;
  color: var(--fg-muted);
  font-size: var(--step--1);
  flex-basis: 100%;
}

.boilerplate {
  padding: var(--space-m);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.boilerplate p:last-child {
  margin-bottom: 0;
}

/* ---- Narrow phones -----------------------------------------------------
   The header carries the wordmark, the language toggle and the menu button.
   Below ~30rem those stop fitting on one line, so the menu button drops its
   label (the bars plus an accessible name carry it) and the wordmark tightens.
*/

@media (max-width: 30rem) {
  .site-header__actions {
    gap: var(--space-xs);
  }

  .nav-toggle {
    padding: 0.5rem 0.6rem;
  }

  .nav-toggle__text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .lang-toggle button {
    padding: 0.4rem 0.45rem;
    letter-spacing: 0.06em;
  }

  .wordmark__name {
    font-size: 0.95rem;
  }

  .wordmark__mark {
    width: 1.7rem;
    height: 1.7rem;
  }
}

/* ---- Print --------------------------------------------------------------
   Scroll-reveal never runs on a printed page, so anything still waiting for
   the observer would print blank. Ink grounds also waste a cartridge and
   read worse on paper than plain black on white.
*/

@media print {
  .reveal-ready .reveal,
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .site-header,
  .nav-toggle,
  .lang-toggle,
  .lightbox,
  .btn-row,
  .uli-tracery {
    display: none !important;
  }

  body,
  .band,
  .band--ink,
  .band--ink-deep,
  .band--coral,
  .band--nzu,
  .hero {
    background: #fff !important;
    color: #000 !important;
  }

  .hero::before,
  .hero::after,
  .textured::before {
    display: none !important;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    word-break: break-all;
  }
}

/* ---- Brand mark slot ---------------------------------------------------
   The header shows the real logo file when assets/img/logo-ada.png exists,
   and the drawn crown-and-tricolour mark until it does. Both occupy the same
   box so the header never shifts when the real logo lands.
*/

.wordmark__logo {
  width: 2rem;
  height: 2rem;
  flex: none;
  object-fit: contain;
  border-radius: 3px;
}

@media (max-width: 30rem) {
  .wordmark__logo {
    width: 1.7rem;
    height: 1.7rem;
  }
}
