/* ==========================================================================
   AlFajr landing — content layers (everything above the particle background)
   Layout follows wireframe 1a "The Gate".
   Panels float on the background as inset rounded cards; the background is
   always visible in the gutters and between sections.
   ========================================================================== */

:root {
  --void: #000000;
  --bone: #f5f1e8;
  --ash: #8f9a95;
  --graphite: #464f4c;
  --verdant: #15846e;
  --deep-green: #0e5c4a;
  --ember: #f15b40; /* taken from the crescent in their logo */
  --saffron: #ffb829;

  --panel: rgba(7, 13, 11, 0.62);
  --panel-solid: rgba(6, 11, 9, 0.9);
  --hairline: rgba(245, 241, 232, 0.1);
  --hairline-strong: rgba(245, 241, 232, 0.2);

  --radius: clamp(18px, 1.9vw, 30px);
  --radius-sm: clamp(12px, 1.1vw, 18px);
  --gutter: clamp(18px, 3.4vw, 52px);
  --stack: clamp(76px, 9vw, 168px);

  /* Display face echoes the ALFAJR wordmark: a geometric sans with cut
     terminals, a straight R leg and a shallow baseline J. Archivo was the
     closest match of the candidates tested against the logo outlines. */
  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', 'Courier New', monospace;

  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  /* Matches the first day-cycle stop, so the page never flashes black before
     site.js runs and so the WebGL fallback still lands on dawn rather than void. */
  background: linear-gradient(180deg, #252c52 0%, #5c3f56 68%, #171a33 100%);
  font-family: var(--sans);
  color: var(--bone);
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---- layer 0: day cycle, then the particle canvas over it ---- */

/* Dawn at the top of the document, night at the bottom. site.js interpolates
   the four stops from scroll progress and writes the whole background here;
   these values are the morning stop, so the layer is correct before JS runs. */
.daycycle {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 78% 62%, rgba(122, 74, 94, 0.3) 0%, transparent 55%),
    linear-gradient(180deg, #252c52 0%, #5c3f56 68%, #171a33 100%);
}

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
}

/* Sits between the field and the content so panels always have contrast. */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity 1.1s cubic-bezier(0.22, 1, 0.36, 1);
  background: radial-gradient(ellipse 80% 70% at 50% 45%, transparent 38%, rgba(0, 0, 0, 0.5) 100%);
}

/* Nothing needs seating against the background during a beat. */
body.field-open .vignette { opacity: 0.4; }

/* ---- shared ---- */

.page { position: relative; z-index: 2; }

.wrap {
  width: min(1440px, 100% - var(--gutter) * 2);
  margin-inline: auto;
}

/* Anchor targets must clear the floating nav, or jump links land underneath it. */
[id] { scroll-margin-top: clamp(104px, 12vh, 148px); }

.panel {
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--hairline);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
}

.eyebrow {
  font-family: var(--mono);
  font-size: clamp(10px, 0.75vw, 11px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--saffron);
}

/* A geometric sans carries far more ink than the Garamond this replaced, so it
   is set smaller, tighter and at the wordmark's own weight rather than inheriting
   the serif's size ramp. */
h1, h2, h3 {
  font-family: var(--display);
  /* 500, not the wordmark's heavier weight: at 100px across two lines, 600 fills
     the column and reads blocky. 500 keeps the geometry and the brand match
     while leaving the headline some air. */
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.06;
}

h1 { font-size: clamp(40px, 6.2vw, 100px); }
h2 { font-size: clamp(29px, 4vw, 64px); }
h3 { font-size: clamp(19px, 1.7vw, 27px); }

.lede {
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.68;
  color: rgba(245, 241, 232, 0.66);
  font-weight: 300;
  max-width: 54ch;
}

/* ---- buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid var(--hairline-strong);
  background: transparent;
  color: var(--bone);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.4s ease, border-color 0.4s ease, color 0.4s ease, transform 0.4s ease;
}
.btn:hover {
  background: var(--bone);
  border-color: var(--bone);
  color: #07100d;
  transform: translateY(-2px);
}
.btn--accent {
  border-color: rgba(241, 91, 64, 0.5);
  color: var(--saffron);
}
.btn--accent:hover {
  background: var(--ember);
  border-color: var(--ember);
  color: var(--bone);
}
.btn__arrow { transition: transform 0.4s ease; }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ==========================================================================
   MEDIA SLOTS — placeholders for footage/stills to be supplied.
   Swap the whole .slot element for a <video> or <img> with the same class
   for sizing; see README for the convention.
   ========================================================================== */

