/* gradientpost.co — Custom CSS — v2 (light-forward / graphite-chrome) */

:root {
  /* ── Ink (deep) — sampled from reference ─────────────── */
  --ink-deep: #0a0d10;
  --ink: #14181e;
  --ink-soft: #1f242b;
  --graphite: #2a2e34;
  --graphite-soft: #3a3f47;

  /* ── Steel (mid) ─────────────────────────────────────── */
  --steel-dark: #4a4f57;
  --steel: #7c8390;
  --steel-light: #a8acb3;

  /* ── Silver / Pearl (highlights + light surfaces) ────── */
  --silver: #c5c9ce;
  --silver-bright: #d8dbdf;
  --pearl: #eef0f3;
  --pearl-light: #f4f5f7;
  --pearl-bright: #fafbfc;

  /* ── Type ─────────────────────────────────────────────── */
  --text-on-light: var(--ink);
  --text-on-light-muted: var(--steel-dark);
  --text-on-dark: #f0f1f3;
  --text-on-dark-muted: var(--steel-light);

  /* ── Borders ──────────────────────────────────────────── */
  --hairline-light: rgba(20, 24, 30, 0.10);
  --hairline-light-soft: rgba(20, 24, 30, 0.06);
  --hairline-dark: rgba(216, 219, 223, 0.12);
  --hairline-dark-soft: rgba(216, 219, 223, 0.06);

  /* ── Signature gradients ──────────────────────────────── */
  --chrome-gradient: linear-gradient(105deg, #4a4f57 0%, #7c8390 18%, #c5c9ce 38%, #ffffff 50%, #c5c9ce 62%, #7c8390 82%, #2a2e34 100%);
  --chrome-gradient-static: linear-gradient(135deg, #2a2e34 0%, #7c8390 25%, #d8dbdf 50%, #a8acb3 75%, #14181e 100%);

  /* Hero spotlight — recreates the reference image in CSS */
  --graphite-spotlight:
    radial-gradient(ellipse 55% 45% at 22% 32%, rgba(216, 219, 223, 0.22), transparent 62%),
    radial-gradient(ellipse 70% 60% at 28% 38%, rgba(168, 172, 179, 0.12), transparent 70%),
    linear-gradient(155deg, #1a1d22 0%, #14181e 38%, #0a0d10 80%, #06080a 100%);

  /* Pearl surface with subtle cool gradient */
  --pearl-surface:
    radial-gradient(ellipse 80% 60% at 80% 0%, rgba(168, 172, 179, 0.10), transparent 60%),
    linear-gradient(180deg, var(--pearl-bright) 0%, var(--pearl) 100%);

  /* ── Type ─────────────────────────────────────────────── */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

html, body { overflow-x: hidden; }

body {
  background: var(--pearl-light);
  color: var(--text-on-light);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  cursor: none;
  font-feature-settings: "ss01" on, "cv11" on;
}

h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.02em; }

/* ══════════════════════════════════════════════════════════
   GRAIN — site-wide texture overlay (drives the "tech" feel)
   ══════════════════════════════════════════════════════════ */
.grain-overlay {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.grain-section {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.65 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ══════════════════════════════════════════════════════════
   CURSOR — cyan ambient accent
   ══════════════════════════════════════════════════════════ */
:root {
  --accent-cyan-deep: #5a9bd1;
  --accent-cyan: #7eb3dc;
  --accent-cyan-bright: #b8d4ee;
}

.cursor-dot {
  position: fixed; width: 6px; height: 6px;
  background: var(--accent-cyan);
  border-radius: 50%; pointer-events: none;
  z-index: 99999; transform: translate(-50%, -50%);
  box-shadow:
    0 0 6px rgba(126, 179, 220, 0.55),
    0 0 14px rgba(126, 179, 220, 0.25);
  transition: width 0.3s cubic-bezier(0.16,1,0.3,1),
              height 0.3s cubic-bezier(0.16,1,0.3,1),
              background-color 0.25s,
              box-shadow 0.3s;
}
.cursor-dot.hovering {
  width: 9px; height: 9px;
  background: var(--accent-cyan-bright);
  box-shadow:
    0 0 12px rgba(184, 212, 238, 0.85),
    0 0 26px rgba(126, 179, 220, 0.5);
}

/* Ring is 4 corner brackets — viewfinder mark, not a circle */
.cursor-ring {
  --bracket-color: rgba(126, 179, 220, 0.55);
  --bracket-len: 7px;
  position: fixed; width: 28px; height: 28px;
  pointer-events: none;
  z-index: 99998; transform: translate(-50%, -50%);
  border: none;
  background-image:
    linear-gradient(var(--bracket-color), var(--bracket-color)),
    linear-gradient(var(--bracket-color), var(--bracket-color)),
    linear-gradient(var(--bracket-color), var(--bracket-color)),
    linear-gradient(var(--bracket-color), var(--bracket-color)),
    linear-gradient(var(--bracket-color), var(--bracket-color)),
    linear-gradient(var(--bracket-color), var(--bracket-color)),
    linear-gradient(var(--bracket-color), var(--bracket-color)),
    linear-gradient(var(--bracket-color), var(--bracket-color));
  background-size:
    var(--bracket-len) 1px, 1px var(--bracket-len),
    var(--bracket-len) 1px, 1px var(--bracket-len),
    var(--bracket-len) 1px, 1px var(--bracket-len),
    var(--bracket-len) 1px, 1px var(--bracket-len);
  background-position:
    left top, left top,
    right top, right top,
    left bottom, left bottom,
    right bottom, right bottom;
  background-repeat: no-repeat;
  transition: width 0.35s cubic-bezier(0.16,1,0.3,1),
              height 0.35s cubic-bezier(0.16,1,0.3,1),
              filter 0.3s,
              --bracket-color 0.3s;
}
.cursor-ring.hovering {
  --bracket-color: rgba(184, 212, 238, 0.9);
  --bracket-len: 10px;
  width: 50px; height: 50px;
  filter: drop-shadow(0 0 6px rgba(184, 212, 238, 0.55));
}

@media (pointer: coarse) {
  body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none !important; }
}

/* ══════════════════════════════════════════════════════════
   SCROLL PROGRESS
   ══════════════════════════════════════════════════════════ */
#progress {
  position: fixed; top: 0; left: 0;
  height: 1px; width: 0%;
  background: linear-gradient(90deg,
    #2a2e34 0%,
    #7c8390 25%,
    var(--accent-cyan-bright) 50%,
    #a8acb3 75%,
    #14181e 100%);
  box-shadow: 0 0 8px rgba(184, 212, 238, 0.4);
  z-index: 10001;
}

/* ══════════════════════════════════════════════════════════
   NAV
   ══════════════════════════════════════════════════════════ */
nav { transition: background 0.4s ease, border-color 0.4s ease; border-bottom: 1px solid transparent; }
nav.scrolled-light { background: rgba(244, 245, 247, 0.85); backdrop-filter: blur(12px); border-bottom-color: var(--hairline-light-soft); }
nav.scrolled-dark { background: rgba(10, 13, 16, 0.85); backdrop-filter: blur(12px); border-bottom-color: var(--hairline-dark-soft); }

.nav-link {
  color: var(--text-on-light-muted);
  transition: color 0.3s;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  cursor: none;
  font-weight: 500;
  font-family: var(--font-body);
}
.nav-link:hover, .nav-link.active { color: var(--ink); }
[data-scroll-bg="dark"] .nav-link { color: var(--text-on-dark-muted); }
[data-scroll-bg="dark"] .nav-link:hover { color: var(--silver-bright); }

/* ── Nav dropdown ──────────────────────────────────────── */
.nav-item-with-dropdown {
  position: relative;
}
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: -14px;
  min-width: 180px;
  padding: 6px;
  background: rgba(20, 24, 30, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--hairline-dark-soft);
  display: flex;
  flex-direction: column;
  gap: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.16,1,0.3,1), visibility 0s 0.28s;
  z-index: 60;
  pointer-events: none;
}
.nav-item-with-dropdown:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.16,1,0.3,1), visibility 0s;
}
.nav-item-with-dropdown::after {
  /* Hover bridge — keeps the menu open when crossing the gap */
  content: '';
  position: absolute;
  top: 100%; left: -14px;
  width: calc(100% + 28px); height: 12px;
  pointer-events: none;
}
.nav-item-with-dropdown:hover::after { pointer-events: auto; }

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel-light);
  text-decoration: none;
  cursor: none;
  transition: color 0.2s, background 0.2s;
  position: relative;
}
.dropdown-link::before {
  content: '';
  width: 8px; height: 1px;
  background: currentColor;
  opacity: 0.5;
}
.dropdown-link:hover {
  color: var(--silver-bright);
  background: rgba(216, 219, 223, 0.05);
}

