/*
Theme Name: ECU Shop NZ
Theme URI: https://ecushop.co.nz
Author: ECU Shop NZ
Author URI: https://ecushop.co.nz
Description: Custom dark automotive theme for ECU Shop NZ — New Zealand's leading supplier of Throttle Response Controllers, Tunable Piggyback Diesel ECUs, EGR Delete Cables, and Gauges.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ecushop
Tags: e-commerce, woocommerce, dark, automotive, custom-menu, custom-logo, featured-images

ECU Shop NZ — WooCommerce Custom Theme
*/

/* ==========================================================================
   Design System — CSS Custom Properties
   ========================================================================== */

:root {
  /* Raw brand red — kept as the literal source. Under the teal-led migration
     (Option A) red is reserved for buy CTAs, urgency badges and errors only;
     everything decorative routes through the semantic --ecu-accent-* / danger
     tokens below. Do NOT reference --ecu-red* directly in new decorative CSS. */
  --ecu-red: #e63946;
  --ecu-red-dark: #c1121f;
  --ecu-red-light: #ff6b6b;

  /* ECU Shop brand blue-teal (raw ramp). Contrast on #0d1117 family:
     teal-light 6.19:1 (text-safe, body) · teal 4.65:1 (fills/borders/large
     text only) · teal-dark white-fg 6.95:1 · teal-deep white-fg 12.0:1. */
  --ecu-teal-light: #2e9ecb;
  --ecu-teal: #1f86b8;
  --ecu-teal-dark: #145f88;
  --ecu-teal-deep: #0a3a55;

  /* ------------------------------------------------------------------
     SEMANTIC TOKEN LAYER — the one place the red/teal split is tuned.
     Migration decision: teal-led site, red reserved for conversion + danger.
     ------------------------------------------------------------------ */

  /* Brand accent (teal) — decorative fills, borders, dividers, icon glows,
     section accents, focus rings, non-CTA link hovers. */
  --ecu-accent: var(--ecu-teal);              /* fills/borders/large text (4.65:1) */
  --ecu-accent-strong: var(--ecu-teal-dark);  /* solid button fills, deep hovers (white-fg 6.95:1) */
  --ecu-accent-soft: var(--ecu-teal-light);   /* TEXT on dark — body-safe (6.19:1) */
  --ecu-accent-bright: #5bbfe6;               /* brighter hover for accent text (8.3:1) */
  --ecu-accent-glow: rgba(31, 134, 184, 0.4);
  --ecu-accent-glow-soft: rgba(31, 134, 184, 0.15);
  --ecu-accent-tint: rgba(31, 134, 184, 0.08);        /* soft section/card tints */
  --ecu-accent-tint-strong: rgba(31, 134, 184, 0.12); /* winner/highlight tints */

  /* Conversion (red) — buy buttons, urgency/announcement badges. Option A. */
  --ecu-cta: var(--ecu-red);
  --ecu-cta-dark: var(--ecu-red-dark);
  --ecu-cta-light: var(--ecu-red-light);
  --ecu-cta-glow: rgba(230, 57, 70, 0.4);
  --ecu-cta-glow-soft: rgba(230, 57, 70, 0.15);

  /* Danger (red) — errors, validation, negative/"without product" indicators,
     rev-limiter warning line. Body-text danger uses #e63946 (4.54:1 on dark). */
  --ecu-danger: var(--ecu-red);
  --ecu-danger-strong: var(--ecu-red-dark);

  /* Secondary Accent */
  --ecu-amber: #f59e0b;
  --ecu-orange: #f97316;

  /* Backgrounds */
  --ecu-bg-primary: #0d1117;
  --ecu-bg-secondary: #161b22;
  --ecu-bg-tertiary: #1c2333;
  --ecu-bg-input: #21262d;

  /* Text */
  --ecu-text-primary: #f0f6fc;
  --ecu-text-secondary: #9ca3af;
  /* Readable brand-accent TEXT on dark backgrounds. Now the teal-led accent:
     teal-light (#2e9ecb) hits 6.19:1 on #0d1117 (PASS AA normal), so accent
     writing, links and small labels are readable. Solid teal (#1f86b8, 4.65:1)
     is reserved for fills/borders/large text; CTAs use --ecu-cta (red). */
  --ecu-text-accent: var(--ecu-teal-light);

  /* Borders */
  --ecu-border: #30363d;
  --ecu-border-light: #484f58;

  /* Success/Info */
  --ecu-green: #3fb950;
  --ecu-blue: #58a6ff;

  /* Legacy red glow aliases — retained so any CTA/urgency selector still
     resolving them keeps red. Decorative code uses --ecu-accent-glow*. */
  --ecu-red-glow: rgba(230, 57, 70, 0.4);
  --ecu-red-glow-soft: rgba(230, 57, 70, 0.15);

  /* Layout */
  --ecu-max-width: 1320px;
  --ecu-section-padding: 80px;
  --ecu-section-padding-mobile: 48px;
  --ecu-card-radius: 10px;
  --ecu-radius: 10px;
  --ecu-gap: 24px;

  /* Typography */
  --ecu-font-display: 'Teko', 'Bebas Neue', sans-serif;
  --ecu-font-heading: 'Barlow', 'Roboto Condensed', sans-serif;
  --ecu-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Focus styles for keyboard accessibility */
:focus-visible {
  outline: 2px solid var(--ecu-accent);
  outline-offset: 2px;
}

/* Remove default outline only when using mouse */
:focus:not(:focus-visible) {
  outline: none;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--ecu-font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ecu-text-primary);
  background-color: var(--ecu-bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle noise texture overlay for premium feel */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

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

a {
  color: var(--ecu-accent-soft);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--ecu-accent-bright);
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ecu-font-heading);
  line-height: 1.2;
  color: var(--ecu-text-primary);
}

