@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/inter-400.woff2) format('woff2'), url(fonts/inter-400.ttf) format('truetype'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/inter-600.woff2) format('woff2'), url(fonts/inter-600.ttf) format('truetype'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/inter-700.woff2) format('woff2'), url(fonts/inter-700.ttf) format('truetype'); }

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

:root {
  --bg: #05060d;
  --bg-alt: #0a0c18;
  --bg-card: rgba(255, 255, 255, 0.025);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --accent: #4a6cf7;
  --accent-2: #00d4ff;
  --accent-glow: rgba(74, 108, 247, 0.55);
  --text: #c8ccdb;
  --text-bright: #ffffff;
  --text-dim: #6b7088;
  --max-width: 1100px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 0.9375rem;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Animated backdrop grid — sits under everything */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(74, 108, 247, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 108, 247, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: -1px -1px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at 50% 30%, black 0%, transparent 70%);
}

/* Soft gradient blobs */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(600px 400px at 15% 10%, rgba(74, 108, 247, 0.18), transparent 70%),
    radial-gradient(500px 400px at 90% 80%, rgba(0, 212, 255, 0.12), transparent 70%);
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--text-bright); }

/* ===== Nav ===== */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0 24px;
  background: rgba(5, 6, 13, 0.7);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
nav .nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
nav .logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-bright);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
nav .nav-logo {
  height: 28px;
  width: auto;
  /* Same chroma-key trick as the ticker / hero rabbit — drops the PNG's
     white background by inverting then hue-rotating back, then screen-blends
     the resulting near-black background into the dark nav. */
  filter: invert(1) hue-rotate(180deg) brightness(1.1);
  mix-blend-mode: screen;
}
nav .logo span {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
}
nav ul a {
  color: var(--text-dim);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}
nav ul a:hover, nav ul a.active {
  color: var(--text-bright);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 78vh;
  padding: 80px 24px 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  z-index: 1;
}
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(74, 108, 247, 0.08);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-2);
  margin-bottom: 28px;
}
.hero-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px var(--accent-2);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--text-bright);
  max-width: 14ch;
  margin: 0 auto 24px;
}
.hero h1 .grad {
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 60%, #b48cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 100%;
  animation: gradShift 8s ease-in-out infinite;
}
@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.hero p {
  color: var(--text);
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  max-width: 580px;
  margin: 0 auto 32px;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--text-bright);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 8px 32px var(--accent-glow);
}
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--accent-glow);
  color: var(--text-bright);
}
.hero-cta::after {
  content: '→';
  transition: transform 0.2s;
}
.hero-cta:hover::after { transform: translateX(4px); }

/* ===== Page headers ===== */
.page-header {
  position: relative;
  padding: 96px 24px 48px;
  z-index: 1;
}
.page-header .inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-bright);
}
.page-header h1 .grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-header p {
  margin-top: 12px;
  color: var(--text-dim);
  font-size: 1.0625rem;
}

/* ===== Content ===== */
.content {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 24px;
  z-index: 1;
}
.section-label {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent-2);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-strong);
}
.content h2 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-bright);
  margin-bottom: 16px;
  margin-top: 56px;
}
.content h2:first-of-type, .content > .section-label + h2 { margin-top: 0; }
.content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-top: 28px;
  margin-bottom: 8px;
}
.content p { margin-bottom: 14px; }
.content ul { margin: 8px 0 16px 20px; }
.content ul li { margin-bottom: 6px; }

/* ===== Cards (glass) ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 32px;
  perspective: 1200px;
}
.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  transform-style: preserve-3d;
  will-change: transform;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, transparent 30%, var(--accent) 50%, var(--accent-2) 70%, transparent 90%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(74, 108, 247, 0.22), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.card:hover {
  border-color: transparent;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.card:hover::before { opacity: 1; }
.card:hover::after { opacity: 1; }
.card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-bright);
  margin: 0 0 8px;
  position: relative;
  z-index: 1;
}
.card p {
  font-size: 0.875rem;
  color: var(--text-dim);
  margin: 0;
  position: relative;
  z-index: 1;
}
.card .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 14px;
  font-size: 1rem;
  box-shadow: 0 8px 24px rgba(74, 108, 247, 0.3);
  position: relative;
  z-index: 1;
}

/* ===== Marquee ticker ===== */
.ticker {
  position: relative;
  border-block: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
  padding: 18px 0;
  overflow: hidden;
  z-index: 1;
}
.ticker-track {
  display: flex;
  align-items: center;
  gap: 56px;
  width: max-content;
  animation: scroll 40s linear infinite;
}
.ticker-item {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}
.ticker-item span {
  color: var(--accent-2);
  margin-right: 10px;
}
.ticker-logo {
  height: 36px;
  width: auto;
  flex-shrink: 0;
  opacity: 0.95;
  /* The PNG has a solid white background (no alpha channel). invert→hue-rotate
     flips the lightness while preserving the original blue, so the white
     square becomes near-black (blends with --bg) and the rabbit stays blue. */
  filter: invert(1) hue-rotate(180deg) brightness(1.1);
  mix-blend-mode: screen;
  user-select: none;
  -webkit-user-drag: none;
}
@keyframes scroll {
  to { transform: translateX(-50%); }
}