.slot {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: clamp(16px, 2vw, 28px);
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(245, 241, 232, 0.16);
  /* Opaque enough to read as a card against the particle field, translucent
     enough that the background still glows through. Real media replacing the
     slot will be fully opaque anyway. */
  background-color: rgba(5, 10, 9, 0.46);
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(245, 241, 232, 0.045) 0 1px,
    transparent 1px 11px
  );
  overflow: hidden;
  aspect-ratio: var(--ratio, 16 / 9);
  min-height: 140px;
}

.slot__label {
  font-family: var(--mono);
  font-size: clamp(10px, 0.8vw, 12px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 241, 232, 0.62);
}

.slot__note {
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: rgba(245, 241, 232, 0.3);
}

.slot--tall { --ratio: 3 / 4; }
.slot--square { --ratio: 1 / 1; }
.slot--wide { --ratio: 21 / 9; }

/* Slots used as a fill behind copy: label goes top-left so it never collides
   with the title and button sitting at the bottom of the same card. */
.hero__media,
.scrub__media,
.block__media,
.tile__media {
  justify-content: flex-start;
  align-items: flex-start;
}

/* Same fill rule the other slots needed: a replaced element positioned with
   inset:0 sizes to its intrinsic dimensions, not to the box. */
video.hero__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Biased up, not centred. On a wide-short desktop window the card can reach
     2.56:1 against the clip's 1.78:1, which throws away 30% of the height —
     centred, half of that comes off the top and decapitates everyone. 25% keeps
     headroom in the standing and prayer scenes while still holding the rug.
     No effect on phones: a portrait slot scales the clip to height and crops
     horizontally, so there is no vertical excess to position. */
  object-position: 50% 25%;
  background: #030806;
}

/* The hero is the exception — its copy column starts at the top-left too, so a
   top-left placeholder label lands straight on the eyebrow. Park it top-right,
   clear of the nav above and the copy beside it. Placeholder chrome only; this
   whole rule disappears with the slot once the real hero video lands. */
.hero__media.slot {
  align-items: flex-end;
  text-align: right;
}

/* ---- scroll reveal ---- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
              transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay='1'] { transition-delay: 0.09s; }
.reveal[data-delay='2'] { transition-delay: 0.18s; }
.reveal[data-delay='3'] { transition-delay: 0.27s; }
.reveal[data-delay='4'] { transition-delay: 0.36s; }
.reveal[data-delay='5'] { transition-delay: 0.45s; }

/* ==========================================================================
   NAV — transparent over the hero, gains a hairline and ground after it
   ========================================================================== */

/* Floating pill — detached from the top edge and aligned to the same container
   as the panels below, so its edges line up with the hero card. */
.nav {
  position: fixed;
  top: clamp(12px, 1.5vw, 20px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  width: min(1440px, 100% - var(--gutter) * 2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(8px, 0.8vw, 11px);
  padding-left: clamp(16px, 1.7vw, 28px);
  border-radius: 999px;
  border: 1px solid rgba(245, 241, 232, 0.08);
  background: linear-gradient(100deg, rgba(14, 20, 18, 0.6), rgba(8, 13, 11, 0.46));
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  box-shadow: 0 18px 50px -22px rgba(0, 0, 0, 0.85);
  transition: background 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

/* Grounds once the hero is behind it. */
.nav.solid {
  background: linear-gradient(100deg, rgba(10, 16, 14, 0.86), rgba(5, 9, 8, 0.78));
  border-color: rgba(245, 241, 232, 0.14);
  box-shadow: 0 22px 60px -24px rgba(0, 0, 0, 0.95);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--bone);
}

/* The wordmark path takes currentColor so it reads bone on the dark page; the
   crescent keeps AlFajr's own orange, baked into the sprite. */
.logo {
  display: block;
  height: clamp(26px, 2.2vw, 34px);
  width: auto;
  aspect-ratio: 200 / 70;
  color: var(--bone);
}
.logo--lg { height: clamp(38px, 3.4vw, 54px); }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 34px);
  padding-right: 4px;
}
.nav__links a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 241, 232, 0.62);
  text-decoration: none;
  transition: color 0.3s ease;
}
.nav__links a:hover { color: var(--bone); }

@media (max-width: 860px) {
  .nav__links a:not(.btn) { display: none; }
}

