:root {
  color-scheme: light;
  --ink: #10141b;
  --muted: #667085;
  --paper: #f7f5f0;
  --paper-strong: #ffffff;
  --night: #0d1117;
  --line: rgba(16, 20, 27, 0.12);
  --sea: #0f766e;
  --clay: #df6b35;
  --sun: #f3b63f;
  --sky: #8ecae6;
  --accent: #df6b35;
  --nav-h: 68px;
  --shadow: 0 24px 70px rgba(16, 20, 27, 0.18);
  --page-progress: 0;
  --mx: 0.5;
  --my: 0.5;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

body::selection {
  background: rgba(223, 107, 53, 0.26);
}

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

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

button,
input,
textarea {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  translate: 0 -150%;
  background: var(--paper-strong);
  color: var(--ink);
  padding: 0.7rem 1rem;
  border-radius: 8px;
}

.skip-link:focus {
  translate: 0 0;
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 70;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: calc(var(--page-progress) * 100%);
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--sun), var(--sky));
  box-shadow: 0 0 18px rgba(243, 182, 63, 0.36);
}

.cursor-glow {
  position: fixed;
  left: calc(var(--mx) * 100vw);
  top: calc(var(--my) * 100vh);
  z-index: 1;
  width: 22rem;
  height: 22rem;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(142, 202, 230, 0.13), transparent 66%);
  mix-blend-mode: screen;
  pointer-events: none;
  opacity: 0.72;
  transform: translate3d(0, 0, 0);
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0 1.2rem;
  color: #fff;
  background: rgba(13, 17, 23, 0.52);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.nav-button {
  align-items: center;
}

.brand {
  display: inline-flex;
  justify-self: start;
  gap: 0.55rem;
  font-weight: 760;
  transform: translate3d(calc((var(--mx) - 0.5) * -0.45rem), 0, 0);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.nav-links {
  display: none;
  gap: 1.4rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
}

.nav-links a {
  padding: 0.4rem 0;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: #fff;
}

.nav-button {
  justify-self: end;
  display: inline-flex;
  min-height: 2.35rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.13);
  font-weight: 720;
}

.hero {
  height: 270svh;
  background: var(--night);
}

