/* ==========================================================================
   SEITEL — Sections (DESIGN.md §7), in page order
   ========================================================================== */

/* ---------- 01 · Hero (§7.01 v2.0): white, full viewport, no inset, no overlay ----------
   Left: text on container cols 1–6, top-aligned under the nav.
   Right: the stage, from col 7 to the right viewport edge and up to the top
   (partly behind the solid nav pill). Every layer has reserved dimensions → no CLS. */
.hero {
  /* Content width of the one container (§5.1); % = the hero's own width (no scrollbar) */
  --hero-w: min(var(--container), 100% - 2 * var(--pad-x));
  position: relative;
  isolation: isolate;
  min-height: max(640px, 100vh);
  min-height: max(640px, 100svh);
  background: var(--white);
  overflow: clip; /* the spiral is cropped by the viewport edge; no horizontal scroll */
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  padding-top: calc(var(--nav-top) + var(--nav-h) + clamp(48px, 10svh, 120px));
  padding-bottom: var(--s-8);
}

.hero__content {
  grid-column: 1 / 7;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero__title { color: var(--ink-900); }
.hero__lead {
  max-width: 46ch;
  margin-top: var(--s-5);
  color: var(--slate-600);
}
.hero__actions { margin-top: var(--s-6); }

/* Stage: from container col 7 (+ half gutter) to the viewport edge, full hero height */
.hero__stage {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: calc((100% - var(--hero-w)) / 2 + (var(--hero-w) + var(--gutter)) / 2);
  right: 0;
  pointer-events: none;
}

.hero__stage .hero__layer { position: absolute; }

/* 1 · Spiral: ~80% of the stage height, sky-400 at 35%, cropped by the right edge */
.hero__spiral {
  top: 8%;
  right: -14%;
  height: 80%;
  aspect-ratio: 97.36 / 100;
  --logo-navy: var(--sky-400);
  --logo-blue: var(--sky-400);
  --logo-sky:  var(--sky-400);
  opacity: .35;
}
.hero__spiral-svg { width: 100%; height: 100%; }

/* 2 · Main image: portrait, bottom-anchored, transparent background (§7.01) */
.hero__visual {
  bottom: 4%;
  left: 2%;
  height: 84%;
  aspect-ratio: 1122 / 1402;
}
.hero__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 3 · Depth pieces (optional cut-outs), overlapping the image edges */
.hero__piece { width: clamp(64px, 9vw, 140px); }
.hero__piece img { width: 100%; height: auto; mix-blend-mode: multiply; }
.hero__piece--1 { top: 18%; left: -4%; }
.hero__piece--2 { bottom: 10%; left: 46%; }
.hero__piece--3 { top: 34%; left: 58%; }

/* 4 · OSD chip: overlaps the lower-left edge of the image by −24px */
.hero__chip-layer {
  left: calc(2% - 24px);
  bottom: 22%;
  pointer-events: auto;
}
.hero__chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  height: 36px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  background: var(--white);
  box-shadow: var(--shadow-2);
  color: var(--ink-900);
  white-space: nowrap;
}
.hero__chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-600);
}

/* On load: text first (60ms stagger, from main.js), then stage layers back to front.
   The main image is never hidden (it is the LCP element). */
.hero__spiral [data-reveal] { transition-delay: 240ms; }
.hero__piece [data-reveal]  { transition-delay: 300ms; }
.hero__chip[data-reveal]    { transition-delay: 360ms; }

/* ----- Scroll depth (§7.01): layers travel at different speeds over the hero scroll.
   Travel per layer (transform only); halved on mobile. ----- */
/* --dy is in svh (share of the hero height) so every layer uses the same reference:
   closer layers really travel further. */
.hero__layer { --dy: 0svh; --rot: 0deg; --ds: 0; }
[data-depth="spiral"] { --dy: -6svh;  --rot: 8deg; }
[data-depth="image"]  { --dy: -12svh; --ds: .04; }
[data-depth="piece"]  { --dy: -22svh; }
[data-depth="chip"]   { --dy: -30svh; }
[data-depth="text"]   { --dy: -4svh; }

