/* ========================================
   VIBEPARTY LANDING PAGE
   Art direction: Collaborative, energetic,
   celebratory. Dark base with warm party
   colors — coral, electric lime, soft violet.
   ======================================== */

/* --- Design Tokens --- */
:root {
  /* Type scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-hero: clamp(2.75rem,  1rem    + 5vw,    5.5rem);

  /* Spacing (4px base) */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;

  /* Font families */
  --font-display: 'Clash Display', 'Inter', sans-serif;
  --font-body: 'General Sans', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* --- Dark theme (default) --- */
:root, [data-theme="dark"] {
  --color-bg:             #0c0b10;
  --color-surface:        #14131a;
  --color-surface-2:      #1a1922;
  --color-surface-offset: #18171f;
  --color-surface-dynamic: #222130;
  --color-divider:        #2a293a;
  --color-border:         #35344a;

  --color-text:           #eae9f0;
  --color-text-muted:     #8d8b9e;
  --color-text-faint:     #5c5a70;

  /* Primary: warm coral — party energy */
  --color-primary:        #ff6b6b;
  --color-primary-hover:  #e85555;
  --color-primary-active: #d04444;
  --color-primary-glow:   oklch(from #ff6b6b l c h / 0.15);

  /* Secondary: electric lime — fresh, alive */
  --color-secondary:      #a3e635;
  --color-secondary-hover: #8ecf1e;
  --color-secondary-muted: #6b9e20;

  /* Tertiary: soft violet — a hint of night */
  --color-tertiary:       #a78bfa;
  --color-tertiary-hover: #8b6ff0;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.5);
}

/* --- Light theme --- */
[data-theme="light"] {
  --color-bg:             #f8f7fb;
  --color-surface:        #ffffff;
  --color-surface-2:      #ffffff;
  --color-surface-offset: #f0eff5;
  --color-surface-dynamic: #e8e7f0;
  --color-divider:        #d8d7e2;
  --color-border:         #c8c7d5;

  --color-text:           #1a1928;
  --color-text-muted:     #5c5a70;
  --color-text-faint:     #9896a8;

  --color-primary:        #e04545;
  --color-primary-hover:  #c83535;
  --color-primary-active: #b02828;
  --color-primary-glow:   oklch(from #e04545 l c h / 0.1);

  --color-secondary:      #4d8a0e;
  --color-secondary-hover: #3d7008;
  --color-secondary-muted: #5a9e18;

  --color-tertiary:       #7c5cc7;
  --color-tertiary-hover: #6a48b5;

  --shadow-sm: 0 1px 2px oklch(0.2 0.02 280 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.02 280 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.02 280 / 0.12);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --color-bg:             #f8f7fb;
    --color-surface:        #ffffff;
    --color-surface-2:      #ffffff;
    --color-surface-offset: #f0eff5;
    --color-surface-dynamic: #e8e7f0;
    --color-divider:        #d8d7e2;
    --color-border:         #c8c7d5;
    --color-text:           #1a1928;
    --color-text-muted:     #5c5a70;
    --color-text-faint:     #9896a8;
    --color-primary:        #e04545;
    --color-primary-hover:  #c83535;
    --color-primary-active: #b02828;
    --color-primary-glow:   oklch(from #e04545 l c h / 0.1);
    --color-secondary:      #4d8a0e;
    --color-secondary-hover: #3d7008;
    --color-secondary-muted: #5a9e18;
    --color-tertiary:       #7c5cc7;
    --color-tertiary-hover: #6a48b5;
    --shadow-sm: 0 1px 2px oklch(0.2 0.02 280 / 0.06);
    --shadow-md: 0 4px 12px oklch(0.2 0.02 280 / 0.08);
    --shadow-lg: 0 12px 32px oklch(0.2 0.02 280 / 0.12);
  }
}

/* --- Global styles --- */
body {
  font-family: var(--font-body);
  overflow-x: hidden;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover {
  color: var(--color-primary-hover);
}

.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

/* --- Header --- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
  padding: var(--space-4) 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.logo-text .logo-accent {
  color: var(--color-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
}
.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-dynamic);
}

/* --- Hero --- */
.hero {
  padding: clamp(var(--space-16), 10vw, var(--space-32)) 0 clamp(var(--space-12), 8vw, var(--space-24));
  text-align: left;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  margin-bottom: var(--space-8);
  letter-spacing: 0.02em;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-secondary);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--color-text);
  max-width: 16ch;
  margin-bottom: var(--space-6);
}

.hero h1 .accent-coral {
  color: var(--color-primary);
}

.hero h1 .accent-lime {
  color: var(--color-secondary);
}

.hero h1 .accent-violet {
  color: var(--color-tertiary);
}

.hero-sub {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 52ch;
  line-height: 1.5;
  margin-bottom: var(--space-10);
}

.hero-cta-row {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.01em;
  white-space: nowrap;
  min-height: 48px;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 0 24px var(--color-primary-glow);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  color: #fff;
  box-shadow: 0 0 32px var(--color-primary-glow), 0 0 48px var(--color-primary-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}
.btn-ghost:hover {
  color: var(--color-text);
  background: var(--color-surface);
  border-color: oklch(from var(--color-text) l c h / 0.2);
}

/* --- How It Works --- */
.how-section {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) 0;
  border-top: 1px solid var(--color-divider);
}

.section-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-primary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-12);
  max-width: 32ch;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

@media (max-width: 768px) {
  .steps-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

.step {
  position: relative;
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.06);
  border-radius: var(--radius-xl);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}

.step:hover {
  border-color: oklch(from var(--color-primary) l c h / 0.3);
  box-shadow: 0 0 24px var(--color-primary-glow);
}

.step-number {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.step h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

.step p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --- Scenarios --- */
.scenarios-section {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) 0;
  border-top: 1px solid var(--color-divider);
}

.scenarios-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

@media (max-width: 768px) {
  .scenarios-grid {
    grid-template-columns: 1fr;
  }
}

.scenario {
  padding: var(--space-8);
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.06);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}