.hero-sticky {
  position: sticky;
  top: 0;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  align-items: center;
  padding: calc(var(--nav-h) + 2rem) 1.2rem 7rem;
  color: #fff;
  isolation: isolate;
  perspective: 1200px;
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media {
  inset: auto;
  left: -8rem;
  top: -8rem;
  width: calc(100% + 16rem);
  height: calc(100% + 16rem);
  max-width: none;
  object-fit: cover;
  object-position: 58% 54%;
  transform:
    translate3d(
      calc((var(--progress, 0) * -3rem) + ((var(--mx) - 0.5) * -1.8rem)),
      calc((var(--progress, 0) * -2rem) + ((var(--my) - 0.5) * -1.2rem)),
      0
    )
    scale(calc(1.18 - (var(--progress, 0) * 0.1)));
  filter:
    saturate(calc(1.12 - (var(--progress, 0) * 0.16)))
    contrast(1.05)
    brightness(calc(0.96 - (var(--progress, 0) * 0.08)));
  transform-origin: center;
  will-change: transform, filter;
}

.hero-shade {
  z-index: -1;
  background:
    radial-gradient(circle at calc(var(--mx) * 100%) calc(var(--my) * 100%), rgba(255, 255, 255, 0.18), transparent 22rem),
    linear-gradient(90deg, rgba(6, 8, 12, 0.72), rgba(6, 8, 12, 0.22) 54%, rgba(6, 8, 12, 0.58)),
    linear-gradient(0deg, rgba(6, 8, 12, 0.82), rgba(6, 8, 12, 0.08) 42%, rgba(6, 8, 12, 0.62));
}

.flight-hud {
  position: absolute;
  inset: calc(var(--nav-h) + 1.3rem) 1.2rem 1.2rem;
  z-index: -1;
  opacity: calc(0.16 + (var(--progress, 0) * 0.26));
  transform:
    translate3d(
      calc((var(--mx) - 0.5) * 1.4rem),
      calc((var(--my) - 0.5) * 1rem),
      0
    )
    scale(calc(1 + (var(--progress, 0) * 0.035)));
  pointer-events: none;
}

.flight-hud::before {
  content: "";
  position: absolute;
  inset: 16% 18%;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  mask-image: linear-gradient(90deg, transparent 8%, #000 18% 82%, transparent 92%);
}

.flight-hud::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(28rem, 54vw);
  aspect-ratio: 1;
  translate: -50% -50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.4rem rgba(255, 255, 255, 0.018);
}

.hud-corner,
.hud-axis,
.hud-readout {
  position: absolute;
}

.hud-corner {
  width: 3.7rem;
  height: 3.7rem;
  border-color: rgba(255, 255, 255, 0.8);
}

.hud-corner-tl {
  left: 0;
  top: 0;
  border-left: 1px solid;
  border-top: 1px solid;
}

.hud-corner-tr {
  right: 0;
  top: 0;
  border-right: 1px solid;
  border-top: 1px solid;
}

.hud-corner-bl {
  left: 0;
  bottom: 0;
  border-left: 1px solid;
  border-bottom: 1px solid;
}

.hud-corner-br {
  right: 0;
  bottom: 0;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.hud-axis {
  left: 50%;
  top: 50%;
  background: rgba(255, 255, 255, 0.62);
}

.hud-axis-x {
  width: min(22rem, 44vw);
  height: 1px;
  translate: -50% -50%;
}

.hud-axis-y {
  width: 1px;
  height: min(22rem, 44vw);
  translate: -50% -50%;
}

.hud-readout {
  bottom: 5.8rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.68rem;
  font-weight: 780;
  letter-spacing: 0;
}

.hud-readout-left {
  left: 0;
}

.hud-readout-right {
  right: 0;
}

.hero-content {
  width: min(100%, 760px);
  padding-top: 3rem;
  transform:
    translate3d(
      calc((var(--mx) - 0.5) * 0.9rem),
      calc((var(--progress, 0) * -5rem) + ((var(--my) - 0.5) * 0.5rem)),
      calc(var(--progress, 0) * 7rem)
    )
    rotateX(calc(var(--progress, 0) * 4deg));
  opacity: calc(1 - (var(--progress, 0) * 1.2));
  will-change: transform, opacity;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero h1 {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.05em;
  margin: 0;
  font-size: 3.8rem;
  line-height: 0.92;
  letter-spacing: 0;
}

.hero h1 span {
  display: inline-block;
  transform:
    translate3d(0, calc(var(--progress, 0) * -1.2rem), 0)
    scale(calc(1 - (var(--progress, 0) * 0.04)));
}

.hero h1 span + span {
  transform:
    translate3d(calc(var(--progress, 0) * 1.7rem), calc(var(--progress, 0) * -1.2rem), 0)
    scale(calc(1 - (var(--progress, 0) * 0.04)));
}

.hero-lead {
  max-width: 42rem;
  margin: 1.25rem 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.14rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.7rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.82rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 780;
  cursor: pointer;
  transition:
    transform 220ms ease,
    background 220ms ease,
    border-color 220ms ease;
}

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

.button-primary {
  background: #fff;
  color: var(--night);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #f0f4f8;
}

.button-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.16);
}

.hero-metrics {
  position: absolute;
  left: 1.2rem;
  right: 1.2rem;
  bottom: 1.15rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  opacity: calc(0.58 + (var(--progress, 0) * 0.42));
}

.hero-metrics span {
  min-height: 2.6rem;
  display: grid;
  place-items: center;
  padding: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  font-size: 0.86rem;
  font-weight: 700;
  transform: translate3d(0, calc((1 - var(--progress, 0)) * 0.8rem), 0);
}

.hero-peek {
  position: absolute;
  right: 1.2rem;
  bottom: 5.35rem;
  display: none;
  align-items: center;
  gap: 0.8rem;
  width: min(18rem, calc(100% - 2.4rem));
  min-height: 4.4rem;
  padding: 0.58rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(10, 13, 18, 0.58);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  transform:
    translate3d(calc((1 - var(--progress, 0)) * 1.2rem), 0, 0)
    rotateY(calc((var(--mx) - 0.5) * -5deg));
  transform-origin: right center;
}

.hero-peek strong,
.hero-peek small {
  display: block;
}

.hero-peek strong {
  font-size: 0.96rem;
}

.hero-peek small {
  margin-top: 0.12rem;
  color: rgba(255, 255, 255, 0.68);
}

.peek-thumb {
  flex: 0 0 4.4rem;
  align-self: stretch;
  border-radius: 6px;
  background: url("assets/images/showcase/bayonne-adour.jpg") center / cover;
}

.intro-section,
.portfolio-section,
.services-section,
.contact-section {
  width: min(1120px, calc(100% - 2.4rem));
  margin: 0 auto;
}

.intro-section {
  padding: 6rem 0 5rem;
}

.section-copy {
  max-width: 750px;
}

.section-copy-wide {
  max-width: 940px;
}

.section-copy h2,
.contact-copy h2,
.process-copy h2 {
  margin: 0;
  font-size: 2.3rem;
  line-height: 1.04;
  letter-spacing: 0;
}

.intro-grid {
  display: grid;
  gap: 1.1rem;
  margin-top: 2rem;
  color: #384150;
  font-size: 1.04rem;
}

.intro-grid p {
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.cinematic-section {
  height: 560svh;
  background: var(--night);
  color: #fff;
}

.cinematic-sticky {
  position: sticky;
  top: 0;
  min-height: 100svh;
  display: grid;
  align-items: end;
  padding: calc(var(--nav-h) + 1rem) 1.2rem 1.2rem;
  overflow: hidden;
  isolation: isolate;
  perspective: 1400px;
}

.shot-stack,
.shot {
  position: absolute;
  inset: 0;
}

.shot-stack {
  z-index: -2;
  background: #05080c;
}

.shot {
  margin: 0;
  inset: -3rem;
  opacity: 0;
  transform: scale(1.06);
  filter: saturate(0.85) brightness(0.74);
  will-change: opacity, transform;
}

.shot.is-active {
  opacity: 1;
  filter: saturate(1.05) brightness(0.9);
}

.shot img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transform: scale(calc(1.08 - (var(--shot-focus, 0) * 0.04)));
  will-change: transform;
}

.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 8, 12, 0.78), rgba(5, 8, 12, 0.1) 52%, rgba(5, 8, 12, 0.48)),
    linear-gradient(0deg, rgba(5, 8, 12, 0.7), rgba(5, 8, 12, 0.12) 45%, rgba(5, 8, 12, 0.2));
}

