/* ============================================================
   OPTIFLOW STUDIO — style.css
   "Neural Core" — dark, kinetic, sci-fi FUI.
   Cyan × violet × magenta on deep space black.
   ============================================================ */

@property --spin {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

:root {
  --bg: #030409;
  --bg-2: #060A14;
  --card: #0A0F1D;
  --fg: #EEF2F6;
  --muted: #8B94A7;
  --cyan: #00F0FF;
  --violet: #8B5CFF;
  --magenta: #FF2E97;
  --line: rgba(255, 255, 255, 0.08);
  --grad: linear-gradient(92deg, var(--cyan), var(--violet));
  --font-d: 'Orbitron', 'Space Grotesk', sans-serif;
  --font-g: 'Space Grotesk', sans-serif;
  --font-b: 'Inter', sans-serif;
  --font-m: 'JetBrains Mono', monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 76px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-b);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.has-cursor,
body.has-cursor a,
body.has-cursor button { cursor: none; }

body.menu-open { overflow: hidden; }

::selection { background: var(--cyan); color: #02121a; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #16203A, #1B2334);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover { background: #2A3550; }

a { color: inherit; text-decoration: none; }
.mono { font-family: var(--font-m); }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  width: min(1240px, 92vw);
  margin-inline: auto;
}

/* ---------- Ambient aurora backdrop ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.aurora i {
  position: absolute;
  border-radius: 50%;
}
.aurora i:nth-child(1) {
  width: 64vmax; height: 64vmax;
  left: -18vmax; top: -24vmax;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.10), transparent 62%);
  animation: drift-a 36s ease-in-out infinite alternate;
}
.aurora i:nth-child(2) {
  width: 58vmax; height: 58vmax;
  right: -20vmax; top: 8vmax;
  background: radial-gradient(circle, rgba(139, 92, 255, 0.10), transparent 62%);
  animation: drift-b 44s ease-in-out infinite alternate;
}
.aurora i:nth-child(3) {
  width: 50vmax; height: 50vmax;
  left: 24vmax; bottom: -26vmax;
  background: radial-gradient(circle, rgba(255, 46, 151, 0.06), transparent 62%);
  animation: drift-c 52s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate(9vmax, 7vmax) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-8vmax, 10vmax) scale(0.9); } }
@keyframes drift-c { to { transform: translate(6vmax, -9vmax) scale(1.2); } }

/* ---------- Film grain + scanlines ---------- */
.noise {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 9990;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.7s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); }
  75% { transform: translate(-3%, -3%); }
  100% { transform: translate(2%, 2%); }
}
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 9989;
  pointer-events: none;
  opacity: 0.04;
  background: repeating-linear-gradient(0deg,
    transparent 0 2px, rgba(255, 255, 255, 0.5) 2px 3px);
  mix-blend-mode: overlay;
}

