/* ============ CodxDev — cinematic 3D landing ============ */

:root {
  --bg: oklch(0.16 0.012 260);
  --bg-2: oklch(0.13 0.014 260);
  --bg-3: oklch(0.10 0.012 260);
  --panel: oklch(0.20 0.014 260);
  --panel-2: oklch(0.24 0.014 260);
  --line: oklch(0.32 0.012 260 / 0.55);
  --line-soft: oklch(0.32 0.012 260 / 0.25);
  --fg: oklch(0.97 0.005 90);
  --fg-dim: oklch(0.78 0.008 260);
  --fg-mute: oklch(0.58 0.010 260);
  --accent-h: 215;
  --accent: oklch(0.78 0.16 var(--accent-h));
  --accent-2: oklch(0.62 0.18 var(--accent-h));
  --accent-glow: oklch(0.78 0.16 var(--accent-h) / 0.35);
  --warn: oklch(0.82 0.14 70);
  --good: oklch(0.78 0.14 155);

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Space Grotesk", system-ui, sans-serif;
  --mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  --radius: 18px;
  --radius-sm: 10px;

  --depth: 1;            /* tweakable 3D intensity multiplier (0..1.6) */
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-feature-settings: "ss01", "ss02", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Background dressing — deep cinematic gradient + grain + subtle grid */
.bg-stack {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  pointer-events: none;
}
.bg-grad {
  position: absolute; inset: -10%;
  background:
    radial-gradient(60% 50% at 15% 10%, oklch(0.30 0.07 var(--accent-h) / 0.45), transparent 65%),
    radial-gradient(50% 45% at 85% 20%, oklch(0.28 0.06 calc(var(--accent-h) + 60) / 0.30), transparent 70%),
    radial-gradient(70% 70% at 50% 110%, oklch(0.22 0.05 var(--accent-h) / 0.55), transparent 70%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 35%, var(--bg-3) 100%);
  filter: saturate(1.05);
}
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, oklch(0.28 0.01 260 / 0.35) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(0.28 0.01 260 / 0.35) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(80% 70% at 50% 30%, black 30%, transparent 80%);
  opacity: 0.5;
}
.bg-grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
  opacity: 0.55;
}

/* ===================== Layout shell ===================== */
.shell { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 32px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(14px) saturate(120%);
  background: linear-gradient(180deg, oklch(0.13 0.014 260 / 0.85), oklch(0.13 0.014 260 / 0.4));
  border-bottom: 1px solid var(--line-soft);
}
.nav-row { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; font-size: 18px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; position: relative;
  background:
    conic-gradient(from 220deg at 50% 50%, var(--accent), var(--accent-2), var(--accent));
  box-shadow: 0 0 0 1px oklch(0.5 0.04 260 / 0.5), 0 8px 24px var(--accent-glow);
}
.brand-mark::after{
  content: ""; position: absolute; inset: 5px; border-radius: 5px;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px oklch(0.4 0.02 260 / 0.7);
}
.brand-mark::before{
  content: ""; position: absolute; inset: 0; border-radius: 8px;
  background: linear-gradient(135deg, transparent 40%, oklch(1 0 0 / 0.18) 50%, transparent 60%);
}
.brand b { font-weight: 600; }
.brand span { color: var(--accent); font-weight: 600; }

.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a {
  color: var(--fg-dim); text-decoration: none; font-size: 14px;
  letter-spacing: -0.005em; transition: color .15s ease;
}
.nav-links a:hover { color: var(--fg); }

.nav-cta {
  background: var(--fg); color: oklch(0.18 0.014 260);
  border: 0; border-radius: 999px; height: 36px; padding: 0 16px;
  font: 500 13.5px/1 var(--sans); letter-spacing: -0.005em;
  cursor: pointer; transition: transform .15s ease;
}
.nav-cta:hover { transform: translateY(-1px); }

/* ===================== HERO ===================== */
.hero {
  position: relative;
  padding: 56px 0 80px;
  min-height: calc(100vh - 72px);
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px; align-items: center;
}

.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 8px; border-radius: 999px;
  border: 1px solid var(--line);
  background: oklch(0.20 0.014 260 / 0.6);
  font: 500 12px/1 var(--mono);
  color: var(--fg-dim);
  letter-spacing: 0.04em; text-transform: uppercase;
}
.kicker .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--good); box-shadow: 0 0 0 4px oklch(0.78 0.14 155 / 0.18);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.12); }
}