h1 { font-size: 3rem; font-weight: 700; }
h2 { font-size: 2.25rem; font-weight: 700; }
h3 { font-size: 1.5rem; font-weight: 700; }
h4 { font-size: 1.25rem; font-weight: 700; }

p {
  margin-bottom: 1rem;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.container {
  max-width: var(--ecu-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--ecu-section-padding) 0;
}

.section--alt {
  background: radial-gradient(ellipse at top center, #1a2030 0%, var(--ecu-bg-secondary) 70%);
}

.section--tertiary {
  background: radial-gradient(ellipse at bottom center, #222940 0%, var(--ecu-bg-tertiary) 70%);
}

.section__heading {
  text-align: center;
  margin-bottom: 48px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-muted { color: var(--ecu-text-secondary); }
.text-accent { color: var(--ecu-text-accent); }
.text-uppercase { text-transform: uppercase; }

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

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-family: var(--ecu-font-heading);
  position: relative;
  overflow: hidden;
}

/* Primary = the buy CTA. Option A keeps it red for maximum conversion contrast
   against the otherwise teal-led site. */
.btn-primary {
  background: linear-gradient(135deg, var(--ecu-cta), var(--ecu-cta-dark));
  color: #fff;
}

/* Shimmer sweep effect */
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--ecu-cta-light), var(--ecu-cta));
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--ecu-cta-glow);
}

/* Secondary = non-buy action (outline). Teal-led per Option A. */
.btn-secondary {
  border: 2px solid var(--ecu-accent);
  color: var(--ecu-accent-soft);
  background: transparent;
}

.btn-secondary:hover {
  background: var(--ecu-accent-strong);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--ecu-accent-glow-soft);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 18px 40px;
  font-size: 1.0625rem;
}

/* Button with arrow */
.btn-arrow::after {
  content: ' \2192';
  display: inline-block;
  transition: transform 0.3s ease;
  margin-left: 6px;
}

.btn-arrow:hover::after {
  transform: translateX(4px);
}