@media (prefers-reduced-motion: no-preference) {
  /* Native: CSS scroll-driven animations over the first screen of scroll */
  @supports (animation-timeline: scroll()) {
    .hero__stage .hero__layer,
    .hero__content {
      animation: hero-depth linear both;
      animation-timeline: scroll(root block);
      animation-range: 0 100vh;
      will-change: transform;
    }
    .hero__content {
      animation-name: hero-depth, hero-fade;
    }
  }

  /* Fallback: hero-depth.js writes --p (0 → 1) on .hero once per frame */
  .hero.is-depth-js .hero__stage .hero__layer,
  .hero.is-depth-js .hero__content {
    transform:
      translateY(calc(var(--p, 0) * var(--dy)))
      rotate(calc(var(--p, 0) * var(--rot)))
      scale(calc(1 + var(--p, 0) * var(--ds)));
    will-change: transform;
  }
  .hero.is-depth-js .hero__content {
    opacity: calc(1 - max(0, var(--p, 0) - .8) * 3); /* 1 → .4 near the end */
  }
}

@keyframes hero-depth {
  from { transform: none; }
  to   { transform: translateY(var(--dy)) rotate(var(--rot)) scale(calc(1 + var(--ds))); }
}
@keyframes hero-fade {
  0%, 80% { opacity: 1; }
  100%    { opacity: .4; }
}

/* Desktop height budget: never taller than the viewport on short screens */
@media (min-width: 1024px) and (max-height: 760px) {
  .hero__inner { padding-top: calc(var(--nav-top) + var(--nav-h) + 40px); }
}

/* ----- Mobile & tablet (<1024px): text first, then the stage at 4:5 ----- */
@media (max-width: 1023px) {
  .hero { min-height: 0; }
  .hero__inner {
    padding-top: calc(var(--nav-top) + var(--nav-h) + var(--s-6));
    padding-bottom: var(--s-6);
  }
  .hero__content { grid-column: 1 / -1; }

  .hero__stage {
    position: relative;
    left: auto;
    right: auto;
    width: var(--hero-w);
    margin-inline: auto;
    aspect-ratio: 4 / 5;
    max-height: 640px;
  }
  .hero__spiral { top: 4%; right: -10%; height: 62%; }
  .hero__visual { left: 50%; bottom: 0; height: 92%; translate: -50% 0; }
  .hero__chip-layer { left: 0; bottom: 14%; }
  .hero__piece--2,
  .hero__piece--3 { display: none; } /* max one depth piece on mobile */

  /* Half the amplitudes (§7.01) */
  [data-depth="spiral"] { --dy: -3svh;  --rot: 4deg; }
  [data-depth="image"]  { --dy: -6svh;  --ds: .02; }
  [data-depth="piece"]  { --dy: -11svh; }
  [data-depth="chip"]   { --dy: -15svh; }
  [data-depth="text"]   { --dy: -2svh; }
}

@media (min-width: 600px) and (max-width: 1023px) {
  .hero__stage { width: min(var(--hero-w), 560px); }
}

/* ---------- 02 · Brand strip (§7.02) ---------- */
.brands { padding-block: var(--s-7); }

/* Intro line (§7.02 v2.1): reads as content, not a footnote — left on the container */
.brands__caption {
  max-width: 36ch; /* one line from 1024px up (below) */
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
  color: var(--ink-900);
}
@media (min-width: 1024px) {
  .brands__caption { max-width: none; }
}

.brands__viewport {
  margin-top: var(--s-6);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

/* Two identical lists side by side; the track moves -50% for a seamless loop.
   Spacing is a trailing margin on EVERY item (not flex gap + list padding):
   the last item of list 1 then keeps the same space before the first item of
   list 2, so the join ("JFL → Dahua") looks exactly like any other pair, and
   both lists stay the same width (−50% lands on the identical frame).
   Note: base.css `ul[role="list"] { padding: 0 }` used to cancel the old
   padding-right here, which is what glued "JFLDahua" together. */
.brands {
  --brands-gap: var(--s-8);
  --brands-logo-h: 32px; /* uniform optical height, × per-brand --logo-scale (§7.02) */
}

.brands__track {
  display: flex;
  width: max-content;
  animation: brands-drift 40s linear infinite;
}
.brands__viewport:hover .brands__track,
.brands__viewport:focus-within .brands__track { animation-play-state: paused; }

.brands__list {
  display: flex;
  flex: none;
  align-items: center;
  margin: 0;
}

.brands__item {
  flex: none;
  display: flex;
  align-items: center;
  height: calc(var(--brands-logo-h) * 1.3); /* room for the largest --logo-scale */
  margin-inline-end: var(--brands-gap);
}

/* Text wordmark (brand without a logo file yet) */
.brands__name {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--ink-900);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease);
}

