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

:root {
  --black: #000;
  --white: #fff;
  --gray: #666;
  --gray-dim: #333;
  --font: 'Inter', sans-serif;
  --display: 'Syne', sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
}

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

/* Grain */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.4s steps(3) infinite;
}

@keyframes grain {
  0% { transform: translate(0,0); }
  33% { transform: translate(-1%,-1%); }
  66% { transform: translate(1%,1%); }
}

/* ====== INTRO ====== */
.intro {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.intro-rows {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.intro-row {
  display: flex;
  align-items: center;
}

.morph-svg {
  height: clamp(4.2rem, 12vw, 11rem);
  width: auto;
  opacity: 0;
  display: block;
  overflow: visible;
  flex-shrink: 0;
}

.expand-text {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(5rem, 15vw, 14rem);
  text-transform: uppercase;
  letter-spacing: -0.04em;
  line-height: 1;
  width: 0;
  overflow: hidden;
  opacity: 0;
  white-space: nowrap;
}

/* ====== 404 NUKE ====== */
.nuke-screen {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  perspective: 650px;
}

.nuke-screen.active {
  opacity: 1;
  pointer-events: all;
}

.nuke-content {
  text-align: center;
}

.card-outer {
  width: clamp(320px, 55vw, 600px);
  aspect-ratio: 5 / 2.5;
  background:
    radial-gradient(89% 85% at 17% 78%, #ffffff 0%, #d4d4d4 40%, #b0b0b0 78%, #888888 100%),
    url("https://assets.codepen.io/16327/noise-e82662fe.png");
  background-blend-mode: color-dodge;
  border-radius: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 32px;
  opacity: 0;
  transform: scale(0.8);
  will-change: transform;
}

.card-404 {
  width: 80%;
  max-height: 80%;
}

.nuke-sub {
  font-size: 0.9rem;
  color: var(--gray);
  margin-top: 0;
  opacity: 0;
}

.nuke-jk {
  margin-top: 60px;
  opacity: 0;
}

.nuke-jk p {
  font-size: 0.8rem;
  color: var(--gray-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.nuke-back {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  padding-bottom: 2px;
  transition: border-color 0.3s;
}

.nuke-back:hover {
  border-color: var(--white);
}

/* ====== NAV ====== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 40px;
  opacity: 0;
  mix-blend-mode: difference;
}

.nav-logo {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

.nav-cta {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 10px 24px;
  border: 1px solid rgba(255,255,255,0.3);
  transition: 0.3s var(--ease);
}

.nav-cta:hover {
  background: var(--white);
  color: var(--black);
}

/* ====== HERO ====== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  opacity: 0;
}

.hero-tag {
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 32px;
}

.hero-carousel {
  margin-top: 48px;
  opacity: 0;
  user-select: none;
  -webkit-user-select: none;
}

.carousel-window {
  border: 1px solid rgba(255,255,255,0.15);
  padding: 24px 56px;
  overflow: hidden;
  cursor: grab;
  transition: border-color 0.3s;
}

.carousel-window:hover {
  border-color: rgba(255,255,255,0.3);
}

.carousel-window:active {
  cursor: grabbing;
}

.carousel-text {
  font-family: var(--display);
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  text-align: center;
  white-space: nowrap;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: background 0.3s;
  cursor: pointer;
}

.carousel-dot.active {
  background: rgba(255,255,255,0.7);
}

/* ====== SECTIONS ====== */
.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 40px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.section-title {
  font-family: var(--display);
  font-size: clamp(3rem, 8vw, 8rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin-bottom: 0;
}

.st-line {
  display: block;
  overflow: hidden;
}

.st-word {
  display: inline-block;
  transform: translateY(110%);
}

.st-outline {
  -webkit-text-stroke: 1.5px var(--white);
  color: transparent;
}

/* Fade up */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
}

/* ====== CONTACT CHOICES ====== */
.section-contact {
  min-height: auto;
  padding: 160px 40px;
}

.choice-block {
  text-align: center;
}

.choice-label {
  font-family: var(--display);
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 700;
  margin-bottom: 40px;
  letter-spacing: -0.02em;
}

.choice-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-choice {
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 16px 40px;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  transition: 0.3s var(--ease);
  letter-spacing: 0.02em;
}

.btn-choice:hover {
  border-color: var(--white);
}

.btn-contact:hover {
  background: var(--white);
  color: var(--black);
}

.btn-bye:hover {
  background: var(--white);
  color: var(--black);
}

/* ====== GAME FLOW ====== */
.game-flow {
  display: none;
  text-align: center;
}

.game-flow.active {
  display: block;
}

.game-step {
  display: none;
}

.game-step.active {
  display: block;
  animation: stepIn 0.5s var(--ease);
}

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

.game-question {
  font-family: var(--display);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 700;
  margin-bottom: 32px;
}

/* Robot check */
.robot-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 32px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.03);
  color: var(--white);
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.9rem;
  transition: 0.3s var(--ease);
}

.robot-btn:hover {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.06);
}

.robot-box {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s var(--ease);
}

.robot-box.checked {
  background: var(--white);
  border-color: var(--white);
}

.robot-box.checked::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--black);
  border-bottom: 2px solid var(--black);
  transform: rotate(-45deg) translateY(-1px);
}

