:root {
  --bg: #020102;
  --fg: #fff3dc;
  --muted: rgba(255, 243, 220, .68);
  --line: rgba(255, 243, 220, .17);
  --glass: rgba(18, 7, 22, .52);
  --accent: #d46d2d;
  --accent-2: #3fd0ad;
  --accent-3: #bc4394;
  --violet: #7c1f60;
  --deep-violet: #441138;
  --ocean: #253857;
  --powder: #74a1a9;
  --shadow: 0 40px 100px rgba(2, 1, 2, .58);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  color: var(--fg);
  background:
    radial-gradient(circle at 80% 0%, rgba(188,67,148,.28), transparent 35%),
    radial-gradient(circle at 12% 20%, rgba(63,208,173,.16), transparent 30%),
    #020102;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

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

.grain {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: .18;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 260 260' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(63,208,173,.85);
  box-shadow: 0 0 28px rgba(188,67,148,.28);
  border-radius: 999px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 60;
  opacity: .8;
  transition: width .2s ease, height .2s ease, opacity .2s ease;
}

.side-rail {
  position: fixed;
  z-index: 20;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 34px;
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  color: rgba(247,243,232,.42);
}

.section {
  position: relative;
  min-height: 100vh;
  padding: 120px clamp(22px, 6vw, 92px);
}

.hero {
  display: grid;
  align-items: center;
  overflow: hidden;
  padding-top: 120px;
}

.video-stage, .video-stage > * {
  position: absolute;
  inset: 0;
}

.video-stage {
  z-index: -3;
  background: #020102;
}

.yt-frame {
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.25s ease, transform 6s ease;
  pointer-events: none;
}

.yt-frame.active {
  opacity: .72;
  transform: scale(1.02);
}

.yt-frame iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120vw;
  height: 67.5vw;
  min-height: 120vh;
  min-width: 213.33vh;
  transform: translate(-50%, -50%);
  border: 0;
  filter: saturate(.95) contrast(1.2) brightness(.58) hue-rotate(-8deg);
}

.video-vignette {
  background:
    linear-gradient(90deg, rgba(2,1,2,.96), rgba(68,17,56,.40) 46%, rgba(2,1,2,.76)),
    radial-gradient(circle at 62% 42%, transparent 0 28%, rgba(2,1,2,.86) 76%),
    radial-gradient(circle at 20% 82%, rgba(212,109,45,.22), transparent 38%);
  z-index: 2;
}

.fallback-motion {
  z-index: -1;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(188,67,148,.40), transparent 28%),
    conic-gradient(from 220deg, rgba(63,208,173,.18), transparent, rgba(212,109,45,.24), transparent, rgba(116,161,169,.12));
  animation: spinBg 16s linear infinite;
}

#neuralCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: .78;
}

.nav {
  position: fixed;
  top: 18px;
  left: clamp(22px, 6vw, 92px);
  right: clamp(22px, 6vw, 92px);
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(18,7,22,.50);
  backdrop-filter: blur(22px);
  border-radius: 999px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: .1em; }
.brand-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(188,67,148,.42));
}
.brand-copy { font-size: 13px; color: var(--fg); }
.nav-links { display: flex; gap: clamp(12px, 2vw, 28px); color: var(--muted); font-size: 13px; }
.nav-links a { transition: color .2s ease; }
.nav-links a:hover { color: var(--fg); }

.hero-content { max-width: 980px; position: relative; z-index: 2; }
.eyebrow {
  margin: 0 0 18px;
  color: var(--accent-2);
  letter-spacing: .32em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
}
.headline, h2 {
  margin: 0;
  font-size: clamp(54px, 9vw, 132px);
  line-height: .86;
  letter-spacing: -.07em;
  max-width: 1100px;
}
h2 { font-size: clamp(42px, 6vw, 92px); }
.hero-copy, .studio-copy p, .contact p {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.45;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: #fff3dc;
  border-color: rgba(212,109,45,.62);
  font-weight: 900;
  box-shadow: 0 18px 50px rgba(188,67,148,.26);
}
.button.ghost { background: rgba(255,255,255,.05); }
.button:hover { transform: translateY(-3px); }