/* Light-mode variant — when nav is over a light section */
[data-scroll-bg="light"] .nav-dropdown,
nav:not([data-scroll-bg="dark"]) .nav-dropdown {
  background: rgba(244, 245, 247, 0.94);
  border-color: var(--hairline-light);
}
[data-scroll-bg="light"] .dropdown-link,
nav:not([data-scroll-bg="dark"]) .dropdown-link {
  color: var(--steel-dark);
}
[data-scroll-bg="light"] .dropdown-link:hover,
nav:not([data-scroll-bg="dark"]) .dropdown-link:hover {
  color: var(--ink);
  background: rgba(20, 24, 30, 0.04);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  text-transform: uppercase;
  background: var(--chrome-gradient-static);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ══════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--ink); color: var(--pearl-bright);
  font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  font-size: 0.68rem; padding: 0.85rem 1.6rem;
  transition: all 0.35s cubic-bezier(0.16,1,0.3,1); cursor: none;
  font-family: var(--font-body); border: 1px solid var(--ink); border-radius: 0;
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: var(--chrome-gradient);
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity 0.35s;
  z-index: 0;
}
.btn-primary > * { position: relative; z-index: 1; }
.btn-primary:hover { color: var(--ink); }
.btn-primary:hover::after { opacity: 1; animation: chromeShimmer 3s linear infinite; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--steel-dark); color: var(--ink);
  font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  font-size: 0.68rem; padding: 0.8rem 1.55rem;
  transition: all 0.35s; cursor: none;
  font-family: var(--font-body); border-radius: 0;
  background: transparent;
}
.btn-ghost:hover { border-color: var(--ink); background: var(--ink); color: var(--pearl-bright); }

[data-scroll-bg="dark"] .btn-primary,
.section-graphite .btn-primary {
  background: var(--silver-bright); color: var(--ink); border-color: var(--silver-bright);
}
[data-scroll-bg="dark"] .btn-ghost,
.section-graphite .btn-ghost {
  border-color: var(--steel-light); color: var(--silver-bright);
}
[data-scroll-bg="dark"] .btn-ghost:hover,
.section-graphite .btn-ghost:hover { background: var(--silver-bright); color: var(--ink); border-color: var(--silver-bright); }

/* ══════════════════════════════════════════════════════════
   CHROME TYPE
   ══════════════════════════════════════════════════════════ */
.chrome-text {
  background: var(--chrome-gradient);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: chromeShimmer 9s linear infinite;
}
@keyframes chromeShimmer {
  0%   { background-position: 250% 0; }
  100% { background-position: -250% 0; }
}

/* ══════════════════════════════════════════════════════════
   SECTION MODES
   ══════════════════════════════════════════════════════════ */
.section-graphite {
  position: relative;
  background: var(--graphite-spotlight);
  color: var(--text-on-dark);
  isolation: isolate;
}
.section-graphite > * { position: relative; z-index: 1; }
.section-graphite .grain-section { z-index: 0; }

/* Reel video as a section background — used on About hero */
.section-graphite.has-reel-bg { overflow: hidden; }
.section-graphite.has-reel-bg .reel-bg-iframe-wrap { z-index: 0; }
.section-graphite.has-reel-bg .reel-bg-overlay { z-index: 1; }
.section-graphite.has-reel-bg .grain-section { z-index: 2; }
.section-graphite.has-reel-bg > *:not(.reel-bg-iframe-wrap):not(.reel-bg-overlay):not(.grain-section) { z-index: 3; }

.reel-bg-iframe-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.reel-bg-iframe-wrap iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100%, 177.78vh);
  height: max(100%, 56.25vw);
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border: 0;
}
.reel-bg-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 25% 35%, rgba(20, 24, 30, 0.45), rgba(10, 13, 16, 0.78) 70%),
    linear-gradient(180deg, rgba(10, 13, 16, 0.4) 0%, rgba(10, 13, 16, 0.7) 100%);
}

/* ── Video-backed graphite (hero) ─────────────────────── */
.section-graphite-video {
  position: relative;
  background: var(--ink-deep);
  color: var(--text-on-dark);
  isolation: isolate;
  overflow: hidden;
}
.section-graphite-video > * { position: relative; z-index: 3; }

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: grayscale(1) contrast(1.08) brightness(0.55);
  pointer-events: none;
}

/* Graphite gradient mask — sits over the video, restores the */
/* "spotlight on graphite" feel from the reference image       */
.hero-gradient-mask {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 55% 45% at 22% 32%, rgba(216, 219, 223, 0.18), transparent 62%),
    radial-gradient(ellipse 70% 60% at 28% 38%, rgba(168, 172, 179, 0.10), transparent 70%),
    linear-gradient(155deg, rgba(26, 29, 34, 0.55) 0%, rgba(20, 24, 30, 0.72) 38%, rgba(10, 13, 16, 0.88) 80%, rgba(6, 8, 10, 0.95) 100%);
  pointer-events: none;
}
.section-graphite-video .grain-section { z-index: 2; }

.section-pearl {
  position: relative;
  background: var(--pearl-surface);
  color: var(--text-on-light);
}
.section-pearl-flat {
  background: var(--pearl-light);
  color: var(--text-on-light);
}
.section-bright {
  background: var(--pearl-bright);
  color: var(--text-on-light);
}

/* Chrome seam — the gradient strip that joins dark ↔ light */
.chrome-seam {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--steel-light) 30%, var(--silver-bright) 50%, var(--steel-light) 70%, transparent 100%);
}
.chrome-seam-thick {
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--steel) 20%, var(--silver-bright) 50%, var(--steel) 80%, transparent 100%);
  box-shadow: 0 0 24px rgba(216, 219, 223, 0.25);
}

