/* TITAN solutions — premium agency site */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter+Tight:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500&display=swap');

:root {
  --bg: #f6f4ef;
  --bg-2: #eeece5;
  --ink: #0e0d0b;
  --ink-dim: #6b6962;
  --ink-faint: #b8b5ac;
  --accent: #ff4a1c;
  --accent-2: #d93408;
  --line: rgba(14, 13, 11, 0.10);
  --line-strong: rgba(14, 13, 11, 0.22);
  --glass: rgba(14, 13, 11, 0.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  cursor: none;
}

body {
  min-height: 100vh;
  position: relative;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: none; border: none; background: none; color: inherit; }

.serif { font-family: 'Instrument Serif', serif; font-weight: 400; letter-spacing: -0.02em; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* ========== GRAIN OVERLAY ========== */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 3 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ========== CURSOR ========== */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s cubic-bezier(.2,.8,.2,1), height 0.3s cubic-bezier(.2,.8,.2,1), opacity 0.3s;
}
.cursor-ring.hover {
  width: 64px; height: 64px;
  border-color: var(--accent);
}

/* ========== LOADING ========== */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 32px 40px;
  transition: opacity 0.8s ease, transform 1s cubic-bezier(.76,0,.24,1);
}
#loader.done {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}
.loader-mark {
  font-family: 'Instrument Serif', serif;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.loader-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.loader-word {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(64px, 14vw, 200px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  overflow: hidden;
}
.loader-word span {
  display: inline-block;
  transform: translateY(110%);
  animation: loader-rise 1.1s cubic-bezier(.76,0,.24,1) forwards;
}
@keyframes loader-rise { to { transform: translateY(0); } }
.loader-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}
.loader-bar {
  position: absolute;
  bottom: 0; left: 0;
  height: 1px;
  background: var(--accent);
  width: 0%;
  transition: width 0.1s linear;
}
.loader-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ========== NAV ========== */
nav.top {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 24px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: rgba(246, 244, 239, 0.96);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid rgba(14,13,11,0.06);
}
.logo {
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.logo small {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
}
.logo-dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin: 0 2px 2px 2px;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}
nav.top ul {
  list-style: none;
  display: flex;
  gap: 28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink);
}
nav.top ul li a { display: inline-flex; gap: 6px; align-items: baseline; }
nav.top ul li a::before {
  content: attr(data-num);
  color: var(--accent);
  font-size: 9px;
  opacity: 0.8;
}
.nav-cta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.nav-cta:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.nav-cta .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

/* ========== HERO ========== */
section.hero {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 780px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 0;
  background: var(--bg);
  --hero-blur: 0;
  filter: blur(calc(var(--hero-blur) * 10px));
  opacity: calc(1 - var(--hero-blur) * 0.78);
  transform: scale(calc(1 - var(--hero-blur) * 0.02));
  transition: filter 0.25s linear, opacity 0.25s linear, transform 0.25s linear;
}
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 40px;
  pointer-events: none;
}
.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
  margin-bottom: 24px;
  display: inline-flex;
  gap: 10px;
  align-items: center;
}
.hero-eyebrow::before, .hero-eyebrow::after {
  content: '';
  width: 24px; height: 1px;
  background: var(--ink-faint);
}
h1.hero-title {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(72px, 14vw, 220px);
  line-height: 0.88;
  letter-spacing: -0.035em;
  margin-bottom: 28px;
}
h1.hero-title em {
  font-style: italic;
  color: var(--accent);
}
.hero-sub {
  font-size: 15px;
  max-width: 520px;
  margin: 0 auto;
  color: var(--ink-dim);
  line-height: 1.5;
}
.hero-sub strong { color: var(--ink); font-weight: 500; }