.headline {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(44px, 6vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 22px 0 0;
  text-wrap: balance;
}
.headline em {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.01em;
}
.headline .stroke {
  -webkit-text-stroke: 1px oklch(0.78 0.008 260 / 0.6);
  color: transparent;
}

.lede {
  margin-top: 28px; max-width: 560px;
  color: var(--fg-dim); font-size: 17px; line-height: 1.55;
  letter-spacing: -0.005em; text-wrap: pretty;
}
.lede strong { color: var(--fg); font-weight: 500; }

.cta-row { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; align-items: center; }
.btn {
  height: 48px; padding: 0 22px; border-radius: 999px;
  font: 500 14.5px/1 var(--sans); letter-spacing: -0.005em;
  cursor: pointer; border: 0; display: inline-flex; align-items: center; gap: 10px;
  transition: transform .15s ease, box-shadow .2s ease;
}
.btn-primary {
  background: var(--fg); color: oklch(0.16 0.014 260);
  box-shadow: 0 1px 0 oklch(1 0 0 / 0.6) inset, 0 16px 40px -20px oklch(0.95 0 0 / 0.6);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 1px 0 oklch(1 0 0 / 0.6) inset, 0 20px 50px -20px oklch(0.95 0 0 / 0.7);}
.btn-ghost {
  background: oklch(0.22 0.014 260 / 0.4); color: var(--fg);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: oklch(0.26 0.014 260 / 0.6); }
.btn .arrow {
  width: 20px; height: 20px; border-radius: 50%;
  background: oklch(0.16 0.014 260 / 0.12);
  display: inline-grid; place-items: center; font-size: 11px;
}
.btn-ghost .arrow { background: oklch(1 0 0 / 0.08); }

/* Tagline rule */
.tag-rule {
  margin-top: 44px;
  display: flex; align-items: center; gap: 16px;
  color: var(--fg-mute); font: 400 13px/1 var(--mono);
  letter-spacing: 0.05em; text-transform: uppercase;
}
.tag-rule::before, .tag-rule::after {
  content: ""; flex: 1; height: 1px; background: var(--line-soft);
}
.tag-rule::after { max-width: 80px; }
.tag-rule::before { max-width: 16px; }

.tagline {
  margin-top: 18px;
  font-family: var(--serif); font-style: italic;
  font-size: clamp(22px, 2.2vw, 28px); line-height: 1.25;
  color: var(--fg); letter-spacing: -0.01em;
  max-width: 520px;
}

/* ===== 3D Module — the cinematic centerpiece ===== */
.scene {
  position: relative;
  height: 620px;
  perspective: 1600px;
  perspective-origin: 50% 45%;
  isolation: isolate;
}
.scene-floor {
  position: absolute; left: -10%; right: -10%; bottom: -40px; height: 220px;
  background: radial-gradient(60% 100% at 50% 0%, oklch(0.22 0.05 var(--accent-h) / 0.55), transparent 70%);
  filter: blur(20px);
  z-index: -1;
}

.stage {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(calc(-8deg * var(--depth))) rotateY(calc(-18deg * var(--depth))) rotateZ(0deg);
  transition: transform .12s ease-out;
}

/* Floating planes (the "stack") */
.plane {
  position: absolute; left: 50%; top: 50%;
  width: 420px; height: 280px;
  margin-left: -210px; margin-top: -140px;
  transform-style: preserve-3d;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, oklch(0.22 0.018 260 / 0.92), oklch(0.18 0.014 260 / 0.92));
  box-shadow:
    0 1px 0 oklch(1 0 0 / 0.05) inset,
    0 30px 60px -30px oklch(0 0 0 / 0.6);
  backdrop-filter: blur(10px);
}
.plane.p1 { transform: translate3d(-60px, -120px, calc(140px * var(--depth))); width: 380px; height: 230px;}
.plane.p2 { transform: translate3d(40px, 40px, calc(40px * var(--depth))); width: 440px; height: 290px; }
.plane.p3 { transform: translate3d(-30px, 160px, calc(-80px * var(--depth))); width: 340px; height: 200px; opacity: 0.85;}

/* Plane content — code-ish panel */
.plane .head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  font: 500 12px/1 var(--mono); color: var(--fg-mute);
  letter-spacing: 0.02em;
}
.plane .dots { display:flex; gap: 6px; }
.plane .dots i { width: 9px; height: 9px; border-radius: 50%; background: oklch(0.4 0.02 260); display:inline-block; }
.plane .dots i:nth-child(1) { background: oklch(0.72 0.13 30); }
.plane .dots i:nth-child(2) { background: oklch(0.82 0.13 90); }
.plane .dots i:nth-child(3) { background: oklch(0.78 0.13 155); }
.plane .body { padding: 14px 16px; font: 12.5px/1.7 var(--mono); color: var(--fg-dim); }
.plane .ln { display: block; white-space: nowrap; overflow: hidden; }
.plane .ln .k { color: oklch(0.82 0.14 var(--accent-h)); }
.plane .ln .s { color: oklch(0.82 0.12 145); }
.plane .ln .n { color: oklch(0.82 0.12 60); }
.plane .ln .c { color: var(--fg-mute); }

