/* ═══════════════════════════════════════════════════
   QUIZ EMPIRE — ECC Frontend Design
   Direction: Playful Editorial
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Playfair+Display:ital,wght@0,700;0,800;1,700&display=swap');

/* ═══ TOKENS ═══ */
:root {
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --bg-deep: #07070f;
  --bg-surface: #0d0d1a;
  --bg-card: rgba(18, 18, 40, 0.6);
  --bg-card-hover: rgba(24, 24, 52, 0.8);

  --text-primary: #eeedf5;
  --text-secondary: #9696b8;
  --text-muted: #6a6a8e;

  --jewel-amethyst: #a855f7;
  --jewel-emerald: #22d3a3;
  --jewel-sapphire: #3b82f6;
  --jewel-ruby: #f43f5e;
  --jewel-gold: #facc15;

  --gradient-hero: linear-gradient(135deg, #a855f7, #3b82f6, #22d3a3);
  --gradient-accent: linear-gradient(135deg, #a855f7, #f43f5e);
  --gradient-card: linear-gradient(135deg, rgba(168,85,247,0.08), rgba(59,130,246,0.04));

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-card: 0 1px 3px rgba(0,0,0,0.3), 0 0 0 1px rgba(168,85,247,0.03);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(168,85,247,0.08);
  --shadow-glow: 0 0 60px rgba(168,85,247,0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ═══ ATMOSPHERE ═══ */

/* Subtle noise overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* Gradient orbs with noise texture */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  animation: orbFloat 25s ease-in-out infinite;
  will-change: transform;
}
.orb::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  mix-blend-mode: overlay;
  opacity: 0.3;
}
.o1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(168,85,247,0.15), transparent 70%);
  top: -300px; left: -200px;
  animation-delay: 0s;
}
.o2 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(59,130,246,0.12), transparent 70%);
  bottom: -250px; right: -150px;
  animation-delay: -8s;
}
.o3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(34,211,163,0.08), transparent 70%);
  top: 40%; left: 60%;
  animation-delay: -16s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0,0) scale(1); }
  25% { transform: translate(100px,-80px) scale(1.05); }
  50% { transform: translate(-60px,100px) scale(0.95); }
  75% { transform: translate(80px,60px) scale(1.02); }
}

/* ═══ HEADER ═══ */
.hdr {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(7,7,15,0.9) 0%, transparent 100%);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  font-style: italic;
}
.logo span {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hdr nav { display: flex; gap: 2px; }
.hdr nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  transition: all .25s;
  position: relative;
}
.hdr nav a:hover {
  color: var(--text-primary);
  background: rgba(168,85,247,0.08);
}

/* ═══ HERO ═══ */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 32px 80px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 18px;
  border-radius: 100px;
  background: rgba(168,85,247,0.08);
  border: 1px solid rgba(168,85,247,0.15);
  font-size: 12px;
  font-weight: 600;
  color: var(--jewel-amethyst);
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 32px;
  animation: fadeUp 0.6s ease both;
}
.hero-badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--jewel-emerald);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.3; } }

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 10vw, 96px);
  font-weight: 800;
  font-style: italic;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 24px;
  animation: fadeUp 0.6s ease 0.1s both;
}
.hero h1 .line1 { display: block; }
.hero h1 .line2 {
  display: block;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 500px;
  margin: 0 auto 36px;
  animation: fadeUp 0.6s ease 0.2s both;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 40px;
  border: none;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--jewel-amethyst), var(--jewel-ruby));
  transition: all .3s cubic-bezier(.34,1.56,.64,1);
  text-decoration: none;
  box-shadow: 0 4px 24px rgba(168,85,247,0.25);
  animation: fadeUp 0.6s ease 0.3s both;
  position: relative;
  overflow: hidden;
}
.hero-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.08) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform .5s;
}
.hero-cta:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 40px rgba(168,85,247,0.35);
}
.hero-cta:hover::before { transform: translateX(100%); }

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

/* ═══ STATS BAR ═══ */
.stats {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 32px 40px;
  max-width: 500px;
  margin: -40px auto 60px;
  background: var(--bg-card);
  border: 1px solid rgba(168,85,247,0.06);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px);
  transform: translateY(0);
}
.stat-item { text-align: center; }
.stat-number {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  font-style: italic;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 4px;
  display: block;
}
.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.stat-divider {
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(168,85,247,0.2), transparent);
}

/* ═══ SECTIONS ═══ */
.sec {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 80px 32px;
}

