/* ==========================================================
   lobhdhomne.vercel.app
   Black and red. Squared corners. A live 3D particle field
   behind the page (js/scene.js), smooth scroll and motion
   (js/fx.js). All motion switches off under reduced motion.
   ========================================================== */

@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Anton";
  src: url("../assets/fonts/anton-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../assets/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../assets/fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #0a0a0a;
  --panel: #141414;
  --glass: rgba(14, 14, 14, .78);
  --line: #2a2a2a;
  --line-soft: rgba(255, 255, 255, .08);
  --text: #f2f2f2;
  --muted: #a3a3a3;
  --red: #c8102e;        /* fills: buttons, bars (white text = 5.9:1) */
  --red-text: #ff4d5e;   /* red text on black (6.1:1) */
  --field: #7a7a7a;      /* input borders (4.3:1 on panel) */
  --focus: #ffffff;
  --max: 76rem;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.75, 0, .25, 1);
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --display: "Anton", "Archivo", Impact, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); scroll-behavior: auto; }
body {
  margin: 0;
  background: transparent;
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  overflow-x: clip;
}
::selection { background: var(--red); color: #fff; }
img, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { color: var(--red-text); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 300; background: var(--red); color: #fff; padding: .6rem 1rem; font-weight: 700; }
.skip-link:focus { left: 1rem; top: 1rem; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }

/* ---------- 3D background canvas ---------- */
.scene {
  position: fixed; inset: 0; z-index: -1;
  width: 100vw; height: 100vh; height: 100lvh;
  pointer-events: none; opacity: 0; transition: opacity 1.4s ease;
}
.scene.is-ready { opacity: 1; }
body[data-scene]::after { /* vignette + scanline texture over the particles */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse at 70% 40%, transparent 0 35%, rgba(10,10,10,.55) 80%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.018) 0 1px, transparent 1px 3px);
}
.no-webgl body[data-scene] { background: radial-gradient(ellipse at 75% 30%, rgba(200,16,46,.22), transparent 55%), var(--bg); }

/* ---------- Page wipe (in on load, out on navigation) ---------- */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 250; pointer-events: none;
  background: var(--red);
  transform: scaleY(0); transform-origin: top;
  animation: wipe-in .45s cubic-bezier(.16, 1, .3, 1) both; /* ease-out: starts clearing on the first frame */
}
.is-leaving body::before { animation: none; transform: scaleY(1); transform-origin: bottom; transition: transform .28s var(--ease-io); }
@keyframes wipe-in { from { transform: scaleY(1); } to { transform: scaleY(0); } }

/* ---------- Progress bar ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
  background: var(--red); transform-origin: left; transform: scaleX(0); pointer-events: none;
}

/* ---------- Cursor ring (fine pointers only) ---------- */
.cursor { position: fixed; inset: 0; z-index: 240; pointer-events: none; opacity: 0; transition: opacity .4s ease; }
.cursor.is-on { opacity: 1; }
.cursor__ring, .cursor__dot { position: absolute; top: 0; left: 0; width: 0; height: 0; will-change: transform; }
.cursor__ring::before {
  content: ""; position: absolute; left: -18px; top: -18px; width: 36px; height: 36px;
  border: 1.5px solid rgba(255, 77, 94, .85); border-radius: 50%;
  transition: transform .3s cubic-bezier(.22, 1, .36, 1), background-color .25s ease, border-color .25s ease, opacity .25s ease;
}
.cursor__dot::before {
  content: ""; position: absolute; left: -3px; top: -3px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--red-text);
  transition: transform .35s cubic-bezier(.22, 1, .36, 1), opacity .25s ease;
}
.cursor.is-hover .cursor__ring::before { transform: scale(1.8); background-color: rgba(200, 16, 46, .16); border-color: var(--red-text); }
.cursor.is-hover .cursor__dot::before { transform: scale(0); }
.cursor.is-text .cursor__ring::before { transform: scale(.5); opacity: .5; }
.cursor.is-down .cursor__ring::before { transform: scale(.75); }
.cursor.is-hover.is-down .cursor__ring::before { transform: scale(1.5); }