/* ---------- Scroll progress + HUD ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 2000;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--magenta));
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}

.hud-corner {
  position: fixed;
  bottom: 18px;
  z-index: 800;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.35s;
}
body.at-end .hud-corner { opacity: 0; }
.hud-bl { left: 24px; }
.hud-br { right: 24px; }
.hud-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: blink 2.2s steps(2) infinite;
}
#scrollPct { color: var(--cyan); }

.hud-rail {
  position: fixed;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 800;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hud-rail a {
  position: relative;
  width: 22px; height: 22px;
  display: grid;
  place-items: center;
}
.hud-rail a::before {
  content: '';
  width: 8px; height: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transform: rotate(45deg);
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.hud-rail a:hover::before,
.hud-rail a.active::before {
  border-color: var(--cyan);
  background: rgba(0, 240, 255, 0.4);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}
.hud-rail a::after {
  content: attr(data-label);
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-m);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  color: var(--cyan);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.hud-rail a:hover::after,
.hud-rail a.active::after { opacity: 1; }

body.menu-open .hud-corner,
body.menu-open .hud-rail,
body.menu-open .scroll-progress { display: none; }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}
body.loaded .preloader { opacity: 0; visibility: hidden; }
.preloader-inner {
  display: flex;
  align-items: baseline;
  gap: 20px;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
}
.preloader-logo { font-weight: 700; letter-spacing: -0.02em; }
.preloader-count { color: var(--cyan); font-size: 0.8em; text-shadow: 0 0 18px rgba(0,240,255,.6); }
.preloader-bar {
  width: min(280px, 60vw);
  height: 1px;
  background: var(--line);
  overflow: hidden;
}
.preloader-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--magenta));
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.8);
}
.preloader-msg {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.blink { animation: blink 1.1s steps(2) infinite; color: var(--cyan); }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Custom cursor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9995;
  border-radius: 50%;
  opacity: 0;
}
body.has-cursor .cursor-dot,
body.has-cursor .cursor-ring { opacity: 1; }
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  transform: translate(-50%, -50%);
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid rgba(0, 240, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out),
              border-color 0.25s;
}
.cursor-ring.is-hover {
  width: 64px; height: 64px;
  border-color: rgba(139, 92, 255, 0.9);
  background: rgba(139, 92, 255, 0.08);
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: max(24px, 4vw);
  transition: transform 0.45s var(--ease-out), background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(3, 4, 9, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.nav.hidden { transform: translateY(-100%); }

.nav-logo {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.logo-mark {
  animation: spin-slow 14s linear infinite;
  display: inline-block;
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.7));
}
@keyframes spin-slow { to { transform: rotate(360deg); } }

.nav-links {
  display: flex;
  gap: 36px;
}
.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  transition: color 0.25s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%;
  height: 1px;
  background: var(--grad);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}
.nav-links a:hover { color: var(--fg); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-cta {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 12px 22px;
  border: 1px solid var(--line);
  border-radius: 100px;
  transition: border-color 0.3s, color 0.3s, box-shadow 0.3s,
              transform 0.3s var(--ease-out);
}
.nav-cta:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.3), inset 0 0 12px rgba(0, 240, 255, 0.08);
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 7px;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}
.nav-burger span {
  width: 26px;
  height: 2px;
  background: var(--fg);
  transition: transform 0.35s var(--ease-out), opacity 0.3s;
}
body.menu-open .nav-burger span:first-child { transform: translateY(4.5px) rotate(45deg); }
body.menu-open .nav-burger span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

/* ---------- Mobile menu ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(3, 4, 9, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 48px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-out), visibility 0.4s;
}
body.menu-open .mobile-menu { opacity: 1; visibility: visible; }
.mobile-menu nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.mobile-link {
  font-family: var(--font-d);
  font-size: clamp(1.6rem, 7vw, 2.6rem);
  font-weight: 600;
  text-transform: uppercase;
  padding: 6px 16px;
  transition: color 0.25s, letter-spacing 0.3s;
}
.mobile-link:hover { color: var(--cyan); letter-spacing: 0.04em; }
.mobile-menu-foot { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.12em; }

/* ---------- Reveal animations ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s var(--ease-out) var(--d, 0s),
              transform 0.9s var(--ease-out) var(--d, 0s);
}
[data-reveal].in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}
#field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero-glow {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(50% 42% at 74% 38%, rgba(139, 92, 255, 0.12), transparent 70%),
    radial-gradient(42% 36% at 14% 80%, rgba(0, 240, 255, 0.09), transparent 70%);
}
/* Perspective grid floor */
.hero::after {
  content: '';
  position: absolute;
  left: -25%; right: -25%; bottom: -4%;
  height: 46%;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.13) 1px, transparent 1px);
  background-size: 46px 46px;
  transform: perspective(640px) rotateX(64deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 85%);
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 85%);
  animation: gridmove 2.2s linear infinite;
}
@keyframes gridmove { to { background-position: 0 46px, 0 0; } }

