/* ============================================
   TOKENS
   ============================================ */
:root {
  --ink: #14121c;
  --ink-2: #1b1824;
  --ink-3: #241f30;
  --brass: #4fb3c4;
  --brass-dim: #3d8b98;
  --frost: #ff6b52;
  --parchment: #f2e8d5;
  --parchment-dim: #b6ad9c;
  --epic: #e8b33d;

  --display: "Bricolage Grotesque", "Georgia", serif;
  --body: "Inter", -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Courier New", monospace;

  --edge: 1px solid rgba(79, 179, 196, 0.22);
  --container: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@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;
  }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--brass);
  text-decoration: none;
}
a:hover { color: var(--frost); }

:focus-visible {
  outline: 2px solid var(--frost);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* ============================================
   TOP NAV
   ============================================ */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 22, 31, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: var(--edge);
}
.topnav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.topnav .mark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--parchment);
  letter-spacing: 0.01em;
}
.topnav .mark span { color: var(--brass); }
.topnav nav {
  display: flex;
  gap: 28px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.topnav nav a { color: var(--parchment-dim); }
.topnav nav a:hover { color: var(--brass); }
.topnav nav a.lang-toggle {
  border: 1px solid rgba(79, 179, 196, 0.4);
  border-radius: 999px;
  padding: 3px 10px;
  color: var(--brass);
}
.topnav nav a.lang-toggle:hover { background: rgba(79, 179, 196, 0.12); }

/* ============================================
   BUTTONS / TAGS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid var(--brass);
  color: var(--brass);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background 0.2s, color 0.2s;
}
.btn:hover {
  background: var(--brass);
  color: var(--ink);
}

/* Chip tags — a tinted fill carries the category color, and a quiet
   hairline (not a loud outline) keeps the plain/neutral variant legible
   as a chip: --ink-3 on --ink-2 alone is only ~1.09:1 contrast, since
   there's no hue to fall back on the way the teal/mustard fills have. */
.tag {
  display: inline-block;
  line-height: 1;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--parchment-dim);
  background: var(--ink-3);
  border: 1px solid rgba(242, 232, 213, 0.12);
  border-radius: 999px;
  padding: 6px 13px;
}
.tag.epic { color: var(--epic); background: rgba(232, 179, 61, 0.14); }
.tag.brass { color: var(--brass); background: rgba(79, 179, 196, 0.14); }

.card-meta-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-meta-row .tag { margin-bottom: 0; }
.card-year { display: inline-block; line-height: 1; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--parchment-dim); }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: var(--edge);
}
.hero-banner {
  position: relative;
  width: 100%;
  height: 86vh;
  min-height: 560px;
  max-height: 820px;
  background: #000;
  overflow: hidden;
}
.hero-banner video,
.hero-banner .hero-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Flat uniform dim across the whole video — separate from the bottom-focused
   fade below, just a constant tint so the footage overall sits a touch
   darker/quieter behind the UI. */
.hero-dim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(20, 22, 31, 0.3);
}
/* Flat alpha safety layer — sits under the dithered scrim to guarantee a
   contrast floor even on the brightest video frames. Same fade shape,
   just a plain wash rather than gradient/pattern. */
.hero-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(10, 11, 16, 0.45);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, transparent 15%, black 50%, black 100%);
          mask-image: linear-gradient(180deg, transparent 0%, transparent 15%, black 50%, black 100%);
}
/* Dithered scrim: solid gradient for guaranteed contrast + tiled pixel-grid
   texture on top. Spans the full banner but is masked/graded so the top
   stays clean and only the lower portion (where the title sits) darkens —
   percentage-based so it holds up regardless of viewport height. */