/* ══════════════════════════════════════════════════════════
   TECH LABELS — mono eyebrow with index numbers
   ══════════════════════════════════════════════════════════ */
.tech-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
}
.tech-label::before {
  content: ''; display: block;
  width: 24px; height: 1px;
  background: currentColor;
  opacity: 0.5;
}
.tech-label .index {
  color: var(--steel);
  font-weight: 400;
}
.section-graphite .tech-label { color: var(--steel-light); }
.section-graphite .tech-label .index { color: var(--steel); }

/* Technical readout — mono inline data */
.readout {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--steel-dark);
}
.section-graphite .readout { color: var(--steel-light); }

/* ══════════════════════════════════════════════════════════
   BIG NUMBERS
   ══════════════════════════════════════════════════════════ */
.big-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(5rem, 12vw, 10rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  background: var(--chrome-gradient-static);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.85;
}

/* ══════════════════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════════════════ */
.g-card {
  border: 1px solid var(--hairline-light);
  border-radius: 0;
  padding: 1.75rem;
  position: relative;
  transition: border-color 0.4s, transform 0.4s, box-shadow 0.4s;
  background: var(--pearl-bright);
  overflow: hidden;
}
.g-card::before {
  content: ''; position: absolute; inset: 0;
  background: var(--chrome-gradient);
  background-size: 250% 100%;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.g-card::after {
  content: ''; position: absolute; left: 0; top: 0;
  width: 100%; height: 1px;
  background: var(--chrome-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
}
.g-card:hover {
  border-color: var(--steel-dark);
  transform: translateY(-2px);
}
.g-card:hover::after { transform: scaleX(1); }
.g-card > * { position: relative; }

.section-graphite .g-card {
  border-color: var(--hairline-dark);
  background: rgba(20, 24, 30, 0.4);
  backdrop-filter: blur(8px);
}
.section-graphite .g-card:hover { border-color: var(--steel); }

/* ══════════════════════════════════════════════════════════
   PROJECT GRID
   ══════════════════════════════════════════════════════════ */
.project-card {
  position: relative; overflow: hidden;
  background: var(--ink);
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform 0.6s cubic-bezier(0.16,1,0.3,1), box-shadow 0.6s;
  isolation: isolate;
}
.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px -16px rgba(10, 13, 16, 0.35);
}
.project-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.16,1,0.3,1),
              filter 0.4s cubic-bezier(0.16,1,0.3,1);
  filter: contrast(1.02) saturate(1);
}
.project-card:hover img {
  transform: scale(1.05);
  filter: contrast(1.1) saturate(1.18) brightness(1.05);
}

/* Chrome diagonal sweep — sheen passes across on hover */
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.10) 46%,
    rgba(216, 219, 223, 0.28) 50%,
    rgba(255, 255, 255, 0.10) 54%,
    transparent 70%
  );
  background-size: 260% 100%;
  background-position: -60% 0;
  opacity: 0;
  mix-blend-mode: overlay;
  transition: opacity 0.4s, background-position 1.1s cubic-bezier(0.16,1,0.3,1);
}
.project-card:hover::before {
  opacity: 1;
  background-position: 160% 0;
}

/* "VIEW →" mono indicator — slides in from above on hover */
.project-card::after {
  content: 'VIEW →';
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  z-index: 4;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--silver-bright);
  background: rgba(10, 13, 16, 0.65);
  backdrop-filter: blur(6px);
  padding: 0.4rem 0.65rem;
  border: 1px solid rgba(216, 219, 223, 0.22);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.35s, transform 0.45s cubic-bezier(0.16,1,0.3,1);
  pointer-events: none;
}
.project-card:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.project-overlay {
  position: absolute; inset: 0;
  z-index: 3;
  background: linear-gradient(to top, rgba(10,13,16,0.92) 0%, rgba(10,13,16,0.2) 55%, transparent 85%);
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  transition: background 0.5s;
}
.project-card:hover .project-overlay {
  background: linear-gradient(to top, rgba(10,13,16,0.96) 0%, rgba(10,13,16,0.35) 50%, rgba(10,13,16,0.05) 90%);
}

.project-card .readout {
  color: var(--steel-light);
  margin-bottom: 0.4rem;
  transition: color 0.4s, transform 0.5s cubic-bezier(0.16,1,0.3,1);
}
.project-card:hover .readout {
  color: var(--silver-bright);
  transform: translateY(-2px);
}
.project-card h3,
.project-card p {
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
}
.project-card:hover h3 { transform: translateY(-2px); }

/* ══════════════════════════════════════════════════════════
   HORIZONTAL SCROLL
   ══════════════════════════════════════════════════════════ */
.h-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 1rem;
}
.h-scroll::-webkit-scrollbar { display: none; }
.h-scroll > * { scroll-snap-align: start; flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════
   MARQUEE
   ══════════════════════════════════════════════════════════ */
.marquee-track {
  display: flex;
  gap: 2.5rem;
  white-space: nowrap;
  animation: marquee 60s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel-dark);
}
.marquee-item { font-weight: 500; }
.marquee-sep { color: var(--steel-light); opacity: 0.6; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Logo carousel — clients/credits strip */
.logo-carousel-wrap {
  overflow: hidden;
}
.logo-carousel {
  display: flex;
  align-items: center;
  gap: 4rem;
  animation: logoCarousel 55s linear infinite;
  width: max-content;
}
.logo-carousel:hover { animation-play-state: paused; }
.logo-carousel .logo-item {
  flex-shrink: 0;
  width: 180px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-carousel .logo-item img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.logo-carousel .logo-item-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.015em;
  color: var(--ink);
  white-space: nowrap;
}
@keyframes logoCarousel {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .logo-carousel { animation: none; }
}

/* Audience accordion */
.aud-stack {
  border-top: 1px solid var(--hairline-light);
}
.aud-row {
  border-bottom: 1px solid var(--hairline-light);
}
.aud-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 2.25rem 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  gap: 1.5rem;
  transition: padding 0.3s ease;
}
.aud-head-meta { flex: 1; min-width: 0; }
.aud-eyebrow {
  color: var(--steel);
  margin-bottom: 0.6rem;
  transition: color 0.3s ease;
}
.aud-name {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--ink);
  margin: 0;
  transition: opacity 0.3s ease, letter-spacing 0.3s ease;
}
.aud-head:hover .aud-name { opacity: 0.78; }
.aud-head:hover .aud-eyebrow { color: var(--ink); }
.aud-toggle {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hairline-light);
  border-radius: 999px;
  flex-shrink: 0;
  color: var(--ink);
  background: transparent;
  transition: transform 0.45s cubic-bezier(.2,.7,.2,1), background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.aud-head:hover .aud-toggle { border-color: var(--ink); }