/* Logo: full color, full opacity at all times (§7.02 v2.1) */
.brands__logo {
  display: block;
  width: auto;
  height: calc(var(--brands-logo-h) * var(--logo-scale, 1));
  max-width: 140px;
  object-fit: contain;
}

.brands__link { display: flex; align-items: center; border-radius: 4px; }

.brands__item:hover .brands__name,
.brands__link:focus-visible .brands__name { color: var(--navy-700); }

@keyframes brands-drift {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .brands__viewport { -webkit-mask-image: none; mask-image: none; }
  .brands__track { animation: none; width: auto; justify-content: center; padding-inline: var(--pad-x); }
  .brands__list { flex: 1 1 auto; flex-wrap: wrap; justify-content: center; row-gap: var(--s-4); }
  .brands__item { margin-inline: calc(var(--s-6) / 2); }
  .brands__list[aria-hidden="true"] { display: none; }
}

@media (max-width: 767px) {
  .brands { padding-block: var(--s-7) var(--s-6); --brands-gap: var(--s-7); }
  .brands__name { font-size: 17px; }
}

/* ---------- 03 · About bento (§7.03) ---------- */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas:
    "media body"
    "media cards";
  column-gap: var(--s-8);   /* room for the card's -24px overhang */
  row-gap: var(--s-7);
  align-items: start;
}

.about__body {
  grid-area: body;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-5);
}

.about__title { max-width: 24ch; }
.about__lead { color: var(--slate-600); max-width: 54ch; }

.about__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-5);
  margin-top: var(--s-3);
}

.about__media {
  grid-area: media;
  position: relative;
  margin: 0;
}

.about__photo {
  aspect-ratio: 4 / 5;
  border-radius: var(--r-card);
  overflow: hidden;
}
.about__photo > * { width: 100%; height: 100%; object-fit: cover; }

/* Floating data card: overhangs the photo's right edge by 24px, never centered */
.about__card {
  position: absolute;
  right: -24px;
  bottom: 72px;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  width: min(280px, 80%);
}
.about__card-value { font-size: 48px; }

.about__caption {
  margin-top: var(--s-3);
  color: var(--slate-600);
}

.about__cards {
  grid-area: cards;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--gutter);
}

@media (max-width: 959px) {
  .about__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "body" "media" "cards";
    row-gap: var(--s-7);
  }
  .about__media { max-width: 560px; }
  .about__photo { aspect-ratio: 4 / 3; }
  .about__card { right: -12px; bottom: 56px; }
}

@media (max-width: 767px) {
  .about__photo { aspect-ratio: 4 / 5; }
  .about__card { right: -8px; bottom: 48px; width: 78%; }
  .about__card-value { font-size: 40px; }
  .about__cards { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 04 · Figures strip (§7.04) ---------- */
.figures { padding-block: 0 var(--section-y); }

.figures__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

.figures__item {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-7) var(--s-6);
}
.figures__item + .figures__item { border-left: 1px solid var(--line); }
.figures__item:first-child { padding-left: 0; }

.figures__value { color: var(--navy-700); white-space: nowrap; }
.figures__caption { color: var(--slate-600); }

@media (max-width: 959px) {
  .figures__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figures__item { padding: var(--s-6) var(--s-5); }
  .figures__item:nth-child(odd) { padding-left: 0; border-left: 0; }
  .figures__item:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

/* ---------- 05 · Solutions (§7.05 v2.0): dark --ink-900 block ---------- */
.solutions {
  background: var(--ink-900);
  color: var(--white);
}

.solutions__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-4);
  max-width: 760px;
}
.solutions__lead { color: var(--on-dark-72); }

.solutions__grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  column-gap: var(--s-9);
  align-items: start;
}