/* ==========================================================================
   Forms
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="password"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  background: var(--ecu-bg-input);
  border: 1px solid var(--ecu-border);
  border-radius: 6px;
  color: var(--ecu-text-primary);
  font-family: var(--ecu-font-body);
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--ecu-accent);
  box-shadow: 0 0 0 3px var(--ecu-accent-glow-soft), inset 3px 0 0 var(--ecu-accent);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b949e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--ecu-text-secondary);
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: var(--ecu-bg-secondary);
  border: 1px solid var(--ecu-border);
  border-radius: var(--ecu-card-radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ecu-accent), var(--ecu-accent-soft), var(--ecu-accent));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 20px var(--ecu-accent-glow-soft);
  border-color: var(--ecu-border-light);
}

.card:hover::before {
  opacity: 1;
}

.card__image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.card__body {
  padding: var(--ecu-gap);
}

.card__title {
  font-size: 1.125rem;
  margin-bottom: 8px;
}

.card__text {
  color: var(--ecu-text-secondary);
  font-size: 0.9375rem;
}

/* ==========================================================================
   Grid Layouts
   ========================================================================== */

.grid {
  display: grid;
  gap: var(--ecu-gap);
}

.grid--2 {
  grid-template-columns: 1fr;
}

.grid--3 {
  grid-template-columns: 1fr;
}

.grid--4 {
  grid-template-columns: 1fr;
}

@media (min-width: 576px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

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

@media (min-width: 992px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .reviews-grid.grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* ==========================================================================
   Scroll Reveal Animations
   ========================================================================== */

/* Reveal animations: only hide content when JS is active (html.js class set by main.js).
   Without JS, all content is immediately visible — no dark dead zones on slow/blocked JS. */
.js .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.js .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children in grids */
.js .reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.js .reveal-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.js .reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.js .reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.js .reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.js .reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.js .reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }

.js .reveal-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Back to Top Button
   ========================================================================== */

.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--ecu-accent), var(--ecu-accent-strong));
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all 0.3s ease;
  z-index: 990;
  box-shadow: 0 4px 16px var(--ecu-accent-glow);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--ecu-accent-glow);
}

/* ==========================================================================
   Page Loading Bar
   ========================================================================== */

.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ecu-accent), var(--ecu-accent-soft), var(--ecu-accent));
  z-index: 10001;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px var(--ecu-accent-glow);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 767px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }

  .section {
    padding: var(--ecu-section-padding-mobile) 0;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  /* Scroll-reveal content must not wait for IntersectionObserver under reduced motion */
  .js .reveal,
  .js .reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ==========================================================================
   BSN Hero — Engine Hologram Background
   ========================================================================== */

.bsn-hero {
  position: relative;
  overflow: hidden;
}

@keyframes bsn-hologram-fadein {
  0%   { opacity: 0; }
  100% { opacity: 0.45; }
}

.bsn-hero__engine-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 100%;
  border: none;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  animation: bsn-hologram-fadein 2s ease-out 0.4s forwards;
}

.bsn-hero > .container {
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Ramble Idle — XY Sound Design Widget
   ========================================================================== */

.bsn-ramble {
  background: var(--ecu-bg-secondary);
  position: relative;
  overflow: hidden;
}

.bsn-ramble::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(31, 134, 184, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.bsn-ramble .section-tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-family: var(--ecu-font-display);
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--ecu-accent-soft);
  background: var(--ecu-accent-tint);
  border: 1px solid rgba(31, 134, 184, 0.2);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.bsn-ramble__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.bsn-ramble__intro {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--ecu-text-primary);
  margin-bottom: 32px;
}

.bsn-ramble__features {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 32px;
}

