/* ==========================================================================
   BASE STYLES — Sologiri Waitlist
   Body defaults, heading hierarchy, global text styles, scrollbar, containers.
   ========================================================================== */

html, body {
  width: 100vw;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

html {
  scrollbar-width: thin;
  scrollbar-color: #C5C0BA var(--bg-base);
  overscroll-behavior-y: none; /* PWA native app feel, disables pull-to-refresh bounce */
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-base);
  -webkit-font-smoothing: antialiased;
}

/* ---- Heading Hierarchy ---- */

h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-5xl);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-4xl);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-2xl);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* ---- Text Selection ---- */

::selection {
  background: var(--accent-primary);
  color: #FFFFFF;
}

::-moz-selection {
  background: var(--accent-primary);
  color: #FFFFFF;
}

/* ---- Custom Scrollbar (Light) ---- */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
  background: #C5C0BA;
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: #A09A94;
}

/* Firefox */

/* ---- Layout Containers ---- */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
  box-sizing: border-box;
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

/* ---- Section Base ---- */

.section {
  padding: var(--space-24) 0;
  position: relative;
}

.section--dark {
  background-color: var(--bg-dark);
  color: var(--text-on-dark);
}

.section--dark h1,
.section--dark h2,
.section--dark h3 {
  color: var(--text-on-dark);
}

.section--dark .section__subtitle {
  color: var(--text-on-dark-secondary);
}

.section--purple {
  background-color: var(--accent-primary);
  color: #FFFFFF;
}

.section--purple h1,
.section--purple h2,
.section--purple h3 {
  color: #FFFFFF;
}

/* Section divider line */
.section + .section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 600px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-subtle), transparent);
}

/* ---- Section Typography ---- */

.section__tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-secondary);
  margin-bottom: var(--space-4);
}

.section__headline {
  margin-bottom: var(--space-4);
}

.section__subtext {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 640px;
}

/* ---- Utilities ---- */
.text-purple { color: var(--accent-primary) !important; }
.text-teal { color: var(--accent-teal) !important; }
.text-gold { color: var(--accent-gold) !important; }

.text-center { text-align: center !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.mt-6 { margin-top: var(--space-6) !important; }
.mt-12 { margin-top: var(--space-12) !important; }
.mb-12 { margin-bottom: var(--space-12) !important; }
.mb-16 { margin-bottom: var(--space-16) !important; }

.font-bold { font-weight: 700 !important; }
.text-lg { font-size: var(--text-lg) !important; }
.text-2xl { font-size: var(--text-2xl) !important; }
.text-white\/90 { color: rgba(255, 255, 255, 0.9) !important; }
.text-on-dark-secondary { color: var(--text-on-dark-secondary) !important; }

.max-w-2xl { max-width: 42rem !important; }

/* ---- Responsive Heading Sizes ---- */

@media (max-width: 768px) {
  h1 {
    font-size: 28px;
    overflow-wrap: break-word;
  }

  h2 {
    font-size: 24px;
    overflow-wrap: break-word;
  }

  h3 {
    font-size: var(--text-xl);
  }

  .section {
    padding: var(--space-16) 0;
  }

  .container {
    padding: 0 var(--space-4);
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
    letter-spacing: -0.01em;
  }
}