/* ---------- Hover preview (home index) ---------- */
.preview {
  position: fixed; top: 0; left: 0; z-index: 20; pointer-events: none;
  width: 0; height: 0;
}
.preview img {
  position: absolute; left: 1.5rem; top: -9rem; width: 14rem; height: 17rem; object-fit: cover;
  border: 1px solid var(--line); box-shadow: 0 30px 60px rgba(0,0,0,.6);
  opacity: 0; transform: scale(.85); transition: opacity .3s ease, transform .45s var(--ease);
}
.preview.is-on img { opacity: 1; transform: scale(1); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: transform .5s var(--ease), background .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem; padding-block: 1.1rem; }
.site-header.is-scrolled {
  background: rgba(10, 10, 10, .72);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line-soft);
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header--solid { position: sticky; top: 0; background: rgba(10, 10, 10, .92); border-bottom-color: var(--line); }
.logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 800; font-stretch: 110%; letter-spacing: .02em; text-transform: uppercase; font-size: .95rem; }
.logo img { width: 30px; height: 30px; transition: transform .6s var(--ease); }
.logo:hover img { transform: rotate(-180deg); }
.logo:hover { color: var(--text); }
.main-nav ul { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  position: relative; display: inline-block; text-decoration: none;
  font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: #d6d6d6; padding-block: .3rem;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: #fff;
  transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease);
}
.main-nav a:hover { color: #fff; }
.main-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.main-nav a[aria-current="page"] { color: #fff; }
.main-nav a[aria-current="page"]::after { transform: scaleX(1); background: var(--red); }

.motion-toggle {
  display: inline-flex; align-items: center; gap: .5rem;
  font: 700 .7rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 0;
  padding: .5rem .7rem; cursor: pointer; transition: color .25s ease, border-color .25s ease;
}
.motion-toggle:hover { color: #fff; border-color: #fff; }
.motion-toggle__dot { width: .55rem; height: .55rem; border-radius: 50%; background: #555; }
.motion-toggle[aria-pressed="true"] .motion-toggle__dot { background: var(--red-text); box-shadow: 0 0 10px var(--red-text); }
.site-header .main-nav { margin-left: auto; }
@media (max-width: 560px) { .motion-toggle { position: absolute; top: .85rem; right: clamp(1rem, 4vw, 2rem); } }

/* ---------- Buttons: square on purpose, magnetic on desktop ---------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: .6rem;
  font: 700 .95rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase;
  padding: 1.05rem 1.5rem; border: 2px solid var(--red); border-radius: 0;
  background: var(--red); color: #fff; text-decoration: none; cursor: pointer;
  transform: translate(var(--mx, 0px), var(--my, 0px));
  transition: transform .35s var(--ease), color .3s ease, border-color .3s ease;
}
.btn::before { /* fill that sweeps in on hover */
  content: ""; position: absolute; inset: 0; z-index: -1; background: #fff;
  transform: translateY(101%); transition: transform .45s var(--ease);
}
.btn:hover { color: #0a0a0a; border-color: #fff; }
.btn:hover::before { transform: translateY(0); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn--outline { background: rgba(0,0,0,.35); border-color: #fff; }
.btn .arrow { font-family: var(--mono); font-weight: 400; transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Hero (shared) ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding-block: 8rem 5rem;
}
.hero::before { /* keep the text side readable over the particles */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(10,10,10,.75) 0%, rgba(10,10,10,.3) 45%, transparent 70%),
              linear-gradient(to bottom, transparent 70%, var(--bg));
}
.hero .container { position: relative; z-index: 2; will-change: transform, opacity; }
.hero__grid { display: grid; gap: 3rem; align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .hero__grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr); } }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; margin-top: 2.5rem; padding: 0; list-style: none;
  font: 700 .72rem/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.hero__meta li::before { content: "● "; color: var(--red-text); }
.scroll-cue {
  position: absolute; right: clamp(1rem, 4vw, 2rem); bottom: 1.75rem; z-index: 3;
  display: flex; align-items: center; gap: .75rem;
  font: 700 .7rem var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.scroll-cue::after {
  content: ""; width: 3.5rem; height: 1px; background: linear-gradient(90deg, var(--red-text) 50%, var(--line) 50%);
  background-size: 200% 100%; animation: cue 2s linear infinite;
}
@keyframes cue { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* Floating 3D card in the hero (photo, video or screenshot) */
.card3d {
  position: relative; margin: 0;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d; transition: transform .7s var(--ease);
  animation: float 7s ease-in-out infinite;
}
.card3d.is-tilting { transition: transform .12s linear; animation-play-state: paused; }
.card3d__inner {
  position: relative; overflow: hidden; background: var(--panel);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(200,16,46,.25), 0 0 80px -20px rgba(200,16,46,.45);
}
.card3d__inner::after { /* moving glare */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 4;
  background: radial-gradient(circle at var(--gx, 30%) var(--gy, 20%), rgba(255,255,255,.18), transparent 45%);
  mix-blend-mode: screen;
}
.card3d img, .card3d video { width: 100%; height: 100%; object-fit: cover; }
.card3d__tag {
  position: absolute; z-index: 5; left: -1rem; bottom: 1.5rem;
  transform: translateZ(60px);
  font: 700 .72rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  background: var(--red); color: #fff; padding: .6rem .8rem;
}
.card3d__bar { display: flex; gap: .4rem; align-items: center; padding: .6rem .75rem; background: #111; border-bottom: 1px solid var(--line); font: .7rem var(--mono); color: var(--muted); }
.card3d__bar i { width: .6rem; height: .6rem; border-radius: 50%; background: #333; }
.card3d__bar i:first-child { background: var(--red); }
.card3d__bar span { margin-left: .5rem; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }

.video-toggle {
  position: absolute; right: .75rem; bottom: .75rem; z-index: 6;
  font: 700 .7rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: #fff; background: rgba(0,0,0,.65); border: 1px solid rgba(255,255,255,.5);
  padding: .55rem .8rem; border-radius: 0; cursor: pointer;
}
.video-toggle:hover { background: #000; border-color: #fff; }

.kicker { font: 700 .8rem/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--red-text); margin: 0 0 1.25rem; }
.kicker::before { content: ""; display: inline-block; width: 2rem; height: 2px; background: var(--red-text); vertical-align: middle; margin-right: .75rem; }
.lead { font-size: clamp(1.1rem, 2vw, 1.35rem); color: #d9d9d9; max-width: 40rem; margin: 0 0 2rem; }

h1, h2, h3 { margin: 0 0 .75rem; line-height: 1.02; }
h2 { font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 800; font-stretch: 80%; text-transform: uppercase; letter-spacing: -.01em; }
h3 { font-size: 1.2rem; font-weight: 700; line-height: 1.2; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }

/* ---------- Split heading letters ---------- */
.is-split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
.is-split .ch { display: inline-block; transform: translateY(110%) rotate(6deg); animation: ch-in 1s var(--ease) forwards; animation-delay: calc(var(--i) * 26ms + 350ms); }
@keyframes ch-in { to { transform: none; } }
.hero .kicker, .hero .lead, .hero .btn-row, .hero .hero__meta, .hero .lbd-badge { animation: rise 1s var(--ease) both; }
.hero .lead { animation-delay: .7s; }
.hero .btn-row { animation-delay: .85s; }
.hero .hero__meta { animation-delay: 1s; }
.hero__visual { animation: card-in 1.4s var(--ease) .4s both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes card-in { from { opacity: 0; transform: perspective(1000px) rotateY(-25deg) translateX(60px) scale(.9); } }

/* ---------- Scroll reveals ---------- */
.rv { opacity: 0; transform: translateY(48px); transition: opacity .9s var(--ease) var(--d, 0ms), transform 1.1s var(--ease) var(--d, 0ms); }
.rv.is-in { opacity: 1; transform: none; }

/* ---------- Sections ---------- */
.section { position: relative; padding-block: clamp(4.5rem, 11vw, 8.5rem); border-bottom: 1px solid var(--line-soft); }
.section--panel { background: var(--glass); }
.section__head { display: grid; gap: .75rem 3rem; grid-template-columns: minmax(0, 1fr); margin-bottom: 3rem; }
@media (min-width: 800px) { .section__head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; } }
.section__head p { color: var(--muted); margin: 0; max-width: 32rem; }
.label { font: 700 .75rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--red-text); display: block; margin-bottom: .9rem; }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden; border-block: 1px solid var(--line); background: var(--red);
  padding-block: 1rem; white-space: nowrap; user-select: none;
}
.marquee__track { display: inline-flex; animation: marquee 28s linear infinite; }
.marquee span { font-family: var(--display); font-size: clamp(1.6rem, 4vw, 2.8rem); text-transform: uppercase; line-height: 1; padding-inline: 1.5rem; color: #fff; }
.marquee span:nth-child(even) { color: transparent; -webkit-text-stroke: 1px #fff; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Photos ---------- */
.photo { margin: 0; position: relative; background: var(--panel); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo figcaption { font: .75rem/1.4 var(--mono); color: var(--muted); padding-top: .6rem; }
.photo--portrait { aspect-ratio: 9 / 11; }
.photo--square { aspect-ratio: 1 / 1; }
.photo--wide { aspect-ratio: 16 / 9; }
.photo--frame { border: 1px solid var(--line); padding: .6rem; }
.photo--frame img { height: auto; }
.photo--frame img { transition: transform 1.2s var(--ease), filter .6s ease; filter: grayscale(.35); }
.photo--frame:hover img { transform: scale(1.03); filter: none; }

/* Parallax image band */
.band { position: relative; overflow: hidden; margin: 0; aspect-ratio: 21 / 9; border: 1px solid var(--line); background: var(--panel); }
.band img { position: absolute; left: 0; top: -12%; width: 100%; height: 124%; object-fit: cover; will-change: transform; }
.band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,10,10,.7), transparent 50%); }
@media (max-width: 700px) { .band { aspect-ratio: 4 / 3; } }

/* =========================================================
   HOME
   ========================================================= */
.home-name {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(4.2rem, 14vw, 12rem); line-height: .84; letter-spacing: .005em; margin: 0 0 1.75rem;
}
.home-name span { display: block; color: var(--red-text); }
.home-name .home-name__last { margin-top: .22em; } /* breathing room between the two lines */
.home-name .w, .home-name .ch { display: inline-block; }
.page-home .hero__visual { max-width: 23rem; width: 100%; justify-self: end; }
.page-home .card3d .card3d__inner { aspect-ratio: 9 / 11; }

.index-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.index-list li { border-bottom: 1px solid var(--line); }
.index-link {
  position: relative; overflow: hidden;
  display: grid; gap: .25rem 2rem; align-items: baseline;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  padding: 2rem 0; text-decoration: none;
}
.index-link::before { /* red sweep behind the row */
  content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(200,16,46,.22), transparent 70%);
  transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease);
}
@media (min-width: 800px) { .index-link { grid-template-columns: 5rem minmax(0, 1.1fr) minmax(0, 1.4fr) auto; padding: 2.75rem 0; } }
.index-link .n { font: 700 .9rem var(--mono); color: var(--red-text); }
.index-link .t { font-family: var(--display); font-size: clamp(2.6rem, 7vw, 5.5rem); text-transform: uppercase; line-height: 1; transition: transform .6s var(--ease), color .3s ease; }
.index-link .d { color: var(--muted); grid-column: 2; }
.index-link .go { font: 700 .8rem var(--mono); letter-spacing: .1em; text-transform: uppercase; grid-column: 2; margin-top: .5rem; transition: transform .4s var(--ease); }
@media (min-width: 800px) { .index-link .d, .index-link .go { grid-column: auto; margin-top: 0; } }
.index-link:hover { color: var(--text); }
.index-link:hover::before { transform: scaleX(1); }
.index-link:hover .t { color: var(--red-text); transform: translateX(1rem); }
.index-link:hover .go { transform: translateX(.5rem); }

.about-strip { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 800px) { .about-strip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); } }
.about-strip p { font-size: 1.15rem; max-width: 38rem; }
.about-strip + .band { margin-top: 4rem; }

.cta-block { text-align: center; }
.cta-block h2 { font-family: var(--display); font-weight: 400; font-stretch: normal; font-size: clamp(3rem, 10vw, 8rem); line-height: .9; margin-bottom: 2rem; }
.cta-block h2 em { font-style: normal; color: transparent; -webkit-text-stroke: 2px var(--red-text); }
.cta-block .btn-row { justify-content: center; }

/* =========================================================
   LBD MEDIA
   ========================================================= */
.page-lbd h1 {
  font-size: clamp(2.8rem, 7.5vw, 6.4rem); font-weight: 900; font-stretch: 72%;
  text-transform: uppercase; line-height: .9; max-width: 15ch; margin-bottom: 1.5rem;
}
.page-lbd h1 em { font-style: normal; color: var(--red-text); }
.lbd-badge { display: inline-block; font: 700 .8rem/1 var(--mono); letter-spacing: .12em; background: var(--red); color: #fff; padding: .45rem .65rem; margin-bottom: 1.5rem; }
.page-lbd .card3d .card3d__inner { aspect-ratio: 16 / 10; }

.service-table { width: 100%; border-collapse: collapse; }
.service-table th, .service-table td { text-align: left; vertical-align: top; padding: 1.6rem 1rem 1.6rem 0; border-top: 1px solid var(--line); }
.service-table thead th { font: 700 .75rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-top: 0; padding-bottom: .8rem; }
.service-table tbody tr { transition: background .3s ease; }
.service-table tbody tr:hover { background: rgba(200,16,46,.08); }
.service-table tbody th { font-size: clamp(1.3rem, 2.4vw, 1.9rem); font-weight: 800; font-stretch: 85%; text-transform: uppercase; width: 30%; transition: color .3s ease; }
.service-table tbody tr:hover th { color: var(--red-text); }
.service-table tbody th small { display: block; font: 700 .75rem var(--mono); color: var(--red-text); margin-bottom: .35rem; }
.service-table td { color: var(--muted); }
.table-wrap { overflow-x: auto; }
@media (max-width: 700px) {
  .service-table thead { display: none; }
  .service-table tr { display: block; border-top: 1px solid var(--line); padding-block: 1.1rem; }
  .service-table th, .service-table td { display: block; border: 0; padding: .2rem 0; width: auto; }
  .service-table tbody th { width: auto; }
}

.split { display: grid; gap: 2.5rem; align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .split { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 4rem; } }

/* Process timeline: a grid on phones, a pinned horizontal scroll on desktop */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); border-left: 1px solid var(--line); }
.timeline li { position: relative; padding: 1.75rem 1.5rem; border-right: 1px solid var(--line); border-top: 4px solid var(--red); border-bottom: 1px solid var(--line); background: rgba(10,10,10,.85); }
.timeline .step { font: 700 .8rem var(--mono); color: var(--red-text); display: block; margin-bottom: 1.5rem; }
.timeline h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); text-transform: uppercase; font-stretch: 85%; font-weight: 800; }
.timeline p { color: var(--muted); margin: 0; }