.bsn-ramble__feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.bsn-ramble__feature-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--ecu-accent-tint);
  border: 1px solid rgba(31, 134, 184, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bsn-ramble__feature-title {
  font-size: 0.9375rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.bsn-ramble__feature-text {
  color: var(--ecu-text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0;
}

.bsn-ramble__how-it-works {
  background: var(--ecu-bg-tertiary);
  border: 1px solid var(--ecu-border);
  border-radius: var(--ecu-card-radius);
  padding: 24px;
  margin-bottom: 32px;
}

.bsn-ramble__subtitle {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ecu-accent-soft);
  margin-bottom: 8px;
}

.bsn-ramble__explanation {
  color: var(--ecu-text-secondary);
  font-size: 0.875rem;
  line-height: 1.7;
  margin: 0;
}

.bsn-ramble__visual {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* XY Pad */
.bsn-ramble__xy-pad {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #0c0c0c;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 23px, rgba(255,255,255,0.045) 23px, rgba(255,255,255,0.045) 24px),
    repeating-linear-gradient(90deg, transparent, transparent 23px, rgba(255,255,255,0.045) 23px, rgba(255,255,255,0.045) 24px);
  border: 1px solid var(--ecu-border);
  border-radius: var(--ecu-card-radius);
  overflow: hidden;
  cursor: crosshair;
  user-select: none;
  -webkit-user-select: none;
}

.bsn-ramble__xy-pad.is-dragging { cursor: none; }

/* Rev-limiter "redline" warning marker — danger semantics, stays red. */
.bsn-ramble__limit-line {
  position: absolute;
  top: 18%;
  left: 0;
  right: 0;
  height: 0;
  border-top: 1px dashed rgba(230, 57, 70, 0.65);
  pointer-events: none;
}

.bsn-ramble__limit-label {
  position: absolute;
  left: 8px;
  top: -18px;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(230, 57, 70, 0.8);
  font-family: var(--ecu-font-display);
}

.bsn-ramble__cross-h,
.bsn-ramble__cross-v {
  position: absolute;
  background: rgba(255,255,255,0.12);
  pointer-events: none;
}
.bsn-ramble__cross-h { top: 50%; left: 0; right: 0; height: 1px; }
.bsn-ramble__cross-v { left: 50%; top: 0; bottom: 0; width: 1px; }

.bsn-ramble__axis-label {
  position: absolute;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.35);
  font-family: var(--ecu-font-display);
  pointer-events: none;
}
.bsn-ramble__axis-label--top    { top: 6px;    left: 50%; transform: translateX(-50%); }
.bsn-ramble__axis-label--bottom { bottom: 6px; left: 50%; transform: translateX(-50%); }
.bsn-ramble__axis-label--left   { left: 6px;   top: 50%;  transform: translateY(-50%); }
.bsn-ramble__axis-label--right  { right: 6px;  top: 50%;  transform: translateY(-50%); }

.bsn-ramble__dot {
  position: absolute;
  width: 18px;
  height: 18px;
  background: #39ff74;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px #39ff74, 0 0 20px rgba(57,255,116,0.4);
  pointer-events: none;
  transition: box-shadow 0.15s ease;
  z-index: 2;
}
.bsn-ramble__xy-pad.is-dragging .bsn-ramble__dot {
  box-shadow: 0 0 12px #39ff74, 0 0 32px rgba(57,255,116,0.6);
}

.bsn-ramble__canvas {
  display: block;
  width: 100%;
  height: 72px;
  border: 1px solid var(--ecu-border);
  border-radius: var(--ecu-card-radius);
  background: var(--ecu-bg-tertiary);
}

.bsn-ramble__sound-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  background: transparent;
  border: 1px solid var(--ecu-accent);
  border-radius: var(--ecu-card-radius);
  color: var(--ecu-accent-soft);
  font-family: var(--ecu-font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
.bsn-ramble__sound-btn:hover {
  background: var(--ecu-accent-tint-strong);
  box-shadow: 0 0 16px var(--ecu-accent-glow-soft);
}
.bsn-ramble__sound-btn.is-playing {
  background: var(--ecu-accent-strong);
  color: #fff;
  box-shadow: 0 0 20px var(--ecu-accent-glow-soft);
}

.bsn-ramble__volume {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bsn-ramble__volume-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ecu-text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.bsn-ramble__volume-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--ecu-border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.bsn-ramble__volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--ecu-accent);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 6px var(--ecu-accent-glow-soft);
}
.bsn-ramble__volume-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--ecu-accent);
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

.bsn-ramble__volume-value {
  font-size: 0.75rem;
  color: var(--ecu-text-secondary);
  min-width: 32px;
  text-align: right;
  flex-shrink: 0;
}

.bsn-ramble__badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ecu-accent-tint);
  border: 1px solid rgba(31, 134, 184, 0.2);
  border-radius: var(--ecu-card-radius);
  padding: 16px 20px;
  font-size: 0.875rem;
  color: var(--ecu-text-primary);
  font-weight: 500;
}