/* ===== Rabbit runway — overlay covering the hero. A single rabbit crosses
   left→right every 10 s. JS in scene.js randomizes --rabbit-y on each
   iteration so the rabbit appears at a different vertical position each
   crossing. z-index:-1 keeps it above the canvas (z:-1, earlier in DOM)
   but below the hero text content. */
.rabbit-runway {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}
.rabbit-runner {
  position: absolute;
  top: var(--rabbit-y, 50%);
  left: -80px;
  height: 40px;
  width: auto;
  transform: translateY(-50%);
  filter: invert(1) hue-rotate(180deg) brightness(1.1);
  mix-blend-mode: screen;
  animation: rabbitCross 15s linear infinite;
  user-select: none;
  -webkit-user-drag: none;
}
@keyframes rabbitCross {
  /* Cycle = 15 s. Crossing takes the first 5 s (33 %); the rabbit then
     holds off-screen-right for the remaining 10 s as a gap before the
     next crossing. */
  0%   { left: -80px; }
  33%  { left: 100%; }
  100% { left: 100%; }
}

/* ===== Stats strip ===== */
.stats {
  position: relative;
  z-index: 1;
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
  padding: 56px 24px;
}
.stats-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
}
.stat .num {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.stat .label {
  margin-top: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-dim);
}

/* ===== Contact form ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 32px;
}
.contact-info p { color: var(--text-dim); font-size: 0.9rem; }
.contact-form label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-bright);
  margin-bottom: 6px;
  margin-top: 18px;
}
.contact-form label:first-child { margin-top: 0; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-bright);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  background: rgba(74, 108, 247, 0.06);
}
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form button {
  margin-top: 22px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--text-bright);
  border: none;
  padding: 12px 32px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 8px 24px var(--accent-glow);
}
.contact-form button:hover { transform: translateY(-2px); box-shadow: 0 12px 32px var(--accent-glow); }

/* ===== Legal ===== */
.legal-section { margin-bottom: 32px; }
.legal-section h3 { margin-top: 0; }
.legal-updated {
  color: var(--text-dim);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 32px;
}

/* ===== 404 back link ===== */
.back-home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--text-bright);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 24px var(--accent-glow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.back-home:hover {
  color: var(--text-bright);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--accent-glow);
}

/* ===== Footer ===== */
footer {
  position: relative;
  z-index: 1;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  padding: 40px 24px;
  font-size: 0.8125rem;
}
footer .footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
footer a { color: var(--text-dim); }
footer a:hover { color: var(--text-bright); }
footer .footer-links { display: flex; gap: 24px; }

/* ===== Scroll reveal ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
[data-reveal].revealed {
  opacity: 1;
  transform: none;
}
[data-reveal][data-delay="1"] { transition-delay: 0.08s; }
[data-reveal][data-delay="2"] { transition-delay: 0.16s; }
[data-reveal][data-delay="3"] { transition-delay: 0.24s; }
[data-reveal][data-delay="4"] { transition-delay: 0.32s; }

/* ===== Responsive ===== */
@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .cards { grid-template-columns: 1fr; }
  footer .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
  nav ul { gap: 18px; }
  nav .logo { font-size: 0.9375rem; }
  nav ul a { font-size: 0.75rem; }
  .hero { min-height: 70vh; padding: 56px 20px 72px; }
  .page-header { padding: 64px 20px 32px; }
  .content { padding: 48px 20px; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .ticker-track { animation: none; }
  html { scroll-behavior: auto; }
}
