/* ============================================================
   Slept On — Design System
   css/style.css
   ============================================================ */

/* ============================================================
   Section 1: Design Tokens
   ============================================================ */

:root {
  --color-bg:             #0f0f12;
  --color-surface:        #1c1c22;
  --color-surface-raised: #22222a;
  --color-accent:         #7b4fd4;
  --color-accent-hover:   #6a42c0;
  --color-accent-glow:    rgba(123, 79, 212, 0.18);
  --color-accent-dim:     rgba(123, 79, 212, 0.08);
  --color-text-primary:   #f0f0f0;
  --color-text-secondary: #8a8a99;
  --color-border:         #2a2a33;
  --color-border-hover:   #4a3a6a;

  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --font-size-label:   13px;
  --font-size-body:    16px;
  --font-size-heading: 28px;
  --font-size-display: 52px;
  --font-weight-regular: 400;
  --font-weight-bold:    700;
  --line-height-display: 1.05;
  --line-height-heading: 1.2;
  --line-height-label:   1.4;
  --line-height-body:    1.6;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}


/* ============================================================
   Section 2: Base
   ============================================================ */

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

html, body {
  overflow-x: hidden;
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-family);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* ============================================================
   Section 3: Utilities
   ============================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}


/* ============================================================
   Section 4: Container
   ============================================================ */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}


/* ============================================================
   Section 5: Section spacing
   ============================================================ */

section {
  padding: var(--space-4xl) 0;
}


/* ============================================================
   Section 6: Hero
   ============================================================ */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: 100px;
  padding-bottom: var(--space-4xl);
  text-align: center;
  overflow: hidden;
}

/* Ambient purple glow behind headline */
.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  background: radial-gradient(ellipse at center, rgba(123, 79, 212, 0.13) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Subtle bottom fade into content below */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--color-bg));
  pointer-events: none;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo {
  position: absolute;
  top: 40px;
  left: 40px;
  max-height: 48px;
  width: auto;
  z-index: 2;
}

.hero-headline {
  font-size: var(--font-size-display);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-display);
  letter-spacing: -0.03em;
  text-align: center;
  background: linear-gradient(160deg, #ffffff 20%, #c4aef5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: 18px;
  font-weight: var(--font-weight-regular);
  color: var(--color-text-secondary);
  letter-spacing: 0.02em;
  text-align: center;
  margin-top: var(--space-md);
}

.hero-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-2xl);
  width: 100%;
  max-width: 520px;
}

.hero .btn-secondary {
  margin-top: var(--space-md);
}

.waitlist-counter {
  font-size: var(--font-size-label);
  color: var(--color-text-secondary);
  margin-top: var(--space-xl);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.privacy-note {
  font-size: var(--font-size-label);
  color: var(--color-text-secondary);
  margin-top: var(--space-sm);
  opacity: 0.55;
}


/* ============================================================
   Section 7: Primary CTA
   ============================================================ */

.btn-primary {
  background: var(--color-accent);
  color: var(--color-text-primary);
  border: none;
  padding: 14px var(--space-xl);
  min-height: 48px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 150ms ease, box-shadow 150ms ease;
  white-space: nowrap;
  box-shadow: 0 0 28px rgba(123, 79, 212, 0.4);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  box-shadow: 0 0 40px rgba(123, 79, 212, 0.6);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}


/* ============================================================
   Section 8: Secondary CTA
   ============================================================ */

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(123, 79, 212, 0.45);
  color: var(--color-accent);
  padding: 14px var(--space-xl);
  min-height: 48px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-bold);
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.btn-secondary:hover {
  background: rgba(123, 79, 212, 0.1);
  border-color: var(--color-accent);
}

.btn-secondary:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}


/* ============================================================
   Section 9: Email input
   ============================================================ */

.email-input {
  background: rgba(28, 28, 34, 0.85);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  padding: 14px var(--space-md);
  min-height: 48px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-body);
  cursor: text;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  flex: 1;
  min-width: 0;
  width: 100%;
}

.email-input::placeholder {
  color: var(--color-text-secondary);
  opacity: 0.55;
}

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