.hero-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(180deg, rgba(20,22,31,0) 0%, rgba(20,22,31,0.5) 38%, rgba(20,22,31,0.97) 100%),
    url(../assets/images/pixel-grid.png);
  background-size: cover, 6px 6px;
  background-repeat: no-repeat, repeat;
  background-position: center, center;
  image-rendering: pixelated;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, transparent 18%, black 48%, black 100%);
          mask-image: linear-gradient(180deg, transparent 0%, transparent 18%, black 48%, black 100%);
}
.hero-toggle {
  position: absolute;
  bottom: 18px;
  right: 18px;
  z-index: 3;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 22, 31, 0.6);
  border: 1px solid rgba(79, 179, 196, 0.45);
  border-radius: 50%;
  color: var(--brass);
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.2s, border-color 0.2s;
}
.hero-toggle:hover { background: rgba(20, 22, 31, 0.85); border-color: var(--brass); }
.hero-toggle svg { width: 16px; height: 16px; }
.hero-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding-bottom: 58px;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--frost);
  margin: 0 0 18px;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  line-height: 1.05;
  margin: 0 0 22px;
  color: var(--parchment);
}
.hero h1 em {
  font-style: normal;
  color: var(--brass);
}
.hero .lede {
  font-size: 1.08rem;
  color: var(--parchment-dim);
  max-width: 52ch;
  margin: 0 0 28px;
}
.hero .meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}
.hero .fill-me {
  border: 1px dashed rgba(237, 230, 216, 0.35);
  color: var(--parchment-dim);
  font-style: italic;
  padding: 2px 6px;
  border-radius: 2px;
}

/* ============================================
   SECTION PLATES
   ============================================ */
.plate {
  padding: 76px 0;
  border-bottom: var(--edge);
}
.plate:nth-child(even) { background: rgba(28, 32, 48, 0.35); }

.plate-head {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 24px;
  margin-bottom: 40px;
}
.plate-numeral {
  font-family: var(--display);
  font-size: 2.6rem;
  color: var(--brass-dim);
  line-height: 1;
}
.plate-head h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.9rem;
  margin: 0 0 10px;
  color: var(--parchment);
}
.plate-head p {
  color: var(--parchment-dim);
  max-width: 68ch;
  margin: 0;
}
.plate-head .fill-me { display: block; margin-top: 10px; }

/* Sub-component inside a plate — for grouping several small studies
   (e.g. component-by-component docs) under one section heading. */
.component-block { margin-top: 56px; }
.component-block:first-of-type { margin-top: 0; }
.component-block h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--parchment);
  margin: 0 0 8px;
}
.component-block p {
  color: var(--parchment-dim);
  max-width: 68ch;
  margin: 0 0 24px;
}

/* Art-direction pillars (Type / Color / Texture) — small supporting swatches, stacked */
.direction-pillars {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 40px;
}
.direction-pillar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 28px;
  border-top: 1px solid rgba(79, 179, 196, 0.15);
}
.direction-pillar:first-child { padding-top: 0; border-top: none; }
.direction-pillar-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brass-dim);
}
.direction-wordmark { max-width: 100%; height: auto; }
.direction-wordmark + .direction-wordmark { margin-top: 64px; }
.direction-swatches { display: flex; gap: 8px; max-width: 320px; }
.direction-swatches .swatch {
  flex: 1;
  aspect-ratio: 1;
  border-radius: 4px;
  border: var(--edge);
}
.direction-textures { display: flex; gap: 8px; max-width: 480px; }
.direction-textures img {
  flex: 1;
  width: 50%;
  height: 84px;
  object-fit: cover;
  border-radius: 4px;
  border: var(--edge);
  background: var(--ink-3);
}

/* gear divider — the line spans the full viewport width */
.gear-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 56px 0 20px;
  margin-left: calc(50% - 50vw + 16px);
  margin-right: calc(50% - 50vw + 16px);
  color: var(--brass-dim);
}
.gear-divider .line {
  flex: 1;
  height: 1px;
  background: rgba(79, 179, 196, 0.22);
}

