/*
 * BrandYou234 — Block Library CSS Contract
 * ALL blocks use ONLY these variables. Zero raw hex anywhere.
 * Session 12 — May 2026
 *
 * UI/UX Skill: Professional Legal vertical
 * Style: Refined Minimal + Authoritative
 * Spacing: 8px base grid throughout
 * Typography: Serif display + clean Sans body
 */

/* ═══════════════════════════════════════════════════
   COLOUR TOKENS — set by brandyou234-colour-engine.php
   ═══════════════════════════════════════════════════ */
:root {
  /* Brand colours (overridden per scheme) */
  --primary:        #1a3a5c;   /* Deep navy */
  --primary-mid:    #2a5280;   /* Mid navy  */
  --secondary:      #2a5280;   /* Alias for primary-mid (used in button hover) */
  --primary-light:  #e8f0f8;   /* Pale blue tint */
  --accent:         #c9a84c;   /* Gold */
  --accent-light:   #f0e4b8;   /* Pale gold */
  --accent-rgb:     201, 168, 76;  /* For rgba() glow on accent elements */
  --text-on-primary:#ffffff;
  --text-on-accent: #1a1a1a;

  /* Surface tokens */
  --bg:             #ffffff;
  --bg-alt:         #f8f9fa;   /* Off-white sections */
  --bg-dark:        #0f2236;   /* Deep dark sections */
  --surface:        #ffffff;
  --surface-raised: #ffffff;   /* Cards */
  --border:         #e2e8f0;
  --border-strong:  #c8d4e0;

  /* Text tokens */
  --text-primary:   #1a1a2e;
  --text-secondary: #4a5568;
  --text-muted:     #718096;
  --text-inverse:   #ffffff;

  /* Semantic tokens */
  --success:        #2d6a4f;
  --error:          #c62828;
  --warning:        #e65100;

  /* ═══════════════════════════════════════════════
     TYPOGRAPHY SCALE
     ═══════════════════════════════════════════════ */
  --font-display:   'Playfair Display', Georgia, serif;
  --font-body:      'Source Sans 3', 'Source Sans Pro', system-ui, sans-serif;
  --font-mono:      'JetBrains Mono', monospace;

  --text-xs:    0.75rem;   /* 12px */
  --text-sm:    0.875rem;  /* 14px */
  --text-base:  1rem;      /* 16px — minimum body */
  --text-lg:    1.125rem;  /* 18px */
  --text-xl:    1.25rem;   /* 20px */
  --text-2xl:   1.5rem;    /* 24px */
  --text-3xl:   2rem;      /* 32px */
  --text-4xl:   2.5rem;    /* 40px */
  --text-5xl:   3rem;      /* 48px */
  --text-6xl:   3.75rem;   /* 60px */

  --leading-tight:  1.25;
  --leading-snug:   1.375;
  --leading-normal: 1.5;
  --leading-relaxed:1.625;
  --leading-loose:  1.75;

  --weight-normal:  400;
  --weight-medium:  500;
  --weight-semibold:600;
  --weight-bold:    700;

  /* ═══════════════════════════════════════════════
     SPACING — 8px grid
     ═══════════════════════════════════════════════ */
  --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-14:  3.5rem;    /* 56px */
  --space-16:  4rem;      /* 64px */
  --space-20:  5rem;      /* 80px */
  --space-24:  6rem;      /* 96px */

  /* Section padding */
  --section-y:        var(--space-20);  /* 80px desktop */
  --section-y-mobile: var(--space-12);  /* 48px mobile */
  --container-max:    1200px;
  --container-px:     var(--space-6);   /* 24px sides */

  /* ═══════════════════════════════════════════════
     ELEVATION / SHADOW
     ═══════════════════════════════════════════════ */
  /* Issue 12b: three-layer shadows for perceived depth */
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.04), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-md:  0 1px 2px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.08), 0 12px 32px rgba(0,0,0,0.04);
  --shadow-lg:  0 2px 4px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.10), 0 24px 56px rgba(0,0,0,0.06);
  --shadow-xl:  0 4px 8px rgba(0,0,0,0.08), 0 16px 40px rgba(0,0,0,0.14), 0 40px 80px rgba(0,0,0,0.08);
  --shadow-gold:0 4px 20px rgba(201,168,76,0.25), 0 0 40px rgba(201,168,76,0.08);

  /* ═══════════════════════════════════════════════
     BORDER RADIUS
     ═══════════════════════════════════════════════ */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-full:9999px;

  /* ═══════════════════════════════════════════════
     ANIMATION
     ═══════════════════════════════════════════════ */
  --transition-fast:   150ms ease-out;
  --transition-base:   250ms ease-out;
  --transition-slow:   400ms ease-out;
  --transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ═══════════════════════════════════════════════
     Z-INDEX LAYERS
     ═══════════════════════════════════════════════ */
  --z-base:    0;
  --z-above:   10;
  --z-dropdown:20;
  --z-sticky:  40;
  --z-overlay: 100;
  --z-modal:   1000;
}

