/* ============================================
   EvZero - Common Styles (minimalist rebuild)
   ============================================ */

:root {
  /* backgrounds - deep, near-black */
  --bg-0: #050507;
  --bg-1: #08080b;
  --bg-2: #0d0d11;
  --bg-3: #131319;

  /* purple - refined, not neon */
  --purple:        #8b5cf6;   /* primary */
  --purple-bright: #a78bfa;   /* accent for hovers */
  --purple-deep:   #5b21b6;   /* depth */
  --purple-glow:   rgba(139, 92, 246, 0.22);

  /* text */
  --white:       #ffffff;
  --white-dim:   rgba(255, 255, 255, 0.62);
  --white-faint: rgba(255, 255, 255, 0.38);
  --white-ghost: rgba(255, 255, 255, 0.08);
  --white-line:  rgba(255, 255, 255, 0.06);

  /* glass */
  --glass-bg:     rgba(255, 255, 255, 0.02);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-hover:  rgba(255, 255, 255, 0.035);

  /* sharper radii */
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-xl: 14px;

  /* motion */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

  --nav-height: 64px;

  --font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Unbounded', 'Space Grotesk', 'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
}

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

html, body {
  height: 100%;
  background: var(--bg-0);
  color: var(--white);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  cursor: none;
  font-feature-settings: "ss01", "cv11";
}
body { overscroll-behavior: none; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: none; background: none; border: none; color: inherit; }
img, svg { display: block; }

::selection { background: var(--purple); color: var(--white); }

/* ============================================
   Background - minimal grid + vignette
   ============================================ */
.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-base {
  position: absolute;
  inset: 0;
  background: var(--bg-0);
}

.bg-grid {
  position: absolute;
  inset: 0;
  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: 72px 72px;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 40%, black, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 40%, black, transparent 85%);
}

.bg-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(91, 33, 182, 0.12), transparent 65%),
    radial-gradient(ellipse 70% 50% at 80% 100%, rgba(91, 33, 182, 0.08), transparent 65%);
}

.bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.025;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/></svg>");
}

/* ============================================
   Top navigation - minimalist, no logo
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 32px;
  background: linear-gradient(180deg, rgba(5, 5, 7, 0.9) 0%, rgba(5, 5, 7, 0.5) 60%, transparent 100%);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.nav-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
  transition: opacity 0.4s var(--ease-out);
}
.nav-brand:hover { opacity: 0.75; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--white-faint);
  border-radius: var(--radius-sm);
  transition: color 0.3s var(--ease-out);
}
.nav-links a:hover,
.nav-links a.active { color: var(--white); }
.nav-links a.active { position: relative; }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 2px;
  height: 1px;
  background: var(--white);
}

.nav-cta {
  padding: 9px 18px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--white);
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  transition: all 0.35s var(--ease-out);
}
.nav-cta:hover {
  background: var(--white);
  color: var(--bg-0);
  border-color: var(--white);
}

/* ============================================
   Scroll snap page container
   ============================================ */
.page {
  position: relative;
  z-index: 1;
  height: 100vh;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.page::-webkit-scrollbar { display: none; }

.section {
  position: relative;
  min-height: 100vh;
  padding: calc(var(--nav-height) + 60px) 40px 80px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
}
.section-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

/* reveal animations - fluid + subtle */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 1.1s var(--ease-out),
    transform 1.1s var(--ease-out);
}
.section.is-active .reveal { opacity: 1; transform: none; }
.section.is-active .reveal.d1 { transition-delay: 0.08s; }
.section.is-active .reveal.d2 { transition-delay: 0.16s; }
.section.is-active .reveal.d3 { transition-delay: 0.24s; }
.section.is-active .reveal.d4 { transition-delay: 0.32s; }
.section.is-active .reveal.d5 { transition-delay: 0.40s; }
.section.is-active .reveal.d6 { transition-delay: 0.48s; }
.section.is-active .reveal.d7 { transition-delay: 0.56s; }

/* side section indicator */
.section-indicator {
  position: fixed;
  top: 50%;
  right: 32px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 50;
}
.section-indicator button {
  width: 22px;
  height: 1px;
  border-radius: 0;
  border: none;
  background: var(--white-faint);
  padding: 0;
  transition: all 0.5s var(--ease-out);
  cursor: none;
}
.section-indicator button.active {
  width: 34px;
  background: var(--white);
  height: 1px;
}
.section-indicator button:hover { background: var(--white); }

/* ============================================
   Custom cursor - minimal
   ============================================ */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}
.cursor-dot {
  width: 4px; height: 4px;
  background: var(--white);
  border-radius: 50%;
}
.cursor-ring {
  width: 28px; height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}
.cursor-ring.hover {
  width: 52px; height: 52px;
  border-color: rgba(255, 255, 255, 0.85);
}

/* ============================================
   Pixel cat (monochrome, minimal)
   ============================================ */