/* P2: live metric tile */
.tile-title {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px 6px;
  font: 500 12px/1 var(--mono); color: var(--fg-mute);
  letter-spacing: 0.05em; text-transform: uppercase;
}
.tile-value {
  padding: 0 18px;
  font: 500 44px/1 var(--sans); letter-spacing: -0.03em;
}
.tile-value em { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 28px; margin-left: 4px; }
.tile-sub { padding: 4px 18px 0; color: var(--fg-dim); font-size: 13px;}
.spark {
  margin: 14px 18px 0; height: 70px; position: relative;
  background:
    linear-gradient(to top, oklch(0.78 0.16 var(--accent-h) / 0.18), transparent 70%);
  border-top: 1px solid var(--line-soft);
}
.spark svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.spark .ln-path { fill: none; stroke: var(--accent); stroke-width: 1.5; }

/* P3: status rows */
.rows { padding: 8px 14px;}
.row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px; border-bottom: 1px dashed var(--line-soft);
  font: 13px/1.2 var(--sans); letter-spacing: -0.005em;
}
.row:last-child { border-bottom: 0; }
.row .pill {
  font: 500 10px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 999px;
  background: oklch(0.78 0.14 155 / 0.14); color: var(--good);
  margin-left: auto;
}
.row.warn .pill { background: oklch(0.82 0.14 70 / 0.16); color: var(--warn); }
.row .ico {
  width: 22px; height: 22px; border-radius: 6px;
  background: oklch(0.26 0.014 260); border: 1px solid var(--line);
  display: inline-grid; place-items: center; font: 500 10px/1 var(--mono);
  color: var(--fg-dim);
}

/* Free-floating orb / cube */
.orb {
  position: absolute; left: 50%; top: 50%;
  width: 120px; height: 120px; margin-left: -60px; margin-top: -60px;
  transform: translate3d(180px, -180px, calc(220px * var(--depth)));
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, oklch(1 0 0 / 0.5), transparent 35%),
    radial-gradient(circle at 65% 70%, var(--accent), oklch(0.30 0.10 var(--accent-h)) 70%);
  box-shadow:
    0 0 0 1px oklch(1 0 0 / 0.08) inset,
    0 30px 80px oklch(0.30 0.18 var(--accent-h) / 0.55);
  animation: float 7s ease-in-out infinite;
}
@keyframes float {
  0%,100% { translate: 0 0; }
  50% { translate: 0 -14px; }
}

.cube-wrap {
  position: absolute; left: 50%; top: 50%;
  width: 90px; height: 90px; margin-left: -45px; margin-top: -45px;
  transform: translate3d(-220px, 200px, calc(180px * var(--depth)));
  transform-style: preserve-3d;
  animation: spin 18s linear infinite;
}
.cube { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; }
.cube div {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, oklch(0.26 0.02 260 / 0.85), oklch(0.20 0.018 260 / 0.85));
  border: 1px solid var(--line);
  box-shadow: 0 0 0 1px oklch(1 0 0 / 0.04) inset;
}
.cube .f { transform: translateZ(45px); }
.cube .b { transform: rotateY(180deg) translateZ(45px); }
.cube .r { transform: rotateY(90deg)  translateZ(45px); }
.cube .l { transform: rotateY(-90deg) translateZ(45px); }
.cube .t { transform: rotateX(90deg)  translateZ(45px); }
.cube .bt{ transform: rotateX(-90deg) translateZ(45px); }
.cube .f::after {
  content: "{ }"; position: absolute; inset: 0;
  display: grid; place-items: center; color: var(--accent);
  font: 500 22px/1 var(--mono);
}
@keyframes spin {
  from { transform: rotateX(20deg) rotateY(0deg); }
  to   { transform: rotateX(20deg) rotateY(360deg); }
}