/* Accordion on dark: dividers 12% white, numbers 48%, titles white */
.solutions .accordion { border-bottom-color: var(--on-dark-12); }
.solutions .accordion__item { border-top-color: var(--on-dark-12); }
.solutions .accordion__trigger { color: var(--white); grid-template-columns: 40px minmax(0, 1fr) 40px; }
.solutions .accordion__num { color: var(--on-dark-48); }
.solutions .accordion__trigger:hover .accordion__title,
.solutions .accordion__item.is-open .accordion__title { color: var(--white); }
.solutions .accordion__icon {
  width: 40px;
  height: 40px;
  border-color: var(--on-dark-24);
  background: transparent;
  color: var(--white);
}
.solutions .accordion__item.is-open .accordion__icon {
  border-color: var(--blue-600);
  background: var(--blue-600);
  color: var(--white);
}
.solutions .accordion__text { color: var(--on-dark-72); }

/* Open row highlight (§7.05 v2.1): the area between its two divider lines gets a
   --blue-600 tint at 18%, radius 16px. It is a background, so it may extend 20px
   past the container edge (§5.1) and the text never moves when a row opens. */
.solutions .accordion__item { position: relative; isolation: isolate; }
.solutions .accordion__item::before {
  content: "";
  position: absolute;
  inset: 0 -20px;
  z-index: -1;
  border-radius: 16px;
  background: rgba(var(--blue-600-rgb), .18);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease);
}
.solutions .accordion__item.is-open::before { opacity: 1; }
.solutions .accordion__item.is-open,
.solutions .accordion__item.is-open + .accordion__item { border-top-color: transparent; }
.solutions .accordion__item:last-child.is-open { border-bottom: 0; }
.solutions .accordion:has(.accordion__item:last-child.is-open) { border-bottom-color: transparent; }
.solutions .accordion__item.is-open .accordion__trigger { padding-top: var(--s-5); }
.solutions .accordion__item.is-open .accordion__content { padding-bottom: var(--s-5); }

/* Right: sky-50 illustration panel + floating data card */
.solutions__media {
  position: sticky;
  top: calc(var(--nav-top) + var(--nav-h) + var(--s-6));
}

.solutions__frame {
  position: relative;
  aspect-ratio: 1 / 1;
}

/* Each line has its own illustration + card; the active one crossfades in (400ms) */
.solutions__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-base) var(--ease), visibility 0s linear var(--dur-base);
}
.solutions__slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--dur-base) var(--ease), visibility 0s;
}

.solutions__panel {
  display: grid;
  place-items: center;
  height: 100%;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--sky-50);
  isolation: isolate; /* multiply blends against the sky-50 panel only */
}
.solutions__art {
  width: 86%;
  height: 86%;
  object-fit: contain;
  mix-blend-mode: multiply; /* the illustrations have a white background (§11.2) */
}
.solutions__panel .placeholder { width: 100%; height: 100%; background: var(--sky-50); }

/* Card overhangs the panel bottom-left by 24px (§6.4) */
.solutions__card {
  position: absolute;
  left: -24px;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  min-width: 232px;
}
.solutions__card .float-card__value { font-size: 44px; color: var(--navy-700); }

@media (max-width: 959px) {
  .solutions__grid { grid-template-columns: minmax(0, 1fr); row-gap: var(--s-6); }
  .solutions__media { position: relative; top: 0; order: -1; }
  .solutions__frame { aspect-ratio: 4 / 3; }
  .solutions__card { left: var(--s-4); bottom: var(--s-4); min-width: 0; }
}

@media (max-width: 767px) {
  /* Narrow gutter: the tint spans the block's inner padding instead */
  .solutions .accordion__item::before { inset: 0 calc(-1 * (var(--pad-x) - var(--inset) - 2px)); border-radius: 12px; }
  .solutions__frame { aspect-ratio: 1 / 1; }
  .solutions__card .float-card__value { font-size: 36px; }
  .solutions .accordion__trigger { grid-template-columns: 32px minmax(0, 1fr) 40px; }
}