.scenario:hover {
  border-color: oklch(from var(--color-tertiary) l c h / 0.3);
}

.scenario-icon {
  width: 36px;
  height: 36px;
  color: var(--color-tertiary);
}

.scenario h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.scenario p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.scenario-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-divider);
  margin-top: auto;
}

/* --- Why section --- */
.why-section {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) 0;
  border-top: 1px solid var(--color-divider);
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-6);
}

@media (max-width: 768px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
}

.why-item {
  padding: var(--space-6);
}

.why-item h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

.why-item p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --- CTA Section --- */
.cta-section {
  padding: clamp(var(--space-16), 10vw, var(--space-32)) 0;
  border-top: 1px solid var(--color-divider);
  text-align: center;
  position: relative;
}

.cta-section h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
}

.cta-section h2 .accent-coral {
  color: var(--color-primary);
}

.cta-section p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 48ch;
  margin: 0 auto var(--space-8);
}

/* --- Waitlist form --- */
.waitlist-form {
  display: flex;
  gap: var(--space-3);
  max-width: 440px;
  margin: 0 auto;
}

@media (max-width: 480px) {
  .waitlist-form {
    flex-direction: column;
  }
}

.waitlist-form input[type="email"] {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-sm);
  min-height: 48px;
}

.waitlist-form input[type="email"]::placeholder {
  color: var(--color-text-faint);
}

.waitlist-form input[type="email"]:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.waitlist-success {
  display: none;
  text-align: center;
  padding: var(--space-6);
  color: var(--color-secondary);
  font-weight: 600;
}

.waitlist-success.show {
  display: block;
}

/* --- Footer --- */
.footer {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--color-divider);
  text-align: center;
}

.footer p {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* --- Terminal decoration --- */
.terminal-block {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-top: var(--space-12);
  max-width: 600px;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-offset);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.06);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
}
.terminal-dot.red { background: var(--color-primary); }
.terminal-dot.yellow { background: #f5c542; }
.terminal-dot.green { background: var(--color-secondary); }

.terminal-body {
  padding: var(--space-5);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.8;
  color: var(--color-text-muted);
}

.terminal-body .prompt {
  color: var(--color-secondary);
}

.terminal-body .cmd {
  color: var(--color-text);
}

.terminal-body .output {
  color: var(--color-text-faint);
}

.terminal-body .highlight {
  color: var(--color-primary);
}

.terminal-body .violet {
  color: var(--color-tertiary);
}

/* --- Confetti canvas --- */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

/* --- Scroll reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* --- Ambient glow --- */
.hero-glow {
  position: absolute;
  top: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, oklch(from var(--color-primary) l c h / 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-glow-2 {
  position: absolute;
  bottom: -50px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, oklch(from var(--color-tertiary) l c h / 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* --- Grid decoration line --- */
.hero-grid-line {
  position: absolute;
  top: 0;
  right: 10%;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--color-divider) 20%, var(--color-divider) 80%, transparent);
  opacity: 0.3;
}

@media (max-width: 768px) {
  .hero-grid-line { display: none; }
  .hero { text-align: left; }
  .hero h1 { max-width: 100%; }
}