.aud-row.open .aud-toggle {
  transform: rotate(45deg);
  background: var(--ink);
  color: var(--bone, #f4f5f7);
  border-color: var(--ink);
}
.aud-body-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s cubic-bezier(.2,.7,.2,1);
}
.aud-row.open .aud-body-wrap {
  grid-template-rows: 1fr;
}
.aud-body { overflow: hidden; min-height: 0; }
.aud-body-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  padding-bottom: 3rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease 0.15s, transform 0.5s ease 0.15s;
}
.aud-row.open .aud-body-inner {
  opacity: 1;
  transform: translateY(0);
}
.aud-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--hairline-light);
  background: var(--ink);
}
.aud-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.aud-prose p {
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
}
.aud-prose p + p { margin-top: 1.1rem; }
@media (min-width: 800px) {
  .aud-head { padding: 2.75rem 0; }
  .aud-body-inner {
    grid-template-columns: 5fr 7fr;
    gap: 3rem;
  }
  .aud-prose p { font-size: 1.05rem; }
}

/* Package card — flips to dark mode on hover (lives on bright section) */
.pkg-card {
  border-right: 1px solid var(--hairline-light);
  transition: background 0.45s ease, border-color 0.4s ease;
}
.pkg-card:last-child { border-right: 0; }
.pkg-card h3,
.pkg-card .readout,
.pkg-card p,
.pkg-card ul,
.pkg-card li {
  transition: color 0.45s ease;
}
.pkg-card:hover {
  background: var(--ink);
  border-color: var(--hairline-dark);
}
.pkg-card:hover h3,
.pkg-card:hover ul,
.pkg-card:hover li { color: var(--silver-bright) !important; }
.pkg-card:hover .readout { color: var(--steel-light) !important; }
.pkg-card:hover p { color: var(--steel-light) !important; }
@media (max-width: 767px) {
  .pkg-card {
    border-right: 0;
    border-bottom: 1px solid var(--hairline-light);
  }
  .pkg-card:last-child { border-bottom: 0; }
}

/* Audience accordion — dark variant when on a graphite section */
.section-graphite .aud-stack { border-top-color: var(--hairline-dark); }
.section-graphite .aud-row { border-bottom-color: var(--hairline-dark); }
.section-graphite .aud-name { color: var(--silver-bright); }
.section-graphite .aud-eyebrow { color: var(--steel); }
.section-graphite .aud-head:hover .aud-eyebrow { color: var(--silver-bright); }
.section-graphite .aud-toggle {
  border-color: var(--hairline-dark);
  color: var(--silver-bright);
}
.section-graphite .aud-head:hover .aud-toggle { border-color: var(--silver-bright); }
.section-graphite .aud-row.open .aud-toggle {
  background: var(--silver-bright);
  color: var(--ink);
  border-color: var(--silver-bright);
}
.section-graphite .aud-image { border-color: var(--hairline-dark); }
.section-graphite .aud-prose p { color: var(--steel-light); }

/* Prev/Next project links */
.prev-next-link {
  display: block;
  text-decoration: none;
  padding: 0.5rem 0;
  transition: opacity 0.3s ease;
}
.prev-next-link:hover { opacity: 1; }
.prev-next-link.prev:hover svg { transform: translateX(-4px); }
.prev-next-link.next:hover svg { transform: translateX(4px); }
.prev-next-link span.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  max-width: 100%;
}

/* Footer trusted-by — original color, dimmed */
.logo-carousel--footer { gap: 2.5rem; animation-duration: 70s; }
.logo-carousel--footer .logo-item { width: 110px; height: 38px; }
.logo-carousel--footer .logo-item img {
  opacity: 0.55;
  transition: opacity 0.3s ease;
}
.logo-carousel--footer .logo-item:hover img { opacity: 1; }

/* Compact trusted-by — uniform HEIGHT approach + monochrome filter.
   All logos render at the same height with widths flowing from aspect ratio.
   Monochrome filter equalizes color/contrast weight across brands.
   Roundel-shaped marks (TEDx, Visit Greenville, James Beard, Manychat icon)
   get a slightly taller treatment so they don't appear tiny. */
.logo-carousel--compact { gap: 4rem; animation-duration: 55s; align-items: center; }
.logo-carousel--compact .logo-item {
  width: auto;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-carousel--compact .logo-item img {
  /* Uniform height; width auto-derives from aspect ratio */
  height: 100%;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  /* Monochrome treatment: convert to grayscale, push toward ink */
  filter: grayscale(1) brightness(0.45) contrast(1.1);
  opacity: 0.7;
  transition: filter 0.3s ease, opacity 0.3s ease;
}
.logo-carousel--compact .logo-item:hover img {
  filter: grayscale(1) brightness(0.2) contrast(1.2);
  opacity: 1;
}

/* Roundel-shaped marks need a slightly taller treatment to read at same weight */
.logo-carousel--compact .logo-item img[alt="TEDx" i],
.logo-carousel--compact .logo-item img[alt="" i][src*="TEDx"],
.logo-carousel--compact .logo-item img[alt="James Beard" i],
.logo-carousel--compact .logo-item img[alt="" i][src*="James_Beard"],
.logo-carousel--compact .logo-item img[alt="Visit Greenville" i],
.logo-carousel--compact .logo-item img[alt="" i][src*="VGSC"] {
  height: 48px;
}
.logo-carousel--compact .logo-item:has(img[alt="TEDx" i]),
.logo-carousel--compact .logo-item:has(img[alt="" i][src*="TEDx"]),
.logo-carousel--compact .logo-item:has(img[alt="James Beard" i]),
.logo-carousel--compact .logo-item:has(img[alt="" i][src*="James_Beard"]),
.logo-carousel--compact .logo-item:has(img[alt="Visit Greenville" i]),
.logo-carousel--compact .logo-item:has(img[alt="" i][src*="VGSC"]) {
  height: 48px;
}

/* Mobile: tighter sizing, faster scroll */
@media (max-width: 768px) {
  .logo-carousel--compact { gap: 2.5rem; animation-duration: 36s; }
  .logo-carousel--compact .logo-item { height: 26px; }
  .logo-carousel--compact .logo-item img { max-width: 140px; }
  .logo-carousel--compact .logo-item img[alt="TEDx" i],
  .logo-carousel--compact .logo-item img[alt="" i][src*="TEDx"],
  .logo-carousel--compact .logo-item img[alt="James Beard" i],
  .logo-carousel--compact .logo-item img[alt="" i][src*="James_Beard"],
  .logo-carousel--compact .logo-item img[alt="Visit Greenville" i],
  .logo-carousel--compact .logo-item img[alt="" i][src*="VGSC"] {
    height: 36px;
  }
  .logo-carousel--compact .logo-item:has(img[alt="TEDx" i]),
  .logo-carousel--compact .logo-item:has(img[alt="" i][src*="TEDx"]),
  .logo-carousel--compact .logo-item:has(img[alt="James Beard" i]),
  .logo-carousel--compact .logo-item:has(img[alt="" i][src*="James_Beard"]),
  .logo-carousel--compact .logo-item:has(img[alt="Visit Greenville" i]),
  .logo-carousel--compact .logo-item:has(img[alt="" i][src*="VGSC"]) {
    height: 36px;
  }
}


/* Mobile: tighter boxes + faster scroll */
@media (max-width: 768px) {
  .logo-carousel--compact { gap: 2.25rem; animation-duration: 36s; }
  .logo-carousel--compact .logo-item { width: 130px; height: 42px; }
}


/* Team carousel — auto-scroll, pause on hover */
.team-carousel-wrap {
  overflow: hidden;
  margin-left: -2rem;
  margin-right: -2rem;
}
@media (min-width: 768px) {
  .team-carousel-wrap { margin-left: -3rem; margin-right: -3rem; }
}
.team-carousel {
  display: flex;
  gap: 1rem;
  padding: 0 2rem;
  animation: teamCarousel 60s linear infinite;
  width: max-content;
}
.team-carousel:hover { animation-play-state: paused; }
.team-carousel .g-card { flex-shrink: 0; }
@keyframes teamCarousel {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .team-carousel { animation: none; }
}

/* Featured projects carousel — auto-scroll, pause on hover */
.featured-carousel-wrap {
  overflow: hidden;
  margin-left: -2rem;
  margin-right: -2rem;
}
@media (min-width: 768px) {
  .featured-carousel-wrap { margin-left: -3rem; margin-right: -3rem; }
}
.featured-carousel {
  display: flex;
  gap: 1rem;
  padding: 0 2rem;
  animation: featuredCarousel 80s linear infinite;
  width: max-content;
}
.featured-carousel:hover { animation-play-state: paused; }
.featured-carousel .project-card {
  width: 22vw;
  min-width: 320px;
  max-width: 460px;
  flex-shrink: 0;
}
@keyframes featuredCarousel {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ══════════════════════════════════════════════════════════
   REEL
   ══════════════════════════════════════════════════════════ */
.reel-container {
  position: relative; width: 100%;
  padding-bottom: 56.25%; overflow: hidden;
  transition: box-shadow 0.4s;
  border: 1px solid var(--hairline-light);
}
.reel-container:hover { box-shadow: 0 30px 80px rgba(20,24,30,0.18); }
.reel-container iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.reel-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1rem;
  background: var(--graphite-spotlight);
}
.reel-placeholder .play-icon {
  width: 64px; height: 64px;
  border: 1px solid var(--silver);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--silver-bright);
  transition: all 0.4s;
}
.reel-placeholder:hover .play-icon {
  border-color: var(--silver-bright);
  background: var(--silver-bright);
  color: var(--ink);
}