/* image grid — breaks out of .wrap to span the viewport width, minus a small side margin */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  margin-left: calc(50% - 50vw + 16px);
  margin-right: calc(50% - 50vw + 16px);
}
.shot-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.shot {
  margin: 0;
  background: var(--ink-2);
  border: var(--edge);
  border-radius: 4px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.shot.in-view { opacity: 1; transform: none; }
.shot img { width: 100%; height: auto; cursor: zoom-in; }
.shot video { width: 100%; height: auto; display: block; }
.shot.full video {
  width: auto;
  height: min(640px, 80vh);
  max-width: 100%;
  margin: 0 auto;
}
.shot figcaption {
  padding: 14px 16px 16px;
  font-size: 0.86rem;
  color: var(--parchment-dim);
  border-top: 1px solid rgba(79, 179, 196, 0.15);
}
.shot figcaption strong {
  display: block;
  color: var(--parchment);
  font-size: 0.92rem;
  margin-bottom: 4px;
}
.shot.wide { grid-column: span 2; }
.shot.full { grid-column: 1 / -1; }

/* Icon variant — transparent-background artwork shown bare, no card plate */
.shot.shot-icon {
  background: none;
  border: none;
}
.shot.shot-icon img { padding: 10px 28px 0; cursor: default; }
.shot.shot-icon figcaption { border-top: none; padding-top: 4px; text-align: center; }
.shot.shot-icon figcaption strong { text-align: center; }

/* Bare variant — no card plate behind the artwork, caption sits directly underneath */
.shot.shot-bare {
  background: none;
  border: none;
}
.shot.shot-bare figcaption { border-top: none; padding-left: 0; padding-right: 0; }
.shot.shot-portrait img { max-width: 360px; display: block; margin: 0 auto; }

/* Caps a full-bleed shot at its source image's native width so it never
   upscales past its real resolution on wide viewports — set --native-w inline. */
.shot img.shot-native-w { max-width: var(--native-w); display: block; margin: 0 auto; }

/* Always renders at the source image's true native resolution, never scaled
   up or down — set --native-w inline on the figure. .shot-native-frame
   shrinks the frame itself down to that same width instead of staying
   full-bleed; .shot's own overflow:hidden clips cleanly on the rare
   viewport narrower than the image, no scrollbar. */
.shot.shot-native-frame { width: var(--native-w); max-width: 100%; margin: 0 auto; }
.shot img.shot-native-fixed { width: var(--native-w); max-width: none; display: block; margin: 0 auto; }
@media (max-width: 860px) {
  .shot-grid, .shot-grid.cols-2 { grid-template-columns: 1fr; }
  .shot.wide { grid-column: span 1; }
}

/* Mobile screenshots — sized by height so portrait screens never get
   stretched edge to edge; rows wrap naturally regardless of shot count. */
.shot-grid.mobile-shots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
}
.shot-grid.mobile-shots .shot {
  width: auto;
  max-width: 100%;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
}
.shot-grid.mobile-shots .shot img {
  width: auto;
  height: min(640px, 70vh);
  max-width: 100%;
  object-fit: contain;
}

/* ============================================
   PHONE-FRAME SLIDESHOW
   ============================================ */
.phone-slideshow {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  max-width: 340px;
}
.phone-slideshow.wide { max-width: 800px; }
.phone-slideshow.wide .phone-slideshow-arrow {
  width: 22px;
  height: 22px;
  font-size: 1rem;
}
.phone-slideshow-tabs { margin-top: 56px; }

/* Scrollable frame — for very tall single images (e.g. a full scrolling
   landing page) where a height cap would shrink it to an unreadable
   sliver. Shown near its natural width, full height, no nested scroll —
   the page's own scroll carries the reader through it. */
.scroll-frame {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  background: var(--ink-2);
  border: 2px solid rgba(79, 179, 196, 0.4);
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}
.scroll-frame img { display: block; width: 100%; height: auto; cursor: zoom-in; }
.shot:has(.scroll-frame) { background: none; border: none; padding: 0; overflow: visible; }
.shot:has(.scroll-frame) figcaption {
  max-width: 900px;
  margin: 14px auto 0;
  text-align: center;
  border-top: none;
  padding: 0;
}

/* Embedded PDF preview — for source documents where a rasterized slideshow
   would cap the resolution; the browser's native viewer stays crisp at any
   zoom and handles its own pagination/scrolling. */
.pdf-frame {
  position: relative;
  width: 100%;
  height: 720px;
  max-height: 82vh;
  background: var(--ink-2);
  border: 2px solid rgba(79, 179, 196, 0.4);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}