@media (max-width: 768px) {
  .bsn-ramble__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .bsn-ramble__xy-pad {
    aspect-ratio: 4 / 3;
  }
}

/* ==========================================================================
   Competitor Comparison Table — BSN vs iDrive vs EVC
   ========================================================================== */

.bsn-vs-section {
  background: var(--ecu-bg-primary);
}

.bsn-vs-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--ecu-card-radius);
  border: 1px solid var(--ecu-border);
}

.bsn-vs-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
}

.bsn-vs-table th,
.bsn-vs-table td {
  padding: 14px 18px;
  text-align: center;
  border-bottom: 1px solid var(--ecu-border);
  font-size: 0.875rem;
}

.bsn-vs-table th:first-child,
.bsn-vs-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--ecu-text-secondary);
  width: 40%;
}

.bsn-vs-table thead th {
  background: var(--ecu-bg-secondary);
  font-family: var(--ecu-font-display);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ecu-text-primary);
  border-bottom: 2px solid var(--ecu-border);
}

.bsn-vs-table thead th.bsn-vs-table__winner {
  background: rgba(230, 57, 70, 0.12);
  color: var(--ecu-cta-light);
  border-bottom: 2px solid var(--ecu-cta);
}

.bsn-vs-table tbody tr:hover {
  background: rgba(255,255,255,0.02);
}

.bsn-vs-table tbody tr:last-child td {
  border-bottom: none;
}

.bsn-vs-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(63,185,80,0.12);
  border: 1px solid var(--ecu-green);
  color: var(--ecu-green);
}

.bsn-vs-cross {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--ecu-text-secondary);
}

.bsn-vs-value {
  font-weight: 600;
  color: var(--ecu-text-primary);
}

.bsn-vs-value--winner {
  color: var(--ecu-cta-light);
  font-weight: 700;
}

/* ==========================================================================
   Homepage — Logo Parallax Video Section
   ========================================================================== */

@keyframes logo-parallax-fadein {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

.logo-parallax-section {
  position: relative;
  height: 88vh;
  overflow: hidden;
  background: var(--ecu-bg-primary);
}

.logo-parallax-inner {
  position: absolute;
  top: -12%; left: 0; right: 0; bottom: -12%;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

.logo-parallax-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.logo-parallax-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(13,17,23,0.72) 0%,
    rgba(13,17,23,0.22) 30%,
    rgba(13,17,23,0.22) 70%,
    rgba(13,17,23,0.80) 100%
  );
  pointer-events: none;
}

.logo-parallax-label {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--ecu-font-heading);
  font-size: 0.72rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.32);
  white-space: nowrap;
  pointer-events: none;
}

@media (max-width: 640px) {
  .logo-parallax-section { height: 56vh; }
}

/* ==========================================================================
   Homepage — Email Signup Section
   ========================================================================== */

