/* ============================================
   VANZENGINE — Design tokens
   ============================================ */
:root {
  --bg-void: #05070d;
  --bg-panel: #0b0f1a;
  --bg-panel-2: #0f1524;
  --accent-cyan: #4ff0ff;
  --accent-violet: #7c5cff;
  --accent-magenta: #ff4fd8;
  --text-primary: #eef2ff;
  --text-secondary: #9aa4c4;
  --text-dim: #5c6488;
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(79, 240, 255, 0.35);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Sora', sans-serif;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

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

html {
  scroll-behavior: smooth;
}

@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;
  }
}

body {
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

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

::selection {
  background: var(--accent-violet);
  color: #fff;
}

/* ============================================
   Ambient background
   ============================================ */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(124, 92, 255, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 15%, rgba(79, 240, 255, 0.14) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(255, 79, 216, 0.10) 0%, transparent 55%),
    var(--bg-void);
}

.grid-overlay {
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 20%, black 0%, transparent 70%);
}

.matrix-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.26;
  mix-blend-mode: screen;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  will-change: transform;
}

.orb-1 {
  width: 480px; height: 480px;
  top: -10%; left: -10%;
  background: radial-gradient(circle, var(--accent-violet), transparent 70%);
  animation: drift1 22s ease-in-out infinite;
}

.orb-2 {
  width: 380px; height: 380px;
  top: 30%; right: -8%;
  background: radial-gradient(circle, var(--accent-cyan), transparent 70%);
  animation: drift2 26s ease-in-out infinite;
}

.orb-3 {
  width: 420px; height: 420px;
  bottom: -12%; left: 30%;
  background: radial-gradient(circle, var(--accent-magenta), transparent 70%);
  animation: drift3 30s ease-in-out infinite;
}

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.1); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, 60px) scale(0.95); }
}
@keyframes drift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -50px) scale(1.08); }
}

.noise {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* ============================================
   Topbar / Burger
   ============================================ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 48px);
  backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, rgba(5,7,13,0.7), transparent);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo {
  height: 52px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
}
.brand-mark span#brandText {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}
.brand-dot { color: var(--accent-cyan); }

.burger {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-glass);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.burger:hover { border-color: var(--border-glow); background: rgba(79,240,255,0.06); }
.burger:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }

.burger span {
  width: 18px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Drawer */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3,4,9,0.6);
  backdrop-filter: blur(4px);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.drawer-overlay.active { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: min(320px, 84vw);
  background: linear-gradient(180deg, var(--bg-panel-2), var(--bg-panel));
  border-left: 1px solid var(--border-glass);
  z-index: 70;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.drawer.active { transform: translateX(0); }

.drawer-inner {
  padding: 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
}

.drawer-close {
  align-self: flex-end;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-glass);
  background: rgba(255,255,255,0.03);
  color: var(--text-primary);
  font-size: 22px;
  line-height: 1;
  margin-bottom: 24px;
}
.drawer-close:hover { border-color: var(--border-glow); }

.drawer-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.drawer-link:hover {
  background: rgba(79,240,255,0.06);
  color: var(--text-primary);
  transform: translateX(-4px);
}

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 20px 60px;
}

.hero-content {
  max-width: 720px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--accent-cyan);
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.1s;
}

.hero-title {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: clamp(42px, 11vw, 84px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.25s;
}

.grad-text {
  background: linear-gradient(120deg, var(--accent-cyan), var(--accent-violet) 55%, var(--accent-magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 60px rgba(124,92,255,0.35);
}

.hero-tagline {
  margin-top: 18px;
  font-size: clamp(14px, 2.4vw, 17px);
  color: var(--text-secondary);
  font-weight: 300;
  max-width: 460px;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.4s;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Video frame */
.video-frame {
  position: relative;
  margin-top: 44px;
  width: min(780px, 100%);
  opacity: 0;
  animation: fadeUp 0.9s ease forwards 0.55s;
}

.video-frame-inner {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 50vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(20px);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03) inset,
    0 30px 80px -20px rgba(0,0,0,0.6);
}

.frame-glow {
  position: absolute;
  inset: -2px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet), var(--accent-magenta));
  opacity: 0.25;
  filter: blur(24px);
  z-index: -1;
}

#mainVideo {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(160deg, var(--bg-panel-2), var(--bg-panel));
  color: var(--text-dim);
  padding: 20px;
  text-align: center;
}
.ph-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: var(--accent-cyan);
  margin-bottom: 6px;
}
.video-placeholder p {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}
.video-placeholder span {
  font-size: 11px;
  color: var(--text-dim);
}
.video-placeholder code {
  background: rgba(255,255,255,0.05);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10.5px;
}

