:root {
  --bg: #0a0a0a;
  --bg-soft: #111111;
  --surface: #161616;
  --surface-2: #1e1e1e;
  --text: #e8e4e0;
  --muted: #999999;
  --faint: rgba(232, 228, 224, 0.38);
  --line: #272727;
  --line-strong: #404040;
  --accent: #c8372d;
  --accent-2: #e04438;
  --tech: #cfd8d8;
  --font-display: "Inter Tight", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(232,228,224,.045) 1px, transparent 1px) 0 0 / 9.5vw 100%,
    radial-gradient(circle at 78% 16%, rgba(200, 55, 45, 0.16), transparent 30rem),
    linear-gradient(180deg, #0a0a0a 0%, #0d0d0d 48%, #050505 100%);
  color: var(--text);
  font-family: var(--font-display);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 100% 4px;
  opacity: .22;
  mix-blend-mode: soft-light;
  z-index: 20;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem clamp(1rem, 3vw, 3rem);
  color: rgba(242, 245, 244, .86);
  background: linear-gradient(180deg, rgba(7, 9, 10, .84), rgba(7, 9, 10, .38) 72%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 1.6rem;
  height: 1.6rem;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
}

.site-nav nav {
  display: flex;
  align-items: center;
  gap: clamp(.8rem, 2.2vw, 2rem);
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.site-nav nav a {
  color: var(--muted);
  transition: color .3s var(--ease);
}

.site-nav nav a:hover,
.site-nav nav a:focus-visible,
.footer a:hover,
.text-link:hover {
  color: var(--accent-2);
}

main {
  position: relative;
  z-index: 1;
}

.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(22rem, .82fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(7rem, 12vw, 10rem) clamp(1rem, 4vw, 5rem) clamp(4rem, 8vw, 7rem);
}

.hero-copy {
  max-width: 54rem;
}

.context,
.work-type,
.step span {
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .18em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--accent);
}

.context {
  position: relative;
  margin: 0 0 1.3rem;
  padding-top: .9rem;
}

.context::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3rem;
  height: 3px;
  background: var(--accent);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 12ch;
  font-size: clamp(4.4rem, 11.5vw, 12rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: .86;
  text-transform: uppercase;
}

.hero-text {
  max-width: 44rem;
  margin-top: 2rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.7vw, 1.45rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  padding: 0 1.1rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: transform .35s var(--ease), background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--text);
  color: #050607;
  border-color: var(--text);
}

.button.secondary {
  color: var(--text);
  background: rgba(255,255,255,.035);
}

.button.secondary:hover {
  border-color: var(--accent);
}

.line-link {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  min-height: 2.5rem;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  transition: color .3s var(--ease), transform .3s var(--ease);
}

.line-link span {
  width: 2.4rem;
  height: 2px;
  background: var(--accent);
  transition: width .3s var(--ease), background .3s var(--ease);
}

.line-link:hover,
.line-link:focus-visible {
  color: var(--accent-2);
  transform: translateX(2px);
}

.line-link:hover span,
.line-link:focus-visible span {
  width: 3.2rem;
  background: var(--accent-2);
}

.muted-link {
  color: var(--muted);
}

.dark-link {
  color: #0a0a0a;
}

.dark-link span {
  background: #0a0a0a;
}

.tech-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 2.2rem;
  max-width: 44rem;
}

.tech-strip span {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 1px solid rgba(232, 228, 224, .2);
  padding: .45rem .58rem;
  color: rgba(232, 228, 224, .64);
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.tech-strip svg,
.cue-icon {
  width: 1rem;
  height: 1rem;
  color: var(--accent);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.reel-stack {
  position: relative;
  min-height: clamp(38rem, 78vh, 52rem);
  isolation: isolate;
}

.reel-frame {
  position: absolute;
  overflow: hidden;
  background: #0b0f11;
  border: 1px solid var(--line-strong);
  box-shadow: 0 2rem 6rem rgba(0,0,0,.45);
}

.reel-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,.08);
  pointer-events: none;
}

.reel-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.main-frame {
  inset: 1rem auto auto 17%;
  width: min(56vw, 25rem);
  aspect-ratio: 9 / 16;
  z-index: 2;
  outline: 1px solid rgba(200,55,45,.48);
  outline-offset: .55rem;
}

.side-frame {
  width: min(34vw, 15rem);
  aspect-ratio: 9 / 16;
  opacity: .66;
  filter: saturate(.82) contrast(1.08);
}

.side-frame.top {
  top: 4.5rem;
  right: 0;
}

.side-frame.bottom {
  left: 0;
  bottom: 2rem;
}

