/*
Theme Name: Kennedy Media Group
Theme URI: https://kennedymedia.com
Author: Kennedy Media Group
Author URI: https://kennedymedia.com
Description: Custom lightweight theme for kennedymedia.com. Replaces Divi. Hand-coded template parts + ACF flexible content blocks for editable sections.
Version: 2.13.0
Requires PHP: 8.0
Text Domain: kmg
*/

/* ==========================================================================
   DESIGN TOKENS — kept 1:1 with the existing brand system
   ========================================================================== */
:root {
  /* Brand palette */
  --kmg-deep-blue: #0A2540;
  --kmg-mid-blue: #1E4A8C;
  --kmg-accent-blue: #00A3D9;
  --kmg-white: #FFFFFF;
  --kmg-ink: #16233A;
  --kmg-muted: #5B6B82;
  --kmg-bg-light: #F5F8FB;
  --kmg-border: #E1E8F0;

  /* Dark-section system — used on hero, CTA, stats, marquee.
     A near-black navy rather than pure black, so it still reads as
     "your" blue, not a generic dark-mode template. */
  --kmg-void: #060E1A;
  --kmg-void-2: #0D1B30;
  --kmg-glow-cyan: rgba(0, 163, 217, 0.35);
  --kmg-glow-violet: rgba(107, 91, 255, 0.22);
  --kmg-line-dark: rgba(255, 255, 255, 0.1);
  --kmg-text-dark-muted: rgba(255, 255, 255, 0.65);

  /* Type */
  --font-display: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Spacing scale */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 5rem;

  /* Layout */
  --container-max: 1200px;
  --radius: 8px;
  --radius-lg: 20px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   RESET / BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--kmg-ink);
  background: var(--kmg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--kmg-deep-blue);
  line-height: 1.2;
  margin: 0 0 var(--space-2);
}
p { margin: 0 0 var(--space-2); }
a { color: var(--kmg-accent-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
button, .btn {
  font-family: var(--font-body);
  cursor: pointer;
}

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.btn-primary {
  background: var(--kmg-accent-blue);
  color: var(--kmg-white);
}
.btn-primary:hover { background: #0891c2; text-decoration: none; transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  border-color: var(--kmg-white);
  color: var(--kmg-white);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); text-decoration: none; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--kmg-accent-blue);
  outline-offset: 2px;
}

/* ==========================================================================
   SCROLL-REVEAL SYSTEM
   Elements start hidden/offset via [data-reveal], and gain .is-visible
   from an IntersectionObserver in main.js. Pure CSS transforms/opacity —
   no animation library, GPU-accelerated, cheap. Respects reduced-motion
   above (transitions collapse to ~instant).
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  transition: opacity 1.1s cubic-bezier(0.22, 1, 0.36, 1),
              transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
/* Staggered children — set transition-delay via inline custom property
   --reveal-index, applied by main.js based on DOM order within a
   [data-reveal-group]. Capped in JS so long lists don't take forever
   to finish revealing. */
[data-reveal] { transition-delay: calc(var(--reveal-index, 0) * 110ms); }

/* No-JS fallback: if main.js hasn't run (blocked/erroring), content must
   still be visible rather than permanently hidden. */
.no-js [data-reveal] { opacity: 1; transform: none; }
