/* ==========================================================================
   home.css — Kcheat landing page
   Theme: dark grey base, dim accents, cyan + kahoot purple, ambient background
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --bg-900: #0a0a0f;
  --bg-800: #111118;
  --bg-700: #1a1a24;
  --bg-600: #232330;
  --surface: rgba(26, 26, 36, 0.55);
  --surface-strong: rgba(35, 35, 48, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* Text — brightened for readability on dark backgrounds */
  --text-100: #f5f5fa;
  --text-200: #d4d4e0;
  --text-300: #b0b0c0;
  --text-400: #9090a4;

  --cyan: #22d3ee;
  --cyan-dim: #0ea5b8;
  --purple: #7c3aed;
  --kahoot: #5010a8;
  --kahoot-bright: #8b5cf6;
  --accent: #a855f7;

  --radius: 18px;
  --radius-sm: 12px;

  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
}

/* ---------- Reset within content block ---------- */
.home-page * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.home-page {
  font-family: var(--font);
  color: var(--text-100);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Ambient canvas background ---------- */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.home-page {
  position: relative;
  z-index: 1;
}

/* ---------- Layout ---------- */
.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px;
  position: relative;
}

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

/* ---------- Hero ---------- */
.hero {
  text-align: center;
}

.hero-title {
  font-size: clamp(44px, 8vw, 88px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.9s 0.15s forwards;
}

.hero-title .grad {
  background: linear-gradient(120deg, var(--cyan) 0%, var(--kahoot-bright) 55%, var(--kahoot) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--text-200);
  max-width: 560px;
  margin: 0 auto 48px;
  line-height: 1.6;
  opacity: 0;
  animation: fadeUp 0.9s 0.35s forwards;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.9s 0.5s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease;
  font-family: var(--font);
}

.btn-primary {
  background: linear-gradient(120deg, var(--kahoot) 0%, var(--kahoot-bright) 100%);
  color: #fff;
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(124, 58, 237, 0.55);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text-100);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(12px);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ---------- Section heading ---------- */
.section-head {
  text-align: center;
  margin-bottom: 72px;
}

.section-tag {
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(34px, 5.5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 18px;
  color: var(--text-100);
}

.section-desc {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-300);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---------- How it works ---------- */
.steps {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 240px;
}

.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(124, 58, 237, 0.15));
  border: 1px solid var(--border-strong);
  color: var(--cyan);
}

.step-text {
  font-size: 16px;
  color: var(--text-200);
  line-height: 1.5;
}

.step-text strong {
  color: var(--text-100);
  font-weight: 600;
}

/* ---------- Stat row ---------- */
.stat-row {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat .num {
  font-size: clamp(32px, 4vw, 42px);
  font-weight: 800;
  background: linear-gradient(120deg, var(--cyan), var(--kahoot-bright));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat .label {
  font-size: 13px;
  color: var(--text-300);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 6px;
}

/* ---------- Feature grid ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s ease, box-shadow 0.4s ease;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(124, 58, 237, 0.12));
  border: 1px solid var(--border-strong);
}

.feature-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--cyan);
}

.feature-card.purple .feature-icon svg {
  stroke: var(--kahoot-bright);
}

.feature-title {
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  color: var(--text-100);
}

.feature-text {
  color: var(--text-300);
  font-size: 15px;
  line-height: 1.65;
}

.feature-meta {
  margin-top: 22px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 100px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.2);
  color: var(--cyan);
}

.feature-card.purple .chip {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.25);
  color: var(--kahoot-bright);
}

/* ---------- CTA ---------- */
.cta {
  text-align: center;
}

.cta-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  padding: 72px 48px;
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(124, 58, 237, 0.15), transparent 60%);
  pointer-events: none;
}

.cta-card h2 {
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  position: relative;
  color: var(--text-100);
}

.cta-card p {
  color: var(--text-300);
  font-size: 17px;
  max-width: 460px;
  margin: 0 auto 36px;
  position: relative;
  line-height: 1.6;
}

.cta-card .hero-actions {
  position: relative;
  animation: none;
  opacity: 1;
}

.cta-foot {
  margin-top: 28px;
  font-size: 13px;
  color: var(--text-400);
  position: relative;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ---------- Keyframes ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
  .steps {
    gap: 28px;
  }
  .cta-card {
    padding: 48px 24px;
  }
}

@media (max-width: 520px) {
  .section {
    padding: 80px 20px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    justify-content: center;
  }
  .stat-row {
    gap: 28px;
  }
}