.pdf-frame object,
.pdf-frame embed {
  width: 100%;
  height: 100%;
  display: block;
}
.pdf-frame-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 24px;
  text-align: center;
  color: var(--parchment-dim);
}
.pdf-open-link {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--brass);
}
.pdf-open-link:hover { text-decoration: underline; }

/* Frame + arrows sit side by side, so the arrows live outside the frame
   instead of overlaying the screenshot. */
.phone-slideshow-stage {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.phone-slideshow-stage .phone-frame,
.phone-slideshow-stage .slate-frame,
.phone-slideshow-stage .auto-frame {
  flex: 1 1 auto;
  min-width: 0;
}

/* Landscape "slate" frame — for screens that already have their own device
   chrome baked into the image (e.g. tablet mockups), so no phone bezel
   is layered on top. */
.slate-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--ink-2);
  border: 2px solid rgba(79, 179, 196, 0.4);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}

/* Height-capped frame for slides with mixed aspect ratios (e.g. component
   documentation pages) — unlike phone-frame/slate-frame, it doesn't force a
   fixed aspect ratio, it just caps the height and lets width follow. */
.auto-frame {
  position: relative;
  width: 100%;
  height: min(520px, 65vh);
  background: var(--ink-2);
  border: 2px solid rgba(79, 179, 196, 0.4);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}

/* Tabs above a phone-slideshow, for picking which item set the slider shows */
.phone-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}
.phone-tab {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--parchment-dim);
  background: transparent;
  border: 1px solid rgba(79, 179, 196, 0.3);
  border-radius: 999px;
  padding: 6px 16px;
  cursor: pointer;
}
.phone-tab.is-active { color: var(--ink); background: var(--brass); border-color: var(--brass); }
.phone-tab:hover:not(.is-active) { border-color: var(--brass); color: var(--brass); }

/* Row of phone frames side by side (e.g. one static + several sliders) */
.phone-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
}
.phone-row .phone-slideshow {
  max-width: 220px;
  flex: 1 1 180px;
}
.phone-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 393 / 900;
  background: var(--ink-2);
  border: 2px solid rgba(79, 179, 196, 0.4);
  border-radius: 40px;
  padding: 10px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}
.phone-notch {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 18px;
  background: var(--ink);
  border-radius: 10px;
  z-index: 2;
}
.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 30px;
  background: var(--ink);
}
.phone-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  cursor: zoom-in;
}

/* "Classic" phone frame — matches older, more square-ish device screenshots
   (e.g. 405x720 / 9:16) instead of the modern edge-to-edge 393/900 ratio.
   Home button + camera dot instead of a notch. */
.phone-frame.classic {
  aspect-ratio: 9 / 16;
  border-radius: 26px;
  padding: 14px 10px 30px;
}
.phone-frame.classic .phone-screen { border-radius: 6px; }
.phone-frame.classic .phone-notch {
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.phone-home-button {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(79, 179, 196, 0.4);
  z-index: 2;
}
.phone-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.phone-slideshow-arrow {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(79, 179, 196, 0.4);
  border-radius: 50%;
  background: rgba(28, 32, 48, 0.6);
  color: var(--brass);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.phone-slideshow-arrow:hover { background: rgba(28, 32, 48, 0.9); border-color: var(--brass); }
.phone-slideshow-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.phone-slideshow-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  padding: 0;
  border: none;
  background: rgba(79, 179, 196, 0.3);
  cursor: pointer;
}
.phone-slideshow-dots .dot.is-active { background: var(--brass); }
.phone-slideshow-caption {
  margin: 14px 0 0;
  text-align: center;
  max-width: 40ch;
  font-size: 0.86rem;
  color: var(--parchment-dim);
}
.phone-slideshow-caption strong {
  display: block;
  color: var(--parchment);
  font-size: 0.92rem;
  margin-bottom: 4px;
}

/* ============================================
   ITEM ICON MARQUEE
   ============================================ */
.marquee-row {
  overflow: hidden;
  margin: 0 0 14px;
  margin-left: calc(50% - 50vw + 16px);
  margin-right: calc(50% - 50vw + 16px);
}
.marquee-row:last-child { margin-bottom: 0; }
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 32s linear infinite;
}
.marquee-track.marquee-right { animation-direction: reverse; }
.marquee-track img {
  height: 90px;
  width: auto;
  display: block;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================
   DRAG-TO-COMPARE SLIDER
   ============================================ */
.compare {
  position: relative;
  margin-top: 32px;
  margin-left: calc(50% - 50vw + 16px);
  margin-right: calc(50% - 50vw + 16px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 4px;
  border: var(--edge);
  background: #000;
  cursor: ew-resize;
  touch-action: none;
}
.compare-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}
.compare-top {
  clip-path: inset(0 50% 0 0);
}
.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 0;
  transform: translateX(-50%);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.compare-handle::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--brass);
  box-shadow: 0 0 0 1px rgba(20,22,31,0.5);
}
.compare-label {
  position: absolute;
  top: 14px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--parchment);
  background: rgba(20, 22, 31, 0.65);
  border: 1px solid rgba(79, 179, 196, 0.3);
  padding: 4px 10px;
  border-radius: 2px;
  pointer-events: none;
}
.compare-label-left { left: 14px; }
.compare-label-right { right: 14px; }