/* Hero meta strip */
.meta-strip {
  margin-top: 56px; display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.meta-strip.meta-strip-3 { grid-template-columns: repeat(3, 1fr); }
.meta-strip .cell {
  padding: 22px 6px; display: flex; flex-direction: column; gap: 6px;
  border-right: 1px solid var(--line-soft);
}
.meta-strip .cell:last-child { border-right: 0; }
.meta-strip .v { font: 500 34px/1 var(--sans); letter-spacing: -0.03em; }
.meta-strip .v em { font-family: var(--serif); font-style: italic; color: var(--accent); }
.meta-strip .l { font: 500 11.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-mute); }

/* ===================== Section common ===================== */
.section { padding: 120px 0; position: relative; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: 56px; }
.section-eyebrow {
  font: 500 11.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-mute); display: inline-flex; align-items: center; gap: 10px;
}
.section-eyebrow::before {
  content: ""; width: 24px; height: 1px; background: var(--accent);
}
.section-title {
  font-weight: 500; font-size: clamp(34px, 4.2vw, 56px);
  letter-spacing: -0.03em; line-height: 1.0;
  margin: 16px 0 0; max-width: 720px; text-wrap: balance;
}
.section-title em { font-family: var(--serif); font-style: italic; color: var(--accent); font-weight: 400; }
.section-sub { color: var(--fg-dim); max-width: 420px; font-size: 16px; line-height: 1.55; }

/* ===================== Services ===================== */
.services {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}
.svc {
  grid-column: span 2;
  position: relative;
  padding: 28px 26px 26px;
  background: linear-gradient(180deg, oklch(0.21 0.014 260 / 0.85), oklch(0.18 0.014 260 / 0.85));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 280px;
  display: flex; flex-direction: column;
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
  transform-style: preserve-3d;
  overflow: hidden;
}
.svc.feature { grid-column: span 3; min-height: 320px; }
.svc.feat-row { grid-column: span 3; min-height: 320px; }
.svc.wide { grid-column: span 4; min-height: 260px; }
.svc:hover { transform: translateY(-4px); border-color: oklch(0.45 0.04 260 / 0.7); }

.svc .idx {
  position: absolute; right: 22px; top: 22px;
  font: 500 11px/1 var(--mono); color: var(--fg-mute); letter-spacing: 0.08em;
}
.svc .glyph {
  width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(135deg, oklch(0.30 0.02 260), oklch(0.22 0.018 260));
  border: 1px solid var(--line);
  display: grid; place-items: center;
  margin-bottom: 22px;
  position: relative;
  box-shadow: 0 12px 24px -12px oklch(0 0 0 / 0.4);
}
.svc .glyph::after {
  content: ""; position: absolute; inset: 0; border-radius: 14px;
  background: linear-gradient(135deg, transparent 50%, oklch(1 0 0 / 0.06));
}
.svc h3 {
  margin: 0 0 8px; font-weight: 500; font-size: 22px;
  letter-spacing: -0.02em; line-height: 1.1;
}
.svc h3 em { font-family: var(--serif); font-style: italic; color: var(--accent); font-weight: 400; }
.svc p {
  margin: 0; color: var(--fg-dim); font-size: 14.5px; line-height: 1.55;
  letter-spacing: -0.005em;
}
.svc .tags {
  margin-top: auto; padding-top: 22px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.svc .tag {
  padding: 5px 10px; border-radius: 999px;
  background: oklch(0.24 0.014 260 / 0.7); border: 1px solid var(--line-soft);
  font: 500 11px/1 var(--mono); letter-spacing: 0.04em; color: var(--fg-dim);
}

/* Glyph variants (CSS primitives only) */
.gx-stack { position: relative; width: 28px; height: 28px; }
.gx-stack i {
  position: absolute; inset: 0; border: 1.5px solid var(--accent); border-radius: 4px;
}
.gx-stack i:nth-child(2) { transform: translate(5px, 5px); border-color: oklch(0.78 0.008 260 / 0.7); }
.gx-stack i:nth-child(3) { transform: translate(10px, 10px); border-color: oklch(0.78 0.008 260 / 0.35); }

.gx-flow { width: 30px; height: 28px; position: relative; }
.gx-flow i {
  position: absolute; width: 10px; height: 10px; border-radius: 3px;
  background: var(--accent);
}
.gx-flow i:nth-child(1) { left: 0; top: 0; }
.gx-flow i:nth-child(2) { right: 0; top: 0; background: var(--fg); }
.gx-flow i:nth-child(3) { left: 50%; bottom: 0; transform: translateX(-50%); background: oklch(0.78 0.008 260 / 0.55); }
.gx-flow::after {
  content: ""; position: absolute; inset: 5px; border: 1.5px dashed oklch(0.5 0.04 260); border-radius: 50%;
}

.gx-grid { width: 30px; height: 30px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.gx-grid i { background: oklch(0.5 0.04 260); border-radius: 2px; aspect-ratio: 1;}
.gx-grid i:nth-child(1), .gx-grid i:nth-child(5), .gx-grid i:nth-child(9) { background: var(--accent); }

.gx-orb {
  width: 30px; height: 30px; border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, oklch(1 0 0 / 0.6), transparent 40%),
    radial-gradient(circle at 65% 70%, var(--accent), oklch(0.3 0.1 var(--accent-h)));
}
.gx-bar { width: 30px; height: 24px; display: flex; gap: 4px; align-items: flex-end; }
.gx-bar i { flex: 1; background: var(--accent); border-radius: 2px;}
.gx-bar i:nth-child(1) { height: 40%; background: oklch(0.5 0.04 260);}
.gx-bar i:nth-child(2) { height: 70%;}
.gx-bar i:nth-child(3) { height: 55%; background: oklch(0.5 0.04 260);}
.gx-bar i:nth-child(4) { height: 95%;}
.gx-cal {
  width: 30px; height: 28px; border: 1.5px solid var(--accent); border-radius: 4px;
  position: relative; padding-top: 7px;
}
.gx-cal::before { content:""; position: absolute; top: -2px; left: 0; right: 0; height: 5px; border-bottom: 1.5px solid var(--accent);}
.gx-cal::after { content:""; position: absolute; left: 5px; top: 11px; width: 8px; height: 8px; background: var(--fg); border-radius: 1px;}

/* Feature card visualization */
.feat-vis {
  position: absolute; right: -10%; top: -10%; bottom: -20%; width: 65%;
  pointer-events: none; opacity: 0.95;
}
.feat-vis .ring {
  position: absolute; border-radius: 50%; border: 1px solid var(--line);
}
.feat-vis .ring.r1 { inset: 10% 10% 10% 10%; }
.feat-vis .ring.r2 { inset: 20% 20% 20% 20%; border-color: var(--line-soft);}
.feat-vis .ring.r3 { inset: 32% 32% 32% 32%; border-color: var(--line-soft);}
.feat-vis .node {
  position: absolute; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow);
}
.feat-vis .n1 { left: 50%; top: 10%; }
.feat-vis .n2 { left: 88%; top: 50%; }
.feat-vis .n3 { left: 18%; top: 70%; background: var(--fg);}
.feat-vis .n4 { left: 60%; top: 88%; }