/* ══════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════ */
.hero-mark {
  font-size: clamp(4.5rem, 14vw, 12rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.85;
  font-family: var(--font-display);
}
.hero-meta {
  display: flex; gap: 2rem; flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel-light);
}
.hero-meta-item { display: flex; align-items: center; gap: 0.5rem; }
.hero-meta-item::before {
  content: ''; width: 6px; height: 6px;
  background: var(--silver); border-radius: 50%;
  box-shadow: 0 0 8px var(--silver);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem; right: 2rem;
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--steel-light);
  z-index: 5;
}
.scroll-indicator::after {
  content: ''; width: 1px; height: 32px;
  background: linear-gradient(to bottom, var(--silver), transparent);
  animation: scrollPulse 2.5s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.7); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ══════════════════════════════════════════════════════════
   BLUEPRINT GRID — for one section, a faint technical grid
   ══════════════════════════════════════════════════════════ */
.blueprint-bg {
  background-image:
    linear-gradient(rgba(124, 131, 144, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 131, 144, 0.08) 1px, transparent 1px);
  background-size: 80px 80px;
}
/* When combined with section-pearl, layer grid on top of the pearl gradient */
.section-pearl.blueprint-bg {
  background:
    linear-gradient(rgba(124, 131, 144, 0.08) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(90deg, rgba(124, 131, 144, 0.08) 1px, transparent 1px) 0 0 / 80px 80px,
    radial-gradient(ellipse 80% 60% at 80% 0%, rgba(168, 172, 179, 0.10), transparent 60%),
    linear-gradient(180deg, var(--pearl-bright) 0%, var(--pearl) 100%);
}
/* When combined with section-graphite, layer grid on top of the graphite spotlight */
.section-graphite.blueprint-bg {
  background:
    linear-gradient(rgba(168, 172, 179, 0.06) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(90deg, rgba(168, 172, 179, 0.06) 1px, transparent 1px) 0 0 / 80px 80px,
    radial-gradient(ellipse 55% 45% at 22% 32%, rgba(216, 219, 223, 0.22), transparent 62%),
    radial-gradient(ellipse 70% 60% at 28% 38%, rgba(168, 172, 179, 0.12), transparent 70%),
    linear-gradient(155deg, #1a1d22 0%, #14181e 38%, #0a0d10 80%, #06080a 100%);
}

/* ══════════════════════════════════════════════════════════
   REVEAL ANIMATION
   ══════════════════════════════════════════════════════════ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s, transform 0.8s; }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-scale { opacity: 0; transform: scale(0.98); transition: opacity 0.8s, transform 0.8s; }
.reveal-scale.in { opacity: 1; transform: scale(1); }

/* ══════════════════════════════════════════════════════════
   SERVICE FRAMES — catalog/lookbook layout (legacy, unused)
   ══════════════════════════════════════════════════════════ */
.service-frame {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--ink);
  aspect-ratio: 16 / 10;
  isolation: isolate;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--hairline-light);
}
.service-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16,1,0.3,1),
              filter 0.5s cubic-bezier(0.16,1,0.3,1);
  filter: contrast(1.04) saturate(1);
}
.service-frame:hover img {
  transform: scale(1.04);
  filter: contrast(1.1) saturate(1.18) brightness(1.04);
}

/* Corner brackets — film-viewfinder mark */
.service-frame::before,
.service-frame::after,
.service-frame > .corner-2::before,
.service-frame > .corner-2::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border-color: var(--silver-bright);
  border-style: solid;
  border-width: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.7;
  transition: opacity 0.4s, width 0.4s, height 0.4s;
}
.service-frame::before { top: 8px; left: 8px; border-top-width: 1px; border-left-width: 1px; }
.service-frame::after  { top: 8px; right: 8px; border-top-width: 1px; border-right-width: 1px; }
.service-frame > .corner-2::before { bottom: 8px; left: 8px; border-bottom-width: 1px; border-left-width: 1px; }
.service-frame > .corner-2::after  { bottom: 8px; right: 8px; border-bottom-width: 1px; border-right-width: 1px; }
.service-frame:hover::before,
.service-frame:hover::after,
.service-frame:hover > .corner-2::before,
.service-frame:hover > .corner-2::after {
  opacity: 1;
  width: 22px; height: 22px;
}

.service-frame-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(10,13,16,0.92) 0%, rgba(10,13,16,0.4) 50%, transparent 100%);
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--silver-bright);
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 3;
}
.service-frame-caption .featured-in { color: var(--steel-light); }
.service-frame-caption .arrow {
  opacity: 0.7;
  transition: transform 0.35s, opacity 0.35s;
}
.service-frame:hover .service-frame-caption .arrow {
  transform: translateX(4px);
  opacity: 1;
}

/* ══════════════════════════════════════════════════════════
   TEAM PORTRAITS
   ══════════════════════════════════════════════════════════ */