.hero-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  z-index: 3;
}
.hero-bottom .col { display: flex; flex-direction: column; gap: 6px; }
.hero-bottom .col strong { color: var(--ink); font-weight: 400; }
.scroll-hint {
  display: flex; align-items: center; gap: 8px;
}
.scroll-hint .arrow {
  display: inline-block;
  width: 20px; height: 1px;
  background: var(--ink);
  position: relative;
  animation: scroll-arrow 2s ease-in-out infinite;
}
.scroll-hint .arrow::after {
  content: ''; position: absolute; right: 0; top: -3px;
  width: 6px; height: 6px; border-right: 1px solid var(--ink); border-top: 1px solid var(--ink);
  transform: rotate(135deg);
}
@keyframes scroll-arrow {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(4px); opacity: 0.5; }
}

/* readouts in hero corners */
.hero-readout {
  position: absolute;
  z-index: 3;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  line-height: 1.6;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
}
.hero-readout.tl { top: 96px; left: 40px; }
.hero-readout.tr { top: 96px; right: 40px; text-align: right; }
.hero-readout .label { color: var(--ink-faint); }
.hero-readout .val { color: var(--ink); font-variant-numeric: tabular-nums; }
.hero-readout .val.accent { color: var(--accent); }

/* ========== TICKER ========== */
.ticker {
  position: relative;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg);
}
.ticker-track {
  display: flex;
  gap: 60px;
  white-space: nowrap;
  animation: ticker 40s linear infinite;
  font-family: 'Instrument Serif', serif;
  font-size: 42px;
  letter-spacing: -0.02em;
}
.ticker-track span { display: inline-flex; align-items: center; gap: 40px; }
.ticker-track em { font-style: italic; color: var(--accent); }
.ticker-track .sep {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--ink-faint);
}
@keyframes ticker { to { transform: translateX(-50%); } }

/* ========== SCROLL STACK (hero pin + process/services overlay) ========== */
.scroll-stack {
  position: relative;
}

/* hero dim now driven by --hero-blur custom property (set from scroll JS) */

/* ========== MANIFEST ========== */
section.manifest {
  position: relative;
  padding: 100px 40px 100px;
  border-bottom: 1px solid var(--line);
}
.sec-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  margin-bottom: 60px;
  align-items: start;
}
.sec-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.sec-num::before {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
}
.sec-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
}
.manifest-body {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(40px, 6vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 1600px;
}
.manifest-body .word {
  display: inline-block;
  overflow: hidden;
  padding: 0 0.02em;
}
.manifest-body .word span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.9s cubic-bezier(.2,.8,.2,1);
}
.manifest-body.in .word span { transform: translateY(0); }
.manifest-body em { font-style: italic; color: var(--accent); }
.manifest-body .dim { color: var(--ink-faint); }

.manifest-stats {
  margin-top: 200px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 60px;
  border-top: 1px solid var(--line);
  padding-top: 60px;
}
.stat .num {
  font-family: 'Instrument Serif', serif;
  font-size: 96px;
  line-height: 1;
  letter-spacing: -0.03em;
}
.stat .num em { font-style: italic; color: var(--accent); }
.stat .lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  margin-top: 14px;
}

/* ========== PROCESS ========== */
section.process-wrap {
  position: relative;
  height: 200vh;  /* was 340vh — 6 steps in 2× viewport, not 3.4× */
  z-index: 2;
}
.process-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 80px 40px 40px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  filter: blur(24px);
  transition: opacity 0.8s cubic-bezier(.2,.8,.2,1), filter 0.8s cubic-bezier(.2,.8,.2,1);
}
.process-pin.revealed {
  opacity: 1;
  filter: blur(0);
}
.process-head {
  margin-bottom: 40px;
  flex: 0 0 auto;
}
.process-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  flex: 1 1 auto;
  min-height: 0;
}
.process-canvas-holder {
  position: relative;
  min-height: 0;
}
#process-canvas {
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: radial-gradient(ellipse at center, rgba(255,74,28,0.04), transparent 70%);
  display: block;
}
.process-stage {
  position: relative;
  overflow: hidden;
  min-height: 0;
}
.process-steps {
  position: relative;
  left: 0; right: 0;
  top: 0;
  display: flex;
  flex-direction: column;
}
.p-step {
  border-top: 1px solid var(--line);
  padding: 12px 0;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  position: relative;
  opacity: 0.35;
  transition: opacity 0.45s cubic-bezier(.2,.8,.2,1), padding 0.45s cubic-bezier(.2,.8,.2,1);
}
/* compact dim steps — only num + title, hide description + meta */
.p-step:not(.active) p,
.p-step:not(.active) .p-meta {
  display: none;
}
.p-step:not(.active) h3 {
  margin-bottom: 0;
}
.p-step:last-child { border-bottom: 1px solid var(--line); }
.p-step.active { opacity: 1; padding-left: 16px; }
.p-step.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--accent);
}
.p-step .p-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-dim);
  padding-top: 6px;
}
.p-step.active .p-num { color: var(--accent); }
.p-step h3 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.p-step p {
  color: var(--ink-dim);
  font-size: 13px;
  line-height: 1.5;
  max-width: 520px;
}
.p-step .p-meta {
  margin-top: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  display: flex; gap: 16px;
}