/* Compact variant — for lower-res, portrait-cropped source images where a
   full-bleed 16:9 stretch would crop or blur the art. Not full-bleed,
   sized to the source's own aspect ratio, contained rather than covered. */
.compare.compare-compact {
  margin-top: 48px;
  margin-left: auto;
  margin-right: auto;
  max-width: 840px;
  aspect-ratio: 2000 / 2250;
  background: var(--ink-2);
}
.compare.compare-compact .compare-img { object-fit: contain; }

/* Compact sliders have room to put arrows fully outside the frame. */
.compare-stage {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 908px;
  margin: 48px auto 0;
}
.compare-stage .compare.compare-compact {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.compare-arrow {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(79, 179, 196, 0.4);
  border-radius: 50%;
  background: rgba(28, 32, 48, 0.6);
  color: var(--brass);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.compare-arrow:hover { background: rgba(28, 32, 48, 0.9); border-color: var(--brass); }

/* Full-bleed slider has no outside room, so its arrows overlay the edges
   and only appear on hover/focus, matching the lightbox nav pattern. */
.compare-arrow-overlay {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.compare-arrow-overlay.compare-arrow-prev { left: 16px; }
.compare-arrow-overlay.compare-arrow-next { right: 16px; }
.compare:hover .compare-arrow-overlay,
.compare:focus-within .compare-arrow-overlay {
  opacity: 1;
  pointer-events: auto;
}
.compare-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
.compare-range:focus-visible {
  outline: 2px solid var(--frost);
  outline-offset: -4px;
}

.callout {
  font-family: var(--mono);
  font-size: 0.86rem;
  color: var(--frost);
  border-left: 2px solid var(--frost);
  padding: 10px 0 10px 16px;
  margin: 28px 0 0;
  max-width: 68ch;
}

/* ============================================
   HOME / PROJECT CARDS
   ============================================ */
/* Plain masthead — no background video. Structure comes from a two-column
   split (headline / bio+contact) with a vertical rule between them, rather
   than from imagery; kept inside .wrap (unlike the full-bleed cards below)
   since long-form bio text needs a sane line length to stay readable. */
.home-hero {
  padding: 120px 0 96px;
  border-bottom: var(--edge);
}
.home-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
}
.home-hero-side {
  padding-left: 60px;
  border-left: var(--edge);
}
.home-hero .eyebrow { margin-bottom: 22px; }
.home-hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.2rem, 3.6vw, 3.6rem);
  line-height: 1.1;
  margin: 0;
  /* no hardcoded <br> — this column got narrower once the hero became
     two-up with the bio, so a fixed break point stopped fitting; balance
     picks good break points itself instead of stranding a lone word. */
  text-wrap: balance;
}
.home-hero h1 span { color: var(--brass); }
.home-hero-bio {
  color: var(--parchment-dim);
  font-size: 1.04rem;
  line-height: 1.7;
  margin: 0 0 32px;
}
.contact-row { display: flex; flex-wrap: wrap; gap: 20px 26px; font-family: var(--mono); font-size: 0.85rem; }