.hero-content {
  position: relative;
  z-index: 2;
  padding-block: 48px;
  will-change: transform, opacity;
}

.eyebrow {
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  margin-bottom: 28px;
  text-shadow: 0 0 16px rgba(0, 240, 255, 0.5);
}

.hero-title {
  font-family: var(--font-d);
  font-weight: 600;
  font-size: clamp(1.9rem, 7vw, 5.6rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 40px;
}
.hero-title .line {
  display: block;
  text-shadow: -3px 0 rgba(0, 240, 255, 0.18), 3px 0 rgba(255, 46, 151, 0.18);
}
.accent { color: var(--cyan); text-shadow: 0 0 24px rgba(0, 240, 255, 0.8); }

/* Outlined type strokes cleanly in Space Grotesk (Unbounded's overlapping
   contours show seams under text-stroke) — mixing faces here is intentional. */
.outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--fg);
  font-family: var(--font-g);
  font-weight: 700;
}
.grad {
  background: linear-gradient(100deg, var(--cyan), var(--violet) 45%, var(--magenta) 70%, var(--cyan));
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 7s linear infinite;
  filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.3));
}
@keyframes sheen { to { background-position: 220% 0; } }

/* Glitch effect */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  -webkit-text-stroke: 1.5px var(--fg);
  color: transparent;
}
.glitch.glitching::before {
  opacity: 0.9;
  -webkit-text-stroke: 1.5px var(--cyan);
  animation: glitch-a 0.32s steps(2) both;
}
.glitch.glitching::after {
  opacity: 0.9;
  -webkit-text-stroke: 1.5px var(--magenta);
  animation: glitch-b 0.32s steps(2) both;
}
@keyframes glitch-a {
  0% { transform: translate(-6px, 3px); clip-path: inset(10% 0 55% 0); }
  50% { transform: translate(5px, -2px); clip-path: inset(60% 0 8% 0); }
  100% { transform: translate(0, 0); clip-path: inset(0 0 0 0); opacity: 0; }
}
@keyframes glitch-b {
  0% { transform: translate(6px, -3px); clip-path: inset(55% 0 12% 0); }
  50% { transform: translate(-5px, 2px); clip-path: inset(8% 0 62% 0); }
  100% { transform: translate(0, 0); clip-path: inset(0 0 0 0); opacity: 0; }
}

.hero-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
}
.hero-sub p {
  max-width: 46ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
}

.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-g);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 16px 30px;
  border-radius: 100px;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s, background 0.3s,
              color 0.3s, border-color 0.3s, filter 0.3s;
  will-change: transform;
}
.btn svg { transition: transform 0.3s var(--ease-out); }
.btn:hover svg { transform: translateX(4px); }

.btn-primary {
  background: linear-gradient(92deg, var(--cyan), var(--violet));
  color: #02060A;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.25);
}
.btn-primary:hover {
  box-shadow: 0 0 60px rgba(0, 240, 255, 0.45), 0 0 24px rgba(139, 92, 255, 0.4);
  filter: brightness(1.12);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--fg);
  background: rgba(3, 4, 9, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.2), inset 0 0 14px rgba(0, 240, 255, 0.06);
}

.btn-big {
  font-size: 1.15rem;
  padding: 22px 44px;
  letter-spacing: 0.04em;
}