/* ========== SERVICES (horizontal scroll) ========== */
section.services {
  position: relative;
  z-index: 3;
  margin-top: -40vh;  /* overlay last part of process-wrap — stacking, not gap */
}
.services-head {
  padding: 40px 40px 80px;  /* was 200px top / 120px bottom — eliminate dead space */
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: end;
  opacity: 0;
  filter: blur(24px);
  transition: opacity 0.8s cubic-bezier(.2,.8,.2,1), filter 0.8s cubic-bezier(.2,.8,.2,1);
}
.services-head.revealed {
  opacity: 1;
  filter: blur(0);
}
.services-head h2 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(56px, 9vw, 140px);
  line-height: 0.92;
  letter-spacing: -0.03em;
}
.services-head h2 em { font-style: italic; color: var(--accent); }
.services-head p {
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.6;
  max-width: 460px;
}
/* Services — native horizontal scroll (user drags slider, NOT hijacked by wheel) */
.services-horizontal {
  height: auto;
  position: relative;
  padding-bottom: 80px;
}
.services-sticky {
  position: relative;
  top: auto;
  height: auto;
  display: block;
  opacity: 1;
  filter: none;
}
.services-sticky.revealed { opacity: 1; filter: none; }
.services-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 0 40px;
  overflow: visible;
}
@media (max-width: 1100px) { .services-track { grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 0 20px; } }
@media (max-width: 560px)  { .services-track { grid-template-columns: 1fr; } }
.services-progress, .services-idx { display: none !important; }
.svc-card {
  width: 100%;
  min-height: 480px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(14,13,11,0.02), rgba(14,13,11,0));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s, background 0.4s;
}
.svc-shape { height: 140px !important; }
.svc-shape canvas { height: 140px !important; }
.svc-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,74,28,0.08), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.svc-card:hover::before { opacity: 1; }
.svc-card:hover { border-color: rgba(255,74,28,0.35); }
.svc-top { display: flex; justify-content: space-between; align-items: start; }
.svc-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
}
.svc-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
}
.svc-shape {
  width: 100%;
  height: 220px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.svc-shape canvas { display: block; }
.svc-bottom h3 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  min-height: 2.15em;
}
.svc-bottom h3 em { font-style: italic; color: var(--accent); display: block; }
.svc-bottom p {
  color: var(--ink-dim);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 20px;
}
.svc-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.svc-list span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}
.services-progress {
  position: absolute;
  bottom: 40px; left: 40px; right: 40px;
  height: 1px;
  background: var(--line);
}
.services-progress .bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
}
.services-idx {
  position: absolute;
  bottom: 52px; right: 40px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.1em;
}