.team-portrait {
  position: relative;
  overflow: hidden;
  border-radius: 50%;
  isolation: isolate;
}
.team-portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 50%;
  filter: grayscale(0.15) contrast(1.02);
  transition: filter 0.4s, transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.g-card:hover .team-portrait img { filter: grayscale(0) contrast(1.06); transform: scale(1.05); }

/* ══════════════════════════════════════════════════════════
   SERVICES SECTION LOGO
   ══════════════════════════════════════════════════════════ */
.services-logo {
  display: block;
  width: 100%;
  max-width: 480px;
  height: auto;
  object-fit: contain;
}

/* ══════════════════════════════════════════════════════════
   FILTER BUTTONS
   ══════════════════════════════════════════════════════════ */
.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.5rem 1.1rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--steel-dark);
  cursor: none;
  transition: all 0.3s;
}
.filter-btn:hover { color: var(--ink); }
.filter-btn.active {
  color: var(--pearl-bright);
  background: var(--ink);
  border-color: var(--ink);
}

/* ══════════════════════════════════════════════════════════
   FORM ELEMENTS
   ══════════════════════════════════════════════════════════ */
.input-tech {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--hairline-light);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.85rem 0;
  outline: none;
  transition: border-color 0.3s;
}
.input-tech:focus { border-bottom-color: var(--ink); }
.input-tech::placeholder { color: var(--steel); font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; }

/* ══════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════ */
footer { border-top: 1px solid var(--hairline-dark-soft); }

/* ══════════════════════════════════════════════════════════
   SERVICES — TECHNICAL SPEC CARDS
   Replaces stock images. 16:9 frame with blueprint backdrop,
   oversized watermark numeral, 3-col TOOLS/SCOPE/DELIVERY grid.
   ══════════════════════════════════════════════════════════ */
.svc-spec {
  /* Aspect + blueprint-bg + border already on the element */
}
.svc-spec-num {
  position: absolute;
  bottom: -3rem;
  left: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(8rem, 24vw, 22rem);
  line-height: 0.82;
  color: var(--ink);
  opacity: 0.05;
  letter-spacing: -0.05em;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.svc-spec-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1.25rem, 3.5vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 3vw, 2rem);
}
.svc-spec-eyebrow {
  /* readout class already styles font + size; we just space it */
  margin-bottom: 0;
}
.svc-spec-grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-top: clamp(1rem, 2.5vw, 1.75rem);
  border-top: 1px solid var(--hairline-light);
}
.svc-spec-col-label {
  margin-bottom: 0.85rem;
}
.svc-spec-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 0.9vw, 0.85rem);
  line-height: 1.65;
  color: var(--ink);
}
.svc-spec-list li {
  padding: 0;
  letter-spacing: 0;
}
.svc-spec-list li + li {
  margin-top: 0.2rem;
}

@media (max-width: 768px) {
  /* On narrow screens the 16:9 frame is too tight for 3 columns.
     Drop the aspect ratio cap and let the card grow with content. */
  .svc-spec {
    aspect-ratio: auto;
  }
  .svc-spec-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .svc-spec-num {
    font-size: clamp(7rem, 28vw, 12rem);
    bottom: -1.5rem;
  }
}

/* ══════════════════════════════════════════════════════════
   SERVICES — PIPELINE FLOW SCHEMATIC
   Reuses .svc-spec / .svc-spec-num / .svc-spec-inner from above.
   This block replaces the 3-col spec grid with a 5-stage flow.
   ══════════════════════════════════════════════════════════ */
.svc-flow {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.4rem, 1.2vw, 1.25rem);
  padding: clamp(0.5rem, 1.5vw, 1rem) 0;
  border-top: 1px solid var(--hairline-light);
  border-bottom: 1px solid var(--hairline-light);
}
.svc-flow-node {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: clamp(0.65rem, 1.5vw, 1rem) clamp(0.6rem, 1.3vw, 1.1rem) clamp(0.75rem, 1.6vw, 1.15rem);
  border: 1px solid var(--hairline-light);
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.3s ease, transform 0.3s ease;
}
.svc-flow-node:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}
.svc-flow-num {
  font-family: var(--font-mono);
  font-size: clamp(0.55rem, 0.7vw, 0.65rem);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
}
.svc-flow-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(0.78rem, 1.05vw, 1rem);
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.18;
}
.svc-flow-arrow {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  color: var(--steel);
  font-size: clamp(0.9rem, 1.2vw, 1.15rem);
  opacity: 0.55;
  user-select: none;
}
.svc-flow-foot {
  margin-top: auto;
  font-size: clamp(0.55rem, 0.7vw, 0.65rem) !important;
  letter-spacing: 0.14em !important;
  line-height: 1.4;
}

@media (max-width: 900px) {
  /* On narrow viewports, 5 horizontal nodes get cramped. Stack vertically
     and rotate arrows. The .svc-spec aspect-ratio: auto override (already
     defined in the earlier mobile rule) keeps the card from breaking. */
  .svc-flow {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 1rem 0;
  }
  .svc-flow-arrow {
    align-self: center;
    transform: rotate(90deg);
    margin: 0.15rem 0;
  }
  .svc-flow-node {
    flex: 0 0 auto;
    width: 100%;
  }
  .svc-flow-foot {
    text-align: left;
  }
}

/* ══════════════════════════════════════════════════════════
   SERVICES — SPEC CARD DARK MODE
   .svc-spec--dark inverts the card to graphite. Sits as a dark
   "engineering panel" inside the section-bright article.
   ══════════════════════════════════════════════════════════ */
.svc-spec--dark .svc-spec-num {
  color: var(--silver-bright);
  opacity: 0.06;
}
.svc-spec--dark .svc-flow {
  border-top-color: var(--hairline-dark-soft);
  border-bottom-color: var(--hairline-dark-soft);
}
.svc-spec--dark .svc-flow-node {
  border-color: var(--hairline-dark-soft);
  background: rgba(245, 246, 248, 0.025);
}
.svc-spec--dark .svc-flow-node:hover {
  background: rgba(245, 246, 248, 0.075);
}
.svc-spec--dark .svc-flow-num {
  color: var(--steel-light);
}
.svc-spec--dark .svc-flow-name {
  color: var(--silver-bright);
}
.svc-spec--dark .svc-flow-arrow {
  color: var(--steel-light);
  opacity: 0.5;
}
.svc-spec--dark .svc-spec-list {
  color: var(--silver-bright);
}


/* ══════════════════════════════════════════════════════════
   TEAM CAROUSEL — LARGE VARIANT
   Sizes each card so ~5 are visible across the viewport, with
   bigger portraits, bigger type, and wider gaps. Marquee animation
   inherits from the base .team-carousel rule.
   ══════════════════════════════════════════════════════════ */
.team-carousel--lg { gap: 1.75rem; animation-duration: 90s; }
.team-carousel--lg .team-card-lg {
  flex-shrink: 0;
  width: clamp(220px, 19vw, 320px);
}
@media (max-width: 768px) {
  .team-carousel--lg { gap: 1rem; animation-duration: 55s; }
  .team-carousel--lg .team-card-lg {
    width: clamp(180px, 50vw, 260px);
  }
}