/* ===================== Process ===================== */
.process {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.step {
  padding: 32px 28px 36px;
  border-right: 1px solid var(--line-soft);
  position: relative;
  transition: background .25s ease;
}
.step:last-child { border-right: 0; }
.step:hover { background: oklch(0.20 0.014 260 / 0.4); }
.step .num {
  font: 500 11px/1 var(--mono); color: var(--accent); letter-spacing: 0.1em;
  margin-bottom: 28px;
}
.step h4 {
  margin: 0 0 10px; font-weight: 500; font-size: 22px; letter-spacing: -0.02em;
}
.step h4 em { font-family: var(--serif); font-style: italic; color: var(--accent); font-weight: 400;}
.step p {
  margin: 0; color: var(--fg-dim); font-size: 14px; line-height: 1.55;
}

/* ===================== Capabilities (tech bar) ===================== */
.capabilities {
  margin-top: 80px;
  display: grid; grid-template-columns: 220px 1fr; gap: 40px;
  align-items: center;
  padding: 28px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.cap-label {
  font: 500 11.5px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-mute);
}
.cap-list { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.cap-list span {
  font: 500 14.5px/1 var(--sans); letter-spacing: -0.01em;
  color: var(--fg-dim);
  display: inline-flex; align-items: center; gap: 8px;
}
.cap-list span::before {
  content: ""; width: 5px; height: 5px; background: var(--accent); border-radius: 50%;
}

/* ===================== CTA ===================== */
.cta {
  position: relative;
  padding: 80px 56px;
  border-radius: 28px;
  background:
    radial-gradient(80% 120% at 100% 0%, oklch(0.30 0.10 var(--accent-h) / 0.55), transparent 60%),
    radial-gradient(80% 120% at 0% 100%, oklch(0.22 0.06 var(--accent-h) / 0.6), transparent 60%),
    linear-gradient(180deg, oklch(0.22 0.018 260), oklch(0.16 0.014 260));
  border: 1px solid var(--line);
  overflow: hidden;
}
.cta::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(to right, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to right, transparent, black, transparent);
  opacity: 0.5;
}
.cta-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap;}
.cta h2 {
  margin: 0; font-weight: 500; font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.03em; line-height: 1.05; max-width: 700px; text-wrap: balance;
}
.cta h2 em { font-family: var(--serif); font-style: italic; color: var(--accent); font-weight: 400; }
.cta p { color: var(--fg-dim); margin-top: 14px; max-width: 500px; font-size: 16px; line-height: 1.5;}

