/* Smooth Scroll */
html {
  scroll-behavior: smooth;
  overflow-x: clip;
  /* Use clip instead of hidden to allow position: sticky */
}

/* Reset and Base.
   Scoped away from portaled shadcn dialogs ([data-slot='dialog-content'], e.g.
   the signup gate on the reddit-story landing page): this file is UNLAYERED,
   so it would otherwise beat Tailwind's @layer utilities inside the dialog and
   wipe out every p-*/m-* class. Tailwind preflight (layer base) already
   provides the same reset inside the excluded subtree. :where() keeps the
   original zero specificity, so nothing else on the marketing pages changes. */
*:where(:not([data-slot='dialog-content'], [data-slot='dialog-content'] *)) {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --purple: #8B5CF6;
  --magenta: #EC4899;
  --gray-900: #1a202c;
  --gray-700: #4a5568;
  --gray-600: #718096;
  --gray-100: #f7fafc;
  --gray-50: #f9fafb;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #FFFFFF;
  background: #0B0B0F;
  overflow-x: clip;
  /* Use clip instead of hidden to allow position: sticky */
}

/* Container / Layout Helpers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography.
   Same dialog-subtree exclusion as the reset above: these unlayered element
   rules would override the gate's Tailwind text/margin utilities (e.g. its
   28px h2 headline would render at 3.5rem). :where() keeps specificity. */
h1:where(:not([data-slot='dialog-content'] *)) {
  font-size: 2rem;
  font-weight: 700;
}

h2:where(:not([data-slot='dialog-content'] *)) {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
}

h3:where(:not([data-slot='dialog-content'] *)) {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.3;
}

h4:where(:not([data-slot='dialog-content'] *)) {
  font-size: 1.5rem;
  font-weight: 600;
}

p:where(:not([data-slot='dialog-content'] *)) {
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  h2:where(:not([data-slot='dialog-content'] *)) {
    font-size: 2.5rem;
  }

  h3:where(:not([data-slot='dialog-content'] *)) {
    font-size: 2rem;
  }
}

/* Grid / Layout */
/* Collides with Tailwind's .grid utility inside portaled dialogs (would force
   gap: 2rem where the gate sets gap-0) — same subtree exclusion. */
.grid:where(:not([data-slot='dialog-content'], [data-slot='dialog-content'] *)) {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

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

@media (max-width: 768px) {

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Global Section Layout */
.section {
  padding: 80px 0;
  overflow: visible;
}

.section-gray {
  background: var(--gray-50);
}

/* Adjust body padding when banner is visible */
body.banner-visible {
  padding-top: 47px;
}