/* ══════════════════════════════════════════════════════════
   ABOUT — PRINCIPLES DIPTYCH
   Two side-by-side cards on a graphite section. Hairline frame
   with a vertical divider between principles. Watermark numeral
   anchors the top-right of each card.
   ══════════════════════════════════════════════════════════ */
.principle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--hairline-dark-soft);
  border-bottom: 1px solid var(--hairline-dark-soft);
}
.principle-card {
  position: relative;
  padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1.75rem, 3.5vw, 3.5rem);
  display: flex;
  flex-direction: column;
}
.principle-card + .principle-card {
  border-left: 1px solid var(--hairline-dark-soft);
}
.principle-num {
  position: absolute;
  top: clamp(1.5rem, 3vw, 2.5rem);
  right: clamp(1.5rem, 3vw, 3rem);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4rem, 7.5vw, 6.5rem);
  line-height: 0.85;
  color: var(--silver-bright);
  opacity: 0.08;
  letter-spacing: -0.04em;
  pointer-events: none;
  user-select: none;
}
.principle-h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 4.2vw, 3.75rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--silver-bright);
  margin-bottom: 1.5rem;
  max-width: 88%;
}
.principle-body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.15vw, 1.15rem);
  line-height: 1.7;
  color: var(--steel-light);
  max-width: 460px;
}
@media (max-width: 768px) {
  .principle-grid {
    grid-template-columns: 1fr;
  }
  .principle-card + .principle-card {
    border-left: none;
    border-top: 1px solid var(--hairline-dark-soft);
  }
  .principle-num {
    font-size: clamp(3.5rem, 14vw, 5rem);
  }
}

/* ══════════════════════════════════════════════════════════
   CONTACT INQUIRY FORM
   On graphite section. Hairline-underlined inputs, mono labels,
   2-col responsive grid. Netlify-Forms compatible.
   ══════════════════════════════════════════════════════════ */
.inquiry-form { width: 100%; }
.inquiry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 2.5rem;
}
.inquiry-field { display: flex; flex-direction: column; gap: 0.65rem; }
.inquiry-field--full { grid-column: 1 / -1; }
.inquiry-label {
  color: var(--steel) !important;
  font-size: 0.6rem !important;
  letter-spacing: 0.18em;
  line-height: 1;
}
.inquiry-opt {
  color: var(--steel) !important;
  opacity: 0.55;
  margin-left: 0.4rem;
  text-transform: uppercase;
  font-size: 0.55rem !important;
  letter-spacing: 0.16em;
}
.inquiry-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--hairline-dark-soft);
  color: var(--silver-bright);
  font-family: var(--font-body);
  font-size: 1.05rem;
  padding: 0.65rem 0 0.85rem;
  outline: none;
  transition: border-color 0.25s ease;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
}
.inquiry-input::placeholder {
  color: var(--steel);
  font-family: var(--font-body);
  font-size: 0.95rem;
  opacity: 0.6;
}
.inquiry-input:focus { border-bottom-color: var(--silver-bright); }
.inquiry-input:invalid:not(:placeholder-shown) { border-bottom-color: rgba(220, 60, 60, 0.45); }

/* Select — strip default chevron, draw our own */
select.inquiry-input {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='%237a8090' stroke-width='1.5'><path d='M1 1l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0 center;
  padding-right: 1.75rem;
  cursor: pointer;
}
select.inquiry-input option {
  background: var(--graphite-spotlight);
  color: var(--silver-bright);
}

/* Textarea — give it space, no resize handle */
.inquiry-textarea {
  resize: vertical;
  min-height: 7rem;
  line-height: 1.55;
}

@media (max-width: 640px) {
  .inquiry-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .inquiry-field--half { grid-column: auto; }
}

/* ══════════════════════════════════════════════════════════
   SERVICES — VERTICAL PIPELINE SPINE
   Continuous chrome line down center, numbered markers on the
   spine, service cards zigzag left/right. Hairline connectors
   tie markers to cards. Documents the "one pipeline" message
   as a literal visual.
   ══════════════════════════════════════════════════════════ */
.svc-spine {
  position: relative;
}
.svc-spine-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--chrome-gradient-static);
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0.55;
}

.svc-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0;
  padding: clamp(2.5rem, 5vw, 5rem) 0;
}

/* Marker — center column, sits on the spine.
   Solid background masks the line behind it for clean separation. */
.svc-row-marker {
  grid-column: 2;
  position: relative;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pearl-light);
  border: 1px solid var(--ink);
  z-index: 1;
}
.svc-row-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink);
}

/* Connector — hairline from marker to the card edge */
.svc-row-marker::before {
  content: "";
  position: absolute;
  top: 50%;
  width: clamp(1.5rem, 3.5vw, 4rem);
  height: 1px;
  background: var(--hairline-light);
  transform: translateY(-50%);
}
.svc-row--left .svc-row-marker::before { right: 100%; }
.svc-row--right .svc-row-marker::before { left: 100%; }

/* Cards */
.svc-row-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-top: 0.25rem;
}
.svc-row--left .svc-row-card {
  grid-column: 1;
  padding-right: clamp(2.5rem, 5.5vw, 5rem);
}
.svc-row--right .svc-row-card {
  grid-column: 3;
  padding-left: clamp(2.5rem, 5.5vw, 5rem);
}

.svc-row-eyebrow {
  color: var(--steel) !important;
  margin-bottom: 0.5rem;
}
.svc-row-h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 0.65rem;
}
.svc-row-lead {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink);
  font-weight: 500;
  margin: 0 0 0.85rem;
}
.svc-row-body {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.05vw, 1.05rem);
  line-height: 1.7;
  color: var(--text-on-light-muted);
  margin: 0;
}

/* Mobile / narrow: collapse spine to the left, all cards on the right.
   Spine becomes a left-anchored timeline. */
@media (max-width: 900px) {
  .svc-spine-line {
    left: 32px;
    transform: none;
  }
  .svc-row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 0;
    padding: 2rem 0;
  }
  .svc-row-marker {
    grid-column: 1;
    grid-row: 1;
    width: 64px;
    height: 64px;
    margin-left: 0;
    justify-self: start;
  }
  .svc-row--left .svc-row-marker::before,
  .svc-row--right .svc-row-marker::before {
    left: 100%;
    right: auto;
    width: 1.25rem;
  }
  .svc-row--left .svc-row-card,
  .svc-row--right .svc-row-card {
    grid-column: 2;
    grid-row: 1;
    padding-left: 1.5rem;
    padding-right: 0;
  }
}

/* ──────────────────────────────────────────────────────────
   SPINE ROW IMAGES — sit in the negative space across from
   each service card. Hairline-bordered, ink-tinted on hover.
   Marker connector extends to both card and image sides.
   ────────────────────────────────────────────────────────── */