/* ==========================================================================
   HERO — inset rounded card, video behind, headline fades up on first scroll
   ========================================================================== */

.hero {
  position: relative;
  /* Clears the floating nav pill (top offset + its height) plus breathing room. */
  padding-top: clamp(108px, 13vh, 156px);
  padding-bottom: var(--stack);
}

.hero__card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--hairline);
  min-height: clamp(460px, 78vh, 860px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
}

/* The hero media fills the card; the .slot inside drops its aspect-ratio. */
.hero__media {
  position: absolute;
  inset: 0;
  border: none;
  border-radius: 0;
  aspect-ratio: auto;
  flex-direction: column;
  z-index: 0;
}

/* Darkens as the headline arrives, per the wireframe note. */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(3, 7, 6, 0.92) 0%,
    rgba(3, 7, 6, 0.55) 38%,
    rgba(3, 7, 6, 0.12) 70%,
    rgba(3, 7, 6, 0.3) 100%
  );
  opacity: 0.55;
  transition: opacity 1.2s ease;
}
.hero__card.lit .hero__scrim { opacity: 1; }

.hero__body {
  position: relative;
  z-index: 2;
  padding: clamp(26px, 4vw, 68px);
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 1.8vw, 26px);
}

.hero__title { max-width: 14ch; }

.hero__rule {
  width: clamp(70px, 9vw, 132px);
  height: 2px;
  background: linear-gradient(to right, var(--ember), transparent);
  transform-origin: left;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

/* ==========================================================================
   THE GATE — two full-height halves; hovered half widens and plays
   ========================================================================== */

.gate { padding-bottom: var(--stack); }

.gate__grid {
  display: flex;
  gap: clamp(12px, 1.4vw, 22px);
  min-height: clamp(420px, 72vh, 760px);
}

.gate__half {
  position: relative;
  /* basis 0, not 50% — with a 50% basis the two halves plus the gap overflow
     the row, so they shrink and flex-grow (the hover widening) never engages */
  flex: 1 1 0%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(22px, 2.6vw, 44px);
  text-decoration: none;
  color: var(--bone);
  isolation: isolate;
  transition: flex-grow 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.6s ease;
}

/* Holds the resting still and the hover still, stacked. */
.gate__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  /* Stripes show through only while an image is missing, so an absent asset
     reads as a placeholder rather than a broken panel. */
  background-color: rgba(5, 10, 9, 0.46);
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(245, 241, 232, 0.045) 0 1px,
    transparent 1px 11px
  );
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.gate__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity 0.8s ease;
}
.gate__img--hover { opacity: 0; }

/* The Makkah still carries its own "ساعة مكة / MAKKAH CLOCK" wordmark across
   the bottom, which duplicates and collides with the section title. Push in on
   the dial so the wordmark falls outside the crop at every panel height. */
.gate__img--makkah {
  object-position: center 34%;
  transform: scale(1.22);
}

.gate__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(3, 8, 6, 0.9), rgba(3, 8, 6, 0.28) 60%, transparent);
  transition: opacity 0.7s ease;
}

.gate__label { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }

.gate__title { font-size: clamp(30px, 3.6vw, 62px); }

@media (hover: hover) and (min-width: 861px) {
  .gate__grid:hover .gate__half { flex-grow: 0.8; }
  .gate__grid .gate__half:hover { flex-grow: 1.4; border-color: var(--hairline-strong); }
  .gate__half:hover .gate__media { transform: scale(1.04); }
  .gate__half:hover .gate__scrim { opacity: 0.82; }
  .gate__half:hover .gate__img--rest { opacity: 0; }
  .gate__half:hover .gate__img--hover { opacity: 1; }
}

@media (max-width: 860px) {
  .gate__grid { flex-direction: column; min-height: 0; }
  .gate__half { min-height: 62vh; }
}

/* ==========================================================================
   SECTION INTROS
   ========================================================================== */

.intro {
  padding-block: var(--stack) clamp(26px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.6vw, 22px);
}
.intro__head { display: flex; flex-direction: column; gap: 14px; }

/* ==========================================================================
   BEATS — the particle field alone

   Placed at the silhouette transitions, so the morph happens in open space
   instead of behind a panel. No card, no media: just the field, at full
   opacity, with one quiet line of type that says what the shape means.
   ========================================================================== */

.beat {
  min-height: clamp(460px, 76vh, 760px);
  display: grid;
  place-items: center;
  padding-block: var(--stack);
  text-align: center;
}