.hero-foot {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 28px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.scroll-arrow {
  display: inline-block;
  animation: bob 1.6s ease-in-out infinite;
  color: var(--cyan);
}
@keyframes bob { 50% { transform: translateY(5px); } }

/* ---------- Marquee ---------- */
.marquee {
  border-block: 1px solid var(--line);
  overflow: hidden;
  padding-block: 18px;
  background: var(--bg-2);
  position: relative;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee-track span {
  font-family: var(--font-d);
  font-weight: 500;
  font-size: clamp(0.85rem, 1.7vw, 1.15rem);
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: var(--fg);
}
.marquee-track i {
  font-style: normal;
  color: var(--cyan);
  margin-inline: 18px;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.7);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Manifesto ---------- */
.manifesto { height: 220vh; position: relative; }
.manifesto-sticky {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(40% 50% at 85% 30%, rgba(139, 92, 255, 0.07), transparent 70%),
    var(--bg);
}
.manifesto-text {
  font-family: var(--font-g);
  font-weight: 500;
  font-size: clamp(1.15rem, 2.6vw, 2.1rem);
  line-height: 1.7;
  max-width: 32ch;
  text-transform: uppercase;
}
.manifesto-text .w {
  color: rgba(238, 242, 246, 0.13);
  transition: color 0.35s, text-shadow 0.35s;
}
.manifesto-text .w.on { color: var(--fg); }
.manifesto-text em { font-style: normal; }
.manifesto-text em .w.on {
  color: var(--cyan);
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.6);
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding-block: clamp(96px, 12vw, 170px);
}
.section-head {
  margin-bottom: clamp(48px, 6vw, 80px);
  position: relative;
  padding-left: 22px;
}
.section-head::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 2px;
  background: var(--grad);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.5);
}
.section-head h2 {
  font-family: var(--font-d);
  font-weight: 600;
  font-size: clamp(1.5rem, 4.2vw, 3.3rem);
  line-height: 1.15;
  text-transform: uppercase;
}

/* ---------- Bento / cards ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-7 { grid-column: span 7; }

.card {
  position: relative;
  background: linear-gradient(160deg, rgba(255,255,255,0.02), transparent 40%), var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 34px 32px;
  overflow: hidden;
  transition: border-color 0.35s,
              opacity 0.9s var(--ease-out) var(--d, 0s),
              transform 0.9s var(--ease-out) var(--d, 0s);
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
              rgba(0, 240, 255, 0.09), transparent 65%);
  pointer-events: none;
}
.card:hover { border-color: rgba(0, 240, 255, 0.35); }
.card:hover::before { opacity: 1; }

/* Holographic rotating ring border */
.card > .ring, .work-card > .ring { display: none; }
.card::after, .work-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 21px;
  padding: 1px;
  background: conic-gradient(from var(--spin),
    transparent 0turn 0.36turn,
    var(--cyan) 0.47turn,
    var(--violet) 0.53turn,
    transparent 0.64turn 1turn);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.card:hover::after, .work-card:hover::after {
  opacity: 1;
  animation: ringspin 2.6s linear infinite;
}
@keyframes ringspin { to { --spin: 360deg; } }

.card-num {
  position: absolute;
  top: 26px;
  right: 28px;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.card-icon {
  color: var(--cyan);
  margin-bottom: 22px;
  transition: transform 0.35s var(--ease-out), filter 0.35s;
}
.card:hover .card-icon {
  transform: translateY(-3px) scale(1.06);
  filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.8));
}
.card h3 {
  font-family: var(--font-g);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.card p { color: var(--muted); font-size: 0.95rem; max-width: 48ch; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.tags span {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--muted);
  transition: border-color 0.3s, color 0.3s;
}
.card:hover .tags span { border-color: rgba(0, 240, 255, 0.3); color: var(--cyan); }

.card-cta {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.07), rgba(139, 92, 255, 0.1));
  display: flex;
  flex-direction: column;
}
.card-link {
  margin-top: auto;
  padding-top: 18px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--cyan);
  transition: letter-spacing 0.3s, text-shadow 0.3s;
}
.card-link:hover {
  letter-spacing: 0.2em;
  text-shadow: 0 0 16px rgba(0, 240, 255, 0.8);
}