.pixel-cat {
  position: fixed;
  top: 0; left: 0;
  width: 32px;
  height: 32px;
  z-index: 200;
  pointer-events: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
  will-change: transform;
  opacity: 0.82;
}
.pixel-cat .cat-flipper {
  width: 100%;
  height: 100%;
  transition: transform 0.25s var(--ease-out);
}
.pixel-cat .cat-flipper.flip { transform: scaleX(-1); }
.pixel-cat .cat-sprite {
  width: 100%;
  height: 100%;
  position: relative;
  animation: catBob 0.8s ease-in-out infinite;
}
.pixel-cat[data-state="sleeping"] .cat-sprite { animation: catBreathe 2.4s ease-in-out infinite; }
.pixel-cat[data-state="idle"] .cat-sprite     { animation: catBreathe 1.8s ease-in-out infinite; }
.pixel-cat[data-state="walking"] .cat-sprite  { animation: catBob 0.5s ease-in-out infinite; }
.pixel-cat[data-state="playing"] .cat-sprite  { animation: catBob 0.25s ease-in-out infinite; }

.cat-z {
  position: absolute;
  top: -14px; left: 22px;
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  opacity: 0;
  font-family: var(--font-mono);
}
.pixel-cat[data-state="sleeping"] .cat-z { animation: zFloat 2s ease-in-out infinite; }

.cat-meow {
  position: absolute;
  top: -20px; left: -12px;
  padding: 3px 8px;
  background: var(--bg-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-size: 9px;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}
.pixel-cat[data-meowing="true"] .cat-meow { opacity: 1; }

@keyframes catBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px); }
}
@keyframes catBreathe {
  0%, 100% { transform: scaleY(1); }
  50%      { transform: scaleY(0.96); }
}
@keyframes zFloat {
  0%   { opacity: 0; transform: translate(0, 0); }
  25%  { opacity: 1; }
  100% { opacity: 0; transform: translate(8px, -12px); }
}

/* ============================================
   Glass card - subtle, sharp
   ============================================ */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
}

.card {
  background: var(--bg-1);
  border: 1px solid var(--white-line);
  border-radius: var(--radius-md);
  padding: 32px;
  transition:
    border-color 0.5s var(--ease-out),
    background 0.5s var(--ease-out),
    transform 0.6s var(--ease-out);
}
.card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: var(--bg-2);
}

/* ============================================
   Section labels + typography helpers
   ============================================ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--purple-bright);
}
.eyebrow::before {
  content: "";
  display: block;
  width: 28px;
  height: 1px;
  background: var(--purple-bright);
}
.eyebrow.centered { justify-content: center; }
.eyebrow.plain { color: var(--white-faint); }
.eyebrow.plain::before { background: var(--white-faint); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  line-height: 0.92;
}

.display-xl {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(72px, 14vw, 220px);
  letter-spacing: -0.05em;
  line-height: 0.85;
  text-transform: uppercase;
}

.display-lg {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 8vw, 120px);
  letter-spacing: -0.04em;
  line-height: 0.9;
  text-transform: uppercase;
}

.display-md {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 64px);
  letter-spacing: -0.03em;
  line-height: 0.95;
  text-transform: uppercase;
}

.mono { font-family: var(--font-mono); letter-spacing: 0.5px; }

.ev-text .ev   { color: var(--white); }
.ev-text .zero { color: var(--purple-bright); }

.tagline-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--white-dim);
}
.tagline-mono .sep { color: var(--purple-bright); padding: 0 10px; }

/* ============================================
   Scroll hint
   ============================================ */
.scroll-hint {
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--white-faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}
.scroll-hint .line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--white-faint));
  animation: scrollLine 2.4s var(--ease-in-out) infinite;
  transform-origin: top;
}
@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  45%  { transform: scaleY(1); transform-origin: top; }
  50%  { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ============================================
   Footer markers
   ============================================ */
.footer-mini {
  position: fixed;
  bottom: 24px;
  left: 32px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--white-faint);
  letter-spacing: 2px;
  text-transform: uppercase;
  z-index: 50;
  pointer-events: none;
}
.footer-mini-right {
  position: fixed;
  bottom: 24px;
  right: 32px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--white-faint);
  letter-spacing: 2px;
  text-transform: uppercase;
  z-index: 50;
  pointer-events: none;
}

/* ============================================
   Page curtain (transitions)
   ============================================ */
.page-curtain {
  position: fixed;
  inset: 0;
  background: var(--bg-0);
  z-index: 9998;
  transform: translateY(100%);
  transition: transform 0.85s var(--ease-in-out);
  pointer-events: none;
}
.page-curtain.enter { transform: translateY(0); }
.page-curtain.exit  { transform: translateY(-100%); }

/* ============================================
   Button primitive
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--bg-0);
  background: var(--white);
  border: 1px solid var(--white);
  border-radius: var(--radius-sm);
  transition:
    background 0.4s var(--ease-out),
    color 0.4s var(--ease-out),
    transform 0.5s var(--ease-out);
}
.btn:hover {
  background: var(--purple-bright);
  border-color: var(--purple-bright);
  color: var(--bg-0);
  transform: translateY(-2px);
}
.btn .arrow {
  display: inline-block;
  transition: transform 0.4s var(--ease-out);
}
.btn:hover .arrow { transform: translateX(4px); }

.btn.ghost {
  color: var(--white);
  background: transparent;
  border-color: var(--glass-border);
}
.btn.ghost:hover {
  color: var(--bg-0);
  background: var(--white);
  border-color: var(--white);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 860px) {
  .nav { padding: 0 20px; }
  .nav-links { display: none; }
  .section { padding: calc(var(--nav-height) + 40px) 24px 60px; }
  html, body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }
  .pixel-cat { display: none; }
  button, a { cursor: pointer; }
  .section-indicator { right: 14px; }
  .footer-mini, .footer-mini-right { display: none; }
}