/* ---------- 06 · Featured projects ★ (§7.06 v2.0) ---------- */
.projects__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--s-5) var(--s-8);
}
.projects__intro { display: flex; flex-direction: column; align-items: flex-start; }
.projects__title { max-width: 22ch; }
.projects__filters { justify-content: flex-end; }

/* Grid, mobile-first:
   - mobile: one column, featured first
   - tablet: two columns, featured and dot card full width
   - desktop (>=960px): asymmetric bento for "Todos" — row 1 = featured (7 col) + two
     stacked cards (5 col) whose combined height equals the featured card; row 2 =
     card · dot card · card. An even 3-column grid when a line is filtered. */
.projects__grid {
  --feat-h: clamp(420px, 70svh, 520px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-7) var(--gutter);
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.projects__grid.is-switching { opacity: 0; transform: translateY(8px); }

.projects__more { margin-top: var(--s-7); }

/* ----- Featured card: text over the darkened photo (§6.5) ----- */
.project-card--featured {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: var(--feat-h);
  border-radius: var(--r-card);
  overflow: hidden;
  isolation: isolate;
  background: var(--ink-900);
  color: var(--white);
}

.project-card__bg,
.project-card__bg > img,
.project-card__bg > .placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.project-card__bg { z-index: -2; }
.project-card__bg > img {
  object-fit: cover;
  transition: transform 600ms var(--ease);
}
.project-card__bg > .placeholder { background: var(--ink-900); color: var(--navy-700); }

/* Overlay (§6.5 v2.1): stronger, from the bottom-left where the text sits; hover +8% */
.project-card--featured::before,
.project-hero__card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top right, rgba(var(--ink-900-rgb), .92) 0%, rgba(var(--ink-900-rgb), .70) 40%, rgba(var(--ink-900-rgb), .25) 75%, rgba(var(--ink-900-rgb), .10) 100%);
  transition: opacity var(--dur-base) var(--ease);
}
.project-card--featured::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(var(--ink-900-rgb), .08);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease);
}
.project-card--featured:hover::after { opacity: 1; }
.project-card--featured:hover .project-card__bg > img { transform: scale(1.03); }

/* OSD chip top-left */
.project-card__osd--chip {
  top: var(--s-5);
  left: var(--s-5);
  padding: 8px 12px;
  border-radius: var(--r-pill);
  background: rgba(var(--ink-900-rgb), .55);
  color: var(--white);
}
.project-card--featured .project-card__osd { color: var(--white); }

.project-card__overlay {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-3);
  max-width: 560px;
  padding: var(--s-6);
}
/* Text over photos: white only (§6.5 v2.1) — hierarchy by size and weight */
.project-card--featured .project-card__title {
  color: var(--white);
  text-shadow: 0 1px 12px rgba(var(--ink-900-rgb), .45);
}
.project-card--featured .project-card__link::after { border-radius: var(--r-card); }
.project-card__meta-line { color: var(--white); font-weight: 600; }
.project-card__summary { color: var(--white); font-weight: 400; max-width: 48ch; }
.project-card--featured .project-card__figure { color: var(--white); font-weight: 600; }
.project-card__more { margin-top: var(--s-2); }
/* The whole card is the link: hovering it animates the visual button */
.project-card--featured:hover .project-card__more { background: var(--sky-50); }
.project-card--featured:hover .project-card__more .btn__icon { transform: translateX(3px); }

/* Focus ring around the whole featured card */
@supports selector(:has(*)) {
  .project-card--featured:has(.project-card__link:focus-visible) {
    outline: 2px solid var(--blue-600);
    outline-offset: 2px;
  }
}

@media (max-width: 767px) {
  .dot-card { padding: var(--s-5); }
  .project-card__overlay { padding: var(--s-5); }
}