.signup-section {
  background: radial-gradient(ellipse at top center, #1a2030 0%, var(--ecu-bg-secondary) 70%);
  padding: 56px 0;
  text-align: center;
}

.signup-box {
  max-width: 600px;
  margin: 0 auto;
}

.signup-title {
  font-family: var(--ecu-font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ecu-text-primary);
}

.signup-text {
  color: var(--ecu-text-secondary);
  margin-bottom: 24px;
}

.signup-input-group {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  gap: 8px;
}

.signup-input {
  flex: 1;
  padding: 12px 16px;
  background: var(--ecu-bg-input);
  border: 1px solid var(--ecu-border);
  border-radius: 6px;
  color: var(--ecu-text-primary);
  font-family: var(--ecu-font-body);
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.signup-input:focus {
  outline: none;
  border-color: var(--ecu-accent);
  box-shadow: 0 0 0 3px var(--ecu-accent-glow-soft);
}

.signup-input::placeholder { color: var(--ecu-text-secondary); }

.signup-message {
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--ecu-green);
}

@media (max-width: 480px) {
  .signup-input-group {
    flex-direction: column;
  }
}

/* ==========================================================================
   ABOUT PAGE
   ========================================================================== */

.about-hero-subtitle {
  color: var(--ecu-text-secondary);
  font-size: 1.125rem;
  margin-top: 8px;
}

/* Stats Bar */
.about-stats-bar {
  background: var(--ecu-bg-secondary);
  border-top: 1px solid var(--ecu-border);
  border-bottom: 1px solid var(--ecu-border);
  padding: 40px 0;
}

.about-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.about-stat {
  padding: 16px;
}

.about-stat__number {
  font-family: var(--ecu-font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--ecu-accent-soft);
  line-height: 1;
  display: block;
  text-shadow: 0 0 30px var(--ecu-accent-glow-soft);
}

.about-stat__label {
  font-size: 0.875rem;
  color: var(--ecu-text-secondary);
  margin-top: 6px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Story Blocks */
.about-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 64px;
}

.about-block--reverse {
  direction: rtl;
}

.about-block--reverse > * {
  direction: ltr;
}

.about-block__text p {
  color: var(--ecu-text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
}

.about-block__image {
  border-radius: var(--ecu-radius);
  overflow: hidden;
  background: var(--ecu-bg-secondary);
}

.about-block__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--ecu-radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* About Timeline label */
.about-timeline__year {
  position: relative;
  margin-bottom: 16px;
}

.about-timeline__year-label {
  font-family: var(--ecu-font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ecu-accent-soft);
  text-shadow: 0 0 30px var(--ecu-accent-glow-soft);
}

/* Category Intro */
.category-intro {
  margin-bottom: 40px;
  padding: 32px;
  background: var(--ecu-bg-secondary);
  border-radius: var(--ecu-radius);
  border: 1px solid var(--ecu-border);
}

.category-intro h2 {
  font-family: var(--ecu-font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--ecu-text-primary);
}

.category-intro p {
  color: var(--ecu-text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.category-intro__list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.category-intro__list li {
  color: var(--ecu-text-secondary);
  padding-left: 20px;
  position: relative;
  font-size: 0.9375rem;
}

.category-intro__list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--ecu-green);
  font-weight: 700;
}

/* Exit Intent Popup */
.exit-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.exit-popup-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.exit-popup {
  background: var(--ecu-bg-secondary);
  border: 1px solid var(--ecu-border);
  border-radius: var(--ecu-radius);
  padding: 48px 40px;
  max-width: 480px;
  width: 90%;
  position: relative;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

/* Exit-intent discount badge — urgency, keeps red (Option A). Small-text
   readability: coral --ecu-cta-light (#ff6b6b, 6.8:1) not the raw #e63946. */
.exit-popup__badge {
  display: inline-block;
  background: var(--ecu-cta-glow-soft);
  border: 1px solid var(--ecu-cta);
  color: var(--ecu-cta-light);
  font-family: var(--ecu-font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.exit-popup__title {
  font-family: var(--ecu-font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--ecu-text-primary);
  margin-bottom: 8px;
  line-height: 1.2;
}

.exit-popup__subtitle {
  color: var(--ecu-text-secondary);
  margin-bottom: 28px;
  font-size: 0.9375rem;
}

.exit-popup__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exit-popup__input {
  padding: 13px 16px;
  background: var(--ecu-bg-primary);
  border: 1px solid var(--ecu-border);
  border-radius: 6px;
  color: var(--ecu-text-primary);
  font-size: 1rem;
  font-family: var(--ecu-font-body);
  transition: border-color 0.25s;
}

.exit-popup__input:focus {
  outline: none;
  border-color: var(--ecu-accent);
  box-shadow: 0 0 0 3px var(--ecu-accent-glow-soft);
}

.exit-popup__btn {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
}

.exit-popup__dismiss {
  margin-top: 14px;
  font-size: 0.8125rem;
  color: var(--ecu-text-secondary);
  cursor: pointer;
  background: none;
  border: none;
  display: block;
  width: 100%;
  padding: 4px;
  transition: color 0.2s;
}

.exit-popup__dismiss:hover {
  color: var(--ecu-text-primary);
}

.exit-popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  color: var(--ecu-text-secondary);
  cursor: pointer;
  padding: 6px;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.exit-popup__close:hover {
  color: var(--ecu-text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.exit-popup__success {
  padding: 20px 0 8px;
}

.exit-popup__success-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}

.exit-popup__coupon {
  display: inline-block;
  background: rgba(57, 255, 116, 0.08);
  border: 2px dashed var(--ecu-green);
  color: var(--ecu-green);
  font-family: var(--ecu-font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 10px 24px;
  border-radius: 6px;
  margin: 12px 0 16px;
}

/* Afterpay sitewide badge */
.afterpay-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #b2fce4;
  color: #000;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  margin-top: 6px;
}

.afterpay-badge svg {
  width: 60px;
  height: auto;
}

/* About & Category responsive */
@media (max-width: 900px) {
  .about-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-block {
    grid-template-columns: 1fr;
  }
  .about-block--reverse {
    direction: ltr;
  }
  .category-intro__list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .about-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .exit-popup {
    padding: 36px 24px;
  }
}

/* ── Logo parallax video section ─────────────────────────────────────────── */
#logo-parallax-section {
  position: relative;
  height: 88vh;
  overflow: hidden;
  background: #0d1117;
}
#logo-parallax-inner {
  position: absolute;
  top: -12%; left: 0; right: 0; bottom: -12%;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}
#logo-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.logo-parallax-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(13,17,23,0.72) 0%,
    rgba(13,17,23,0.22) 30%,
    rgba(13,17,23,0.22) 70%,
    rgba(13,17,23,0.80) 100%
  );
  pointer-events: none;
}
.logo-parallax-label {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Barlow', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.32);
  white-space: nowrap;
  pointer-events: none;
}
@media (max-width: 640px) {
  #logo-parallax-section { height: 56vh; }
}

/* ── Brand logo pill treatment ───────────────────────────────────────────── */
.brand-strip__logo--pill {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid var(--ecu-border, rgba(255,255,255,0.12));
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--ecu-text-secondary, #8b949e);
  background: var(--ecu-bg-secondary, #161b22);
  transition: border-color 0.2s, color 0.2s;
}
.brand-strip__logo--pill:hover {
  border-color: var(--ecu-accent, #1f86b8);
  color: var(--ecu-text-primary, #e6edf3);
}

/* ── Gallery section heading ─────────────────────────────────────────────── */
.gallery-section__heading {
  text-align: center;
  margin-bottom: 24px;
  padding: 0 16px;
}

/* ── Homepage reviews strip ──────────────────────────────────────────────── */
.homepage-reviews .grid--3 {
  margin-top: 32px;
}

/* ECU-114: Fix dark dead zones ─────────────────────────────────────────────
   Brand strip: add subtle background so it reads against the pure-black body.
   Homepage reviews: give section a differentiated background so cards are
   legible and the section doesn't appear as a blank dark block. */
.brand-strip {
  background: radial-gradient(ellipse at center, #141c2c 0%, var(--ecu-bg-secondary) 80%);
}

.homepage-reviews {
  background: radial-gradient(ellipse at top center, #1a2030 0%, var(--ecu-bg-secondary) 70%);
}

/* Review card: lift border contrast so cards are distinct on alt backgrounds */
.homepage-reviews .card {
  border-color: var(--ecu-border-light);
}

/* Logo parallax fallback: show a gradient overlay even before the video poster
   loads, so the section never appears as a featureless black void */
#logo-parallax-section {
  background: linear-gradient(180deg, #0d1117 0%, #111827 50%, #0d1117 100%);
}

/* ========================================
   SPRINT FIXES — Lead Web Developer
   ======================================== */

/* ECU-117: Enlarge footer payment icons to 32px height */
.payment-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.payment-icon {
    display: inline-flex;
    align-items: center;
}
.payment-icon svg {
    width: auto;
    height: 32px;
}

/* ECU-116: Mobile announcement bar — show only first message on mobile */
@media (max-width: 640px) {
    .announcement-bar__secondary {
        display: none;
    }
    .announcement-bar__text {
        font-size: 0.8rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .announcement-bar__inner {
        justify-content: center;
    }
    .announcement-bar__cta {
        font-size: 0.75rem;
        padding: 4px 10px;
        white-space: nowrap;
    }
}