.shot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(105deg, transparent 0 44%, rgba(255, 255, 255, 0.22) 49%, transparent 55% 100%);
  opacity: calc(var(--shot-focus, 0) * 0.22);
  mix-blend-mode: screen;
  transform: translate3d(calc((var(--shot-focus, 0) - 0.5) * 10rem), 0, 0);
}

.story-panel {
  width: min(100%, 32rem);
  margin: 0;
  padding: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(10, 13, 18, 0.68);
  backdrop-filter: blur(20px);
  transform:
    translate3d(calc((1 - var(--story-in, 1)) * -1.2rem), calc((1 - var(--story-in, 1)) * 1.4rem), 0)
    rotateY(calc((1 - var(--story-in, 1)) * -6deg))
    scale(calc(0.982 + (var(--story-in, 1) * 0.018)));
  transform-origin: left center;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
}

.story-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.17), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent);
  pointer-events: none;
}

.story-panel [data-swap].is-swapping {
  position: relative;
  z-index: 1;
  animation: text-swap 520ms ease both;
}

.story-panel .story-kicker {
  margin: 0 0 0.9rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
}

.story-panel h2 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: 0;
}

.story-panel p:last-child {
  margin: 0.8rem 0 0;
  color: rgba(255, 255, 255, 0.76);
}