/* ═══════════════════════════════════════════════════
   GLOBAL RESETS & BASE (shared across all blocks)
   ═══════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* ═══════════════════════════════════════════════════
   UTILITY CLASSES (used by all blocks)
   ═══════════════════════════════════════════════════ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}

.section-pad {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}
@media (max-width: 768px) {
  .section-pad {
    padding-top: var(--section-y-mobile);
    padding-bottom: var(--section-y-mobile);
  }
}

/* Section label above heading */
.section-label {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
}

/* Standard block heading */
.block-heading {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
}
.block-heading--lg { font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl)); }
.block-heading--md { font-size: clamp(var(--text-2xl), 3vw, var(--text-4xl)); }
.block-heading--sm { font-size: clamp(var(--text-xl), 2.5vw, var(--text-3xl)); }

.block-subheading {
  font-size: var(--text-lg);
  line-height: var(--leading-loose);
  color: var(--text-secondary);
  max-width: 640px;
}

/* ─── BUTTONS ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;              /* ≥44px touch target */
  padding: 0 var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  line-height: 1;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-fast),
              color var(--transition-fast),
              border-color var(--transition-fast),
              transform var(--transition-fast),
              box-shadow var(--transition-fast);
  position: relative;
  overflow: hidden;
}
.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--primary);
  color: var(--text-on-primary);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-mid);
  border-color: var(--primary-mid);
  box-shadow: var(--shadow-md);
}

.btn-gold {
  background: var(--accent);
  color: var(--text-on-accent);
  border-color: var(--accent);
}
.btn-gold:hover {
  background: #b8942e;
  border-color: #b8942e;
  box-shadow: var(--shadow-gold);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary-light);
}

.btn-outline-light {
  background: transparent;
  color: var(--text-inverse);
  border-color: rgba(255,255,255,0.6);
}
.btn-outline-light:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
}

.btn-lg {
  min-height: 56px;
  padding: 0 var(--space-8);
  font-size: var(--text-lg);
}
.btn-sm {
  min-height: 40px;
  padding: 0 var(--space-4);
  font-size: var(--text-sm);
}

/* ─── GOLD DIVIDER ────────────────────────────────── */
.gold-rule {
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent);
  border: none;
  margin: var(--space-4) 0 var(--space-6);
}
.gold-rule--center { margin-left: auto; margin-right: auto; }

/* ─── CARDS ───────────────────────────────────────── */
.card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* ─── REDUCED MOTION ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── RESPONSIVE GRID ─────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-8); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-8); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════
   ISSUE 12 — COLOUR RICHNESS & DEPTH ENHANCEMENTS
   Applied globally — makes PHP pages match Elementor depth
   ═══════════════════════════════════════════════════ */

/* 12a: Dark primary sections — subtle radial overlay for depth */
[class*="bg-primary"],
[class*="section"][style*="--primary"],
.cta, .cta-a, .cta-b, .cta-c,
.pt-hero, .pt-trust,
section[style*="background:var(--primary)"],
section[style*="background: var(--primary)"] {
  background-image: radial-gradient(
    ellipse at 30% 50%,
    rgba(255,255,255,0.04) 0%,
    transparent 70%
  );
  background-blend-mode: overlay;
}

/* 12c: Accent glow on icons and decorative lines */
.pt-trust__icon,
.section-label,
.gold-rule,
[class*="accent-icon"] {
  filter: drop-shadow(0 0 8px rgba(var(--accent-rgb, 201,168,76), 0.22));
}

/* 12d: Gradient section separator — premium feel between sections */
section + section::before {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--accent-rgb, 201,168,76), 0.3) 20%,
    rgba(var(--accent-rgb, 201,168,76), 0.3) 80%,
    transparent
  );
  margin-bottom: -1px;
}

/* 12e: Headings in dark sections — subtle text shadow for perceived weight */
.pt-hero h1,
.pt-hero h2,
.pt-trust h2,
.cta h2,
[style*="color:var(--text-inverse)"],
[style*="color: var(--text-inverse)"] {
  text-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.06);
}

/* 12 — Card depth upgrade */
.card,
.pt-card,
.pt-spotlight__card {
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.card:hover,
.pt-card:hover {
  box-shadow: var(--shadow-lg);
}

/* ── Reduced motion: disable all decorative filters/shadows ── */
@media (prefers-reduced-motion: reduce) {
  .pt-trust__icon,
  .section-label,
  .gold-rule {
    filter: none;
  }
}