/* ===================== Footer ===================== */
.footer { padding: 60px 0 40px; border-top: 1px solid var(--line-soft); margin-top: 80px;}
.foot-row { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.foot-row h5 { margin: 0 0 14px; font: 500 12px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-mute);}
.foot-row a, .foot-row p { display: block; color: var(--fg-dim); text-decoration: none; font-size: 14px; margin: 8px 0; line-height: 1.5;}
.foot-row a:hover { color: var(--fg); }
.foot-base {
  margin-top: 50px; display: flex; justify-content: space-between; align-items: center;
  font: 500 12px/1 var(--mono); color: var(--fg-mute); letter-spacing: 0.04em;
}

/* ===================== Responsive ===================== */
@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; }
  .scene { height: 480px; margin-top: 20px; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .svc, .svc.feature, .svc.feat-row, .svc.wide { grid-column: span 1; }
  .process { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(2) { border-right: 0;}
  .step:nth-child(1), .step:nth-child(2) { border-bottom: 1px solid var(--line-soft);}
  .foot-row { grid-template-columns: 1fr 1fr; }
  .capabilities { grid-template-columns: 1fr; }
}
@media (max-width: 640px){
  .shell { padding: 0 20px; }
  .nav-links { display: none; }
  .services { grid-template-columns: 1fr; }
  .meta-strip, .meta-strip.meta-strip-3 { grid-template-columns: repeat(2,1fr); }
  .meta-strip .cell:nth-child(2){ border-right: 0; }
  .meta-strip .cell:nth-child(1), .meta-strip .cell:nth-child(2){ border-bottom: 1px solid var(--line-soft); }
  .process { grid-template-columns: 1fr; }
  .step { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .step:last-child { border-bottom: 0;}
  .foot-row { grid-template-columns: 1fr; }
  .cta { padding: 48px 28px; }
  .modal { padding: 32px 24px 28px !important; }
  .modal-title { font-size: 28px !important; }
}

/* ===================== Showreel ===================== */
.showreel {
  position: relative;
  margin-top: 8px;
}
.reel-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  overflow: hidden;
  background: oklch(0.08 0.012 260);
  border: 1px solid var(--line);
  box-shadow:
    0 1px 0 oklch(1 0 0 / 0.05) inset,
    0 60px 120px -40px oklch(0 0 0 / 0.7),
    0 0 0 1px oklch(1 0 0 / 0.02),
    0 0 80px -20px var(--accent-glow);
  isolation: isolate;
}
.reel-frame::before {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit; pointer-events: none; z-index: 4;
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.12),
    inset 0 -1px 0 oklch(0 0 0 / 0.4);
}
.reel-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.reel-vignette {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background:
    radial-gradient(120% 80% at 50% 50%, transparent 55%, oklch(0 0 0 / 0.45) 100%),
    linear-gradient(180deg, oklch(0 0 0 / 0.35) 0%, transparent 18%, transparent 72%, oklch(0 0 0 / 0.55) 100%);
}

/* Corner tick marks (cinematic registration) */
.reel-corners { position: absolute; inset: 18px; pointer-events: none; z-index: 5;}
.reel-corners span {
  position: absolute; width: 18px; height: 18px;
  border: 1px solid oklch(1 0 0 / 0.5);
}
.reel-corners span:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.reel-corners span:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.reel-corners span:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.reel-corners span:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; }

.reel-meta {
  position: absolute; top: 20px; left: 24px; right: 24px; z-index: 6;
  display: flex; justify-content: space-between; align-items: center;
  font: 500 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
  color: oklch(1 0 0 / 0.85);
  text-shadow: 0 1px 2px oklch(0 0 0 / 0.6);
}
.reel-dot { display: inline-flex; align-items: center; gap: 8px; }
.reel-dot i {
  width: 7px; height: 7px; border-radius: 50%;
  background: oklch(0.72 0.18 28);
  box-shadow: 0 0 0 4px oklch(0.72 0.18 28 / 0.22);
  animation: pulse 2.2s ease-in-out infinite;
}