@media (min-width: 768px) {
  .projects__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .projects__grid:not(.is-filtered) .project-card--featured { grid-column: 1 / -1; }
  .projects__grid:not(.is-filtered) .dot-card {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
  .projects__more { margin-top: var(--s-8); }
}

@media (min-width: 960px) {
  .projects__grid { --feat-h: clamp(480px, 64svh, 640px); }
  .projects__grid.is-filtered { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .projects__grid:not(.is-filtered) {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: calc((var(--feat-h) - var(--gutter)) / 2) calc((var(--feat-h) - var(--gutter)) / 2) auto;
    row-gap: var(--gutter);
    grid-template-areas:
      "f f f f f f f a a a a a"
      "f f f f f f f b b b b b"
      "c c c c d d d d e e e e";
  }
  .projects__grid:not(.is-filtered) [data-slot="f"] { grid-area: f; }
  .projects__grid:not(.is-filtered) [data-slot="a"] { grid-area: a; }
  .projects__grid:not(.is-filtered) [data-slot="b"] { grid-area: b; }
  .projects__grid:not(.is-filtered) [data-slot="c"] { grid-area: c; margin-top: var(--s-6); }
  .projects__grid:not(.is-filtered) [data-slot="d"] { grid-area: d; margin-top: var(--s-6); }
  .projects__grid:not(.is-filtered) [data-slot="e"] { grid-area: e; margin-top: var(--s-6); }

  /* The two stacked cards share the featured height: their photo takes what is left */
  .projects__grid:not(.is-filtered) [data-slot="a"],
  .projects__grid:not(.is-filtered) [data-slot="b"] { min-height: 0; gap: var(--s-3); }
  .projects__grid:not(.is-filtered) [data-slot="a"] .project-card__media,
  .projects__grid:not(.is-filtered) [data-slot="b"] .project-card__media {
    flex: 1 1 auto;
    min-height: 0;
    aspect-ratio: auto;
  }
  .projects__grid:not(.is-filtered) .project-card--featured { height: 100%; }
  .projects__grid:not(.is-filtered) .dot-card { display: flex; }
}

@media (max-width: 959px) {
  .projects__head { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .projects__filters { justify-content: flex-start; }
}

/* ---------- 07 · Manifesto (§7.07 v2.1): rounded ink block, video facade ---------- */
.manifesto {
  padding-block: var(--section-y);
  background: var(--ink-900);
  color: var(--white);
}


/* Two lines max on desktop (§7.07 v2.1): 30em measure, balanced, white only */
.manifesto__title {
  max-width: 30em;
  font-weight: 600;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--white);
  text-wrap: balance;
}

/* Ratio comes from the clip (inline style); 2.39:1 by default */
.manifesto__frame {
  position: relative;
  margin-top: var(--title-gap);
  aspect-ratio: 2.39 / 1;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--ink-900);
  box-shadow: inset 0 0 0 1px rgba(var(--white-rgb), .08);
}
.manifesto__poster { position: absolute; inset: 0; }
.manifesto__poster.placeholder { background: rgba(var(--white-rgb), .03); }
.manifesto__poster .placeholder__mark { width: min(16%, 160px); }

.manifesto__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin: -44px 0 0 -44px;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink-900);
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.manifesto__play .icon { width: 30px; height: 30px; margin-left: 4px; }
.manifesto__play:hover { transform: scale(1.04); }

/* The player that replaces the facade on click */
.manifesto__player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--ink-900);
}

@media (max-width: 767px) {
  .manifesto__play { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
  .manifesto__play .icon { width: 24px; height: 24px; }
}

/* ---------- 08 · Process (§7.08 v2.0): illustrated steps joined by a dotted line ---------- */
.process__head { display: flex; flex-direction: column; align-items: flex-start; }

.process__list {
  --art: 120px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gutter);
  margin: 0;
}

/* The dotted line: a row of 2px dots through the centre of the illustration circles */
.process__list::before {
  content: "";
  position: absolute;
  top: calc(var(--art) / 2 - 1px);
  left: calc(var(--art) / 2);
  right: 0;
  height: 2px;
  background-image: radial-gradient(circle, var(--slate-400) 1px, transparent 1.5px);
  background-size: 8px 2px;
  background-repeat: repeat-x;
}

.process__step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.process__art {
  position: relative; /* above the dotted line */
  display: grid;
  place-items: center;
  width: var(--art);
  height: var(--art);
  margin-bottom: var(--s-4);
  border-radius: 50%;
  background: var(--sky-50);
  overflow: hidden;
  isolation: isolate;
}
.process__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply; /* illustrations have a white background (§11.2) */
}

.process__num {
  color: var(--blue-600);
  font-variant-numeric: tabular-nums;
}
.process__text { color: var(--slate-600); max-width: 30ch; }