.hpin__track { will-change: transform; }
.hpin.is-pinned { padding-block: 0; }
.hpin.is-pinned .hpin__sticky { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.hpin.is-pinned .hpin__viewport { padding-left: max(clamp(1rem, 4vw, 2rem), calc((100vw - var(--max)) / 2 + 2rem)); }
.hpin.is-pinned .timeline { display: flex; width: max-content; border-left: 1px solid var(--line); padding-right: 8vw; }
.hpin.is-pinned .timeline li { width: clamp(22rem, 34vw, 30rem); min-height: 22rem; padding: 2.25rem; display: flex; flex-direction: column; }
.hpin.is-pinned .timeline li::after { /* giant step number */
  content: counter(step, decimal-leading-zero); counter-increment: step;
  position: absolute; right: 1.25rem; bottom: .5rem;
  font-family: var(--display); font-size: 8rem; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(255,77,94,.35);
}
.hpin.is-pinned .timeline { counter-reset: step; }
.hpin.is-pinned .timeline p { max-width: 22rem; }
.hpin__rail { height: 2px; background: var(--line); margin-top: 2.5rem; position: relative; }
.hpin__rail::after { content: ""; position: absolute; inset: 0; background: var(--red); transform-origin: left; transform: scaleX(var(--pin, 0)); }
.hpin:not(.is-pinned) .hpin__rail { display: none; }

.showreel { aspect-ratio: 16 / 9; border: 1px dashed #555; display: grid; place-items: center; text-align: center; padding: 1.5rem; background: rgba(13,13,13,.85); position: relative; overflow: hidden; }
.showreel::before { content: "REC ●"; position: absolute; top: 1rem; left: 1rem; font: 700 .72rem var(--mono); letter-spacing: .14em; color: var(--red-text); animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.showreel p { max-width: 30rem; color: var(--muted); margin: .5rem auto 0; }
.showreel strong { font-family: var(--display); font-weight: 400; font-size: clamp(1.8rem, 5vw, 3.4rem); text-transform: uppercase; letter-spacing: .02em; }
.samples { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.sample { margin: 0; }
.sample figcaption { font-size: .9rem; color: var(--muted); margin-top: .5rem; }

/* ---------- Embeds (click to load) ---------- */
.embed { position: relative; aspect-ratio: 16 / 9; background: #0d0d0d; border: 1px solid var(--line); display: grid; place-items: center; text-align: center; padding: 1.25rem; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed p { color: var(--muted); font-size: .9rem; max-width: 26rem; margin: .9rem auto 0; }

/* ---------- Form ---------- */
.form { display: grid; gap: 1.25rem 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font: 700 .78rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.field .opt { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--text); background: rgba(10,10,10,.9);
  border: 1px solid var(--field); border-radius: 0; padding: .9rem 1rem;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #aaa; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid #fff; outline-offset: 0; border-color: #fff; box-shadow: 0 0 0 6px rgba(200,16,46,.25); }
.field [aria-invalid="true"] { border-color: var(--red-text); }
.field .hint { font-size: .85rem; color: var(--muted); }
.field .error { font-size: .88rem; color: var(--red-text); min-height: 1.3em; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .95rem; }
.check input { width: 1.15rem; height: 1.15rem; margin-top: .2rem; accent-color: var(--red); flex: none; }
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-status { grid-column: 1 / -1; margin: 0; font-weight: 600; }

/* =========================================================
   DEVELOPER
   ========================================================= */
.page-dev h1 { font: 700 clamp(2.1rem, 5.2vw, 4.2rem)/1.08 var(--mono); letter-spacing: -.02em; max-width: 20ch; margin-bottom: 1.25rem; }
.page-dev h1 .prompt { color: var(--red-text); }
.page-dev h1::after { content: "_"; color: var(--red-text); animation: blink 1s steps(2) infinite; }
.page-dev main h2 { font-family: var(--mono); font-weight: 700; font-stretch: normal; text-transform: none; letter-spacing: -.02em; font-size: clamp(1.8rem, 4vw, 3rem); }
.page-dev main h2::before { content: "// "; color: var(--red-text); }
.page-dev .card3d .card3d__inner img { aspect-ratio: 16 / 10; }
.dev-intro { display: grid; gap: 2rem; align-items: start; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 800px) { .dev-intro { grid-template-columns: 17rem minmax(0, 1fr); gap: 3.5rem; } }
.dev-intro .photo { max-width: 17rem; }
.codebox { font: .95rem/1.7 var(--mono); background: rgba(0,0,0,.85); border: 1px solid var(--line); border-left: 4px solid var(--red); padding: 1.25rem 1.4rem; overflow-x: auto; }
.codebox .k { color: var(--red-text); }
.codebox .c { color: #8c8c8c; }
.slots { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.slot {
  position: relative; background: rgba(10,10,10,.92); padding: 1.75rem; min-height: 12rem;
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: background .3s ease; animation: rise .8s var(--ease) both;
}
.slot:nth-child(2) { animation-delay: .08s; } .slot:nth-child(3) { animation-delay: .16s; }
.slot:nth-child(4) { animation-delay: .24s; } .slot:nth-child(5) { animation-delay: .32s; } .slot:nth-child(6) { animation-delay: .4s; }
a.slot::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--red); transform: scaleY(0); transform-origin: bottom; transition: transform .45s var(--ease); }
a.slot:hover { background: #121212; color: inherit; }
a.slot:hover::before { transform: scaleY(1); }
.slot .label { color: var(--muted); }
.slot h3 { font: 700 clamp(1.15rem, 2vw, 1.5rem)/1.2 var(--mono); margin: .75rem 0 .5rem; overflow-wrap: anywhere; }
.slot p { color: var(--muted); margin: 0; }
.slot__meta { margin-top: auto; padding-top: 1rem; font: 700 .7rem var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--red-text); }
.slot__lang { font: .8rem var(--mono); color: #d7d7d7; margin-top: .5rem; }
#resume-slot { animation: none; }
.resume-frame { width: 100%; height: 72vh; min-height: 440px; border: 1px solid var(--line); background: #111; margin-bottom: 1rem; }
.resume-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .75rem; }

/* =========================================================
   LEGAL
   ========================================================= */
.page-legal { background: var(--bg); }
.legal { padding-block: 3.5rem 5rem; }
.legal__head { border-bottom: 4px solid var(--red); padding-bottom: 1.75rem; margin-bottom: 2.5rem; }
.legal__head h1 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(2.8rem, 8vw, 5.5rem); line-height: .95; }
.legal__meta { font: .85rem var(--mono); color: var(--muted); margin: 0; }
.legal__layout { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .legal__layout { grid-template-columns: 15rem minmax(0, 1fr); gap: 4rem; } }
.toc { font-size: .92rem; }
@media (min-width: 960px) { .toc { position: sticky; top: 6rem; align-self: start; } }
.toc h2 { font: 700 .75rem var(--mono); letter-spacing: .14em; color: var(--red-text); margin-bottom: .75rem; }
.toc ol { margin: 0; padding-left: 1.3rem; }
.toc li { margin-bottom: .35rem; }
.toc a { text-decoration: none; color: var(--muted); }
.toc a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--red); }
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.45rem; font-stretch: 95%; margin-top: 2.75rem; padding-top: .5rem; scroll-margin-top: 6rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .45rem; }
.prose .note { border-left: 4px solid var(--red); background: var(--panel); padding: 1rem 1.2rem; }
.table-scroll { overflow-x: auto; margin: 1rem 0 1.5rem; }
.data-table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: .92rem; }
.data-table th, .data-table td { border: 1px solid var(--line); padding: .6rem .75rem; text-align: left; vertical-align: top; }
.data-table th { background: var(--panel); font: 700 .75rem var(--mono); letter-spacing: .06em; text-transform: uppercase; }

/* =========================================================
   404
   ========================================================= */
.notfound { min-height: 80vh; display: flex; align-items: center; padding-block: 4rem; }
.notfound__code { font-family: var(--display); color: var(--red-text); font-size: clamp(7rem, 30vw, 16rem); line-height: .8; margin: 0 0 1rem; text-shadow: 0 0 60px rgba(200,16,46,.5); animation: glitch 3s steps(1) infinite; }
@keyframes glitch { 0%, 92%, 100% { transform: none; } 93% { transform: translate(-4px, 2px) skewX(8deg); } 95% { transform: translate(5px, -2px); } 97% { transform: translate(-2px, 0) skewX(-6deg); } }
.notfound__more { margin-top: 1.5rem; }
.page-404 .site-footer { padding-top: 0; }

/* ---------- Footer ---------- */
.site-footer { position: relative; border-top: 4px solid var(--red); padding-block: 3.5rem 2.5rem; font-size: .92rem; background: rgba(10,10,10,.92); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .footer-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); } }
.site-footer h2 { font: 700 .75rem var(--mono); letter-spacing: .14em; color: var(--muted); margin-bottom: .9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--red); color: #fff; }
.footer-big { font-family: var(--display); font-size: clamp(2.4rem, 6vw, 4rem); text-transform: uppercase; line-height: 1; margin-bottom: .75rem; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; color: var(--muted); font-size: .85rem; }
.text-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.text-btn:hover { text-decoration: underline; text-decoration-color: var(--red); color: #fff; }

/* ---------- Cookie prompt ---------- */
.cookie {
  position: fixed; z-index: 90; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 4px solid var(--red);
  padding: 1.1rem 0 calc(1.1rem + env(safe-area-inset-bottom, 0px));
  animation: rise .6s var(--ease) both;
}
.cookie .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.cookie h2 { font: 700 .8rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--red-text); margin: 0 0 .3rem; }
.cookie p { margin: 0; max-width: 46rem; font-size: .95rem; }
.cookie__actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.cookie .btn { padding: .8rem 1.2rem; }

@media (max-width: 560px) {
  .site-header .container { padding-block: .85rem; }
  .main-nav ul { gap: .25rem 1.1rem; }
  .main-nav a { font-size: .78rem; }
  .hero { padding-block: 9rem 5.5rem; align-items: flex-end; }
  .page-home .hero__visual { max-width: 15rem; justify-self: start; }
  .card3d__tag { left: .5rem; }
  .btn { width: 100%; justify-content: center; }
  .btn-row { width: 100%; }
  .cookie__actions { width: 100%; }
  .cookie__actions .btn { flex: 1 1 8rem; width: auto; }
  .scroll-cue { display: none; }
}

/* ---------- Reduced motion: keep layout, drop movement ---------- */
/* .reduce-motion comes from js/motion.js, when a visitor turns Motion off in the header. */
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
.reduce-motion body::before { display: none; }
.reduce-motion .marquee__track { animation: none; }

/* ---------- Lenis (from lenis/dist/lenis.css) ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

@media print {
  .site-header, .cookie, .hero__video, .video-toggle, .scene, .progress, .cursor, .preview, .marquee, .scroll-cue { display: none !important; }
  body { background: #fff; color: #000; }
  body::before, body::after { display: none; }
  .rv { opacity: 1; transform: none; }
}