.section-header {
  margin-bottom: 48px;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -1px;
  margin-bottom: 8px;
}
.section-header h2 span {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-header p {
  color: var(--text-secondary);
  font-size: 15px;
}

/* ═══ QUIZ GRID — Asymmetric Magazine Layout ═══ */
.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* Hero card (first in grid) spans wider */
.quiz-grid .qc:first-child:nth-last-child(3),
.quiz-grid .qc:first-child:nth-last-child(3) ~ .qc:nth-child(2) {
  grid-column: span 2;
}

/* Individual card */
.qc {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid rgba(168,85,247,0.04);
  border-radius: var(--radius-xl);
  padding: 28px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all .4s cubic-bezier(.34,1.56,.64,1);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.qc::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--jewel-amethyst), var(--jewel-sapphire), var(--jewel-emerald));
  opacity: 0;
  transition: opacity .4s;
}

.qc:hover {
  transform: translateY(-8px);
  background: var(--bg-card-hover);
  border-color: rgba(168,85,247,0.12);
  box-shadow: var(--shadow-hover), var(--shadow-glow);
}
.qc:hover::before { opacity: 1; }

/* Card icon — atmospheric image background */
.qc-icon {
  width: 100%;
  height: 140px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, rgba(168,85,247,0.1), rgba(59,130,246,0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  transition: all .4s;
}
.qc:hover .qc-icon {
  transform: scale(1.02);
}

.qc-category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 12px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 14px;
  width: fit-content;
}

.qc-category.personality {
  background: rgba(168,85,247,0.1);
  color: var(--jewel-amethyst);
  border: 1px solid rgba(168,85,247,0.12);
}
.qc-category.fun {
  background: rgba(244,63,94,0.1);
  color: var(--jewel-ruby);
  border: 1px solid rgba(244,63,94,0.12);
}
.qc-category.game {
  background: rgba(34,211,163,0.1);
  color: var(--jewel-emerald);
  border: 1px solid rgba(34,211,163,0.12);
}

.qc h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
  line-height: 1.25;
}

.qc p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
  flex: 1;
}

.qc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(168,85,247,0.06);
}

.qc-date {
  font-size: 11px;
  color: var(--text-muted);
}

.qc-cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--jewel-amethyst);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap .3s;
}
.qc:hover .qc-cta { gap: 12px; }

/* ═══ STEPS ═══ */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-card {
  text-align: center;
  padding: 40px 28px;
  background: var(--bg-card);
  border: 1px solid rgba(168,85,247,0.04);
  border-radius: var(--radius-xl);
  transition: all .3s;
  position: relative;
  overflow: hidden;
}

.step-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--jewel-amethyst), var(--jewel-sapphire));
  opacity: 0;
  transition: opacity .3s;
}
.step-card:hover::after { opacity: 1; }

.step-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: rgba(168,85,247,0.08);
}

.step-number {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--jewel-amethyst), var(--jewel-ruby));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  font-style: italic;
  color: #fff;
  margin: 0 auto 16px;
}

.step-icon { font-size: 36px; margin-bottom: 12px; }

.step-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  font-style: italic;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ═══ FOOTER ═══ */
.ft {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(168,85,247,0.06);
  padding: 60px 32px 32px;
  max-width: 1120px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  font-style: italic;
  margin-bottom: 8px;
}
.footer-brand h3 span {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.footer-brand p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  padding: 4px 0;
  transition: color .2s;
}
.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid rgba(168,85,247,0.04);
  padding-top: 24px;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .hdr { padding: 12px 16px; }
  .hero { padding: 100px 20px 60px; min-height: auto; }
  .hero h1 { font-size: 40px; }
  .stats { gap: 24px; padding: 24px; margin-top: -20px; flex-wrap: wrap; }
  .stat-number { font-size: 28px; }
  .sec { padding: 48px 20px; }
  .section-header h2 { font-size: 28px; }
  .steps { grid-template-columns: 1fr; gap: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .quiz-grid { grid-template-columns: 1fr; }
  .quiz-grid .qc:first-child:nth-last-child(3),
  .quiz-grid .qc:first-child:nth-last-child(3) ~ .qc:nth-child(2) {
    grid-column: span 1;
  }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 32px; letter-spacing: -1px; }
  .hero p { font-size: 15px; }
  .hero-cta { padding: 14px 28px; font-size: 14px; }
  .qc { padding: 20px; }
  .qc-icon { height: 100px; }
  .qc h3 { font-size: 17px; }
  .hdr nav a { padding: 6px 12px; font-size: 12px; }
}