.research,
.proof,
.pipeline {
  padding: clamp(4rem, 8vw, 8rem) clamp(1rem, 4vw, 5rem);
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(18rem, .55fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: end;
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
}

.section-head h2,
.rate h2 {
  font-size: clamp(2.8rem, 7.5vw, 7.2rem);
  font-weight: 700;
  line-height: .86;
  letter-spacing: 0;
}

.section-head p,
.rate p {
  color: var(--muted);
  font-size: clamp(1rem, 1.45vw, 1.25rem);
  line-height: 1.65;
}

.research-grid,
.work-list {
  border-top: 1px solid var(--line-strong);
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.research-grid article {
  min-height: 24rem;
  padding: clamp(1.35rem, 2.6vw, 2.4rem);
  border-right: 1px solid var(--line);
}

.research-grid article:last-child {
  border-right: 0;
}

.research-grid span {
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}

.research-grid .cue-icon,
.step .cue-icon {
  width: 1.35rem;
  height: 1.35rem;
  margin-bottom: 1.2rem;
}

.research-grid h3 {
  margin-top: 1rem;
  font-size: clamp(1.7rem, 2.7vw, 3rem);
  font-weight: 700;
  line-height: .94;
  letter-spacing: -0.04em;
}

.research-grid p {
  margin-top: 1rem;
  color: var(--muted);
  font-size: clamp(.96rem, 1.15vw, 1.08rem);
  line-height: 1.65;
}

.work-row {
  display: grid;
  grid-template-columns: minmax(12rem, 24rem) minmax(0, 1fr);
  gap: clamp(1.25rem, 4vw, 4rem);
  align-items: center;
  padding: clamp(1.4rem, 4vw, 3rem) 0;
  border-bottom: 1px solid var(--line);
}

.work-row.featured {
  background: linear-gradient(90deg, rgba(200,55,45,.1), transparent 52%);
}

.work-media {
  display: block;
  width: min(100%, 16rem);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.work-media.wide {
  width: min(100%, 24rem);
  aspect-ratio: 21 / 9;
}

.work-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease), filter .8s var(--ease);
}

.work-media:hover video {
  transform: scale(1.035);
  filter: saturate(1.06);
}

.sample-row {
  grid-template-columns: minmax(18rem, 32rem) minmax(0, 1fr);
}

.sample-grid {
  display: grid;
  grid-template-columns: 1.25fr .85fr;
  grid-template-rows: repeat(2, minmax(7rem, 1fr));
  gap: .45rem;
  width: min(100%, 32rem);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  padding: .45rem;
}

.sample-grid img {
  width: 100%;
  height: 100%;
  min-height: 7rem;
  object-fit: cover;
  filter: saturate(.86) contrast(1.05);
}

.sample-grid img:first-child {
  grid-row: span 2;
}

.work-copy {
  max-width: 58rem;
}

.work-copy h3,
.step h3 {
  margin-top: .75rem;
  font-size: clamp(2rem, 4.2vw, 4.4rem);
  font-weight: 700;
  line-height: .92;
  letter-spacing: -0.045em;
}

.work-copy p,
.step p {
  max-width: 46rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.16rem);
  line-height: 1.65;
}

.text-link {
  display: inline-flex;
  margin-top: 1.35rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.text-link::before {
  content: "";
  width: 2rem;
  height: 2px;
  margin: .42rem .65rem 0 0;
  background: var(--accent);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.step {
  min-height: 25rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-right: 1px solid var(--line);
}

.step:last-child {
  border-right: 0;
}

.step h3 {
  font-size: clamp(1.8rem, 3.2vw, 3.4rem);
}

.rate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: end;
  padding: clamp(4rem, 8vw, 8rem) clamp(1rem, 4vw, 5rem);
  border-top: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(200,55,45,.18), transparent 42%),
    var(--text);
  color: #0a0a0a;
}

.rate p {
  max-width: 54rem;
  margin-top: 1.4rem;
  color: rgba(10,10,10,.72);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem clamp(1rem, 4vw, 5rem);
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .05em;
}

.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .site-nav {
    position: absolute;
  }

  .site-nav nav {
    display: none;
  }

  .hero,
  .section-head,
  .work-row,
  .rate {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 6.5rem;
  }

  h1 {
    max-width: 9ch;
    font-size: clamp(4.2rem, 18vw, 7rem);
  }

  .reel-stack {
    min-height: 36rem;
    margin-top: 1rem;
  }

  .main-frame {
    left: 50%;
    width: min(68vw, 20rem);
    transform: translateX(-50%);
  }

  .side-frame {
    width: min(38vw, 11rem);
  }

  .work-media {
    width: min(64vw, 16rem);
  }

  .sample-row {
    grid-template-columns: 1fr;
  }

  .sample-grid {
    width: min(100%, 34rem);
  }

  .research-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .research-grid article {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .research-grid article:last-child {
    border-bottom: 0;
  }

  .step {
    min-height: 16rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .step:last-child {
    border-bottom: 0;
  }

  .footer {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  body {
    background:
      radial-gradient(circle at 80% 8%, rgba(200, 55, 45, 0.14), transparent 22rem),
      linear-gradient(180deg, #0a0a0a 0%, #0d0d0d 55%, #050505 100%);
  }

  .brand {
    font-size: .65rem;
    letter-spacing: .1em;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .reel-stack {
    min-height: 31rem;
  }

  .main-frame {
    width: min(74vw, 18rem);
  }

  .side-frame.top {
    right: -.4rem;
  }

  .side-frame.bottom {
    left: -.4rem;
  }

  .research,
  .proof,
  .pipeline,
  .rate {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .work-media {
    width: min(78vw, 15rem);
  }

  .sample-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(2, 8.5rem);
  }

  .sample-grid img:first-child {
    grid-row: span 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