.shot-timeline {
  position: absolute;
  left: 1.2rem;
  right: 1.2rem;
  bottom: 0.75rem;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  height: 2.4rem;
  align-items: end;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.68rem;
  font-weight: 820;
  pointer-events: none;
}

.shot-timeline::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.5rem;
  height: 1px;
  background: rgba(255, 255, 255, 0.22);
}

.shot-timeline .timeline-fill {
  position: absolute;
  left: 0;
  bottom: 1.5rem;
  width: calc(var(--progress, 0) * 100%);
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--sun));
  box-shadow: 0 0 16px rgba(243, 182, 63, 0.32);
}

.shot-timeline span:not(.timeline-fill) {
  position: relative;
}

.sequence-section {
  height: 420svh;
  background: #10141b;
  color: #fff;
}

.sequence-sticky {
  position: sticky;
  top: 0;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  align-content: center;
  gap: 1.5rem;
  padding: calc(var(--nav-h) + 1.5rem) 1.2rem 2rem;
  isolation: isolate;
}

.sequence-sticky::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 4rem 4rem;
  transform:
    translate3d(
      calc(var(--progress, 0) * -4rem),
      calc(var(--progress, 0) * -3rem),
      0
    );
  opacity: 0.34;
}

.sequence-sticky::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 80% 12%, rgba(223, 107, 53, 0.2), transparent 24rem),
    linear-gradient(180deg, rgba(16, 20, 27, 0.18), #10141b 80%);
}

.sequence-copy {
  width: min(100%, 680px);
  position: relative;
  z-index: 2;
  transform:
    translate3d(0, calc(var(--progress, 0) * -2rem), 0)
    scale(calc(1 - (var(--progress, 0) * 0.04)));
}

.sequence-copy h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.04;
  letter-spacing: 0;
}

.sequence-copy p:last-child {
  max-width: 42rem;
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.72);
}

.sequence-stage {
  width: 100%;
  overflow: visible;
  padding: 0.3rem 0 1.2rem;
}

.sequence-track {
  display: flex;
  gap: 1rem;
  transform: translate3d(calc(var(--sequence-x, 0) * 1px), 0, 0);
  transition: transform 80ms linear;
  will-change: transform;
}

.sequence-card {
  position: relative;
  flex: 0 0 min(78vw, 44rem);
  min-height: clamp(21rem, 52svh, 34rem);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #05080c;
  transform:
    translate3d(0, calc((1 - var(--card-focus, 0)) * 2rem), 0)
    scale(calc(0.88 + (var(--card-focus, 0) * 0.12)))
    rotateY(calc((1 - var(--card-focus, 0)) * -7deg));
  transform-origin: center;
  opacity: calc(0.48 + (var(--card-focus, 0) * 0.52));
  box-shadow: 0 28px 90px rgba(0, 0, 0, calc(0.18 + (var(--card-focus, 0) * 0.22)));
  will-change: transform, opacity;
}

.sequence-card img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  max-width: none;
  object-fit: cover;
  transform:
    translate3d(calc((1 - var(--card-focus, 0)) * -2rem), 0, 0)
    scale(calc(1.1 - (var(--card-focus, 0) * 0.04)));
  will-change: transform;
}

.sequence-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(5, 8, 12, 0.78), transparent 58%),
    linear-gradient(100deg, rgba(5, 8, 12, 0.34), transparent 60%);
}