.reel-controls {
  position: absolute; left: 24px; right: 24px; bottom: 22px; z-index: 6;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px;
  background: oklch(0.10 0.012 260 / 0.55);
  backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid oklch(1 0 0 / 0.1);
  border-radius: 999px;
  color: oklch(1 0 0 / 0.9);
}
.reel-btn {
  width: 30px; height: 30px; border-radius: 50%;
  background: oklch(1 0 0 / 0.12);
  border: 0; color: oklch(1 0 0 / 0.9);
  cursor: pointer; display: grid; place-items: center;
  transition: background .15s ease, transform .15s ease;
}
.reel-btn:hover { background: oklch(1 0 0 / 0.2); }
.reel-btn:active { transform: scale(0.94); }
.reel-bar {
  flex: 1; height: 3px; background: oklch(1 0 0 / 0.15); border-radius: 999px;
  position: relative; overflow: hidden;
}
.reel-bar-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--accent), oklch(1 0 0 / 0.9));
  border-radius: inherit;
  transition: width .1s linear;
}

.reel-caption {
  display: flex; gap: 18px; align-items: baseline;
  margin-top: 22px;
  color: var(--fg-mute);
  font: 500 12.5px/1.5 var(--mono); letter-spacing: 0.06em;
}
.reel-tick { color: var(--accent); letter-spacing: 0.1em; }
.reel-caption p { margin: 0; color: var(--fg-dim); font-family: var(--sans); letter-spacing: -0.005em; font-size: 14px; }

@media (max-width: 640px) {
  .reel-corners { inset: 12px; }
  .reel-corners span { width: 12px; height: 12px; }
  .reel-meta { top: 14px; left: 16px; right: 16px; font-size: 10px; }
  .reel-controls { left: 14px; right: 14px; bottom: 14px; padding: 8px 12px; gap: 10px; }
}

/* ===================== Intro splash ===================== */
.intro {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 9999;
  background: oklch(0.06 0.012 260);
  overflow: hidden;
  animation: intro-in .35s ease-out;
}
@keyframes intro-in { from { opacity: 0; } to { opacity: 1; } }
.intro.is-exiting {
  opacity: 0;
  transform: scale(1.03);
  transition: opacity .55s ease, transform .65s cubic-bezier(.4,.0,.2,1);
  pointer-events: none;
}
.intro-video {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}
.intro-vignette {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background:
    radial-gradient(120% 90% at 50% 50%, transparent 50%, oklch(0 0 0 / 0.55) 100%),
    linear-gradient(180deg, oklch(0 0 0 / 0.45) 0%, transparent 18%, transparent 72%, oklch(0 0 0 / 0.6) 100%);
}

/* Registration corners */
.intro-frame {
  position: absolute; inset: 28px; pointer-events: none; z-index: 3;
}
.intro-frame span {
  position: absolute; width: 24px; height: 24px;
  border: 1px solid oklch(1 0 0 / 0.55);
}
.intro-frame span:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.intro-frame span:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.intro-frame span:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.intro-frame span:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; }

/* UI layer — flex column, fills viewport so top/bottom are at viewport edges */
.intro-ui {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column;
  justify-content: space-between;
  padding: 36px 44px;
  pointer-events: none;
}
.intro-ui > * { pointer-events: auto; }

.intro-top {
  display: flex; align-items: center; justify-content: space-between;
  color: oklch(1 0 0 / 0.92);
}
.intro-top .brand { font-size: 18px; }
.intro-top .brand-mark { box-shadow: 0 0 0 1px oklch(1 0 0 / 0.3), 0 6px 20px var(--accent-glow); }
.intro-id {
  font: 500 11.5px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase;
  color: oklch(1 0 0 / 0.7);
  text-shadow: 0 1px 2px oklch(0 0 0 / 0.6);
}

.intro-bottom {
  display: flex; align-items: center; justify-content: space-between;
}
.intro-tag {
  font: 500 11.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
  color: oklch(1 0 0 / 0.75);
  display: inline-flex; align-items: center; gap: 10px;
  text-shadow: 0 1px 2px oklch(0 0 0 / 0.6);
}
.intro-tag::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
  animation: pulse 2.2s ease-in-out infinite;
}

.intro-skip {
  display: inline-flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 18px;
  border-radius: 999px;
  background: oklch(1 0 0 / 0.08);
  border: 1px solid oklch(1 0 0 / 0.18);
  color: oklch(1 0 0 / 0.95);
  font: 500 13px/1 var(--sans); letter-spacing: -0.005em;
  cursor: pointer;
  backdrop-filter: blur(10px) saturate(140%);
  transition: background .15s ease, transform .15s ease, border-color .15s ease;
}
.intro-skip:hover {
  background: oklch(1 0 0 / 0.18);
  border-color: oklch(1 0 0 / 0.3);
  transform: translateY(-1px);
}
.intro-skip .arrow {
  width: 18px; height: 18px; border-radius: 50%;
  background: oklch(1 0 0 / 0.15);
  display: inline-grid; place-items: center; font-size: 11px;
}