.beat__line {
  font-family: var(--mono);
  font-size: clamp(11px, 0.9vw, 13px);
  letter-spacing: 0.26em;
  line-height: 2.2;
  text-transform: uppercase;
  /* Sits directly on the day cycle with no panel behind it. Measured against
     the sky, horizon and ground at each beat's own scroll position: 0.62 came
     out at 4.33:1, under the 4.5 floor for text this small. */
  color: rgba(245, 241, 232, 0.72);
  max-width: 32ch;
}

@media (max-width: 860px) {
  .beat { min-height: clamp(360px, 62vh, 560px); }
}

/* ==========================================================================
   SCRUB ACTS — pinned while the footage runs, caption lines swap at marks
   ========================================================================== */

.scrub { position: relative; height: 300vh; }
.scrub:last-of-type { margin-bottom: var(--stack); }

.scrub__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  padding-block: clamp(70px, 9vh, 110px) clamp(24px, 4vh, 48px);
}

.scrub__card {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: 1fr;
  isolation: isolate;
}

.scrub__media {
  position: absolute;
  inset: 0;
  border: none;
  border-radius: 0;
  aspect-ratio: auto;
  z-index: 0;
}

/* Same trap as the tiles: a replaced element positioned with inset:0 still
   sizes to its intrinsic dimensions, so real media has to be told to fill.
   The frame source is 864x496 against a panel up to 1440 wide, so it is always
   being upscaled — object-fit does that more cleanly than a stretched bitmap. */
canvas.scrub__media,
video.scrub__media,
img.scrub__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #030806; /* same base as .scrub__scrim, so it never flashes */
}

.scrub__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to right, rgba(3, 8, 6, 0.9) 0%, rgba(3, 8, 6, 0.5) 45%, transparent 78%);
}
.scrub--mirrored .scrub__scrim {
  background: linear-gradient(to left, rgba(3, 8, 6, 0.9) 0%, rgba(3, 8, 6, 0.5) 45%, transparent 78%);
}

/* Name + button hold still while the captions change beneath them. */
.scrub__meta {
  position: relative;
  z-index: 2;
  align-self: end;
  justify-self: start;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(24px, 3.4vw, 56px);
  max-width: 46ch;
}
.scrub--mirrored .scrub__meta { justify-self: end; text-align: right; align-items: flex-end; }

.scrub__captions { position: relative; min-height: 3.6em; width: 100%; }

.scrub__caption {
  position: absolute;
  inset: 0;
  font-size: clamp(14px, 1.1vw, 17px);
  line-height: 1.6;
  font-weight: 300;
  color: rgba(245, 241, 232, 0.62);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}
.scrub__caption.on { opacity: 1; transform: none; }

/* Frame-mark progress rail. */
.scrub__rail {
  position: absolute;
  z-index: 2;
  right: clamp(18px, 2vw, 34px);
  top: clamp(24px, 3vw, 48px);
  bottom: clamp(24px, 3vw, 48px);
  width: 2px;
  background: rgba(245, 241, 232, 0.12);
  border-radius: 2px;
  overflow: hidden;
}
.scrub--mirrored .scrub__rail { right: auto; left: clamp(18px, 2vw, 34px); }
.scrub__railFill {
  position: absolute;
  inset: 0 0 auto 0;
  height: 0%;
  background: linear-gradient(to bottom, var(--saffron), var(--ember));
}

@media (max-width: 860px) {
  .scrub { height: 220vh; }
  .scrub__meta { max-width: none; }
  .scrub--mirrored .scrub__meta { justify-self: start; text-align: left; align-items: flex-start; }
}

/* ==========================================================================
   BLOCK — a still card, not pinned

   Digital clocks started as a pinned scrub like the others, but the client is
   supplying a still rather than footage, so it holds no scroll runway. Same
   card language as a scrub act, one screen shorter, and the three feature lines
   stand as a list instead of swapping on scroll.
   ========================================================================== */

.block { padding-bottom: var(--stack); }

.block__card {
  position: relative;
  min-height: clamp(420px, 62vh, 660px);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--hairline);
  display: grid;
  isolation: isolate;
}

.block__media {
  position: absolute;
  inset: 0;
  border: none;
  border-radius: 0;
  aspect-ratio: auto;
  z-index: 0;
}

/* Same trap as the tiles and the scrub acts: a replaced element positioned with
   inset:0 sizes to its intrinsic dimensions, so real media must be told to fill. */
img.block__media,
video.block__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #030806;
}