.sequence-card div {
  position: absolute;
  left: 1.1rem;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 1;
  transform: translate3d(0, calc((1 - var(--card-focus, 0)) * 1.1rem), 0);
}

.sequence-card span {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 840;
  text-transform: uppercase;
}

.sequence-card h3 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.sequence-meter {
  position: relative;
  width: min(100%, 38rem);
  height: 0.35rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.sequence-meter span {
  display: block;
  width: calc(var(--progress, 0) * 100%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sea), var(--sky), var(--sun));
}

.engine-section {
  height: 310svh;
  background: #0d1117;
  color: #fff;
}

.engine-sticky {
  position: sticky;
  top: 0;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  align-items: center;
  gap: 2rem;
  padding: calc(var(--nav-h) + 2rem) 1.2rem 2rem;
  isolation: isolate;
}

.engine-sticky::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 18% 24%, rgba(223, 107, 53, 0.28), transparent 24rem),
    radial-gradient(circle at 82% 70%, rgba(15, 118, 110, 0.28), transparent 26rem),
    linear-gradient(180deg, #10141b, #05080c);
}

.engine-sticky::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 3.5rem 3.5rem;
  opacity: 0.28;
  transform: translate3d(calc(var(--progress, 0) * -2rem), calc(var(--progress, 0) * -3rem), 0);
}

.engine-copy {
  width: min(100%, 660px);
  position: relative;
  z-index: 2;
  transform: translate3d(0, calc(var(--progress, 0) * -2rem), 0);
}

.engine-copy h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.04;
  letter-spacing: 0;
}

.engine-copy p:last-child {
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.72);
}

.engine-stage {
  position: relative;
  min-height: 30rem;
  perspective: 1200px;
  transform-style: preserve-3d;
}

.engine-layer {
  position: absolute;
  max-width: none;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
  will-change: transform;
}

.engine-layer-main {
  inset: 7% auto auto 3%;
  width: min(78vw, 48rem);
  aspect-ratio: 16 / 9;
  transform:
    translate3d(calc(var(--progress, 0) * -2rem), calc(var(--progress, 0) * -1rem), 0)
    rotateY(calc(-8deg + (var(--progress, 0) * 8deg)))
    scale(calc(0.96 + (var(--progress, 0) * 0.06)));
}

.engine-layer-float {
  right: 0;
  top: 0;
  width: min(48vw, 28rem);
  aspect-ratio: 16 / 11;
  transform:
    translate3d(calc(var(--progress, 0) * -7rem), calc(var(--progress, 0) * 5rem), 8rem)
    rotateY(calc(12deg - (var(--progress, 0) * 16deg)))
    rotateZ(calc(-3deg + (var(--progress, 0) * 6deg)));
}

.engine-layer-small {
  right: 12%;
  bottom: 0;
  width: min(42vw, 22rem);
  aspect-ratio: 4 / 5;
  transform:
    translate3d(calc(var(--progress, 0) * -3rem), calc(var(--progress, 0) * -5rem), 5rem)
    rotateY(calc(-16deg + (var(--progress, 0) * 10deg)))
    scale(calc(0.92 + (var(--progress, 0) * 0.1)));
}

.engine-panel {
  position: absolute;
  left: 8%;
  bottom: 7%;
  width: min(88%, 24rem);
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(5, 8, 12, 0.72);
  backdrop-filter: blur(18px);
  transform: translate3d(calc(var(--progress, 0) * 4rem), calc(var(--progress, 0) * -1.5rem), 7rem);
}

.engine-panel span,
.engine-panel strong,
.engine-panel small {
  display: block;
}

.engine-panel span {
  margin-bottom: 0.35rem;
  color: var(--sun);
  font-size: 0.72rem;
  font-weight: 840;
  text-transform: uppercase;
}

.engine-panel strong {
  font-size: 1.05rem;
  line-height: 1.2;
}

.engine-panel small {
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.62);
}

