/* ================================================
   RevBoostApp — main.css
   Design tokens, CSS reset, global styles,
   typography, and layout utilities
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500;700&display=swap');

/* ================================================
   DESIGN TOKENS
   ================================================ */
:root {
  /* Backgrounds */
  --bg-page:        #FAFAFA;
  --bg-white:       #FFFFFF;
  --bg-dark:        #0A0A0F;
  --bg-card:        #FFFFFF;
  --bg-subtle:      #F4F4F6;

  /* Brand — Green. Growth. Reviews. Trust. */
  --accent:         #16A34A;
  --accent-light:   #DCFCE7;
  --accent-dark:    #14532D;
  --accent-glow:    rgba(22, 163, 74, 0.15);

  /* Stars — always amber */
  --star:           #F59E0B;

  /* Text */
  --text-primary:   #0A0A0F;
  --text-secondary: #6B7280;
  --text-muted:     #9CA3AF;
  --text-white:     #FFFFFF;
  --text-white-dim: rgba(255,255,255,0.65);

  /* Borders */
  --border:         #E5E7EB;
  --border-dark:    #1F2937;

  /* Shadows */
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-lg:      0 20px 60px rgba(0,0,0,0.12), 0 8px 24px rgba(0,0,0,0.08);
  --shadow-product: 0 32px 80px rgba(0,0,0,0.18), 0 8px 24px rgba(0,0,0,0.1);

  /* Typography */
  --font-body:    'Geist', system-ui, -apple-system, sans-serif;
  --font-mono:    'Geist Mono', 'Courier New', monospace;

  /* Type Scale */
  --text-hero:    clamp(2.8rem, 6vw, 5rem);
  --text-h2:      clamp(2rem, 4vw, 3rem);
  --text-h3:      clamp(1.25rem, 2vw, 1.5rem);
  --text-body:    1rem;
  --text-small:   0.875rem;
  --text-label:   0.75rem;
  --text-stat:    clamp(2.5rem, 5vw, 4rem);

  /* Spacing */
  --space-section: clamp(80px, 10vw, 130px);
  --space-gap:     clamp(16px, 2.5vw, 32px);
  --max-width:     1160px;

  /* Border Radius */
  --radius-card:   12px;
  --radius-btn:    8px;
  --radius-badge:  100px;
  --radius-input:  8px;
  --radius-image:  16px;
  --radius-large:  24px;
}

/* ================================================
   CSS RESET
   ================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

img, video, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

/* ================================================
   GLOBAL FOCUS STATES (Accessibility)
   ================================================ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 16px;
  background: var(--accent);
  color: white;
  padding: 8px 16px;
  border-radius: 0 0 8px 8px;
  font-weight: 500;
  font-size: 0.875rem;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* ================================================
   LAYOUT UTILITIES
   ================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

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

/* ================================================
   TYPOGRAPHY UTILITIES
   ================================================ */
.text-label {
  display: inline-block;
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 5px 14px;
  border-radius: var(--radius-badge);
  margin-bottom: 16px;
}

.text-label--dark {
  background: rgba(22, 163, 74, 0.2);
  color: #4ADE80;
}

.section-h2 {
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.section-h2--white {
  color: var(--text-white);
}

.section-subtext {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.section-subtext--white {
  color: var(--text-white-dim);
}

/* ================================================
   SECTION HEADER BLOCK
   ================================================ */
.section-header {
  margin-bottom: clamp(40px, 6vw, 64px);
}

.section-header.center {
  text-align: center;
}

.section-header.center .section-subtext {
  margin-inline: auto;
  max-width: 560px;
}

/* ================================================
   GRID UTILITIES
   ================================================ */
.grid {
  display: grid;
  gap: var(--space-gap);
}

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

/* ================================================
   FLEX UTILITIES
   ================================================ */
.flex          { display: flex; }
.flex-center   { display: flex; align-items: center; justify-content: center; }
.flex-between  { display: flex; align-items: center; justify-content: space-between; }
.flex-col      { display: flex; flex-direction: column; }
.items-center  { align-items: center; }
.gap-xs        { gap: 6px; }
.gap-sm        { gap: 8px; }
.gap-md        { gap: 16px; }
.gap-lg        { gap: 24px; }
.gap-xl        { gap: 32px; }

/* ================================================
   BACKGROUND UTILITIES
   ================================================ */
.bg-white  { background: var(--bg-white); }
.bg-dark   { background: var(--bg-dark); }
.bg-subtle { background: var(--bg-subtle); }
.bg-page   { background: var(--bg-page); }

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

/* ================================================
   REVEAL ANIMATION SETUP
   ================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Stagger delays */
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }
.reveal[data-delay="5"] { transition-delay: 0.5s; }

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 767px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .hide-desktop {
    display: none !important;
  }
}
