/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #07090f;
  --bg-2: #0d1117;
  --surface: #161b22;
  --border: #21262d;
  --accent: #ff5c2b;
  --accent-glow: rgba(255, 92, 43, 0.15);
  --accent-2: #c4a1ff;
  --c1: #ff5c2b;
  --c2: #7c6af7;
  --c3: #2dd4bf;
  --text: #e6edf3;
  --text-muted: #7d8590;
  --text-dim: #484f58;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.06;
}

/* === HERO === */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 8%;
  overflow: hidden;
}

.hero-inner {
  max-width: 600px;
  position: relative;
  z-index: 2;
}

.hero-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(255, 92, 43, 0.3);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 28px;
}

.hero-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(5rem, 12vw, 9rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
}

.hero-title-drop {
  background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--accent);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 440px;
  line-height: 1.7;
}

/* Animated floating blocks */
.hero-blocks {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 45%;
  max-width: 480px;
  height: 500px;
  z-index: 1;
}

.block {
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  animation: float-block 8s ease-in-out infinite;
}

.block-1 { background: var(--c1); color: #fff; top: 5%; right: 15%; animation-delay: 0s; box-shadow: 0 20px 60px rgba(255, 92, 43, 0.4); }
.block-2 { background: var(--c2); color: #fff; top: 30%; right: 5%; animation-delay: 1.5s; box-shadow: 0 20px 60px rgba(124, 106, 247, 0.4); }
.block-3 { background: var(--c3); color: #022c22; top: 55%; right: 20%; animation-delay: 3s; box-shadow: 0 20px 60px rgba(45, 212, 191, 0.4); }
.block-4 { background: var(--c1); color: #fff; top: 70%; right: 0%; animation-delay: 4.5s; box-shadow: 0 20px 60px rgba(255, 92, 43, 0.4); opacity: 0.7; }
.block-5 { background: var(--c2); color: #fff; top: 15%; right: 40%; animation-delay: 2s; box-shadow: 0 20px 60px rgba(124, 106, 247, 0.4); opacity: 0.5; width: 48px; height: 48px; border-radius: 8px; }

@keyframes float-block {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-18px) rotate(3deg); }
  66% { transform: translateY(10px) rotate(-2deg); }
}

/* === GAME PREVIEW === */
.game-preview {
  position: relative;
  z-index: 1;
  padding: 120px 8%;
  background: var(--bg-2);
}

.preview-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.preview-header {
  margin-bottom: 72px;
}

.preview-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.preview-header h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: start;
  gap: 0;
  margin-bottom: 80px;
}

.step {
  padding: 32px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.step-num {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 2.5rem;
  color: var(--text-dim);
  margin-bottom: 12px;
  letter-spacing: -0.05em;
}

.step h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.step p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.step-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  align-self: center;
  padding-top: 48px;
}

.step-connector::after {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: var(--border);
  position: relative;
}

/* Board visual */
.board-visual {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  max-width: 560px;
}

.board-row {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}

.board-row:last-child { margin-bottom: 0; }

.cell {
  aspect-ratio: 1;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.cell.filled { border-color: transparent; }
.cell.filled.c-1 { background: var(--c1); box-shadow: 0 4px 16px rgba(255, 92, 43, 0.5); }
.cell.filled.c-2 { background: var(--c2); box-shadow: 0 4px 16px rgba(124, 106, 247, 0.5); }
.cell.filled.c-3 { background: var(--c3); box-shadow: 0 4px 16px rgba(45, 212, 191, 0.5); }

.active-row .cell.falling { animation: pulse-glow 1.2s ease-in-out infinite; }

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.95); }
}

/* === FEATURES === */
.features {
  position: relative;
  z-index: 1;
  padding: 120px 8%;
}

.features-inner { max-width: 1100px; margin: 0 auto; }

.features-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 32px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

.feature {
  padding: 44px 40px;
  background: var(--bg-2);
}

.feature-icon {
  color: var(--accent);
  margin-bottom: 20px;
}

.feature h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.feature p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* === CLOSING === */
.closing {
  position: relative;
  z-index: 1;
  padding: 140px 8%;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
}

.closing-inner { max-width: 700px; margin: 0 auto; }

.closing h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 24px;
}

.closing p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto;
}

/* === FOOTER === */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 48px 8%;
}

.footer-inner { max-width: 1100px; margin: 0 auto; }

.footer-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-links a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
}

.footer-links a:hover { text-decoration: underline; }

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .hero { padding: 0 6%; align-items: flex-start; padding-top: 100px; }
  .hero-blocks { display: none; }
  .preview-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .step-connector { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .feature { padding: 32px 24px; }
}

@media (max-width: 600px) {
  .hero { padding: 80px 5% 60px; }
  .game-preview, .features, .closing { padding: 80px 5%; }
  .preview-header h2 { font-size: 1.8rem; }
  .closing h2 { font-size: 1.6rem; }
}