@media (max-width: 959px) {
  .process__list {
    --art: 88px;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-6);
  }
  .process__list::before {
    top: calc(var(--art) / 2);
    bottom: 0;
    left: calc(var(--art) / 2 - 1px);
    right: auto;
    width: 2px;
    height: auto;
    background-size: 2px 8px;
    background-repeat: repeat-y;
  }
  .process__step {
    display: grid;
    grid-template-columns: var(--art) minmax(0, 1fr);
    column-gap: var(--s-5);
    row-gap: var(--s-1);
    align-items: start;
  }
  .process__art { grid-row: 1 / span 3; margin-bottom: 0; }
  .process__num { padding-top: var(--s-3); }
  .process__text { max-width: 44ch; }
}

/* ---------- 09 · Testimonials (§7.09) ---------- */
.testimonials__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-5);
  margin-bottom: var(--title-gap);
}
.testimonials__title { max-width: 26ch; }

/* All slides share one grid cell; height = tallest slide (no jump) */
.carousel__viewport {
  display: grid;
  touch-action: pan-y;
}

.carousel__slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--s-8); /* room for the result card's -24px overhang */
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-base) var(--ease), visibility 0s linear var(--dur-base);
}
.carousel__slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--dur-base) var(--ease), visibility 0s;
}

.carousel__media { position: relative; min-height: 360px; }

.carousel__photo {
  height: 100%;
  border-radius: var(--r-card);
  overflow: hidden;
}
.carousel__photo > * { width: 100%; height: 100%; object-fit: cover; }

/* Result card overhangs the photo's left edge */
.carousel__result {
  position: absolute;
  left: -24px;
  bottom: var(--s-6);
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  max-width: 240px;
}
.carousel__result .float-card__value { font-size: 56px; color: var(--navy-700); font-variant-numeric: tabular-nums; }

.carousel__controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s-5);
  margin-top: var(--s-6);
}

.carousel__counter { color: var(--ink-900); font-variant-numeric: tabular-nums; white-space: nowrap; }

.carousel__progress {
  position: relative;
  height: 1px;
  background: var(--line);
}
.carousel__bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--navy-700);
  transition: width var(--dur-base) var(--ease);
}

.carousel__arrows { display: flex; gap: var(--s-2); }

.carousel__arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-900);
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.carousel__arrow .icon { width: 16px; height: 16px; }
.carousel__arrow:hover { background: var(--ink-900); border-color: var(--ink-900); color: var(--white); }

@media (max-width: 959px) {
  .carousel__slide { grid-template-columns: minmax(0, 1fr); gap: var(--gutter); }
  .carousel__media { min-height: 0; aspect-ratio: 16 / 10; }
  .carousel__result { left: var(--s-4); bottom: var(--s-4); }
}

@media (max-width: 767px) {
  .testimonial-card { padding: var(--s-5); gap: var(--s-6); }
  .carousel__media { aspect-ratio: 4 / 3; }
  .carousel__result .float-card__value { font-size: 44px; }
  .carousel__arrow { width: 40px; height: 40px; } /* bigger touch target on phones */
}

/* ---------- 10 · Closing CTA + form (§7.10 v2.1): rounded ink block, all text white ---------- */
.contact { padding-block: var(--section-y) var(--inset); }

.contact__block {
  position: relative;
  overflow: hidden;
  padding-block: var(--section-y);
  background: var(--ink-900);
  color: var(--white);
}

/* Optional still: right half only, 15% */
.contact__still {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50%;
  height: 100%;
  object-fit: cover;
  opacity: .15;
  pointer-events: none;
}

.contact__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: var(--s-9);
  align-items: start;
}

.contact__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-5);
}

.contact__title { color: var(--white); max-width: 20ch; }

/* Promise: 8px white dot + white 600 18px */
.contact__promise {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--white);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}
.contact__promise-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--white);
}