.svc-row-image {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--hairline-light);
  background: var(--ink);
  cursor: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s;
}
.svc-row--left .svc-row-image {
  grid-column: 3;
  margin-left: clamp(2.5rem, 5.5vw, 5rem);
}
.svc-row--right .svc-row-image {
  grid-column: 1;
  margin-right: clamp(2.5rem, 5.5vw, 5rem);
}
.svc-row-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.35) contrast(0.95);
  transition: filter 0.5s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.svc-row-image:hover {
  border-color: var(--ink);
}
.svc-row-image:hover img {
  filter: grayscale(0) contrast(1.05);
  transform: scale(1.04);
}
.svc-row-image-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.65rem 0.9rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--silver-bright);
  background: linear-gradient(180deg, transparent 0%, rgba(11, 13, 16, 0.85) 100%);
  pointer-events: none;
}

/* Marker now has connectors on BOTH sides — card on one, image on the other */
.svc-row-marker::after {
  content: "";
  position: absolute;
  top: 50%;
  width: clamp(1.5rem, 3.5vw, 4rem);
  height: 1px;
  background: var(--hairline-light);
  transform: translateY(-50%);
}
.svc-row--left .svc-row-marker::after { left: 100%; }
.svc-row--right .svc-row-marker::after { right: 100%; }

/* Mobile: images stack under the card */
@media (max-width: 900px) {
  .svc-row {
    grid-template-rows: auto auto;
  }
  .svc-row--left .svc-row-image,
  .svc-row--right .svc-row-image {
    grid-column: 2;
    grid-row: 2;
    margin: 1.5rem 0 0 1.5rem;
    aspect-ratio: 16 / 9;
  }
  .svc-row-marker::after { display: none; }
}

/* ══════════════════════════════════════════════════════════
   MOBILE / iOS — accessibility + tap targets + iOS quirks
   ══════════════════════════════════════════════════════════ */

/* iOS Safari fix: 100vh includes the bottom toolbar, cutting off content.
   Use dynamic viewport height when supported. */
@supports (height: 100dvh) {
  .min-h-screen { min-height: 100dvh; }
}

/* Body scroll lock when mobile menu is open */
body.menu-open {
  overflow: hidden;
  touch-action: none;
}

/* Mobile menu button — accessible touch target, no inline cursor */
#mobile-menu-btn {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem;
  margin: -0.6rem;  /* visual size unchanged, hit area expanded */
  cursor: pointer !important;
}
#mobile-menu-btn svg {
  width: 22px;
  height: 22px;
}
/* Icon swap: when menu is open, hamburger hides, close shows.
   Both icons sit in the button; JS toggles .hidden on each. */
#mobile-menu-btn [data-icon] { transition: opacity 0.2s; }

/* Mobile menu panel — backdrop blur, slide-in, full-width on phones */
#mobile-menu {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: rgba(244, 245, 247, 0.96);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--hairline-light-soft);
  padding: 1.25rem 2rem 2rem !important;
  display: flex;
  flex-direction: column;
  gap: 0 !important;
  transform-origin: top;
  transform: translateY(-8px);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.2s ease;
  pointer-events: none;
}
#mobile-menu.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
/* Mobile menu link — full 44pt tap target */
#mobile-menu .nav-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--hairline-light-soft);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  cursor: pointer;
}
#mobile-menu .nav-link:last-child { border-bottom: none; }
#mobile-menu .nav-link.active { color: var(--steel-dark); }

/* Hide .hidden override for menu so display:none doesn't fight the slide */
#mobile-menu.hidden { display: none; }

/* Safe-area insets — for notch + home indicator on iPhones */
@supports (padding: env(safe-area-inset-top)) {
  nav .h-16 {
    padding-top: env(safe-area-inset-top);
    height: calc(4rem + env(safe-area-inset-top));
  }
  #mobile-menu {
    top: calc(64px + env(safe-area-inset-top));
    padding-bottom: calc(2rem + env(safe-area-inset-bottom)) !important;
  }
}

/* Prevent iOS input zoom on focus (font-size must be >= 16px).
   inquiry-input is already 1.05rem (~16.8px) but lock it explicitly for mobile. */
@media (max-width: 768px) {
  .inquiry-input,
  .inquiry-textarea,
  select.inquiry-input,
  .input-tech {
    font-size: 16px !important;
  }
}

/* Tap-friendly buttons everywhere — minimum 44px height */
.btn-primary,
.btn-ghost,
.filter-btn {
  min-height: 44px;
}

/* ══════════════════════════════════════════════════════════
   MOBILE FIXES — collision, sizing, hamburger contrast
   ══════════════════════════════════════════════════════════ */

/* ── #1 Hamburger color tied to nav's current scroll bg ──
   !important + explicit svg stroke because Tailwind preflight on <button>
   sets color:inherit which fights default cascade. */
#mobile-menu-btn,
#mobile-menu-btn svg,
#mobile-menu-btn svg path {
  color: var(--ink) !important;
  stroke: var(--ink) !important;
}
nav[data-scroll-bg="dark"] #mobile-menu-btn,
nav[data-scroll-bg="dark"] #mobile-menu-btn svg,
nav[data-scroll-bg="dark"] #mobile-menu-btn svg path,
nav.scrolled-dark #mobile-menu-btn,
nav.scrolled-dark #mobile-menu-btn svg,
nav.scrolled-dark #mobile-menu-btn svg path {
  color: var(--silver-bright) !important;
  stroke: var(--silver-bright) !important;
}

/* ── #2 Suppress hard-coded <br> in headlines on small screens
       so text reflows naturally instead of orphaning words. ── */
@media (max-width: 640px) {
  h1 br, h2 br, h3 br, .hero-mark br {
    display: none;
  }
}

/* ── #3 Hero / page-header flex rows wrap on mobile instead of
       colliding (about, services, contact, etc. all have a
       tech-label + readout in a justify-between row). ── */
@media (max-width: 640px) {
  section .flex.justify-between.items-start {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  /* The trailing readout in those rows can also dominate mobile
     real estate — make it smaller. */
  section .flex.justify-between.items-start > .readout {
    font-size: 0.55rem;
    line-height: 1.4;
  }
}

/* ── #4 Contact email line: smaller on mobile so it doesn't
       feel oversized in the contact-info grid. ── */
@media (max-width: 640px) {
  a[href^="mailto:"].text-xl,
  a[href^="mailto:"].md\:text-2xl {
    font-size: 1.05rem;
    word-break: break-word;
  }
}

/* ── #5 Homepage hero simplification on phone
       Hide the build-version readout + tighten the discipline tags
       so the hero feels less cluttered. ── */
@media (max-width: 640px) {
  /* Hide the v2.0 // BUILD readout on mobile (cosmetic only) */
  .section-graphite.min-h-screen .readout[style*="steel"] {
    /* selectively hidden via a more specific rule below */
  }
}

/* Specific: hide the "v2.0 // BUILD 0426" + the top-right
   "GREENVILLE, SC" readouts on phones — keep them on desktop. */
@media (max-width: 640px) {
  .readout.text-right.hidden,
  section .readout[style*="--steel)"]:not(.svc-spec-eyebrow):not(.svc-flow-foot) {
    /* not used; harmless safety */
  }
}

/* ── Belt-and-suspenders: Tailwind's `hidden md:block` can be slow to
   apply on slow mobile networks (Tailwind CDN). Force the hide. ── */
@media (max-width: 767px) {
  .hidden.md\:block { display: none !important; }
  .text-right.hidden { display: none !important; }
}