@media (max-width: 800px) {
  .home-hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .home-hero-side { padding-left: 0; padding-top: 32px; border-left: none; border-top: var(--edge); }
}

.cards {
  padding: 70px 0 90px;
}
.cards h2 {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--parchment-dim);
  margin: 0 0 34px;
}
/* Full-bleed editorial cards — no separate thumb/body split; the image
   IS the card, with title/tag/year overlaid on a bottom scrim and a large
   index numeral bled toward the top-left corner. Content sits close to
   the card's own edge on purpose rather than centered inside a panel.
   The grid itself stays centered within the site's usual 1180px column
   (same as nav/headings), rather than breaking out to the viewport edge. */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.card {
  position: relative;
  aspect-ratio: 3 / 4;
  border: var(--edge);
  border-radius: 0;
  overflow: hidden;
  background: var(--ink-2);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.card.live:hover {
  border-color: rgba(79, 179, 196, 0.45);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.card-thumb { position: absolute; inset: 0; background: var(--ink-3); }
.card-thumb img, .card-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
}
.card.live:hover .card-thumb img,
.card.live:hover .card-thumb video { transform: scale(1.045); }
.card-thumb video, .card-thumb img.mono { filter: grayscale(1); }
.card.live:hover .card-thumb video,
.card.live:hover .card-thumb img.mono { filter: grayscale(0); }
.card-thumb-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(20, 22, 31, 0.32);
  transition: background 0.25s ease;
}
.card.live:hover .card-thumb-grid { background: rgba(20, 22, 31, 0.1); }
.card-thumb .soon-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--parchment-dim);
  background: rgba(20, 22, 31, 0.55);
}
.card-index {
  position: absolute;
  top: 10px;
  left: 14px;
  z-index: 2;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.1rem, 4.8vw, 3rem);
  line-height: 1;
  color: var(--parchment);
  /* fully opaque now, so the shadow is what keeps it legible on bright
     thumbnails (e.g. a white screenshot) rather than a translucent fill. */
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}
.card-body {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px 18px;
  background: linear-gradient(0deg, rgba(20,22,31,0.95) 0%, rgba(20,22,31,0.55) 48%, rgba(20,22,31,0.05) 75%);
  transition: background 0.3s ease;
}
/* Hover brightens the thumbnail itself (grayscale lifts, the dim overlay
   fades, the image zooms) and reveals the description text — so the same
   rgba(20,22,31,…) scrim family used on every project's own hero banner
   gets reinforced here too, taller and darker, to keep text readable
   against a suddenly brighter/full-color image instead of just hoping
   the resting-state gradient still holds up. */
.card.live:hover .card-body {
  background: linear-gradient(0deg, rgba(20,22,31,0.97) 0%, rgba(20,22,31,0.8) 55%, rgba(20,22,31,0.15) 85%);
}
.card-meta-row { margin-bottom: 10px; }
.card-body h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.1rem, 1.7vw, 1.35rem);
  line-height: 1.18;
  margin: 0 0 6px;
  color: var(--parchment);
}
.card-body p {
  color: var(--parchment-dim);
  font-size: 0.86rem;
  margin: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.35s ease;
}
.card.live:hover .card-body p,
.card.live:focus-within .card-body p { max-height: 6em; opacity: 1; margin: 0 0 10px; }
.card-link {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.card.disabled { opacity: 0.55; }
.card.disabled .card-link { color: var(--parchment-dim); }

/* Feature card — the same card in every respect (type scale, padding,
   numeral size, hover-reveal description), just wider: spans two columns
   instead of one, so it simply takes up more room rather than becoming a
   different-looking component. No aspect-ratio here on purpose — the
   normal 3:4 cards it shares a row with set that row's height, and this
   one stretches to match, so both land on the same bottom edge instead of
   two different ratios racing to define the row. */
.card.card-feature {
  grid-column: span 2;
  aspect-ratio: auto;
}

@media (max-width: 900px) {
  .cards-grid { grid-template-columns: 1fr; }
  .card { aspect-ratio: 4 / 5; }
  .card.card-feature { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
}

/* ============================================
   TOOLS
   ============================================ */
.tools {
  padding: 80px 0 90px;
  background: var(--ink-2);
  border-top: var(--edge);
  border-bottom: var(--edge);
}
.tools h2 {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--parchment-dim);
  text-align: center;
  margin: 0 0 48px;
}
.tools-group { margin-bottom: 52px; }
.tools-group:last-child { margin-bottom: 0; }
.tools-group-label {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 420px;
  margin: 0 auto 30px;
  color: var(--brass-dim);
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.tools-group-label::before,
.tools-group-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(79, 179, 196, 0.22);
}
.tools-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px 48px;
}
.tool {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 72px;
}
.tool-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--parchment-dim);
  transition: color 0.2s ease;
}
.tool-icon svg { width: 100%; height: 100%; }
.tool-icon-text {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
}
.tool:hover .tool-icon,
.tool:focus-visible .tool-icon { color: var(--brass); }
.tool-name {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--parchment-dim);
}
.tool:focus-visible { outline: none; }
.tool-tooltip {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  width: 220px;
  padding: 12px 14px;
  background: var(--ink);
  border: var(--edge);
  border-radius: 6px;
  color: var(--parchment-dim);
  font-family: var(--body);
  font-size: 0.8rem;
  line-height: 1.5;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateX(-50%) translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
  z-index: 5;
}
.tool-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--ink);
}
.tool:hover .tool-tooltip,
.tool:focus-visible .tool-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@media (max-width: 640px) {
  .tool-tooltip { width: 180px; font-size: 0.76rem; }
}