/* Terminal card */
.terminal {
  margin-top: 22px;
  background: #04070E;
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0, 240, 255, 0.04), 0 0 20px rgba(0, 240, 255, 0.06);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.terminal-bar i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #22304a;
}
.terminal-title {
  margin-left: 10px;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.terminal pre {
  padding: 16px 16px 20px;
  font-family: var(--font-m);
  font-size: 0.76rem;
  line-height: 1.7;
  color: #7FF7DD;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 128px;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.25);
}
.term-cursor { animation: blink 0.9s steps(2) infinite; color: var(--cyan); }

/* ---------- Work ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.work-card {
  position: relative;
  display: block;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px 20px 28px;
  background: var(--card);
  transition: border-color 0.35s,
              opacity 0.9s var(--ease-out) var(--d, 0s),
              transform 0.9s var(--ease-out) var(--d, 0s);
}
.work-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
}
.work-card.card-cta {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.07), rgba(139, 92, 255, 0.1)), var(--card);
}
.work-card.card-cta h3 { margin-top: 4px; }
.work-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 22px;
  background-size: 44px 44px, 44px 44px, cover;
}
.work-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: repeating-linear-gradient(0deg,
    transparent 0 3px, rgba(255, 255, 255, 0.035) 3px 4px);
  pointer-events: none;
}
.work-thumb::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: -22%;
  height: 18%;
  z-index: 2;
  background: linear-gradient(to bottom, transparent, rgba(0, 240, 255, 0.16), transparent);
  animation: scan 3.6s linear infinite;
  pointer-events: none;
}
@keyframes scan { to { top: 122%; } }
.thumb-cyan {
  background:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(140deg, #041A22, #06283A 55%, #04101E);
}
.thumb-violet {
  background:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(140deg, #100A2E, #1D1145 55%, #0B0822);
}
.thumb-magenta {
  background:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(140deg, #24071A, #3A0D28 55%, #16040F);
}
.thumb-gold {
  background:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(140deg, #2A1D04, #3A2906 55%, #170F02);
}
.orb {
  position: absolute;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(2px);
  transition: transform 0.6s var(--ease-out);
}
.thumb-cyan .orb { background: radial-gradient(circle at 35% 35%, rgba(0,240,255,0.85), rgba(0,240,255,0.05) 68%); }
.thumb-violet .orb { background: radial-gradient(circle at 35% 35%, rgba(139,92,255,0.85), rgba(139,92,255,0.05) 68%); }
.thumb-magenta .orb { background: radial-gradient(circle at 35% 35%, rgba(255,46,151,0.8), rgba(255,46,151,0.05) 68%); }
.thumb-gold .orb { background: radial-gradient(circle at 35% 35%, rgba(255,184,0,0.85), rgba(255,184,0,0.05) 68%); }
.work-card:hover .orb { transform: translate(-50%, -50%) scale(1.22); }

.work-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 12px;
}
.work-card h3 {
  font-family: var(--font-g);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 8px;
  transition: color 0.3s;
}
.work-card:hover h3 { color: var(--cyan); }
.work-card > p { color: var(--muted); font-size: 0.92rem; }
.work-stat {
  margin-top: 18px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.work-stat strong {
  display: block;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 2px;
  filter: drop-shadow(0 0 14px rgba(0, 240, 255, 0.3));
}

/* ---------- Stats ---------- */
.stats-section {
  padding-block: 0;
  border-block: 1px solid var(--line);
  background: var(--bg-2);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  position: relative;
  padding: clamp(40px, 5vw, 64px) 24px clamp(52px, 6vw, 76px);
  text-align: center;
}
.stat + .stat { border-left: 1px solid var(--line); }
.stat::after {
  content: '';
  position: absolute;
  left: 30%; right: 30%;
  bottom: 30px;
  height: 2px;
  background: var(--grad);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--ease-out);
}
.stats.in .stat::after { transform: scaleX(1); }
.stats.in .stat:nth-child(2)::after { transition-delay: 0.15s; }
.stats.in .stat:nth-child(3)::after { transition-delay: 0.3s; }
.stats.in .stat:nth-child(4)::after { transition-delay: 0.45s; }
.stat-num {
  display: block;
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
  filter: drop-shadow(0 0 18px rgba(0, 240, 255, 0.25));
}
.stat-label {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Process ---------- */
.process {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.step {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  position: relative;
}
.step::before {
  content: '';
  position: absolute;
  top: -1px; left: 0;
  height: 1px;
  width: 0;
  background: var(--grad);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
  transition: width 1s var(--ease-out) 0.25s;
}
.step.in::before { width: 100%; }
.step-num {
  display: block;
  font-family: var(--font-g);
  font-size: clamp(2.4rem, 4.4vw, 3.5rem);
  font-weight: 700;
  -webkit-text-stroke: 1px rgba(0, 240, 255, 0.55);
  color: transparent;
  margin-bottom: 18px;
  line-height: 1;
}
.step h3 {
  font-family: var(--font-g);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.step p { color: var(--muted); font-size: 0.92rem; }

/* ---------- CTA ---------- */
.cta-section {
  position: relative;
  overflow: hidden;
  text-align: center;
  border-top: 1px solid var(--line);
}
.cta-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(46% 55% at 50% 115%, rgba(139, 92, 255, 0.22), transparent 72%),
    radial-gradient(30% 40% at 50% 110%, rgba(0, 240, 255, 0.15), transparent 70%);
}
.cta-inner { position: relative; }
.cta-inner .eyebrow { margin-bottom: 20px; }
.cta-title {
  font-family: var(--font-d);
  font-weight: 600;
  font-size: clamp(2rem, 7.5vw, 6rem);
  line-height: 1.08;
  text-transform: uppercase;
  margin-bottom: 28px;
  text-shadow: -3px 0 rgba(0, 240, 255, 0.15), 3px 0 rgba(255, 46, 151, 0.15);
}
.hollow {
  position: relative;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--fg);
  font-family: var(--font-g);
  font-weight: 700;
  transition: color 0.4s;
}
.hollow::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 0;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.7s var(--ease-out);
}
.cta-title:hover .hollow::after { clip-path: inset(0 0 0 0); }

