/* =============================================================================
   EONYX LABS — base.css
   Design tokens, CSS reset, base typography.
   Load order (see functions.php covert_enqueue_assets):
     1. base.css        <- you are here (tokens, reset, type)
     2. components.css  (header, mega-menu, cards, banners, marquee, cart drawer)
     3. pages.css        (homepage sections, archive/PDP/about/contact layout)
     4. theme.css         (aggregate index / print styles / rare overrides)
   ========================================================================== */

/* -----------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------- */
:root {
  /* Brand core (BRAND_SPEC.md) */
  --c-black: #0F1812;
  --c-black-soft: #17221B;
  --c-black-elevated: #1E2B22;
  --c-white: #FFFFFF;
  --c-lime: #BFD230;
  --c-orange: #F7941D;
  --c-scarlet: #E62127;
  --c-fuchsia: #E91E63;

  /* Category accents are injected at runtime via wp_add_inline_style()
     from inc/category-map.php::covert_category_css_vars() as
     --cat-metabolic, --cat-longevity, --cat-recovery, --cat-cognitive,
     --cat-sleep, --cat-hormonal, --cat-growth, --cat-blends,
     --cat-gh-secretagogue. Fallback values here so components.css never
     breaks in isolation (e.g. this static preview build). */
  --cat-metabolic: #FFCD1C;
  --cat-longevity: #EB2128;
  --cat-recovery: #FFFFFF;
  --cat-cognitive: #EB1A7D;
  --cat-sleep: #F8A11B;
  --cat-hormonal: #BDD32F;
  --cat-growth: #33C5F3;
  --cat-blends: #EB2128;
  --cat-gh-secretagogue: #33C5F3;

  /* Surfaces / text */
  --bg: var(--c-black);
  --bg-elevated: var(--c-black-elevated);
  --bg-soft: var(--c-black-soft);
  --fg: var(--c-white);
  --fg-muted: #9BA79E;
  --fg-dim: #6E7A72;
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.24);
  --accent: var(--c-lime);
  --accent-contrast: var(--c-black);
  --danger: var(--c-scarlet);

  /* Typography */
  --font-display: 'Rajdhani', 'Arial Narrow', sans-serif;
  --font-body: 'Archivo', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.125rem;
  --text-lg: 1.375rem;
  --text-xl: 1.75rem;
  --text-2xl: 2.25rem;
  --text-3xl: 3rem;
  --text-hero: clamp(2.5rem, 5vw + 1rem, 5rem);

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  /* Layout */
  /* Shared desktop content width. Product detail pages intentionally opt out below. */
  --container-max: 1600px;
  --container-pad: clamp(1rem, 4vw, 2.5rem);
  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur-base: 280ms;
  --dur-slow: 600ms;

  /* Z-index scale */
  --z-header: 100;
  --z-mega-menu: 110;
  --z-cart-drawer: 200;
  --z-overlay: 190;
}

/* -----------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

table {
  border-collapse: collapse;
  width: 100%;
}

/* -----------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.05;
  margin: 0 0 var(--space-4);
}

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-md); }
h6 { font-size: var(--text-base); }

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

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
}

.covert-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -999px;
  left: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: var(--space-3) var(--space-5);
  z-index: 1000;
  font-weight: 700;
}
.skip-link:focus {
  top: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* -----------------------------------------------------------------------
   4. Layout helpers
   -------------------------------------------------------------------- */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.covert-main {
  display: block;
}

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

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

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.section-head h2 {
  margin-bottom: var(--space-2);
}

.section-head p {
  margin: 0;
  max-width: 46ch;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: var(--text-sm);
  padding: 0.9em 1.8em;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}
.btn-primary:hover {
  background: #d3e64f;
}

.btn-outline {
  border-color: var(--border-strong);
  color: var(--fg);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-block {
  width: 100%;
}

.btn[disabled],
.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Category swatch/dot (used in mega-menu, badges, spec table) */
.covert-cat-swatch {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
}

.covert-cat-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cat-color, var(--accent));
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.05);
}

/* RUO compliance notice — appears in footer, PDP, cart, checkout */
.covert-ruo-notice {
  font-size: var(--text-xs);
  line-height: 1.6;
  color: var(--fg-dim);
  border: 1px solid var(--border);
  border-left: 3px solid var(--c-scarlet);
  background: var(--bg-soft);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-sm);
}
.covert-ruo-notice strong {
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-right: var(--space-2);
}
.covert-ruo-notice--banner {
  max-width: var(--container-max);
  margin-inline: auto;
}

/* Screen-reader text (WP core convention alias) */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