.engine-stage::before,
.engine-stage::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.engine-stage::before {
  inset: 6% 9% 10%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  transform:
    rotateX(66deg)
    rotateZ(calc(18deg + (var(--progress, 0) * 42deg)))
    translateZ(-2rem);
  opacity: 0.64;
}

.engine-stage::after {
  left: 4%;
  right: 5%;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.44), transparent);
  transform:
    translate3d(0, calc((var(--progress, 0) - 0.5) * 18rem), 0)
    rotateZ(-8deg);
  opacity: 0.58;
}

.portfolio-section,
.services-section {
  padding: 6rem 0;
}

.portfolio-grid {
  display: grid;
  grid-auto-flow: dense;
  gap: 1rem;
  margin-top: 2rem;
}

.portfolio-card {
  position: relative;
  min-height: 24rem;
  overflow: hidden;
  border-radius: 8px;
  background: var(--night);
  color: #fff;
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
}

.portfolio-card.tall {
  min-height: 31rem;
}

.portfolio-card.tall img {
  object-position: 50% 68%;
}

.portfolio-card img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  transition: transform 700ms ease;
}

.portfolio-card:hover img {
  transform: scale(1.06) translate3d(0, -0.4rem, 0);
}

.portfolio-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 8, 12, 0.72), transparent 55%);
}

.portfolio-card div {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  padding: 1.2rem;
}

.portfolio-card span {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--sun);
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
}

.portfolio-card h3,
.service-card h3 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.services-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.service-card {
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  transform:
    translate3d(0, calc((1 - var(--reveal-depth, 1)) * 1.2rem), 0)
    rotateX(calc((1 - var(--reveal-depth, 1)) * 4deg));
  transform-origin: top center;
}

.service-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  height: 2.2rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  background: #102a43;
  color: #fff;
  font-weight: 800;
}

.service-card:nth-child(2) .service-code {
  background: var(--sea);
}

.service-card:nth-child(3) .service-code {
  background: var(--clay);
}

.service-card p {
  margin: 1rem 0 0;
  color: var(--muted);
}

.process-section {
  height: 250svh;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.08), transparent 42%),
    #e8ebe7;
}

.process-sticky {
  position: sticky;
  top: 0;
  min-height: 100svh;
  display: grid;
  align-content: center;
  gap: 2rem;
  width: min(1120px, calc(100% - 2.4rem));
  margin: 0 auto;
  padding: calc(var(--nav-h) + 2rem) 0 3rem;
}

.process-copy {
  max-width: 690px;
  transform:
    translate3d(calc(var(--progress, 0) * -1.5rem), 0, 0)
    scale(calc(1 - (var(--progress, 0) * 0.035)));
}

.process-copy p:last-child {
  margin: 1.1rem 0 0;
  color: #435061;
  font-size: 1.04rem;
}