.hero-logo {
  display: block;
  width: min(260px, 44vw);
  margin: 0 0 26px -10px;
  object-fit: contain;
  filter:
    drop-shadow(0 18px 55px rgba(188,67,148,.34))
    drop-shadow(0 0 32px rgba(63,208,173,.18));
  transform-style: preserve-3d;
}

.floating-logo {
  animation: logoFloat 6.5s ease-in-out infinite;
}

.palette-row {
  display: flex;
  gap: 8px;
  margin: 18px 0 4px;
}

.palette-row span {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255,243,220,.22);
  border-radius: 999px;
  background: var(--chip);
  box-shadow: 0 8px 22px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.22);
}


.hero-panel {
  position: absolute;
  right: clamp(22px, 6vw, 92px);
  bottom: 80px;
  z-index: 4;
  width: min(360px, calc(100% - 44px));
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(26px);
  border-radius: 28px;
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
}
.panel-kicker { display: block; margin-bottom: 8px; color: var(--accent-2); font-size: 10px; letter-spacing: .26em; }
.hero-panel strong { display: block; font-size: 23px; margin-bottom: 8px; }
.hero-panel p { color: var(--muted); line-height: 1.42; }
.panel-control {
  margin-top: 10px;
  color: var(--fg);
  background: rgba(255,255,255,.08);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(247,243,232,.56);
}

.section-header { display: flex; justify-content: space-between; gap: 32px; align-items: end; margin-bottom: 60px; }
.section-header .eyebrow { min-width: 180px; }
.section-header.narrow { display: block; max-width: 960px; }
.work { background: linear-gradient(180deg, #020102, #130615 54%, #081014); }
.work-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.work-card {
  min-height: 380px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.025));
  transform-style: preserve-3d;
  transition: border-color .2s ease, background .2s ease;
}
.work-card:hover { border-color: rgba(212,109,45,.72); background: rgba(188,67,148,.12); }
.work-card span { color: var(--accent); font-weight: 900; }
.work-card h3 { margin: 130px 0 12px; font-size: 30px; letter-spacing: -.04em; }
.work-card p { color: var(--muted); line-height: 1.55; }

.studio {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: clamp(30px, 8vw, 120px);
  align-items: center;
  background:
    radial-gradient(circle at 20% 50%, rgba(212,109,45,.22), transparent 34%),
    radial-gradient(circle at 70% 20%, rgba(63,208,173,.13), transparent 30%),
    #060207;
}
.orbital-wrap { display: grid; place-items: center; min-height: 520px; perspective: 1000px; }
.orbital {
  position: relative;
  width: min(420px, 80vw);
  aspect-ratio: 1;
  transform-style: preserve-3d;
  animation: floatOrb 8s ease-in-out infinite;
}
.orbit {
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(247,243,232,.2);
  border-radius: 50%;
  transform-style: preserve-3d;
}
.orbit-one { animation: orbitA 8s linear infinite; }
.orbit-two { animation: orbitB 11s linear infinite; inset: 22%; }
.orbit-three { animation: orbitC 13s linear infinite; inset: 3%; }
.orbit i {
  position: absolute;
  top: 0;
  left: 50%;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 28px var(--accent);
}
.core {
  position: absolute;
  inset: 28%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(188,67,148,.18), rgba(255,255,255,.035));
  font-weight: 1000;
  letter-spacing: .18em;
  overflow: hidden;
}
.core img {
  width: 82%;
  height: 82%;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(63,208,173,.26));
}
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 34px; }
.stats div { padding: 18px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.04); }
.stats strong { display: block; font-size: 34px; letter-spacing: -.04em; }
.stats span { color: var(--muted); font-size: 13px; }

