/*
 * pSEO Blocks - Lavender Ledger Theme
 * Dawn brokerage meets space-grade efficiency
 * Lavender mist gradient with indigo action accents
 * COMPLETE TONE SYSTEM - all required variables defined
 * 
 * Tone visual hierarchy (4 tones):
 *   base   → #F7F7FB  (lavender mist - primary content)
 *   alt    → #E7E9FF  (deeper lavender - visual breaks)
 *   dark   → #1A1A2E  (midnight indigo - hero, footer)
 *   accent → indigo gradient (CTAs, highlights)
 */

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

:root {
  /* ========================================
     CORE COLORS - Lavender mist base
     ======================================== */
  --color-bg: #F7F7FB;
  --color-surface: #FFFFFF;
  --color-text: #1A1A2E;
  --color-muted: #505364;
  --color-border: rgba(18, 22, 40, 0.06);
  
  /* Primary - Indigo (for buttons, links) */
  --color-primary: #4755FF;
  --color-primary-contrast: #FFFFFF;
  
  /* Accent - Indigo (for highlights) */
  --color-accent: #1A1A2E;
  --color-accent-light: #2D2D45;
  --color-accent-dark: #0F0F1A;
  --color-accent-contrast: #FFFFFF;
  
  /* Status colors */
  --color-warning: #F59E0B;
  --color-error: #EF4444;
  --color-info: #22C55E;
  
  /* ========================================
     TONE: BASE (lavender mist - primary content)
     Background: #F7F7FB - soft lavender white
     ======================================== */
  /* These are the defaults via --color-* vars above */
  
  /* ========================================
     TONE: ALT (deeper lavender - visual breaks)
     Background: #E7E9FF - purple-tinted white
     Use for: feature sections, galleries, alternating content
     ======================================== */
  --color-alt-bg: #E7E9FF;
  --color-alt-text: #1A1A2E;
  --color-alt-muted: #505364;
  --color-alt-border: rgba(18, 22, 40, 0.08);
  --color-alt-card: #FFFFFF;
  --color-alt-link: #4755FF;
  
  /* ========================================
     TONE: DARK (midnight indigo - immersive areas)
     Background: #1A1A2E - deep blue-black
     Use for: hero sections, footer, dramatic areas
     ======================================== */
  --color-dark-bg: #1A1A2E;
  --color-dark-text: #FFFFFF;
  --color-dark-muted: rgba(255, 255, 255, 0.7);
  --color-dark-border: rgba(255, 255, 255, 0.1);
  --color-dark-card: #2A2A42;
  --color-dark-link: #6B77FF;
  
  /* ========================================
     TONE: ACCENT (indigo gradient - CTAs)
     Background: indigo gradient
     Use for: footer CTA, post headers, conversion areas
     ======================================== */
  --color-accent-surface: linear-gradient(135deg, #4755FF 0%, #6B77FF 100%);
  --color-accent-text: #FFFFFF;
  --color-accent-muted: rgba(255, 255, 255, 0.85);
  --color-accent-border: rgba(255, 255, 255, 0.25);
  --color-accent-card: rgba(255, 255, 255, 0.15);
  --color-accent-eyebrow: rgba(255, 255, 255, 0.9);
  
  /* ========================================
     BACKGROUND & OVERLAY TOKENS
     ======================================== */
  --color-overlay: linear-gradient(180deg, rgba(26, 26, 46, 0.7) 0%, rgba(26, 26, 46, 0.95) 100%);
  --color-overlay-solid: rgba(26, 26, 46, 0.9);
  --color-gradient-start: #4755FF;
  --color-gradient-end: #6B77FF;
  --color-shadow: rgba(71, 85, 255, 0.08);
  
  /* ========================================
     TYPOGRAPHY
     ======================================== */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  
  /* Heading styles - confident and clean */
  --heading-weight: 700;
  --heading-gradient: none;
  --heading-text-fill: currentColor;
  
  /* ========================================
     SPACING & LAYOUT
     ======================================== */
  --radius: 18px;
  --radius-input: 14px;
  --radius-tag: 8px;
  --radius-btn: 14px;
  --shadow: 0 1px 3px rgba(18, 22, 40, 0.04), 0 8px 24px rgba(71, 85, 255, 0.08);
  --shadow-lg: 0 2px 6px rgba(18, 22, 40, 0.04), 0 12px 24px rgba(71, 85, 255, 0.15);
  --container-max: 1200px;
  --space-section-y: 6rem;
  --space-card: 1.75rem;
  --nav-height: 4.5rem;
  
  /* ========================================
     COMPONENT TOKENS - BUTTONS
     ======================================== */
  
  /* Primary button - indigo */
  --btn-primary-bg: #4755FF;
  --btn-primary-text: #FFFFFF;
  --btn-primary-border: #4755FF;
  --btn-primary-hover-bg: #3645F0;
  --btn-primary-shadow: 0 4px 12px rgba(71, 85, 255, 0.25);
  
  /* Secondary button - indigo outline */
  --btn-secondary-bg: transparent;
  --btn-secondary-text: #4755FF;
  --btn-secondary-border: #4755FF;
  --btn-secondary-hover-bg: rgba(71, 85, 255, 0.08);
  --btn-secondary-hover-border: #3645F0;
  --btn-secondary-hover-text: #3645F0;
  
  /* Dark tone buttons - white on dark */
  --dark-btn-primary-bg: #FFFFFF;
  --dark-btn-primary-text: #4755FF;
  --dark-btn-secondary-border: #FFFFFF;
  --dark-btn-secondary-text: #FFFFFF;
  
  /* Accent tone buttons - white on gradient */
  --accent-btn-primary-bg: #FFFFFF;
  --accent-btn-primary-text: #4755FF;
  --accent-btn-secondary-border: rgba(255, 255, 255, 0.6);
  --accent-btn-secondary-text: #FFFFFF;
  
  /* ========================================
     COMPONENT TOKENS - NAVIGATION
     ======================================== */
  --nav-bg: rgba(247, 247, 251, 0.95);
  --nav-border: rgba(18, 22, 40, 0.06);
  
  /* ========================================
     COMPONENT TOKENS - SEARCH & INPUTS
     ======================================== */
  --search-input-bg: #FFFFFF;
  --search-input-border: rgba(18, 22, 40, 0.08);
  --search-input-focus-border: #4755FF;
  --search-input-focus-shadow: 0 0 0 3px rgba(71, 85, 255, 0.15);
  --search-btn-bg: #4755FF;
  --search-btn-text: #FFFFFF;
  --search-btn-hover-bg: #3645F0;
  
  /* Popular links */
  --popular-link-bg: rgba(71, 85, 255, 0.08);
  --popular-link-hover-bg: rgba(71, 85, 255, 0.15);
  
  /* ========================================
     COMPONENT TOKENS - CARDS & IMAGES
     ======================================== */
  --card-gradient: none;
  --card-bg: #FFFFFF;
  --image-tag-bg: rgba(26, 26, 46, 0.7);
  --image-tag-text: #FFFFFF;
  --image-title-text: #FFFFFF;
  --image-overlay-gradient: linear-gradient(180deg, transparent 40%, rgba(26, 26, 46, 0.9) 100%);
  
  /* ========================================
     COMPONENT TOKENS - STATS & TRUST BAR
     ======================================== */
  --stat-font: var(--font-heading);
  --stat-gradient: linear-gradient(135deg, #4755FF 0%, #6B77FF 100%);
  --stat-text-fill: transparent;
  --dark-stat-text-fill: transparent;
  
  /* ========================================
     COMPONENT TOKENS - VIDEO
     ======================================== */
  --video-border-color: rgba(71, 85, 255, 0.2);
  --video-hover-border-color: #4755FF;
  --video-glow: 0 8px 32px rgba(71, 85, 255, 0.2);
  --video-hover-shadow: 0 12px 40px rgba(71, 85, 255, 0.25);
  
  /* ========================================
     COMPONENT TOKENS - TIMELINE
     ======================================== */
  --timeline-line-gradient: linear-gradient(180deg, #E7E9FF 0%, #4755FF 50%, #E7E9FF 100%);
  --timeline-number-bg: #4755FF;
  --timeline-number-text: #FFFFFF;
  
  /* ========================================
     COMPONENT TOKENS - CODE BLOCKS
     ======================================== */
  --color-code-bg: #1A1A2E;
  --color-code-text: #6B77FF;
  --color-code-border: rgba(255, 255, 255, 0.1);
  
  /* ========================================
     COMPONENT TOKENS - CALLOUTS
     ======================================== */
  --callout-tip: #22C55E;
  --callout-tip-bg: rgba(34, 197, 94, 0.1);
  --callout-warning: #F59E0B;
  --callout-warning-bg: rgba(245, 158, 11, 0.1);
  --callout-note: #4755FF;
  --callout-note-bg: rgba(71, 85, 255, 0.1);
  
  /* ========================================
     COMPONENT TOKENS - TAGS
     ======================================== */
  --tag-font: var(--font-body);
  --tag-transform: uppercase;
  --tag-letter-spacing: 0.04em;
  
  /* ========================================
     THEME EXTRAS
     ======================================== */
  --scrollbar-track: #F7F7FB;
  --scrollbar-thumb: #D4D6E4;
  --scrollbar-thumb-hover: #4755FF;
  --selection-bg: rgba(71, 85, 255, 0.2);
  --selection-text: #1A1A2E;
  
  /* Hero button glow */
  --hero-btn-glow: 0 4px 16px rgba(71, 85, 255, 0.25);
}

/* ========================================
   TONE-SPECIFIC BUTTON OVERRIDES
   ======================================== */

/* Buttons on DARK tone - white on dark (only when NOT on gradient) */
.block[data-tone="dark"]:not([data-bg="gradient"]) .btn--primary {
  background: var(--dark-btn-primary-bg);
  color: var(--dark-btn-primary-text) !important;
  border-color: var(--dark-btn-primary-bg);
}

.block[data-tone="dark"]:not([data-bg="gradient"]) .btn--primary:hover {
  background: #F0F0F5;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.3);
}

.block[data-tone="dark"]:not([data-bg="gradient"]) .btn--secondary {
  border-color: var(--dark-btn-secondary-border);
  color: var(--dark-btn-secondary-text) !important;
}

.block[data-tone="dark"]:not([data-bg="gradient"]) .btn--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Search button on dark tone - needs INDIGO (not white) because it's inside white input */
.block[data-tone="dark"]:not([data-bg="gradient"]) .search-input__btn {
  background: #4755FF;
  color: #FFFFFF !important;
}

.block[data-tone="dark"]:not([data-bg="gradient"]) .search-input__btn:hover {
  background: #3645F0;
}

/* Search input text on dark tone - ensure dark text on white input */
.block[data-tone="dark"] .search-input__input {
  color: #1A1A2E;
}

.block[data-tone="dark"] .search-input__input::placeholder {
  color: #505364;
}

/* Buttons on ACCENT tone - white on gradient (only when NOT on gradient bg) */
.block[data-tone="accent"]:not([data-bg="gradient"]) .btn--primary {
  background: var(--accent-btn-primary-bg);
  color: var(--accent-btn-primary-text) !important;
  border-color: var(--accent-btn-primary-bg);
}

.block[data-tone="accent"]:not([data-bg="gradient"]) .btn--primary:hover {
  background: #F0F0F5;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.3);
}

.block[data-tone="accent"]:not([data-bg="gradient"]) .btn--secondary {
  border-color: var(--accent-btn-secondary-border);
  color: var(--accent-btn-secondary-text) !important;
}

.block[data-tone="accent"]:not([data-bg="gradient"]) .btn--secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #FFFFFF;
}

/* ========================================
   CARD STYLING - SOFT GLOW EFFECT
   ======================================== */

.card {
  background: var(--card-bg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* Cards on alt tone */
.block[data-tone="alt"] .card {
  background: #FFFFFF;
  border-color: rgba(18, 22, 40, 0.06);
}

/* Cards on dark tone */
.block[data-tone="dark"] .card {
  background: #2A2A42;
  border-color: rgba(255, 255, 255, 0.1);
}

/* Cards on accent tone */
.block[data-tone="accent"] .card {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

/* ========================================
   GRADIENT BACKGROUND TEXT OVERRIDES
   When data-bg="gradient" is applied, text must be readable
   on the indigo gradient (WHITE text)
   ======================================== */

.block[data-bg="gradient"] {
  --surface-text: #FFFFFF;
  --surface-muted: rgba(255, 255, 255, 0.85);
}

.block[data-bg="gradient"] .block__eyebrow {
  color: rgba(255, 255, 255, 0.9) !important;
}

.block[data-bg="gradient"] .hero__subtitle {
  color: rgba(255, 255, 255, 0.85);
}

.block[data-bg="gradient"] .search-section__subtitle {
  color: rgba(255, 255, 255, 0.85);
}

.block[data-bg="gradient"] .footer-cta__eyebrow {
  color: rgba(255, 255, 255, 0.9) !important;
}

.block[data-bg="gradient"] .footer-cta__subtitle {
  color: rgba(255, 255, 255, 0.85);
}

.block[data-bg="gradient"] .footer-cta__feature-title {
  color: #FFFFFF;
}

.block[data-bg="gradient"] .footer-cta__feature-desc {
  color: rgba(255, 255, 255, 0.8);
}

/* Buttons on gradient backgrounds - WHITE for contrast */
.block[data-bg="gradient"] .btn--primary {
  background: #FFFFFF !important;
  color: #4755FF !important;
  border-color: #FFFFFF !important;
}

.block[data-bg="gradient"] .btn--primary:hover {
  background: #F0F0F5 !important;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.3);
}

.block[data-bg="gradient"] .btn--secondary {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
  color: #FFFFFF !important;
}

.block[data-bg="gradient"] .btn--secondary:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: #FFFFFF !important;
}

/* Links on gradient backgrounds */
.block[data-bg="gradient"] a:not(.btn) {
  color: #FFFFFF;
}

/* huge_image subtitle on gradient */
.block[data-bg="gradient"] .huge-image__subtitle {
  color: rgba(255, 255, 255, 0.85);
}

/* ========================================
   ACCENT TONE TEXT OVERRIDES
   (only when NOT combined with gradient bg)
   ======================================== */

.block[data-tone="accent"]:not([data-bg="gradient"]) .block__eyebrow {
  color: rgba(255, 255, 255, 0.9);
}

.block[data-tone="accent"]:not([data-bg="gradient"]) .footer-cta__eyebrow {
  color: rgba(255, 255, 255, 0.9);
}

.block[data-tone="accent"]:not([data-bg="gradient"]) .footer-cta__feature-desc {
  color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   DARK TONE TEXT OVERRIDES
   Indigo eyebrow on dark backgrounds (only when NOT on gradient)
   ======================================== */

.block[data-tone="dark"]:not([data-bg="gradient"]) .block__eyebrow {
  color: #6B77FF;
}

/* ========================================
   BASE/ALT TONE EYEBROW OVERRIDE
   Indigo eyebrow on light backgrounds
   ======================================== */

.block[data-tone="base"] .block__eyebrow,
.block:not([data-tone]) .block__eyebrow {
  color: #4755FF;
}

.block[data-tone="alt"] .block__eyebrow {
  color: #4755FF;
}

/* ========================================
   NAVIGATION STYLING
   ======================================== */

.block--navbar {
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--nav-border);
}

/* ========================================
   BUTTON STYLING - EXPLICIT OVERRIDES
   Ensure buttons always have correct colors
   ======================================== */

.btn--primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text) !important;
  border-color: var(--btn-primary-border);
}

.btn--secondary {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  border-color: var(--btn-secondary-border);
}

/* Breakout CTA buttons - indigo on light backgrounds */
.breakout-cta .btn--primary {
  background: #4755FF;
  color: #FFFFFF !important;
  border-color: #4755FF;
}

.breakout-cta .btn--primary:hover {
  background: #3645F0;
}