/* Two gradients, not one. The copy sits at the bottom of the card and the shelf
   in the clock photo is bright exactly there, so a purely horizontal scrim does
   not protect the text. The bottom gradient guards the copy; the horizontal one
   is pulled back off the subject (transparent by 66% instead of 78%). */
.block__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to top, rgba(3, 8, 6, 0.92) 0%, rgba(3, 8, 6, 0.5) 30%, transparent 64%),
    linear-gradient(to right, rgba(3, 8, 6, 0.85) 0%, rgba(3, 8, 6, 0.34) 38%, transparent 66%);
}

.block--mirrored .block__scrim {
  background:
    linear-gradient(to top, rgba(3, 8, 6, 0.92) 0%, rgba(3, 8, 6, 0.5) 30%, transparent 64%),
    linear-gradient(to left, rgba(3, 8, 6, 0.85) 0%, rgba(3, 8, 6, 0.34) 38%, transparent 66%);
}

.block--mirrored .block__meta {
  justify-self: end;
  text-align: right;
  align-items: flex-end;
}

/* One column on small screens, so the copy goes back to the left edge. */
@media (max-width: 860px) {
  .block--mirrored .block__meta {
    justify-self: start;
    text-align: left;
    align-items: flex-start;
  }
}

.block__meta {
  position: relative;
  z-index: 2;
  align-self: end;
  justify-self: start;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(24px, 3.4vw, 56px);
  max-width: 46ch;
}

/* Matches .scrub__caption, but stacked and all visible at once. */
.block__points {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: clamp(14px, 1.1vw, 17px);
  line-height: 1.6;
  font-weight: 300;
  color: rgba(245, 241, 232, 0.62);
}

@media (max-width: 860px) {
  .block__meta { max-width: none; }
}

/* ==========================================================================
   THE REST — tile grid, staggered reveal, hover swaps still for a loop
   ========================================================================== */

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 1.4vw, 22px);
  padding-bottom: var(--stack);
}
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .tiles { grid-template-columns: 1fr; } }

.tile {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--hairline);
  text-decoration: none;
  color: var(--bone);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: clamp(200px, 26vw, 320px);
  padding: clamp(16px, 1.6vw, 24px);
  isolation: isolate;
  transition: border-color 0.5s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.tile:hover { border-color: var(--hairline-strong); transform: translateY(-4px); }

.tile__media {
  position: absolute;
  inset: 0;
  border: none;
  border-radius: 0;
  aspect-ratio: auto;
  z-index: 0;
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Once a real <img> lands in the slot it has to be told to fill: an absolutely
   positioned replaced element sizes to its intrinsic dimensions, not to inset:0.
   Sources are portrait or square in a landscape tile, so cover crops the sides —
   centre-weighted, since the product sits mid-frame in every supplied render. */
img.tile__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.tile:hover .tile__media { transform: scale(1.05); }

.tile__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(3, 8, 6, 0.88), transparent 62%);
}

.tile__name {
  position: relative;
  z-index: 2;
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.01em;
  font-size: clamp(16px, 1.4vw, 22px);
}

/* ==========================================================================
   FOOTER — dark colophon
   ========================================================================== */

.footer {
  margin-bottom: var(--gutter);
  padding: clamp(30px, 4vw, 64px);
  border-radius: var(--radius);
  background: var(--panel-solid);
  border: 1px solid var(--hairline);
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 4vw, 64px);
  justify-content: space-between;
  padding-bottom: clamp(26px, 3.4vw, 48px);
  border-bottom: 1px solid var(--hairline);
}

.footer__cols {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 5vw, 88px);
}
.footer__col { display: flex; flex-direction: column; gap: 12px; min-width: 130px; }
.footer__col h4 {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(245, 241, 232, 0.38);
}
.footer__col a {
  font-size: 14px;
  font-weight: 300;
  color: rgba(245, 241, 232, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer__col a:hover { color: var(--bone); }

.badges {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 1.4vw, 22px);
  padding-top: clamp(24px, 3vw, 40px);
}
@media (max-width: 780px) { .badges { grid-template-columns: repeat(2, 1fr); } }

.badge {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: clamp(14px, 1.5vw, 20px);
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline);
  background: rgba(245, 241, 232, 0.025);
}
.badge strong {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--bone);
}
.badge span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(245, 241, 232, 0.4);
}

.footer__base {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  padding-top: clamp(22px, 3vw, 36px);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 241, 232, 0.32);
}