.email-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(123, 79, 212, 0.2);
}


/* ============================================================
   Section 10: Section headings
   ============================================================ */

.section-heading {
  font-size: var(--font-size-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-heading);
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}


/* ============================================================
   Section 11: Problem section — stat cards
   ============================================================ */

.stat-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-top: var(--space-2xl);
}

.stat-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  overflow: hidden;
  transition: border-color 200ms ease, transform 200ms ease;
}

/* Accent line across the top of each card */
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0.55;
}

.stat-card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-2px);
}

.stat-value {
  display: block;
  font-size: 48px;
  font-weight: var(--font-weight-bold);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.stat-label {
  font-size: var(--font-size-body);
  color: var(--color-text-primary);
  line-height: var(--line-height-body);
}

.stat-source {
  display: block;
  font-size: var(--font-size-label);
  color: var(--color-text-secondary);
  margin-top: var(--space-sm);
  opacity: 0.6;
}


/* ============================================================
   Section 12: Product preview
   ============================================================ */

.tier-strip {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-2xl);
  flex-wrap: wrap;
  margin-top: var(--space-2xl);
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.tier-strip img {
  height: 120px;
  width: auto;
  filter: drop-shadow(0 0 18px rgba(123, 79, 212, 0.3));
  transition: filter 200ms ease, transform 200ms ease;
}

.tier-strip img:hover {
  filter: drop-shadow(0 0 28px rgba(123, 79, 212, 0.6));
  transform: translateY(-3px) scale(1.04);
}

.benchmark-intro {
  font-size: var(--font-size-body);
  color: var(--color-text-secondary);
  margin-top: var(--space-2xl);
}

.benchmark-table {
  width: auto;
  min-width: 280px;
  border-collapse: collapse;
  font-size: var(--font-size-body);
  color: var(--color-text-primary);
  margin-top: var(--space-md);
}

.benchmark-table th {
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-secondary);
  text-align: left;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-border);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.benchmark-table td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid rgba(42, 42, 51, 0.5);
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: var(--space-2xl) 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.feature-list li {
  font-size: var(--font-size-body);
  color: var(--color-text-secondary);
  line-height: var(--line-height-body);
  padding-left: var(--space-md);
  border-left: 1px solid var(--color-border);
  transition: color 150ms ease, border-color 150ms ease;
}

.feature-list li:hover {
  color: var(--color-text-primary);
  border-left-color: var(--color-accent);
}


/* ============================================================
   Section 13: Waitlist counter
   ============================================================ */

.counter-value {
  color: var(--color-accent);
  font-weight: var(--font-weight-bold);
}


/* ============================================================
   Section 14: Responsive breakpoints
   ============================================================ */

/* Small mobile */
@media (max-width: 479px) {
  .hero-headline {
    font-size: 36px;
    letter-spacing: -0.02em;
  }

  .section-heading {
    font-size: 22px;
  }

  .stat-value {
    font-size: 40px;
  }

  .tier-strip img {
    height: 80px;
  }
}

/* Mobile form stack */
@media (max-width: 639px) {
  .hero-form {
    flex-direction: column;
  }

  .hero-form .email-input,
  .hero-form .btn-primary {
    width: 100%;
  }
}

/* Mobile layout */
@media (max-width: 767px) {
  .container {
    padding: 0 var(--space-md);
  }

  section {
    padding: var(--space-3xl) 0;
  }

  .hero {
    padding-top: 64px;
  }

  .logo {
    top: var(--space-md);
    left: var(--space-md);
    max-height: 36px;
  }

  .hero::before {
    width: 400px;
    height: 320px;
  }

  .tier-strip {
    gap: var(--space-lg);
  }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  .container {
    padding: 0 var(--space-lg);
  }

  .tier-strip img {
    height: 100px;
  }
}

/* Desktop — hero full-height, form inline, stat grid */
@media (min-width: 768px) {
  .hero {
    min-height: 100vh;
  }

  .hero-form {
    flex-direction: row;
  }

  .stat-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}