/* 40px from the promise to the list (24px intro gap + 16px), no divider line */
.contact__address { font-style: normal; width: 100%; margin-top: var(--s-4); }
.contact__list {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.contact__item {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  color: var(--white);
}
.contact__text { display: flex; flex-direction: column; min-width: 0; }
.contact__label { font-size: 15px; font-weight: 600; line-height: 1.3; }
.contact__value { color: var(--white); font-size: 15px; font-weight: 400; line-height: 1.4; overflow-wrap: anywhere; }
a.contact__item:hover .contact__value { text-decoration: underline; text-underline-offset: 3px; }

/* Contact icon tiles (§6.9 v2.1): 44px, radius 12, translucent white; Phosphor Fill 22px in white */
.icon-tile {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-input);
  background: var(--on-dark-08);
  color: var(--white);
  transition: background-color var(--dur-fast) var(--ease);
}
.icon-tile__icon { width: 22px; height: 22px; fill: currentColor; }
.icon-tile--whatsapp { color: var(--whatsapp); }
a.contact__item:hover .icon-tile { background: var(--on-dark-12); }

/* Form card on the dark block */
.contact .form-card { color: var(--ink-900); }

@media (max-width: 959px) {
  .contact__grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-7); }
  .contact__still { width: 100%; }
}

/* ---------- 11 · Footer (§7.11) ---------- */
.footer {
  position: relative;
  padding-top: var(--section-y);
  overflow: hidden;
  background: var(--white);
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 2.5fr) minmax(0, 2.5fr) minmax(0, 3fr);
  gap: var(--s-7) var(--gutter);
}

.footer__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-4);
}
.footer__col--brand .logo__svg { height: 36px; }
.footer__tagline { max-width: 34ch; color: var(--slate-600); font-weight: 400; line-height: 1.6; margin-bottom: var(--s-4); }

.footer__title {
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink-900);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.footer__links a,
.footer__contact a {
  display: inline-block;
  padding-block: 3px; /* 24px+ target (WCAG 2.5.8) without changing the rhythm */
  font-size: 15px;
  color: var(--slate-600);
  transition: color var(--dur-fast) var(--ease);
}
.footer__links a:hover,
.footer__contact a:hover { color: var(--blue-600); }

.footer__contact {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  font-style: normal;
  font-size: 15px;
  color: var(--slate-600);
}
.footer__hours { font-size: var(--fs-small); color: var(--slate-600); }

.footer__social { display: flex; gap: var(--s-2); }
.footer__social-link {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--navy-700);
  transition: border-color var(--dur-fast) var(--ease);
}
.footer__social-link:hover { border-color: var(--slate-400); }

.footer__installer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3) var(--s-5);
  margin-top: var(--s-8);
  padding-block: var(--s-5);
  border-block: 1px solid var(--line);
  color: var(--slate-600);
}

.footer__installer-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 15px;
  font-weight: 600;
  color: var(--blue-600);
}
.footer__installer-link .icon { transition: transform var(--dur-fast) var(--ease); }
.footer__installer-link:hover .icon { transform: translateX(2px); }

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  padding-block: var(--s-5);
  color: var(--slate-600);
  font-weight: 400;
}
.footer__legal a:hover { color: var(--blue-600); }

/* Giant wordmark: full width, sky-300 at 18% fading downward, cropped by the bottom edge */
.footer__wordmark {
  height: 0.62em;               /* shows the top ~85% of the cap height */
  margin-top: var(--s-5);
  overflow: hidden;
  font-family: var(--font);
  font-weight: 800;
  font-size: 29.4vw;            /* tuned so "SEITEL" spans the viewport width */
  line-height: 0.82;
  letter-spacing: -0.045em;
  text-align: center;
  white-space: nowrap;
  color: transparent;
  background: linear-gradient(to bottom, rgba(var(--sky-300-rgb), .18), rgba(var(--sky-300-rgb), 0) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  user-select: none;
  pointer-events: none;
}

@media (max-width: 959px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__col--brand { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  .footer { padding-top: 72px; }
  .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .footer__installer { margin-top: var(--s-7); }
}

/* ---------- Generic templates (index.php fallback) ---------- */
.page-fallback .t-h2 { margin-bottom: var(--s-6); }
.page-fallback__item + .page-fallback__item { margin-top: var(--s-4); }
.page-fallback__content > * + * { margin-top: var(--s-4); }

/* ---------- Theme additions (Phase 3) ---------- */
img.manifesto__poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