.cta-sub {
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  margin-bottom: 44px;
}
.cta-mail {
  margin-top: 28px;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding-top: clamp(48px, 6vw, 80px);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 56px;
}
.footer-brand p {
  color: var(--muted);
  margin-top: 16px;
  font-size: 0.92rem;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-nav a {
  color: var(--muted);
  font-size: 0.92rem;
  width: fit-content;
  transition: color 0.25s, transform 0.25s;
}
.footer-nav a:hover { color: var(--cyan); transform: translateX(4px); }
.footer-social {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: flex-end;
}
.footer-social a {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition: color 0.3s, border-color 0.3s, transform 0.3s var(--ease-out), box-shadow 0.3s;
}
.footer-social a:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  transform: translateY(-3px);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.3);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-block: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.footer-bottom a { transition: color 0.25s; }
.footer-bottom a:hover { color: var(--cyan); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1200px) {
  .hud-rail { display: none; }
}
@media (max-width: 1024px) {
  .span-4, .span-5, .span-7 { grid-column: span 6; }
  .work-grid { grid-template-columns: 1fr 1fr; }
  .process { grid-template-columns: 1fr 1fr; row-gap: 48px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-social { justify-content: flex-start; grid-column: span 2; }
}

@media (max-width: 720px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .span-4, .span-5, .span-7 { grid-column: span 12; }
  .work-grid { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat + .stat { border-left: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line); }
  .hero-sub { gap: 24px; }
  .hero-foot { font-size: 0.6rem; }
  .hero-foot-mid { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-social { grid-column: auto; }
  .manifesto { height: 180vh; }
  .hud-corner { display: none; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .manifesto { height: auto; }
  .manifesto-sticky { position: static; }
  .manifesto-text .w { color: var(--fg); }
  .manifesto-text em .w { color: var(--cyan); }
  .marquee-track { animation: none; }
  .noise { animation: none; }
  #field { display: none; }
  .hero::after { animation: none; }
  .aurora i { animation: none; }
  .work-thumb::after { display: none; }
}