/* Typewriter quote below video */
.typewriter-quote {
  margin-top: 28px;
  max-width: 480px;
  font-family: var(--font-body);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(13px, 2.6vw, 15.5px);
  line-height: 1.6;
  color: var(--text-secondary);
  min-height: 1.6em;
}

.tw-cursor {
  display: inline-block;
  margin-left: 2px;
  color: var(--accent-cyan);
  animation: twBlink 0.9s step-end infinite;
}

@keyframes twBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* CTA */
.cta-btn {
  margin-top: 40px;
  display: inline-flex;
  align-items: center;
  padding: 16px 34px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--bg-void);
  background: linear-gradient(120deg, var(--accent-cyan), var(--accent-violet));
  box-shadow: 0 12px 40px -10px rgba(79,240,255,0.4);
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1), box-shadow 0.25s ease;
  opacity: 0;
  animation: fadeUp 0.9s ease forwards 0.7s;
}
.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 50px -10px rgba(124,92,255,0.5);
}
.cta-btn:active { transform: translateY(-1px) scale(0.98); }
.cta-btn:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 4px; }

/* Floating music on/off button */
.music-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 16px 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border-glass);
  background: rgba(11,15,26,0.75);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px -10px rgba(0,0,0,0.5);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.music-fab:hover { border-color: var(--border-glow); transform: translateY(-2px); }
.music-fab:active { transform: translateY(0) scale(0.97); }
.music-fab:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 3px; }
.music-fab svg { width: 18px; height: 18px; fill: var(--accent-cyan); flex-shrink: 0; }
.fab-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}
.music-fab.is-off { background: rgba(11,15,26,0.5); }
.music-fab.is-off svg { fill: var(--text-dim); }
.music-fab.is-off .fab-label { color: var(--text-dim); }

@media (max-width: 480px) {
  .music-fab { right: 14px; bottom: 14px; height: 44px; padding: 0 14px 0 12px; }
}

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.5;
}
.scroll-hint span {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.scroll-line {
  width: 1px; height: 28px;
  background: linear-gradient(var(--accent-cyan), transparent);
  animation: scrollPulse 1.8s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ============================================
   Links section
   ============================================ */
.links-section {
  position: relative;
  z-index: 1;
  padding: 100px clamp(20px, 6vw, 60px) 60px;
  max-width: 640px;
  margin: 0 auto;
}

.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 5vw, 36px);
  font-weight: 700;
  margin-top: 10px;
  letter-spacing: -0.01em;
}

.link-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  background: rgba(255,255,255,0.025);
  backdrop-filter: blur(10px);
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1), border-color 0.25s ease, background 0.25s ease;
  opacity: 0;
  transform: translateY(18px);
}
.link-card.in-view {
  animation: cardIn 0.6s cubic-bezier(0.16,1,0.3,1) forwards;
}
@keyframes cardIn {
  to { opacity: 1; transform: translateY(0); }
}

.link-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-glow);
  background: rgba(79,240,255,0.05);
}
.link-card:active { transform: translateY(-1px) scale(0.99); }
.link-card:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 3px; }

.link-icon {
  width: 46px; height: 46px;
  flex-shrink: 0;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(79,240,255,0.12), rgba(124,92,255,0.12));
  border: 1px solid var(--border-glass);
}
.link-icon svg { width: 22px; height: 22px; fill: var(--accent-cyan); }

.link-text { flex: 1; min-width: 0; }
.link-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
}
.link-desc {
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 2px;
}

.link-arrow {
  flex-shrink: 0;
  width: 18px; height: 18px;
  color: var(--text-dim);
  transition: transform 0.25s ease, color 0.25s ease;
}
.link-card:hover .link-arrow {
  transform: translateX(4px);
  color: var(--accent-cyan);
}

/* ============================================
   About
   ============================================ */
.about-section {
  position: relative;
  z-index: 1;
  padding: 60px 24px 100px;
}
.about-inner {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  padding: 40px clamp(24px, 5vw, 44px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(14px);
}
.about-inner h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  margin: 10px 0 16px;
}
.about-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  font-weight: 300;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 36px 20px 44px;
  color: var(--text-dim);
  font-size: 12px;
}
.footer-sub {
  margin-top: 6px;
  font-family: var(--font-display);
  color: var(--text-secondary);
  font-size: 13px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 480px) {
  .video-frame-inner { aspect-ratio: 16 / 9; max-height: 32vh; }
  .cta-btn { padding: 14px 26px; font-size: 13px; }
  .brand-logo { height: 40px; max-width: 160px; }
}

@media (min-width: 900px) {
  .hero-title { font-size: 96px; }
}