/* ========== CASE STUDIES ========== */
section.cases {
  padding: 100px 0 80px;
  border-bottom: 1px solid var(--line);
}
.cases-head {
  padding: 0 40px 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: end;
}
.cases-head h2 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(56px, 9vw, 140px);
  line-height: 0.92;
  letter-spacing: -0.03em;
}
.cases-head h2 em { font-style: italic; color: var(--accent); }
.cases-head .aside {
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.6;
  max-width: 360px;
}
.case-list { display: flex; flex-direction: column; }
.case-row {
  border-top: 1px solid var(--line);
  padding: 36px 40px;
  display: grid;
  grid-template-columns: 60px 1.4fr 1fr 1fr 180px;
  gap: 40px;
  align-items: center;
  position: relative;
  transition: background 0.5s;
  cursor: none;
}
.case-row { padding: 48px 40px; }
.case-row:last-child { border-bottom: 1px solid var(--line); }
.case-row:hover { background: rgba(14,13,11,0.03); }
.case-row .c-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-faint);
}
.case-row h3 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -0.02em;
  transition: transform 0.5s cubic-bezier(.2,.8,.2,1);
}
.case-row:hover h3 { transform: translateX(8px); }
.case-row h3 em { font-style: italic; color: var(--accent); }
.case-row .c-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.case-row .c-tags span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
}
.case-row .c-metric {
  font-family: 'Instrument Serif', serif;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.015em;
}
.case-row .c-metric em { font-style: italic; color: var(--accent); }
.case-row .c-metric small {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  margin-top: 6px;
}
.case-row .c-cta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink);
  display: inline-flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}
.case-row .c-cta .arrow {
  display: inline-block;
  width: 20px; height: 1px;
  background: var(--ink);
  position: relative;
  transition: width 0.4s;
}
.case-row:hover .c-cta .arrow { width: 40px; background: var(--accent); }
.case-row .c-cta .arrow::after {
  content: ''; position: absolute; right: 0; top: -3px;
  width: 6px; height: 6px; border-right: 1px solid currentColor; border-top: 1px solid currentColor;
  transform: rotate(45deg);
}

/* preview that appears on hover */
.case-preview {
  position: fixed;
  top: 0; left: 0;
  width: 360px;
  height: 240px;
  border-radius: 4px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  z-index: 50;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.3s, transform 0.4s cubic-bezier(.2,.8,.2,1);
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
}
.case-preview.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.case-preview .ph {
  width: 100%; height: 100%;
  background-size: cover; background-position: center;
  position: relative;
}

/* ========== CLIENTS ========== */
section.clients {
  padding: 80px 40px;
  border-bottom: 1px solid var(--line);
}
.clients-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  margin-bottom: 60px;
  align-items: end;
}
.clients-head h2 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(40px, 6vw, 80px);
  line-height: 0.92;
  letter-spacing: -0.025em;
}
.clients-head h2 em { font-style: italic; color: var(--accent); }
.client-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.client-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  aspect-ratio: 2 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-dim);
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  letter-spacing: -0.01em;
  transition: color 0.3s, background 0.3s;
  position: relative;
}
.client-cell:hover { color: var(--ink); background: rgba(14,13,11,0.03); }
.client-cell.mono { font-family: 'JetBrains Mono', monospace; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; }

/* awards strip */
.awards {
  margin-top: 140px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 60px;
}
.award {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.award .yr {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.12em;
}
.award h4 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-top: 8px;
}
.award small {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 10px;
  display: block;
}

