/*
Theme Name: BoostedValue Child Theme
Theme URI: https://boostedvalue.com
Description: Child theme for GeneratePress — Custom design system for affiliate content (tables, verdicts, pros/cons, CPA bridges). Zero bloat, zero AI slop.
Author: Ricardo Hernandez
Author URI: https://boostedvalue.com
Template: generatepress
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: boostedvalue
*/

/* === DESIGN TOKENS — Single Source of Truth === */
:root {
  /* === COLOR SYSTEM — No AI Slop Palette === */
  --color-brand: #0f172a;           /* Slate 950 — Authority, not generic blue */
  --color-brand-hover: #1e293b;     /* Slate 800 */
  --color-accent: #0ea5e9;          /* Sky 500 — Solo para CTAs primarios */
  --color-accent-hover: #0284c7;    /* Sky 600 */
  --color-success: #16a34a;         /* Green 600 — "Best Pick" */
  --color-warning: #ca8a04;         /* Yellow 600 — "Budget Pick" */
  --color-premium: #7c3aed;         /* Violet 600 — "Premium Pick" */
  --color-error: #ef4444;           /* Red 500 — Cons, errors */
  
  --color-bg: #fafafa;              /* Neutral 50 — Not pure white, easier eyes */
  --color-surface: #ffffff;         /* Pure white for cards */
  --color-border: #e2e8f0;          /* Slate 200 */
  --color-border-strong: #cbd5e1;   /* Slate 300 */
  
  --color-text: #0f172a;            /* Slate 950 */
  --color-text-muted: #475569;      /* Slate 600 */
  --color-text-faint: #94a3b8;      /* Slate 400 */
  
  /* === TYPOGRAPHY SCALE — Musical Rhythm === */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  
  --text-xs: 0.75rem;    /* 12px — Legal, meta */
  --text-sm: 0.875rem;   /* 14px — Body secondary, table cells */
  --text-base: 1rem;     /* 16px — Body primary */
  --text-lg: 1.125rem;   /* 18px — Lead paragraphs */
  --text-xl: 1.25rem;    /* 20px — Subheadings */
  --text-2xl: 1.5rem;    /* 24px — H3 */
  --text-3xl: 1.875rem;  /* 30px — H2 */
  --text-4xl: 2.25rem;   /* 36px — H1 */
  
  --line-tight: 1.2;
  --line-snug: 1.375;
  --line-normal: 1.6;
  --line-relaxed: 1.75;
  
  /* === SPACING SCALE — 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 */
  
  /* === CONTAINER WIDTHS === */
  --container-narrow: 640px;   /* Article body — optimal line length */
  --container-normal: 800px;   /* Tables, wide content */
  --container-wide: 1024px;    /* Full-width sections */
  
  /* === SHADOWS — Subtle, Layered === */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  /* === RADIUS === */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* === TRANSITIONS === */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
}

/* === DARK MODE — Auto, no toggle needed === */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0b0f1a;
    --color-surface: #111827;
    --color-border: #1f2937;
    --color-text: #f1f5f9;
    --color-text-muted: #94a3b8;
  }
}

/* === ACCESSIBILITY & PLATFORM STYLES === */

/* Focus Visible — Every interactive element */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Text Selection — Brand-aware */
::selection {
  background: var(--color-accent);
  color: white;
}

/* Scrollbar — Themed, not browser default */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* Reduced Motion — Respect user preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Skip Link (a11y) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-3) var(--space-6);
  background: var(--color-brand);
  color: white;
  z-index: 1000;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.skip-link:focus {
  top: 0;
}

/* === BASE RESET & TYPOGRAPHY === */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--line-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  margin: 0;
  padding: 0;
}

/* Headings — Musical rhythm, not generic scale */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: var(--line-tight);
  color: var(--color-text);
  margin: 0 0 var(--space-4);
}

h1 { font-size: var(--text-4xl); letter-spacing: -0.02em; }
h2 { font-size: var(--text-3xl); letter-spacing: -0.01em; }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); font-weight: 600; }
h5 { font-size: var(--text-lg); font-weight: 600; }
h6 { font-size: var(--text-base); font-weight: 600; }

/* Links — Only accent color for interactive elements */
a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--color-accent-hover); }
a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Paragraphs — Readable measure */
p {
  margin: 0 0 var(--space-4);
  line-height: var(--line-relaxed);
}
p:last-child { margin-bottom: 0; }

/* Lists */
ul, ol { margin: 0 0 var(--space-4); padding-left: var(--space-6); }
li { margin: var(--space-1) 0; line-height: var(--line-normal); }
li::marker { color: var(--color-text-muted); }

/* Code & Mono */
code, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-bg);
  padding: 0.125em 0.375em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}
pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: var(--line-normal);
  background: #0f172a;
  color: #e2e8f0;
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin: var(--space-6) 0;
}
pre code { background: none; padding: 0; border: none; color: inherit; }

/* Blockquote */
blockquote {
  margin: var(--space-6) 0;
  padding: var(--space-4) var(--space-6);
  border-left: 4px solid var(--color-accent);
  background: var(--color-bg);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  font-style: italic;
  color: var(--color-text-muted);
}
blockquote p:last-child { margin-bottom: 0; }

/* Horizontal Rule */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-12) 0;
}

/* Images */
img { max-width: 100%; height: auto; display: block; }
figure { margin: var(--space-8) 0; }
figcaption {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  text-align: center;
  font-style: italic;
}

/* === UTILITY CLASSES === */
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; }
.container-normal { max-width: var(--container-normal); margin: 0 auto; }
.container-wide { max-width: var(--container-wide); margin: 0 auto; }

.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.text-faint { color: var(--color-text-faint); }
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.font-mono { font-family: var(--font-mono); }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

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

/* === BUTTON SYSTEM === */
.bv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.bv-btn--primary {
  background: var(--color-accent);
  color: white;
}
.bv-btn--primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.bv-btn--primary:active { transform: translateY(0); }

.bv-btn--secondary {
  background: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
}
.bv-btn--secondary:hover {
  background: var(--color-accent);
  color: white;
}

.bv-btn--ghost {
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-border);
}
.bv-btn--ghost:hover {
  background: var(--color-bg);
  border-color: var(--color-border-strong);
}

.bv-btn--success {
  background: var(--color-success);
  color: white;
}
.bv-btn--success:hover { background: #15803d; }

.bv-btn:disabled {
  opacity: 0.5; cursor: not-allowed; transform: none;
}

@media (max-width: 480px) {
  .bv-btn { width: 100%; }
}

/* === BADGE SYSTEM === */
.bv-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  line-height: 1;
}

.bv-badge--top { background: #dcfce7; color: #166534; }
.bv-badge--performance { background: #dbeafe; color: #1e40af; }
.bv-badge--lightweight { background: #f3f4f6; color: #374151; }
.bv-badge--value { background: #fef3c7; color: #92400e; }
.bv-badge--premium { background: #ede9fe; color: #5b21b6; }
.bv-badge--neutral { background: var(--color-bg); color: var(--color-text-muted); border: 1px solid var(--color-border); }

/* === COMPONENT STYLES — Enqueued via functions.php for performance === */
/* @import statements removed — see functions.php lines 22-30 */
/* Components are loaded with wp_enqueue_style in the correct order */