.process-list {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.process-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: center;
  min-height: 4.3rem;
  padding: 1rem;
  border: 1px solid rgba(16, 20, 27, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  transform:
    translate3d(calc((var(--step-offset, 0) - var(--progress, 0)) * 2.2rem), 0, 0)
    scale(calc(0.97 + (var(--step-focus, 0) * 0.03)));
  box-shadow: 0 14px 46px rgba(16, 20, 27, calc(var(--step-focus, 0) * 0.08));
  transition: box-shadow 220ms ease;
}

.process-list span {
  color: var(--sea);
  font-weight: 850;
}

.contact-section {
  display: grid;
  gap: 2rem;
  padding: 6rem 0;
}

.contact-copy p {
  margin: 1rem 0 0;
  color: var(--muted);
}

.text-link {
  display: inline-flex;
  margin-top: 1.2rem;
  color: var(--sea);
  font-weight: 820;
}

.contact-form {
  display: grid;
  gap: 1rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
}

.contact-form label {
  display: grid;
  gap: 0.45rem;
  color: #344054;
  font-weight: 720;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(16, 20, 27, 0.18);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 0.85rem 0.9rem;
  color: var(--ink);
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 3px solid rgba(15, 118, 110, 0.18);
  border-color: var(--sea);
}

.contact-form .button {
  width: 100%;
  border: 0;
  background: var(--night);
  color: #fff;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.3rem 1.2rem;
  border-top: 1px solid var(--line);
  color: #5d6675;
}

[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 1.4rem, 0);
  transition:
    opacity 700ms ease,
    transform 700ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@keyframes text-swap {
  from {
    opacity: 0;
    transform: translate3d(0.7rem, 0.65rem, 0);
    filter: blur(8px);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

@media (min-width: 720px) {
  .site-header {
    padding: 0 1.8rem;
  }

  .nav-links {
    display: inline-flex;
  }

  .hero-sticky {
    padding-inline: 2.2rem;
  }

  .hero h1 {
    font-size: 6.2rem;
  }

  .hero-lead {
    font-size: 1.28rem;
  }

  .hero-metrics {
    left: 2.2rem;
    right: auto;
    width: min(52rem, calc(100% - 4.4rem));
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero-peek {
    display: inline-flex;
    right: 2.2rem;
    bottom: 1.15rem;
  }

  .intro-section,
  .portfolio-section,
  .services-section,
  .contact-section {
    width: min(1120px, calc(100% - 4.4rem));
  }

  .intro-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cinematic-sticky {
    padding: calc(var(--nav-h) + 2rem) 2.2rem 2.2rem;
  }

  .flight-hud {
    inset: calc(var(--nav-h) + 1.6rem) 2.2rem 1.5rem;
  }

  .story-panel {
    margin-left: 0;
    padding: 1.5rem;
  }

  .shot-timeline {
    left: 2.2rem;
    right: 2.2rem;
  }

  .sequence-sticky {
    padding: calc(var(--nav-h) + 2rem) 2.2rem 2.4rem;
  }

  .sequence-copy h2 {
    font-size: 2.8rem;
  }

  .engine-sticky {
    padding: calc(var(--nav-h) + 2rem) 2.2rem 2.4rem;
  }

  .engine-copy h2 {
    font-size: 2.8rem;
  }

  .engine-stage {
    min-height: 34rem;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-card.wide {
    grid-column: span 2;
  }

  .portfolio-card.tall {
    grid-row: span 2;
    min-height: 49rem;
  }

  .services-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .process-sticky {
    width: min(1120px, calc(100% - 4.4rem));
    grid-template-columns: minmax(0, 0.9fr) minmax(22rem, 0.7fr);
    align-items: center;
  }

  .contact-section {
    grid-template-columns: minmax(0, 0.9fr) minmax(22rem, 0.7fr);
    align-items: start;
  }
}

@media (min-width: 1080px) {
  .hero-sticky {
    padding-left: max(3.5rem, calc((100vw - 1120px) / 2));
    padding-right: max(3.5rem, calc((100vw - 1120px) / 2));
  }

  .hero h1 {
    font-size: 7.4rem;
  }

  .section-copy h2,
  .contact-copy h2,
  .process-copy h2 {
    font-size: 3.45rem;
  }

  .story-panel {
    width: 35rem;
  }

  .story-panel h2 {
    font-size: 2.6rem;
  }

  .sequence-sticky {
    grid-template-columns: minmax(19rem, 0.34fr) minmax(0, 1fr);
    align-items: center;
    gap: 3.2rem;
    padding-left: max(3.5rem, calc((100vw - 1180px) / 2));
    padding-right: max(3.5rem, calc((100vw - 1180px) / 2));
  }

  .sequence-copy {
    align-self: center;
    width: min(100%, 22rem);
  }

  .sequence-copy h2 {
    font-size: 2.65rem;
  }

  .sequence-stage {
    min-width: 0;
    overflow: hidden;
  }

  .sequence-meter {
    grid-column: 2;
  }

  .engine-sticky {
    grid-template-columns: minmax(20rem, 0.36fr) minmax(0, 1fr);
    gap: 4rem;
    padding-left: max(3.5rem, calc((100vw - 1180px) / 2));
    padding-right: max(3.5rem, calc((100vw - 1180px) / 2));
  }

  .engine-copy {
    width: min(100%, 28rem);
  }

  .engine-copy h2 {
    font-size: 3.15rem;
  }

  .engine-stage {
    min-height: 39rem;
  }

  .engine-layer-main {
    width: min(50vw, 48rem);
  }

  .engine-layer-float {
    width: min(31vw, 30rem);
  }

  .engine-layer-small {
    width: min(24vw, 22rem);
  }

  .portfolio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .portfolio-card.wide {
    grid-column: span 2;
  }

  .portfolio-card.tall {
    grid-row: span 2;
    min-height: 49rem;
  }
}

@media (max-width: 520px) {
  :root {
    --nav-h: 62px;
  }

  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav-button {
    display: none;
  }

  .hero-sticky {
    padding-bottom: 8.8rem;
  }

  .cursor-glow,
  .flight-hud::before,
  .flight-hud::after,
  .hud-axis,
  .hud-readout {
    display: none;
  }

  .flight-hud {
    inset: var(--nav-h) 1rem 1rem;
  }

  .hud-corner {
    width: 2.2rem;
    height: 2.2rem;
  }

  .hero-media {
    object-position: 62% 50%;
  }

  .hero h1 {
    font-size: 3.25rem;
  }

  .hero-lead {
    font-size: 1rem;
  }

  .button {
    width: 100%;
  }

  .hero-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .shot-timeline {
    display: none;
  }

  .story-panel {
    width: 100%;
  }

  .sequence-section {
    height: 320svh;
  }

  .sequence-sticky {
    align-content: end;
    padding-bottom: 1.2rem;
  }

  .sequence-copy,
  .engine-copy {
    width: 100%;
  }

  .sequence-copy h2 {
    max-width: 20rem;
    font-size: 1.62rem;
    line-height: 1.08;
  }

  .sequence-copy p:last-child {
    max-width: 20rem;
    font-size: 0.95rem;
  }

  .sequence-card {
    flex-basis: 82vw;
    min-height: 22rem;
  }

  .sequence-stage {
    overflow: hidden;
  }

  .sequence-meter {
    width: 100%;
  }

  .engine-section {
    height: 270svh;
  }

  .engine-sticky {
    align-content: center;
    gap: 1rem;
    padding: calc(var(--nav-h) + 1.2rem) 1rem 1.2rem;
  }

  .engine-copy h2 {
    max-width: 22rem;
    font-size: 1.78rem;
    line-height: 1.08;
  }

  .engine-copy p:last-child {
    max-width: 22rem;
    font-size: 0.95rem;
  }

  .engine-stage {
    min-height: 27rem;
  }

  .engine-layer-main {
    left: -1rem;
    top: 12%;
    width: 88vw;
  }

  .engine-layer-float {
    right: 0;
    width: 54vw;
  }

  .engine-layer-small {
    right: 7%;
    bottom: 5%;
    width: 52vw;
  }

  .engine-panel {
    left: 0.35rem;
    bottom: 0;
    width: min(calc(100% - 0.7rem), 19rem);
  }

  .section-copy h2,
  .contact-copy h2,
  .process-copy h2 {
    font-size: 2rem;
  }

  .portfolio-card {
    min-height: 20rem;
  }

  .process-list li {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .hero-media,
  .hero-content,
  .process-copy,
  .shot,
  .story-panel,
  .sequence-track,
  .sequence-card,
  .sequence-card img,
  .engine-copy,
  .engine-layer,
  .engine-panel,
  .engine-stage::before,
  .engine-stage::after {
    transform: none !important;
  }

  .cursor-glow,
  .flight-hud,
  .scroll-progress {
    display: none;
  }
}