/* ============================================
   NEXT PROJECTS (end-of-case-study handoff — a plain list rather than
   another card grid, so a case study doesn't end by repeating its own
   opening pattern)
   ============================================ */
.next-project { padding: 70px 0 86px; }
.next-project-eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 22px;
}
.shelf-list { display: flex; flex-direction: column; }
.shelf-item {
  display: grid;
  grid-template-columns: 1fr 200px 20px;
  align-items: baseline;
  gap: 20px;
  padding: 18px 0;
  border-bottom: var(--edge);
}
.shelf-item:first-child { border-top: var(--edge); }
.shelf-title { font-family: var(--display); font-weight: 600; font-size: 1.05rem; color: var(--parchment); }
.shelf-item:hover .shelf-title { color: var(--brass); }
.shelf-tag { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--parchment-dim); white-space: nowrap; }
.shelf-arrow { font-family: var(--mono); font-size: 0.8rem; color: var(--parchment-dim); text-align: right; }
@media (max-width: 560px) {
  .shelf-item { grid-template-columns: 1fr auto; row-gap: 6px; }
  .shelf-arrow { display: none; }
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  padding: 50px 0 70px;
  text-align: center;
}
.site-footer .mark {
  font-family: var(--display);
  color: var(--brass);
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.site-footer p { color: var(--parchment-dim); font-size: 0.9rem; }
.site-footer .rights { margin-top: 6px; font-size: 0.8rem; opacity: 0.7; }

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(12, 13, 19, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.lightbox img {
  max-width: 100%;
  max-height: 82vh;
  border: 1px solid rgba(79, 179, 196, 0.3);
  border-radius: 3px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}
.lightbox-caption {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--parchment-dim);
  text-align: center;
  max-width: 70ch;
}
.lightbox-close {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(79, 179, 196, 0.4);
  border-radius: 50%;
  background: rgba(28, 32, 48, 0.6);
  color: var(--brass);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(28, 32, 48, 0.9); border-color: var(--brass); }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(79, 179, 196, 0.4);
  border-radius: 50%;
  background: rgba(28, 32, 48, 0.6);
  color: var(--brass);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-nav:hover { background: rgba(28, 32, 48, 0.9); border-color: var(--brass); }
.lightbox-nav:disabled { opacity: 0.3; cursor: default; }
.lightbox-prev { left: 26px; }
.lightbox-next { right: 26px; }
@media (max-width: 640px) {
  .lightbox-nav { width: 40px; height: 40px; font-size: 1.3rem; }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .hero-banner { height: 76vh; min-height: 480px; }
  .plate-head { grid-template-columns: 1fr; }
  .plate-numeral { font-size: 1.6rem; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 20px; }
  .topnav nav { display: none; }
}