/* Game arena */
.game-score {
  font-size: 0.8rem;
  color: var(--gray);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.game-arena {
  width: 100%;
  max-width: 500px;
  height: 300px;
  margin: 0 auto;
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
  cursor: crosshair;
}

.glow-orb {
  position: absolute;
  width: 36px;
  height: 36px;
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(255,255,255,0.6), 0 0 60px rgba(255,255,255,0.3), 0 0 100px rgba(255,255,255,0.1);
  cursor: pointer;
  transition: left 0.3s var(--ease), top 0.3s var(--ease);
  animation: orbGlow 1.5s ease-in-out infinite alternate;
}

@keyframes orbGlow {
  from { box-shadow: 0 0 20px rgba(255,255,255,0.6), 0 0 60px rgba(255,255,255,0.3); transform: scale(1); }
  to { box-shadow: 0 0 30px rgba(255,255,255,0.8), 0 0 80px rgba(255,255,255,0.4); transform: scale(1.15); }
}

/* Win */
.game-win {
  font-family: var(--display);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 700;
  margin-bottom: 24px;
}

.email-reveal {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 2px solid rgba(255,255,255,0.3);
  transition: border-color 0.3s;
  opacity: 0;
  transform: scale(0.9);
}

.email-reveal.show {
  animation: emailPop 0.6s var(--ease) forwards;
}

@keyframes emailPop {
  from { opacity: 0; transform: scale(0.9) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.email-reveal:hover {
  border-color: var(--white);
}

/* Footer */
.footer {
  padding: 32px 40px;
  text-align: center;
  font-size: 0.7rem;
  color: var(--gray-dim);
  letter-spacing: 0.05em;
}

/* Responsive */
@media (max-width: 768px) {
  .nav { padding: 16px 20px; }
  .nav-logo { font-size: 1rem; }
  .nav-cta { font-size: 0.7rem; padding: 8px 16px; }

  .hero { padding: 80px 20px; min-height: 100svh; }
  .hero-tag { font-size: 0.65rem; letter-spacing: 0.2em; margin-bottom: 24px; }

  .hero-carousel { margin-top: 32px; }
  .carousel-window { padding: 16px 24px; min-height: 90px; display: flex; align-items: center; justify-content: center; }
  .carousel-text { font-size: clamp(1.1rem, 5vw, 1.6rem); white-space: normal; }

  .intro-rows { max-width: 100vw; overflow: hidden; }
  .morph-svg { height: clamp(2.8rem, 10vw, 4rem); }
  .expand-text { font-size: clamp(3.2rem, 12vw, 5rem); }

  .section { padding: 80px 20px; min-height: auto; }
  .section-title { font-size: clamp(2.2rem, 10vw, 3.5rem); }

  .section-contact { padding: 80px 20px; }
  .choice-label { font-size: clamp(1rem, 4vw, 1.3rem); margin-bottom: 28px; }
  .choice-buttons { flex-direction: column; gap: 12px; align-items: center; }
  .btn-choice { width: 100%; max-width: 280px; padding: 14px 32px; font-size: 0.85rem; }

  .game-question { font-size: clamp(1rem, 4vw, 1.3rem); }
  .game-arena { height: 220px; }
  .game-win { font-size: clamp(1rem, 4vw, 1.3rem); }
  .email-reveal { font-size: clamp(1.1rem, 5vw, 1.6rem); }

  .card-outer { width: clamp(280px, 85vw, 400px); border-radius: 1.2rem; }
  .nuke-sub { font-size: 0.75rem; }
  .nuke-jk { margin-top: 40px; }
  .nuke-back { font-size: 0.95rem; }

  .footer { padding: 24px 20px; font-size: 0.6rem; }
}

@media (max-width: 380px) {
  .morph-svg { height: clamp(2.2rem, 9vw, 3rem); }
  .expand-text { font-size: clamp(2.5rem, 11vw, 3.5rem); }
  .carousel-window { padding: 14px 16px; min-height: 80px; }
  .carousel-text { font-size: 1rem; }
  .section-title { font-size: clamp(1.8rem, 9vw, 2.5rem); }
}
