/* ==========================================================================
   Base — reset, design tokens, foundational typography
   Convention: mobile-first. Base rules target mobile; layer on larger-
   viewport styles with min-width media queries. Breakpoints: 600 / 900 / 1200.
   ========================================================================== */

:root {
  /* Color — see PROJECT.md §3 brand identity. Pink is an accent only. */
  --color-primary: #ED2A91;
  --color-primary-dark: #C21F76;
  --color-ink: #1E1E1E;
  --color-dark-gray: #333333;
  --color-mid-gray: #666666;
  --color-surface: #F5F5F5;
  --color-white: #FFFFFF;

  --color-text: var(--color-ink);
  --color-text-muted: var(--color-mid-gray);
  --color-border: #E0E0E0;
  --color-focus: var(--color-primary);

  /* Type — self-hosted, subsetted (assets/fonts/). */
  --font-display: 'Space Grotesk', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Fluid scale (clamp: mobile-min, viewport-relative, desktop-max) — sizes
     grow smoothly between breakpoints instead of jumping at fixed steps.
     This is what gives headings real "large/cinematic" presence on desktop
     without overflowing small screens. */
  --fs-100: 0.875rem;
  --fs-200: 1rem;
  --fs-300: clamp(1.125rem, 1.05rem + 0.35vw, 1.375rem);
  --fs-400: clamp(1.35rem, 1.2rem + 0.75vw, 1.875rem);
  --fs-500: clamp(1.75rem, 1.45rem + 1.3vw, 2.75rem);
  --fs-600: clamp(2.25rem, 1.8rem + 2vw, 3.75rem);
  --fs-700: clamp(2.75rem, 2rem + 3.2vw, 5.25rem);
  --fs-hero: clamp(3rem, 1.9rem + 4.8vw, 6.75rem);

  --lh-tight: 1.08;
  --lh-normal: 1.6;

  /* Spacing — 8px baseline scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;
  --space-40: 10rem;

  /* Radius / shadow — layered, soft, slightly tinted toward ink rather than
     flat black, which is what makes a shadow read as "premium" instead of
     a default browser drop-shadow. */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 2px 8px rgba(30, 30, 30, 0.06);
  --shadow-md: 0 8px 24px rgba(30, 30, 30, 0.10);
  --shadow-lg: 0 20px 48px rgba(30, 30, 30, 0.16);
  --shadow-primary: 0 12px 28px rgba(237, 42, 145, 0.28);

  /* Z-index scale — keep every stacking value here, never a magic number inline */
  --z-header: 100;
  --z-mobile-cta: 200;
  --z-consent-banner: 300;
  --z-lightbox: 350;
  --z-modal: 400;

  /* Shared with components.css: body padding-bottom and the consent
     banner's mobile offset both reference this so the mobile CTA bar's
     height can never drift out of sync with what compensates for it. */
  --mobile-cta-height: 56px;
  --header-height: 80px;

  /* Motion — subtle only, per PROJECT.md §13 Phase 2. Every rule that
     uses these must also respect the reduced-motion override below. */
  --transition-fast: 180ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-standard: 320ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 600ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-200);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

/* Fixed glass header (see components.css .site-header) is removed from
   normal flow — pages without a hero need the equivalent space reserved
   so content doesn't start underneath it. Pages with a hero (body.has-hero)
   skip this: the hero itself is full-bleed and deliberately extends behind
   the header, which stays legible over any image via its own glass/blur
   treatment rather than needing the page underneath to make room. */
body:not(.has-hero) {
  padding-top: var(--header-height);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-4);
  font-weight: 700;
}

h1 { font-size: var(--fs-700); }
h2 { font-size: var(--fs-600); margin-bottom: var(--space-6); }
h3 { font-size: var(--fs-500); }
h4 { font-size: var(--fs-400); }

@media (min-width: 900px) {
  h2 { margin-bottom: var(--space-8); }
}

p { margin: 0 0 var(--space-4); }

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

a {
  color: var(--color-primary);
}

/* Accessible focus state — never remove without providing an equivalent */
:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

/* Global reduced-motion override — non-negotiable given this project's
   accessibility commitments (PROJECT.md §2). Component-level animations
   (card/button hover, carousel, hero entrance — see components.css) still
   scope their own transitions sensibly; this is the baseline safety net,
   not a substitute for that scoping. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Self-hosted fonts (assets/fonts/) — variable weight axis, single latin
   subset file each. */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk-variable.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}