/* ========== CTA / CONTACT ========== */
section.cta {
  padding: 100px 40px 60px;
  position: relative;
  overflow: hidden;
}
#cta-canvas {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 72vh;
  width: 100%;
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
  mask-image: linear-gradient(180deg, #000 0%, #000 65%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 65%, transparent 100%);
}
.cta-inner {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
}
.cta-inner h2 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(72px, 13vw, 220px);
  line-height: 0.9;
  letter-spacing: -0.035em;
  margin-bottom: 40px;
}
.cta-inner h2 em { font-style: italic; color: var(--accent); }
.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  margin-top: 220px;
  border-top: 1px solid var(--line);
  padding-top: 80px;
}
.cta-form .field {
  margin-bottom: 28px;
  position: relative;
}
.cta-form label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  margin-bottom: 10px;
}
.cta-form label span { color: var(--accent); }
.cta-form input, .cta-form textarea, .cta-form select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink);
  padding: 10px 0;
  font-family: inherit;
  font-size: 18px;
  outline: none;
  transition: border-color 0.3s;
}
.cta-form input:focus, .cta-form textarea:focus, .cta-form select:focus {
  border-color: var(--accent);
}
.cta-form textarea { resize: none; min-height: 80px; }
.budget-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-dim);
  cursor: none;
  transition: all 0.3s;
}
.chip:hover, .chip.on {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.submit-btn {
  margin-top: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 20px 28px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  display: inline-flex;
  gap: 12px;
  align-items: center;
  transition: all 0.3s;
  cursor: none;
}
.submit-btn:hover { background: var(--accent); color: #000; }
.submit-btn .dot {
  width: 6px; height: 6px; background: currentColor; border-radius: 50%;
}

.cta-info { display: flex; flex-direction: column; gap: 40px; }
.cta-info .block .lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  margin-bottom: 10px;
}
.cta-info .block .val {
  font-family: 'Instrument Serif', serif;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.cta-info .block .val em { font-style: italic; color: var(--accent); }

/* ========== FOOTER ========== */
footer {
  position: relative;
  padding: 40px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.footer-giant {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(100px, 22vw, 360px);
  line-height: 0.85;
  letter-spacing: -0.05em;
  margin: 40px 0 80px;
  text-align: center;
  position: relative;
}
.footer-giant em { font-style: italic; color: var(--accent); }
.footer-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 40px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.footer-bottom .col h5 { color: var(--ink-faint); margin-bottom: 12px; font-weight: 400; }
.footer-bottom .col ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.footer-bottom .col a { color: var(--ink-dim); transition: color 0.3s; }
.footer-bottom .col a:hover { color: var(--accent); }

/* ========== TWEAKS PANEL ========== */
#tweaks {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 9999;
  width: 280px;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink);
  display: none;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1), opacity 0.4s;
}
#tweaks.open { display: block; }
#tweaks.in { transform: translateY(0); opacity: 1; }
#tweaks .tw-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  font-size: 10px;
}
#tweaks .tw-head strong { color: var(--accent); font-weight: 400; }
#tweaks .tw-row { margin-bottom: 16px; }
#tweaks .tw-label {
  display: block;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  font-size: 10px;
}
#tweaks .seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}
#tweaks .seg button {
  padding: 8px 4px;
  font-family: inherit;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  border-radius: 2px;
  transition: all 0.25s;
  cursor: none;
}
#tweaks .seg button.on {
  background: var(--accent);
  color: #000;
}
#tweaks input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  background: transparent;
  cursor: none;
}
#tweaks input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  background: var(--line-strong);
}
#tweaks input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  background: var(--accent);
  border-radius: 50%;
  margin-top: -6px;
}
#tweaks .tw-hint {
  font-size: 9px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
}

/* ==================================================================
   MOBILE — under 768px. Desktop layout untouched.
   ================================================================== */