@media (max-width: 640px) {
  .intro-ui { padding: 22px; }
  .intro-frame { inset: 16px; }
  .intro-frame span { width: 16px; height: 16px; }
  .intro-top .brand b { font-size: 16px; }
  .intro-id { display: none; }
}

/* ===================== Google reCAPTCHA ===================== */
.captcha {
  min-height: 78px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.captcha-widget {
  min-height: 78px;
  display: flex;
  align-items: center;
}
.captcha-status,
.captcha-config,
.captcha-message {
  margin: 0;
  color: var(--fg-mute);
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0;
}
.captcha-config {
  width: 100%;
  min-height: 74px;
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: oklch(0.14 0.014 260 / 0.7);
  color: var(--warn);
}
.captcha-message {
  margin-top: -8px;
  color: var(--warn);
}

@media (max-width: 480px) {
  .captcha {
    transform: scale(0.9);
    transform-origin: left center;
    width: 111%;
  }
}

/* ===================== Contact modal ===================== */
.modal-scrim {
  position: fixed; inset: 0; z-index: 200;
  background: oklch(0.08 0.012 260 / 0.7);
  backdrop-filter: blur(8px) saturate(120%);
  display: grid; place-items: center;
  padding: 24px;
  animation: scrim-in .2s ease-out;
}
@keyframes scrim-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  position: relative;
  width: 100%; max-width: 520px;
  background: linear-gradient(180deg, oklch(0.22 0.014 260), oklch(0.17 0.014 260));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 40px 40px 32px;
  box-shadow:
    0 1px 0 oklch(1 0 0 / 0.06) inset,
    0 40px 100px -20px oklch(0 0 0 / 0.7),
    0 0 0 1px oklch(1 0 0 / 0.02);
  animation: modal-in .25s cubic-bezier(.2,.8,.2,1);
  max-height: calc(100vh - 48px); overflow-y: auto;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  background: oklch(0.26 0.014 260); border: 1px solid var(--line);
  color: var(--fg-dim); font-size: 18px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
  transition: background .15s ease, color .15s ease;
}
.modal-close:hover { background: oklch(0.32 0.014 260); color: var(--fg); }

.modal-eyebrow {
  font: 500 11.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.modal-title {
  margin: 0 0 10px; font-weight: 500; font-size: 34px;
  letter-spacing: -0.03em; line-height: 1.05; text-wrap: balance;
}
.modal-title em { font-family: var(--serif); font-style: italic; color: var(--accent); font-weight: 400; }
.modal-sub {
  margin: 0 0 28px; color: var(--fg-dim); font-size: 14.5px; line-height: 1.5;
}

.modal-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font: 500 12px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-mute);
}
.field label .opt { text-transform: none; letter-spacing: 0; color: var(--fg-mute); font-weight: 400; }
.field input, .field textarea {
  width: 100%;
  background: oklch(0.14 0.014 260 / 0.7);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--fg);
  font: 400 14.5px/1.4 var(--sans);
  letter-spacing: -0.005em;
  outline: none;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
  resize: none;
  font-family: var(--sans);
}
.field textarea { min-height: 96px; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--fg-mute); }
.field input:focus, .field textarea:focus {
  border-color: var(--accent);
  background: oklch(0.16 0.014 260 / 0.9);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.modal-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 10px;
}
.modal-actions .btn { height: 44px; padding: 0 18px; }
.modal-actions .btn[disabled] {
  opacity: 0.45; cursor: not-allowed; transform: none !important;
}

.modal-success {
  text-align: center; padding: 20px 8px 8px;
}
.modal-success h3 {
  margin: 18px 0 6px; font-weight: 500; font-size: 28px;
  letter-spacing: -0.02em;
}
.modal-success p { margin: 0; color: var(--fg-dim); font-size: 15px; line-height: 1.5; }
.modal-success-mark {
  width: 56px; height: 56px; border-radius: 50%;
  margin: 0 auto;
  background: oklch(0.78 0.14 155 / 0.16);
  border: 1px solid oklch(0.78 0.14 155 / 0.4);
  color: var(--good);
  display: grid; place-items: center;
  font-size: 26px; line-height: 1;
  box-shadow: 0 0 0 8px oklch(0.78 0.14 155 / 0.08);
}
