/* base.css — Reset & Design Tokens for 916 Pools */

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

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  line-height: 1.6;
  min-height: 100dvh;
}

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

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  line-height: 1.15;
}

p {
  overflow-wrap: break-word;
}

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
  /* === Colors — Pool Premium Palette === */
  --navy:        #0A1628;
  --navy-light:  #0F1F38;
  --navy-mid:    #162544;
  --teal:        #0891B2;
  --teal-dark:   #0E7490;
  --cyan:        #06B6D4;
  --cyan-light:  #22D3EE;
  --gold:        #D4A853;
  --gold-light:  #E0BE7A;
  --gold-dark:   #B8913F;
  --white:       #FFFFFF;
  --off-white:   #F8FAFB;
  --gray-50:     #F1F5F9;
  --gray-100:    #E2E8F0;
  --gray-200:    #CBD5E1;
  --gray-300:    #94A3B8;
  --gray-400:    #64748B;
  --gray-500:    #475569;
  --gray-600:    #334155;
  --gray-700:    #1E293B;
  --red:         #EF4444;
  --green:       #22C55E;

  /* === Semantic Color Roles === */
  --color-bg:          var(--white);
  --color-bg-alt:      var(--off-white);
  --color-bg-dark:     var(--navy);
  --color-bg-dark-alt: var(--navy-light);
  --color-text:        var(--gray-700);
  --color-text-strong: var(--navy);
  --color-text-muted:  var(--gray-400);
  --color-text-on-dark: var(--white);
  --color-primary:     var(--teal);
  --color-primary-hover: var(--teal-dark);
  --color-accent:      var(--gold);
  --color-accent-hover: var(--gold-dark);
  --color-border:      var(--gray-100);
  --color-border-dark: rgba(255, 255, 255, 0.1);

  /* === Typography Scale (clamp fluid) === */
  --text-xs:   clamp(0.75rem, 0.7rem + 0.2vw, 0.8125rem);   /* 12-13px */
  --text-sm:   clamp(0.8125rem, 0.78rem + 0.15vw, 0.875rem); /* 13-14px */
  --text-base: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem);       /* 15-16px */
  --text-md:   clamp(1rem, 0.95rem + 0.25vw, 1.125rem);       /* 16-18px */
  --text-lg:   clamp(1.125rem, 1rem + 0.5vw, 1.375rem);       /* 18-22px */
  --text-xl:   clamp(1.375rem, 1.2rem + 0.75vw, 1.75rem);     /* 22-28px */
  --text-2xl:  clamp(1.75rem, 1.5rem + 1vw, 2.25rem);         /* 28-36px */
  --text-3xl:  clamp(2rem, 1.5rem + 2vw, 3rem);               /* 32-48px */
  --text-hero: clamp(2.5rem, 2rem + 2.5vw, 4rem);             /* 40-64px */

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

  /* === Layout === */
  --max-width:    1280px;
  --max-width-lg: 1440px;
  --content-padding: clamp(var(--space-4), 5vw, var(--space-8));
  --section-padding: clamp(var(--space-16), 8vw, var(--space-24));
  --border-radius-sm: 6px;
  --border-radius:    10px;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;
  --border-radius-full: 9999px;

  /* === Shadows === */
  --shadow-sm: 0 1px 3px rgba(10, 22, 40, 0.06), 0 1px 2px rgba(10, 22, 40, 0.04);
  --shadow-md: 0 4px 12px rgba(10, 22, 40, 0.08), 0 2px 4px rgba(10, 22, 40, 0.04);
  --shadow-lg: 0 12px 40px rgba(10, 22, 40, 0.12), 0 4px 12px rgba(10, 22, 40, 0.06);
  --shadow-xl: 0 20px 60px rgba(10, 22, 40, 0.16), 0 8px 20px rgba(10, 22, 40, 0.08);

  /* === Transitions === */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:     cubic-bezier(0.4, 0, 1, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   BASE TYPOGRAPHY
   ============================================ */
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
}

h1, h2, h3 {
  font-family: 'Cabinet Grotesk', 'Plus Jakarta Sans', sans-serif;
  color: var(--color-text-strong);
  font-weight: 800;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--content-padding);
}

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

.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;
}

/* ============================================
   SCROLL REVEAL (CSS-first, JS fallback)
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

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

/* Stagger children */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 400ms; }
.reveal-stagger > .reveal:nth-child(7) { transition-delay: 480ms; }
.reveal-stagger > .reveal:nth-child(8) { transition-delay: 560ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