@media (max-width: 768px) {
  html, body { cursor: auto; }

  /* hide custom cursor on mobile (touch already hides, this is failsafe) */
  .cursor-dot, .cursor-ring { display: none !important; }
  .grain { opacity: 0.03; }

  /* ===== NAV: collapse to logo + CTA only ===== */
  nav.top {
    padding: 12px 18px;
    background: rgba(246, 244, 239, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
  }
  nav.top ul { display: none; }
  .logo { font-size: 16px; }
  .logo small { display: none; }
  .nav-cta {
    padding: 8px 14px;
    font-size: 10px;
    letter-spacing: 0.08em;
  }
  .nav-cta .dot { width: 5px; height: 5px; }

  /* ===== LOADER ===== */
  #loader { padding: 20px; }
  .loader-mark { font-size: 11px; }
  .loader-center { width: calc(100% - 40px); }

  /* ===== HERO ===== */
  /* disable sticky on mobile — scroll-stack overlay is too heavy */
  section.hero {
    position: relative;
    top: auto;
    min-height: 100svh;
    height: auto;
    padding: 100px 20px 40px;
  }
  .hero-readout.tl {
    top: 70px;
    left: 18px;
    right: 18px;
    font-size: 9px;
    opacity: 0.8;
  }
  .hero-readout.tl div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hero-readout.tr { display: none; }

  .hero-content { padding: 0; max-width: 100%; }
  .hero-eyebrow { font-size: 10px; margin-bottom: 24px; }
  .hero-title {
    font-size: clamp(48px, 14vw, 72px) !important;
    line-height: 0.95;
  }
  .hero-sub {
    font-size: 15px;
    line-height: 1.55;
    margin-top: 24px;
  }

  section.hero { flex-direction: column; align-items: flex-start; justify-content: flex-start; }
  .hero-eyebrow { margin-top: 60px; }
  .hero-bottom {
    position: static;
    width: 100%;
    margin-top: 40px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
    text-align: left !important;
    font-size: 10px;
  }
  .hero-bottom .col { text-align: left !important; }
  .hero-bottom .scroll-hint { display: none; }

  /* ===== KILL SCROLL-STACK OVERLAY ON MOBILE ===== */
  .scroll-stack { display: block; }
  section.hero {
    --hero-blur: 0 !important;
    filter: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .process-pin, .services-sticky, .services-head {
    opacity: 1 !important;
    filter: none !important;
  }

  /* ===== TICKER ===== */
  .ticker-track { font-size: 24px; gap: 32px; }
  .ticker-track span { gap: 20px; }
  .ticker-track .sep { width: 6px; height: 6px; }

  /* ===== MANIFEST ===== */
  section.manifest {
    padding: 100px 20px 100px;
  }
  .sec-head {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 48px;
  }
  .sec-num { font-size: 10px; }
  .sec-label { font-size: 11px; }
  .manifest-body {
    font-size: clamp(28px, 8vw, 40px);
    line-height: 1.1;
  }
  .manifest-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 80px;
    padding-top: 40px;
  }
  .manifest-stats .stat .num { font-size: 48px; }
  .manifest-stats .stat .lbl { font-size: 10px; }

  /* ===== PROCESS ===== */
  /* disable 700vh sticky pin on mobile — use normal vertical flow */
  section.process-wrap {
    height: auto;
    padding: 80px 0 60px;
  }
  .process-pin {
    position: relative;
    top: auto;
    height: auto;
    padding: 0 20px;
  }
  .process-head { margin-bottom: 32px; }
  .process-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .process-canvas-holder {
    display: none;
  }
  .process-stage {
    overflow: visible;
    height: auto;
  }
  .process-steps {
    position: relative;
    transform: none !important;
    top: auto;
  }
  .p-step {
    opacity: 1 !important;
    padding: 24px 0;
    grid-template-columns: 40px 1fr;
    gap: 12px;
  }
  .p-step.active { padding-left: 12px; }
  .p-step h3 { font-size: 26px; }
  .p-step p { font-size: 13px; }
  .p-step .p-meta {
    flex-direction: column;
    gap: 4px;
    font-size: 9px;
  }

  /* ===== SERVICES ===== */
  section.services { z-index: auto; }
  .services-head {
    grid-template-columns: 1fr;
    padding: 80px 20px 48px;
    gap: 20px;
  }
  .services-head h2 {
    font-size: clamp(44px, 12vw, 64px);
  }
  .services-head p { font-size: 14px; }

  /* on mobile, convert horizontal scroll → native horizontal swipe */
  .services-horizontal {
    height: auto;
    padding-bottom: 60px;
  }
  .services-sticky {
    position: relative;
    top: auto;
    height: auto;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px;
  }
  .services-track {
    transform: none !important;
    gap: 16px;
    padding: 0 20px;
  }
  .svc-card {
    width: 280px;
    height: auto;
    min-height: 420px;
    padding: 20px;
    scroll-snap-align: start;
  }
  .svc-shape { height: 140px; }
  .svc-shape canvas { height: 140px !important; }
  .svc-bottom h3 { font-size: 26px; }
  .svc-bottom p { font-size: 12px; margin-bottom: 14px; }
  .svc-list span { font-size: 9px; padding: 3px 8px; }
  .services-progress { display: none; }
  .services-idx {
    position: static;
    margin: 12px 20px 0;
    text-align: right;
    font-size: 10px;
  }

  /* ===== CASES ===== */
  section.cases {
    padding: 100px 0 80px;
  }
  .cases-head {
    grid-template-columns: 1fr;
    padding: 0 20px 60px;
    gap: 20px;
    align-items: start;
  }
  .cases-head h2 { font-size: clamp(44px, 12vw, 64px); }
  .cases-head .aside { font-size: 13px; }
  .case-row {
    grid-template-columns: 40px 1fr;
    grid-template-areas:
      "num title"
      ".   tags"
      ".   metric"
      ".   cta";
    gap: 12px 12px;
    padding: 28px 20px;
  }
  .case-row .c-num { grid-area: num; font-size: 10px; }
  .case-row h3 { grid-area: title; font-size: 28px; line-height: 1; }
  .case-row .c-tags { grid-area: tags; flex-wrap: wrap; gap: 6px; }
  .case-row .c-tags span { font-size: 9px; }
  .case-row .c-metric {
    grid-area: metric;
    display: flex;
    gap: 8px;
    align-items: baseline;
  }
  .case-row .c-metric em { font-size: 22px; }
  .case-row .c-metric small { font-size: 9px; }
  .case-row .c-cta { grid-area: cta; font-size: 10px; }

  /* ===== CLIENTS ===== */
  section.clients { padding: 100px 20px; }
  .clients-head {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 48px;
    align-items: start;
  }
  .clients-head h2 { font-size: clamp(36px, 10vw, 52px); }
  .client-grid { grid-template-columns: repeat(3, 1fr); }
  .client-cell { font-size: 13px; }
  .client-cell.mono { font-size: 10px; letter-spacing: 0.06em; }

  .awards {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 80px;
  }
  .award { padding-top: 14px; }
  .award .yr { font-size: 9px; }
  .award h4 { font-size: 15px; }
  .award small { font-size: 10px; }

  /* ===== CTA ===== */
  section.cta { padding: 100px 20px 60px; }
  #cta-canvas {
    height: 45vh;
    opacity: 0.35;
  }
  .cta-inner h2 {
    font-size: clamp(48px, 14vw, 72px);
    margin-bottom: 24px;
  }
  .cta-inner p { font-size: 14px !important; }
  .cta-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    margin-top: 80px;
    padding-top: 40px;
  }
  .cta-form .field { margin-bottom: 20px; }
  .cta-form label { font-size: 9px; }
  .cta-form input, .cta-form textarea { font-size: 15px; padding: 10px 0; }
  .budget-chips { flex-wrap: wrap; gap: 6px; }
  .chip { font-size: 10px; padding: 6px 12px; }
  .submit-btn { padding: 14px 24px; font-size: 11px; width: 100%; justify-content: center; }
  .cta-info .block .val { font-size: 18px; }

  /* ===== FOOTER ===== */
  footer { padding: 24px 20px; }
  .footer-giant {
    font-size: clamp(80px, 28vw, 160px);
    letter-spacing: -0.04em;
  }
  .footer-bottom {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    padding-top: 32px;
  }
  .footer-bottom .col ul { font-size: 11px; }
  .footer-bottom .col h5 { font-size: 10px; }
}

/* extra tight ≤ 380px */
@media (max-width: 380px) {
  .hero-readout.tl { font-size: 8px; }
  .hero-title { font-size: clamp(40px, 13vw, 56px) !important; }
  .manifest-body { font-size: clamp(24px, 7.5vw, 32px); }
  .svc-card { width: 260px; min-height: 400px; }
  .client-grid { grid-template-columns: repeat(2, 1fr); }
  .awards { grid-template-columns: 1fr; }
}