.services { background: #07030a; }
.service-stack { margin-top: 54px; display: grid; gap: 12px; }
.service-row {
  width: 100%;
  text-align: left;
  display: grid;
  grid-template-columns: 80px 1fr 1.3fr;
  align-items: center;
  gap: 20px;
  padding: 24px;
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,.035);
  cursor: pointer;
  transition: transform .25s ease, background .25s ease, border-color .25s ease;
}
.service-row:hover, .service-row.active {
  transform: translateX(14px);
  background: linear-gradient(90deg, rgba(124,31,96,.34), rgba(63,208,173,.08), rgba(255,255,255,.04));
  border-color: rgba(212,109,45,.74);
}
.service-row span { color: var(--accent-2); font-weight: 900; }
.service-row b { font-size: clamp(22px, 3vw, 42px); letter-spacing: -.04em; }
.service-row em { color: var(--muted); font-style: normal; }

.marquee-section {
  min-height: auto;
  padding-top: 70px;
  padding-bottom: 70px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--accent-3) 45%, var(--ocean));
  color: #fff3dc;
}
.marquee { white-space: nowrap; font-size: clamp(36px, 8vw, 110px); font-weight: 1000; letter-spacing: -.08em; line-height: .92; }
.marquee span { display: inline-block; animation: marquee 23s linear infinite; }
.marquee.reverse span { animation-direction: reverse; animation-duration: 28s; }

.contact {
  min-height: 74vh;
  display: grid;
  grid-template-columns: 1fr minmax(300px, 520px);
  align-items: center;
  gap: 50px;
  background:
    radial-gradient(circle at 84% 30%, rgba(63,208,173,.15), transparent 30%),
    radial-gradient(circle at 15% 70%, rgba(188,67,148,.16), transparent 34%),
    #020102;
}
.contact-card {
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}
.contact-card a { padding-bottom: 18px; border-bottom: 1px solid var(--line); color: var(--fg); }
.contact-card small { color: var(--muted); }

.footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.footer-brand img { width: 28px; height: 28px; object-fit: contain; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 30px clamp(22px, 6vw, 92px);
  color: rgba(247,243,232,.58);
  border-top: 1px solid var(--line);
  background: #020102;
}

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .75s ease, transform .75s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes spinBg { to { transform: rotate(360deg) scale(1.3); } }
@keyframes logoFloat { 0%, 100% { transform: translateY(0) rotateZ(-1.5deg); } 50% { transform: translateY(-10px) rotateZ(1.5deg); } }
@keyframes floatOrb { 0%,100% { transform: translateY(0) rotateX(64deg) rotateZ(0deg); } 50% { transform: translateY(-18px) rotateX(64deg) rotateZ(12deg); } }
@keyframes orbitA { to { transform: rotateZ(360deg) rotateX(68deg); } }
@keyframes orbitB { to { transform: rotateZ(-360deg) rotateY(68deg); } }
@keyframes orbitC { to { transform: rotateZ(360deg) rotateX(-68deg); } }
@keyframes marquee { to { transform: translateX(-50%); } }

@media (max-width: 980px) {
  .side-rail { display: none; }
  .nav { left: 14px; right: 14px; }
  .nav-links { display: none; }
  .hero-panel { position: relative; right: auto; bottom: auto; margin-top: 48px; }
  .section-header, .studio, .contact { grid-template-columns: 1fr; display: grid; }
  .hero-logo { width: min(220px, 60vw); }
  .work-grid { grid-template-columns: 1fr 1fr; }
  .service-row { grid-template-columns: 48px 1fr; }
  .service-row em { grid-column: 2; }
}

@media (max-width: 640px) {
  .section { padding: 96px 18px; }
  .headline { font-size: clamp(46px, 16vw, 78px); }
  .work-grid, .stats { grid-template-columns: 1fr; }
  .work-card { min-height: 280px; }
  .work-card h3 { margin-top: 70px; }
  footer { flex-direction: column; }
  .cursor-dot { display: none; }
}

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