/* ================================================================
   AAA Training — Main Stylesheet
   Mobile-first, premium firearms training aesthetic
   Palette: charcoal/matte-black base, brass/ember accent, steel grays
   ================================================================ */

/* ----------------------------------------------------------------
  0. Local Fonts
  ---------------------------------------------------------------- */

@font-face {
  font-family: 'Oswald';
  src: url('/assets/fonts/oswald-variable.woff2') format('woff2-variations');
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ----------------------------------------------------------------
   1. CSS Custom Properties (Design Tokens)
   ---------------------------------------------------------------- */

:root {
  
/* Color — Neutrals */
  --color-black:       #0a0a0a;
  --color-charcoal-1:  #111214;
  --color-charcoal-2:  #18191c;
  --color-charcoal-3:  #1e2024;
  --color-charcoal-4:  #252830;
  --color-charcoal-5:  #2e3139;
  --color-steel-1:     #3a3e48;
  --color-steel-2:     #4a4f5c;
  --color-steel-3:     #5e6472;
  --color-steel-4:     #767d8c;
  --color-steel-5:     #9199a8;

  
/* Color — Text */
  --color-text-primary:   #f0f1f3;
  --color-text-secondary: #b8bcc8;
  --color-text-muted:     #767d8c;
  --color-text-inverse:   #111214;

  
/* Color — Accent (Brass / Ember / Amber) */
  --color-accent-50:   #fdf6ec;
  --color-accent-100:  #fae8c8;
  --color-accent-200:  #f4cc8a;
  --color-accent-300:  #ecac50;
  --color-accent-400:  #e0913a; 
/* warm ember */
  --color-accent-500:  #C87941; 
/* primary brass */
  --color-accent-600:  #a85e2c;
  --color-accent-700:  #7d4118;

  
/* Color — Success / Warning / Error */
  --color-success:  #3d8b65;
  --color-warning:  #c87f2a;
  --color-error:    #b84040;

  
/* Color — Borders */
  --color-border:       rgba(255,255,255,0.08);
  --color-border-light: rgba(255,255,255,0.05);
  --color-border-accent: rgba(200,121,65,0.35);

  
/* Typography */
  --font-display: 'Oswald', 'Impact', sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  --fw-light:    300;
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;

  
/* Type Scale */
  --text-xs:   0.75rem;   
/* 12px */
  --text-sm:   0.875rem;  
/* 14px */
  --text-base: 1rem;      
/* 16px */
  --text-lg:   1.125rem;  
/* 18px */
  --text-xl:   1.25rem;   
/* 20px */
  --text-2xl:  1.5rem;    
/* 24px */
  --text-3xl:  1.875rem;  
/* 30px */
  --text-4xl:  2.25rem;   
/* 36px */
  --text-5xl:  3rem;      
/* 48px */
  --text-6xl:  3.75rem;   
/* 60px */
  --text-7xl:  4.5rem;    
/* 72px */

  
/* Spacing (8px base 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-16: 4rem;       
/* 64px */
  --space-20: 5rem;       
/* 80px */
  --space-24: 6rem;       
/* 96px */
  --space-32: 8rem;       
/* 128px */

  
/* Layout */
  --container-max: 1200px;
  --container-pad: var(--space-6);

  
/* Borders */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-full: 9999px;

  
/* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.6);
  --shadow-xl:  0 16px 64px rgba(0,0,0,0.7);
  --shadow-accent: 0 4px 24px rgba(200,121,65,0.25);

  
/* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;
  --transition-spring: 350ms cubic-bezier(0.34, 1.56, 0.64, 1);

  
/* Nav */
  --nav-height: 72px;
}

/* ----------------------------------------------------------------
   2. Reset & Base
   ---------------------------------------------------------------- */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-charcoal-2);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ----------------------------------------------------------------
   3. Accessibility
   ---------------------------------------------------------------- */

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: 9999;
  padding: var(--space-3) var(--space-6);
  background: var(--color-accent-500);
  color: var(--color-black);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-md);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
}

:focus-visible {
  outline: 2px solid var(--color-accent-500);
  outline-offset: 3px;
}

/* ----------------------------------------------------------------
   4. Layout Utilities
   ---------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: var(--space-20);
}

/* Alternating section backgrounds */
.about-section,
.why-section {
  background-color: var(--color-charcoal-3);
}

.faq-section {
  position: relative;
  background-color: rgba(10,10,10,0.76);
}

.services-section,
.safety-section,
.contact-section {
  background-color: var(--color-charcoal-2);
}

/* ----------------------------------------------------------------
   5. Typography Utilities
   ---------------------------------------------------------------- */

.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent-500);
  margin-bottom: var(--space-3);
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: var(--fw-bold);
  line-height: 1.1;
  color: var(--color-text-primary);
  letter-spacing: 0.01em;
  margin-bottom: var(--space-4);
}

.section-subheading {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 640px;
  margin-inline: auto;
  line-height: 1.65;
}

.page-banner {
  background: linear-gradient(180deg, var(--color-charcoal-1) 0%, #0f1012 100%);
  border-bottom: 1px solid var(--color-border);
  padding-block: var(--space-16) var(--space-12);
  margin-top: var(--header-height, 64px);
}

.page-banner-heading {
  font-family: var(--font-display);
  font-size: clamp(var(--text-4xl), 6vw, var(--text-6xl));
  font-weight: var(--fw-bold);
  color: var(--color-text-primary);
  line-height: 1.1;
  letter-spacing: 0.02em;
  margin: 0 0 var(--space-4);
}

.page-banner-meta {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  max-width: 68ch;
}

.page-banner--legal {
  background-color: var(--color-charcoal-1);
  background-image: none;
}

.page-banner--legal .page-banner-meta {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: var(--fw-regular);
  letter-spacing: 0.03em;
}

.page-banner--legal .page-banner-meta strong {
  color: var(--color-text-secondary);
  font-weight: var(--fw-medium);
}

.policy-section {
  background:
    radial-gradient(ellipse at 65% 0%, rgba(200, 121, 65, 0.09) 0%, transparent 55%),
    linear-gradient(180deg, var(--color-charcoal-1) 0%, var(--color-black) 100%);
  padding-block: var(--space-16) var(--space-20);
  position: relative;
  overflow: hidden;
}

.policy-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.018'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.policy-section > .container {
  position: relative;
  z-index: 1;
}

.policy-body {
  max-width: 780px;
}

.policy-body h2 {
  font-family: var(--font-display);
  font-size: clamp(var(--text-xl), 3vw, var(--text-3xl));
  font-weight: var(--fw-semibold);
  color: var(--color-text-primary);
  letter-spacing: 0.03em;
  margin: var(--space-12) 0 var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  scroll-margin-top: calc(var(--header-height, 64px) + var(--space-6));
}

.policy-body h2:first-child {
  margin-top: 0;
}

.policy-body h3 {
  font-family: var(--font-display);
  font-size: clamp(var(--text-lg), 2vw, var(--text-xl));
  font-weight: var(--fw-medium);
  color: var(--color-accent-400);
  letter-spacing: 0.04em;
  margin: var(--space-8) 0 var(--space-3);
}

.policy-body p {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--fw-regular);
  color: var(--color-text-secondary);
  line-height: 1.75;
  margin-bottom: var(--space-5);
}

.policy-body ul {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.policy-body ul li {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: 1.65;
  padding-left: var(--space-5);
  position: relative;
}

.policy-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  background-color: var(--color-accent-500);
  border-radius: 50%;
  flex-shrink: 0;
}

.policy-body hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-10) 0;
}

.policy-toc {
  background-color: var(--color-charcoal-1);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-8);
  display: inline-block;
  min-width: 260px;
  max-width: 100%;
}

.policy-toc-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 var(--space-3) !important;
}

.policy-toc-list {
  list-style: decimal;
  padding-left: var(--space-5);
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.policy-toc-list li {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
  padding-left: 0 !important;
}

.policy-toc-list li::before {
  display: none !important;
}

.policy-toc-list a {
  text-decoration: none !important;
}

.policy-toc-list a:hover {
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

.policy-body a {
  color: var(--color-accent-400);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(224, 145, 58, 0.4);
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

.policy-body a:hover {
  color: var(--color-accent-300);
  text-decoration-color: var(--color-accent-300);
}

.accent-text {
  color: var(--color-accent-500);
}

.inline-link {
  color: var(--color-accent-400);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

.inline-link:hover {
  color: var(--color-accent-300);
}

/* ----------------------------------------------------------------
   6. Buttons
   ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  transition:
    background-color var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base),
    transform var(--transition-fast),
    box-shadow var(--transition-base);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background-color: var(--color-accent-500);
  border-color: var(--color-accent-500);
  color: var(--color-black);
}

.btn-primary:hover {
  background-color: var(--color-accent-400);
  border-color: var(--color-accent-400);
  box-shadow: var(--shadow-accent);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--color-accent-500);
  color: var(--color-accent-500);
}

.btn-outline:hover {
  background-color: rgba(200,121,65,0.10);
  box-shadow: var(--shadow-accent);
}

.btn-card {
  background-color: transparent;
  border-color: var(--color-border);
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  padding: var(--space-2) var(--space-5);
  width: 100%;
  margin-top: auto;
}

.btn-card:hover {
  border-color: var(--color-accent-500);
  color: var(--color-accent-500);
}

.btn-primary.btn-card:hover {
  color: var(--color-black);
}

.btn-large {
  padding: var(--space-4) var(--space-10);
  font-size: var(--text-base);
}

/* Calendar icon inside Book Training buttons */
.btn-cal-icon {
  flex-shrink: 0;
  display: inline-flex;
  position: relative;
  top: -0.5px; 
/* optical alignment with uppercase text */
}

/* Hero button icon: visible on mobile, hidden on desktop */
.btn-cal-icon--mobile {
  display: inline-flex;
}

.btn-submit {
  width: 100%;
  padding: var(--space-4);
  font-size: var(--text-base);
}

.btn-note {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--fw-regular);
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.7;
  margin-top: 2px;
}

/* ----------------------------------------------------------------
   7. Loading Screen
   ---------------------------------------------------------------- */

#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: #080808;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}

#loading-screen.loaded {
  opacity: 0;
  pointer-events: none;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  animation: loader-entry 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  transition: filter 0.25s ease;
}

@keyframes loader-entry {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.loader-logo {
  width: 180px;
  height: auto;
  
/* Filter applied via JS after img.decode() — see .hero-logo-col comment */
}

.loader-inner.glow-ready {
  filter:
    drop-shadow(0 0 36px rgba(220, 95, 12, 0.65))
    drop-shadow(0 8px 48px rgba(0, 0, 0, 0.90));
}

.loader-bar {
  width: 140px;
  height: 2px;
  background: rgba(200, 121, 65, 0.15);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.loader-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 60%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(220, 95, 12, 0.9),
    transparent
  );
  animation: loader-shimmer 1.3s ease-in-out infinite;
}

@keyframes loader-shimmer {
  0%   { transform: translateX(-200%); }
  100% { transform: translateX(350%); }
}

@media (prefers-reduced-motion: reduce) {
  .loader-inner        { animation: none; }
  #loading-screen      { transition: none; }
  .loader-bar::after   { animation: none; }
}

/* ----------------------------------------------------------------
   8. Navigation
   ---------------------------------------------------------------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: transparent;
  transition:
    background-color var(--transition-slow),
    box-shadow var(--transition-slow),
    border-bottom-color var(--transition-slow);
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background-color: rgba(17, 18, 20, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--color-border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.site-header.site-header--solid,
.site-header.site-header--solid.scrolled {
  background-color: var(--color-charcoal-1);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: var(--color-border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
  gap: var(--space-4);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex-shrink: 0;
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--color-accent-500);
  border-radius: var(--radius-sm);
  position: relative;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  color: var(--color-text-primary);
  text-transform: uppercase;
}

.logo-tagline {
  font-size: var(--text-xs);
  font-weight: var(--fw-regular);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Desktop nav links */
.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
}

.nav-item-has-sub {
  position: relative;
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  padding-inline: var(--space-2);
}

.nav-home-link::after {
  left: var(--space-2);
  right: var(--space-2);
}

.nav-home-icon {
  width: 0.95rem;
  height: 0.95rem;
  stroke: currentColor;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--space-3);
  right: var(--space-3);
  height: 1.5px;
  background: var(--color-accent-500);
  transform: scaleX(0);
  transition: transform var(--transition-base);
  transform-origin: left;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 190px;
  padding: var(--space-3) var(--space-2) var(--space-2);
  border-top: 8px solid transparent;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  border-left: 1px solid var(--color-border);
  border-radius: 0;
  background-color: rgba(17, 18, 20, 0.98);
  background-clip: padding-box;
  box-shadow: var(--shadow-md);
  list-style: none;
  z-index: 20;
}

.nav-item-has-sub:hover .nav-submenu,
.nav-item-has-sub:focus-within .nav-submenu {
  display: block;
}

.nav-sublink {
  display: inline-block;
  position: relative;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.nav-sublink::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--space-3);
  right: var(--space-3);
  height: 1.5px;
  background: var(--color-accent-500);
  transform: scaleX(0);
  transition: transform var(--transition-base);
  transform-origin: left;
}

.nav-sublink:hover,
.nav-sublink:focus-visible {
  color: var(--color-text-primary);
}

.nav-sublink:hover::after,
.nav-sublink:focus-visible::after {
  transform: scaleX(1);
}

.nav-cta {
  display: none;
  flex-shrink: 0;
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: var(--space-2);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.hamburger:hover {
  border-color: var(--color-accent-500);
}

.hamburger-line {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--color-text-primary);
  transition:
    transform var(--transition-base),
    opacity var(--transition-base);
  transform-origin: center;
}

/* Hamburger active state */
.hamburger.is-open .hamburger-line:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.hamburger.is-open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.is-open .hamburger-line:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6) var(--container-pad) var(--space-8);
  background-color: var(--color-charcoal-1);
  border-bottom: 1px solid var(--color-border);
  border-top: 1px solid var(--color-border);
  max-height: calc(100svh - var(--nav-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.mobile-menu.is-open {
  display: flex;
}

.mobile-menu.is-visible {
  opacity: 1;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  list-style: none;
}

.mobile-nav-link {
  display: block;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-weight: var(--fw-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.mobile-nav-link:hover {
  color: var(--color-text-primary);
  background-color: var(--color-charcoal-4);
}

/* .mobile-nav-submenu {
  /* no visual distinction — submenu items styled identically to top-level links
} */

.mobile-cta {
  display: none;
}

/* Desktop nav breakpoint */
@media (min-width: 900px) {
  .nav-links {
    display: flex;
  }
  .nav-cta {
    display: inline-flex;
  }
  .hamburger {
    display: none;
  }
  .mobile-menu.is-open {
    display: none;
  }

  .site-header:not(.scrolled) .nav-submenu {
    background-color: rgba(10, 12, 14, 0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  }
}

/* ----------------------------------------------------------------
   9. Hero Section
   ---------------------------------------------------------------- */

.hero-section {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--nav-height);
  background-color: transparent;
}

/* Hero background video
   Fills the hero section edge-to-edge, cropped to cover like a background-image.
   The .hero-overlay above darkens the video for text legibility.
*/
.hero-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    
/* Layer 1: Radial text scrim — widened for two-column layout */
    radial-gradient(
      ellipse 95% 65% at 50% 46%,
      rgba(0,0,0,0.78) 0%,
      rgba(0,0,0,0.40) 50%,
      transparent 80%
    ),
    
/* Layer 2: Directional vignette — cinematic top/bottom fade */
    linear-gradient(
      to bottom,
      rgba(10,10,10,0.68) 0%,
      rgba(10,10,10,0.25) 45%,
      rgba(10,10,10,0.85) 100%
    );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-block: var(--space-20);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
}

/* Hero logo column */
.hero-logo-col {
  flex-shrink: 0;
  
/* Filter is applied via JS after img.decode() resolves (.glow-ready class).
     This prevents iOS Safari from allocating the compositing layer before the
     image is decoded, which clips drop-shadow to the raw content box. */
  transition: filter 0.15s ease;
}

.hero-logo-col.glow-ready {
  filter:
    drop-shadow(0 8px 40px rgba(0,0,0,0.80))
    drop-shadow(0 0 28px rgba(220, 95, 12, 0.55));
}

.hero-logo-img {
  width: 220px;
  height: auto;
}

/* Hero text column */
.hero-text-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
}

/* Desktop: side-by-side layout */
@media (min-width: 900px) {
  .hero-content {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: var(--space-16);
  }

  .hero-logo-img {
    width: 300px;
  }

  .hero-text-col {
    align-items: flex-start;
  }

  .hero-trust-badges {
    justify-content: flex-start;
  }
}

/* Hero badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  background: rgba(200,121,65,0.12);
  border: 1px solid var(--color-border-accent);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-300);
}

.hero-badge-text {
  display: inline-block;
  white-space: nowrap;
  text-align: center;
}

.badge-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--color-accent-500);
  border-radius: var(--radius-full);
  box-shadow: 0 0 8px var(--color-accent-500);
  flex-shrink: 0;
}

/* Hero heading */
.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(var(--text-4xl), 8vw, var(--text-7xl));
  font-weight: var(--fw-bold);
  line-height: 1.0;
  letter-spacing: 0.02em;
  color: var(--color-text-primary);
  text-transform: uppercase;
  max-width: 800px;
  text-shadow: 0 2px 28px rgba(0,0,0,0.90), 0 1px 4px rgba(0,0,0,0.95);
}

.hero-subheading {
  font-size: clamp(var(--text-base), 2.5vw, var(--text-xl));
  color: var(--color-text-secondary);
  line-height: 1.65;
  max-width: 600px;
  text-shadow: 0 1px 12px rgba(0,0,0,0.92);
}

/* Hero CTA group */
.hero-cta-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;
  max-width: 360px;
}

/* Trust badges */
.hero-trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4) var(--space-6);
  margin-top: var(--space-4);
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: var(--fw-medium);
}

.trust-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--color-accent-500);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

/* Scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  opacity: 0.5;
  transition: opacity var(--transition-base);
  text-decoration: none;
}

.hero-scroll-indicator:hover {
  opacity: 1;
}

.hero-scroll-indicator {
  animation: bounce-vertical 2s ease-in-out infinite;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 1.5px solid var(--color-text-secondary);
  border-bottom: 1.5px solid var(--color-text-secondary);
  transform: rotate(45deg);
}

@keyframes bounce-vertical {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(4px); }
}

/* Hero mobile spacing optimization — desktop unchanged */
@media (max-width: 767px) {
  .hero-content {
    padding-top: var(--space-2);     
/* 8px — minimal space above logo */
    padding-bottom: var(--space-6);  
/* 24px — keep reasonable bottom spacing */
    gap: var(--space-5);             
/* 20px — was 32px */
  }

  .hero-badge {
    display: inline-grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    font-size: 0.6875rem; 
/* 11px — prevent word wrap */
    padding: var(--space-1) var(--space-4); 
/* tighter vertical padding */
    column-gap: var(--space-2); 
/* maintain dot spacing */
  }

  .hero-badge-text {
    white-space: normal;
  }

  .hero-subheading {
    display: none; 
/* Hide tagline on mobile to prioritize CTA visibility */
  }

  .hero-trust-badges {
    margin-top: 0; 
/* No spacing — tight to CTA buttons */
  }

  .trust-badge--desktop-only {
    display: none; 
/* Hide Norfolk PD badge on mobile to save space */
  }

  .hero-scroll-indicator {
    bottom: var(--space-4); 
/* 16px — ensure chevron is visible in initial viewport */
  }
}

/* Hero responsive */
@media (min-width: 640px) {
  .hero-cta-group {
    flex-direction: row;
    max-width: none;
    width: auto;
  }

  
/* ── BULLET SHAPE (shelved) ─────────────────────────────────────
     Combines both buttons into a single bullet silhouette on desktop.
     Casing (Book Training) = left half, bullet tip (View Classes) = right half.
     Un-comment everything below to re-enable.

  .hero-cta-group {
    align-items: center;
    gap: 0;
  }
  .hero-cta-group .btn-primary {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    padding-block: 18px;
  }
  .hero-cta-group .btn-outline {
    border-radius: 0 50px 50px 0;
    border-left: none;
  }
  .hero-cta-group .btn:hover,
  .hero-cta-group .btn:active {
    transform: none;
  }
  ── end bullet shape ─────────────────────────────────────────── */
}

/* ----------------------------------------------------------------
   10. About Section
   ---------------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: center;
}

/* Instructor photo */
.about-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-lg);
  display: block;
}

/* Placeholder image */
.about-image-placeholder {
  width: 100%;
  aspect-ratio: 4/5;
  background: var(--color-charcoal-4);
  border: 1px dashed var(--color-border-accent);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  color: var(--color-text-muted);
  text-align: center;
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
}

.about-image-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(200,121,65,0.04) 100%);
}

.placeholder-icon {
  opacity: 0.6;
}

.placeholder-label {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--fw-medium);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.placeholder-note {
  font-size: var(--text-xs);
  color: var(--color-accent-600);
  letter-spacing: 0.05em;
}

.about-name {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
}

.name-initial {
  font-size: 1.3em;
  color: var(--color-text-primary);
  background: linear-gradient(
    transparent 62%,
    rgba(220, 95, 12, 0.55) 62%,
    rgba(220, 95, 12, 0.55) 94%,
    transparent 94%
  );
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.about-bio {
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-5);
}

.about-credentials {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  list-style: none;
}

.about-credentials li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.about-cta-group {
  display: flex;
  flex-wrap: wrap;
  row-gap: var(--space-3);
  column-gap: var(--space-5);
}

.about-cert-link {
  display: inline-block;
  width: min(100%, 220px);
  border-radius: var(--radius-sm);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.about-cert-link:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.about-cert-link:focus-visible {
  outline: 2px solid var(--color-accent-400);
  outline-offset: 3px;
}

.about-cert-badge {
  display: block;
  width: 100%;
  height: auto;
}

.cred-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: rgba(200,121,65,0.12);
  border: 1px solid var(--color-border-accent);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  margin-top: 1px;
}

.cred-check::before {
  content: '';
  display: block;
  width: 8px;
  height: 5px;
  border-left: 1.5px solid var(--color-accent-500);
  border-bottom: 1.5px solid var(--color-accent-500);
  transform: rotate(-45deg) translate(1px, -1px);
}

.about-section {
  position: relative;
  overflow: hidden;
}

/* 1px brass hairline separates the two video-bg sections */
.about-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(200, 121, 65, 0.55) 15%,
    rgba(200, 121, 65, 0.55) 85%,
    transparent 100%
  );
  box-shadow: 0 0 14px rgba(200, 121, 65, 0.28);
  z-index: 6;
  pointer-events: none;
}

/* Hairline brass separator — bottom of about section */
.about-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(200, 121, 65, 0.55) 15%,
    rgba(200, 121, 65, 0.55) 85%,
    transparent 100%
  );
  box-shadow: 0 0 14px rgba(200, 121, 65, 0.28);
  z-index: 6;
  pointer-events: none;
}

/* Fire video fills the section background */
.about-fire-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 2.2s ease;
}

.about-fire-video-wrap.in-view {
  opacity: 1;
}

.about-fire-vid {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  mix-blend-mode: screen;
  display: block;
  opacity: 0.90;
  filter: blur(4px);
}

/* Heavy scrim — keeps text crisp; fire bleeds in at the bottom */
.about-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    rgba(12, 12, 12, 0.97)  0%,
    rgba(12, 12, 12, 0.94) 45%,
    rgba(12, 12, 12, 0.82) 72%,
    rgba(12, 12, 12, 0.62) 100%
  );
  pointer-events: none;
}

/* Aces card — twists up from bottom-right corner when section scrolls in */
.about-bg-aces {
  position: absolute;
  bottom: 0;
  right: 7%;
  z-index: 3;
  pointer-events: none;
  transform-origin: bottom right;
  transform: translate(18%, 80%) rotate(44deg) scale(0.45);
  transition: transform 1.1s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: 0.1s;
  
/* Filter applied via JS after img.decode() — see .hero-logo-col comment */
}

.about-bg-aces.glow-ready {
  filter: drop-shadow(0 -6px 24px rgba(220, 95, 12, 0.60));
}

.about-bg-aces.in-view {
  transform: translate(0, 0) rotate(0deg) scale(1);
}

.about-aces-img {
  width: 289px;
  height: auto;
  display: block;
  opacity: 0.92;
}

/* Section content floats above decorative layers */
.about-section > .container {
  position: relative;
  z-index: 4;
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .about-bg-aces {
    transition: none;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
}

/* ----------------------------------------------------------------
   11. Services Section
   ---------------------------------------------------------------- */

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

/* Service card */
.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-charcoal-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6) var(--space-6);
  gap: var(--space-5);
  transition:
    transform var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base);
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-border-accent);
  box-shadow: var(--shadow-lg);
}

.service-card--featured {
  border-color: var(--color-accent-500);
  background: linear-gradient(135deg, var(--color-charcoal-3) 0%, rgba(200,121,65,0.06) 100%);
}

.card-top-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent-700), var(--color-accent-300));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.service-card:hover .card-top-accent,
.service-card--featured .card-top-accent,
.service-card.card-highlight .card-top-accent {
  opacity: 1;
}

@keyframes cardHighlight {
  0%   { box-shadow: 0 0 0 0   rgba(200, 121, 65, 0);  border-color: transparent; }
  15%  { box-shadow: 0 0 0 5px rgba(200, 121, 65, 0.45); border-color: var(--color-accent-500); }
  55%  { box-shadow: 0 0 0 8px rgba(200, 121, 65, 0.2);  border-color: var(--color-accent-500); }
  100% { box-shadow: 0 0 0 0   rgba(200, 121, 65, 0);   border-color: var(--color-border); }
}

.service-card.card-highlight {
  animation: cardHighlight 1.8s ease-out forwards;
  border-color: var(--color-accent-500);
}

.card-badge {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 1;
  padding: var(--space-1) var(--space-3);
  background: var(--color-accent-500);
  color: var(--color-black);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: rgba(200,121,65,0.08);
  border: 1px solid var(--color-border-accent);
  border-radius: var(--radius-md);
  color: var(--color-accent-500);
  flex-shrink: 0;
}

.card-photo {
  position: relative;
  margin: calc(-1 * var(--space-8)) calc(-1 * var(--space-6)) 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  flex-shrink: 0;
}

.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.45s ease;
}

.service-card:hover .card-photo img {
  transform: scale(1.05);
}

/* Icon badge overlaid on photo bottom-left */
.card-photo .card-icon {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  background: rgba(18, 22, 28, 0.78);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border-color: rgba(200, 121, 65, 0.5);
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  color: var(--color-text-primary);
  text-transform: uppercase;
  line-height: 1.2;
}

.card-description {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.65;
}

.card-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  list-style: none;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.card-details li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.detail-label {
  font-weight: var(--fw-semibold);
  color: var(--color-text-secondary);
  min-width: 64px;
}

.price-tag {
  color: var(--color-accent-400);
  font-weight: var(--fw-medium);
}

.services-note {
  text-align: center;
  margin-top: var(--space-10);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.services-more-wrap {
  margin-top: var(--space-8);
  text-align: center;
}

/* ----------------------------------------------------------------
   12. Homepage Gallery Preview (Phase 2B)
   ---------------------------------------------------------------- */

.home-gallery-section {
  background:
    radial-gradient(ellipse at 65% 0%, rgba(200, 121, 65, 0.09) 0%, transparent 55%),
    linear-gradient(180deg, var(--color-charcoal-1) 0%, var(--color-black) 100%);
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
  position: relative;
  overflow: hidden;
}

.home-gallery-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.018'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  pointer-events: none;
  z-index: 0;
}

.home-gallery-section > .container {
  position: relative;
  z-index: 1;
}

.home-gallery-see-more {
  min-width: 170px;
}

.home-gallery-feedback {
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
}

.home-gallery-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  --home-gallery-row-max-width: 1110px;
}

.home-gallery-size-note {
  margin-top: var(--space-5);
  text-align: right;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.home-gallery-row {
  display: flex;
  gap: 12px;
  width: min(100%, var(--home-gallery-row-max-width));
  margin-inline: auto;
  overflow: hidden;
  border-radius: 10px;
}

.home-gallery-tile {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--color-border-light);
  background: #0b0d10;
  box-shadow: var(--shadow-sm);
}

.home-gallery-tile-btn {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: inherit;
  text-align: left;
}

.home-gallery-tile-btn.has-poster-bg {
  background-color: #0a0a0a;
}

.home-gallery-media,
.home-gallery-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base), filter var(--transition-base);
  background: #0a0b0d;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.home-gallery-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 62%, rgba(8, 9, 11, 0.58) 100%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.home-gallery-tile:hover::after,
.home-gallery-tile:focus-within::after {
  opacity: 1;
}

.home-gallery-tile-btn:hover .home-gallery-media,
.home-gallery-tile-btn:focus-visible .home-gallery-media,
.home-gallery-tile-btn:hover .home-gallery-video,
.home-gallery-tile-btn:focus-visible .home-gallery-video {
  transform: scale(1.025);
  filter: brightness(1.04);
}

.home-gallery-video-badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 2;
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(10, 11, 13, 0.7);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.home-gallery-tile:hover .home-gallery-video-badge,
.home-gallery-tile:focus-within .home-gallery-video-badge {
  border-color: rgba(224, 145, 58, 0.72);
  background: rgba(224, 145, 58, 0.2);
  color: var(--color-accent-300);
}

.home-gallery-pager {
  margin-top: var(--space-12);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.home-gallery-page-btn {
  min-width: 92px;
}

.home-gallery-page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.home-gallery-page-number {
  min-width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: var(--color-charcoal-4);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  padding: 0 var(--space-2);
  transition: border-color var(--transition-fast), color var(--transition-fast), background-color var(--transition-fast);
}

.home-gallery-page-number:hover,
.home-gallery-page-number:focus-visible {
  border-color: var(--color-border-accent);
  color: var(--color-accent-300);
  background: rgba(200, 121, 65, 0.09);
}

.home-gallery-page-number.is-active {
  border-color: var(--color-accent-500);
  color: var(--color-accent-200);
  background: rgba(200, 121, 65, 0.18);
}

.home-gallery-page-ellipsis {
  min-width: 18px;
  text-align: center;
  color: var(--color-text-muted);
  font-weight: var(--fw-bold);
}

.home-gallery-more-wrap {
  margin-top: var(--space-8);
  text-align: center;
}

.home-gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  background: rgba(5, 6, 8, 0.88);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: clamp(var(--space-3), 2vw, var(--space-8));
}

.home-gallery-modal[hidden] {
  display: none;
}

.home-gallery-modal-panel {
  width: min(1200px, 100%);
  max-height: calc(100vh - 2rem);
  background: rgba(17, 18, 20, 0.94);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: var(--shadow-xl);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.home-gallery-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border-light);
  position: relative;
  z-index: 8;
}

.home-gallery-modal-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.home-gallery-modal-close,
.home-gallery-modal-nav {
  border: 1px solid var(--color-border);
  background: rgba(24, 25, 28, 0.82);
  color: var(--color-text-primary);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  line-height: 1;
  position: relative;
  z-index: 6;
}

.home-gallery-modal-close:hover,
.home-gallery-modal-nav:hover,
.home-gallery-modal-close:focus-visible,
.home-gallery-modal-nav:focus-visible {
  border-color: var(--color-accent-500);
  color: var(--color-accent-300);
}

.home-gallery-modal-body-wrap {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: var(--space-2);
  touch-action: pan-y;
  overflow: hidden;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.home-gallery-modal-body {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.home-gallery-modal-media {
  max-width: 100%;
  max-height: min(74vh, 900px);
  object-fit: contain;
  border-radius: 8px;
  transform-origin: center center;
  transition: transform 160ms ease;
  will-change: transform;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
}

.home-gallery-modal-zoom-controls {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--color-border-light);
  background: rgba(10, 11, 13, 0.72);
  backdrop-filter: blur(4px);
}

.home-gallery-modal-zoom-btn {
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(24, 25, 28, 0.9);
  color: var(--color-text-primary);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  padding: 0 10px;
  line-height: 1;
}

.home-gallery-modal-zoom-btn:hover,
.home-gallery-modal-zoom-btn:focus-visible {
  border-color: var(--color-accent-500);
  color: var(--color-accent-300);
}

.home-gallery-modal-zoom-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.home-gallery-modal-video {
  width: min(100%, 1080px);
  max-height: min(74vh, 900px);
  background: #050607;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 8px;
}

.home-gallery-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.home-gallery-modal-prev {
  left: var(--space-3);
}

.home-gallery-modal-next {
  right: var(--space-3);
}

.home-gallery-modal-foot {
  padding: var(--space-3) var(--space-4) var(--space-4);
  border-top: 1px solid var(--color-border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  position: relative;
}

.home-gallery-modal-caption {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.home-gallery-modal-position {
  font-family: var(--font-display);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-gallery-pager .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: var(--color-border-light);
  background: #1f2228;
  color: var(--color-text-muted);
  box-shadow: none;
}

/* ----------------------------------------------------------------
   13. Why Section
   ---------------------------------------------------------------- */

.why-section {
  background-color: var(--color-charcoal-3);
  position: relative;
  overflow: hidden;
}

/* Police badge watermark — viewport-locked, left-offset on desktop */
.why-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/assets/img/badge-watermark.webp') no-repeat;
  background-attachment: fixed;
  background-position: left 60px center;
  background-size: 300px;
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}

.why-section > .container {
  position: relative;
  z-index: 1;
}

.why-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(200,121,65,0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.why-card {
  position: relative;
  isolation: isolate;      
/* contains ::before z-index:-1 within this stacking context */
  display: flex;
  flex-direction: column;
  padding: 52px var(--space-6) 45px;  
/* 52/24/45 — bottom lifts text just slightly from card base */
  background: var(--color-charcoal-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 400px;       
/* portrait ratio — tall like a target */
  transition:
    transform var(--transition-base),
    border-color var(--transition-base),
    background-color var(--transition-base);
}

/* FBI-QIT target image: soft-light blend makes the gray background vanish on dark cards
   while the cream silhouette shows clearly. Icon sits in the head scoring zone. */
.why-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url('/assets/img/qit.webp');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  mix-blend-mode: soft-light;
  pointer-events: none;
  opacity: 0.90;
  transition: opacity var(--transition-base);
}

.why-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-border-accent);
  background-color: var(--color-charcoal-5);
  transition-delay: 0s; 
/* cancel any reveal-up delay that would linger on hover */
}

.why-card:hover::before {
  opacity: 1;
}

/* Dark gradient over the text zone so title/desc stay readable above the cream silhouette */
.why-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 30%,
    rgba(15, 19, 25, 0.25) 55%,
    rgba(15, 19, 25, 0.50) 100%
  );
}

.why-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: rgba(200,121,65,0.1);
  border: 1px solid var(--color-border-accent);
  border-radius: var(--radius-md);
  color: var(--color-accent-500);
  margin: 0 auto var(--space-5);
  transition:
    background var(--transition-base),
    border-color var(--transition-base);
}

/* Crosshair overlay — hidden by default, fades in on card hover */
.why-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23dc2626' stroke-width='1.5'/%3E%3Cline x1='12' y1='1' x2='12' y2='8' stroke='%23dc2626' stroke-width='1.5'/%3E%3Cline x1='12' y1='16' x2='12' y2='23' stroke='%23dc2626' stroke-width='1.5'/%3E%3Cline x1='1' y1='12' x2='8' y2='12' stroke='%23dc2626' stroke-width='1.5'/%3E%3Cline x1='16' y1='12' x2='23' y2='12' stroke='%23dc2626' stroke-width='1.5'/%3E%3Ccircle cx='12' cy='12' r='1.5' fill='%23dc2626'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 55% 55%;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.why-icon svg {
  transition: none; 
/* instant swap — card hover effects remain on .why-card */
}

.why-card:hover .why-icon::after {
  opacity: 1;
}

.why-card:hover .why-icon svg {
  opacity: 0;
}

.why-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  color: var(--color-text-primary);
  text-transform: uppercase;
  align-self: center;
  width: 50%;
  text-align: center;
  margin-top: auto;
  margin-bottom: var(--space-3);
  line-height: 1.2;
  text-shadow: 0 1px 10px rgba(0,0,0,0.9), 0 0 28px rgba(0,0,0,0.65);
}

.why-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.65;
  align-self: center;
  width: 65%;
  text-align: center;
  text-shadow: 0 1px 6px rgba(0,0,0,0.85);
}

/* ----------------------------------------------------------------
   14. Booking Section
   ---------------------------------------------------------------- */

.booking-section {
  position: relative;
  overflow: hidden;
  background-color: var(--color-charcoal-4);
  background-image: radial-gradient(
    ellipse 80% 55% at 50% 0%,
    rgba(200, 121, 65, 0.12) 0%,
    transparent 70%
  );
}

.booking-section::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border-accent), transparent);
}

.booking-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.booking-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-8) var(--space-6);
  background: var(--color-charcoal-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
  align-items: center;
  transition: border-color var(--transition-base);
}

.booking-card:hover {
  border-color: var(--color-border-accent);
}

.booking-card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.booking-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: rgba(200,121,65,0.1);
  border: 1px solid var(--color-border-accent);
  border-radius: var(--radius-md);
  color: var(--color-accent-500);
}

.enroll-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: rgba(200,121,65,0.1);
  border: 1px solid var(--color-border-accent);
  border-radius: var(--radius-md);
  color: var(--color-accent-500);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.booking-card-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.05em;
  color: var(--color-text-primary);
  text-transform: uppercase;
}

.booking-card-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.65;
  flex: 1;
}

.booking-btn {
  width: 100%;
  flex-direction: column;
  gap: 2px;
  height: auto;
  padding-block: var(--space-3);
}

.booking-coming-soon {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-style: italic;
  text-align: center;
}

.booking-fallback {
  text-align: center;
  margin-top: var(--space-10);
  padding: var(--space-6);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Reorder: enrollment steps + fallback above the calendar */
.booking-section > .container {
  display: flex;
  flex-direction: column;
}

.booking-section .section-header            { order: 1; }

.booking-section .booking-grid              { order: 2; }

.booking-section .booking-fallback          { order: 3; }

.booking-section .calendar-label  { order: 4; }

.booking-section #booking-calendar          { order: 5; }

/* ----------------------------------------------------------------
   Booking Calendar
   ---------------------------------------------------------------- */

.booking-calendar {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
}

/* --- Filter tabs ------------------------------------------------ */

.cal-filters-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-charcoal-3);
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color var(--transition-base), color var(--transition-base), background var(--transition-base);
}

.cal-filters-toggle:hover {
  border-color: var(--color-border-accent);
  color: var(--color-text-primary);
}

.cal-filters-toggle:focus-visible {
  outline: 2px solid var(--color-accent-500);
  outline-offset: 2px;
}

.cal-filters-toggle-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: rgba(200, 121, 65, 0.16);
  border: 1px solid rgba(200, 121, 65, 0.45);
  color: var(--color-accent-500);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.cal-filters-toggle-icon {
  transition: transform var(--transition-base);
}

.cal-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
}

.cal-filter-btn {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: border-color var(--transition-base), color var(--transition-base), background var(--transition-base);
}

.cal-filter-btn:hover {
  border-color: var(--color-border-accent);
  color: var(--color-text-primary);
}

.cal-filter-btn.active {
  border-color: var(--color-accent-500);
  background: rgba(200,121,65,0.12);
  color: var(--color-accent-500);
}

/* --- Two-panel body --------------------------------------------- */

.cal-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.cal-panel {
  background: var(--color-charcoal-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

/* --- Month nav -------------------------------------------------- */

.cal-month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

.cal-mobile-week {
  display: none;
}

.cal-mobile-week-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.cal-mobile-week-nav .cal-month-label {
  flex: 1;
  text-align: center;
}

.cal-mobile-expand-btn {
  margin-left: auto;
}

.cal-month-label {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-primary);
}

.cal-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: border-color var(--transition-base), color var(--transition-base);
}

.cal-nav-btn:hover {
  border-color: var(--color-border-accent);
  color: var(--color-accent-500);
}

.cal-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.cal-nav-btn:focus-visible,
.cal-filter-btn:focus-visible,
.cal-mobile-week-days .cal-day--has-session:focus-visible {
  outline: 2px solid var(--color-accent-500);
  outline-offset: 2px;
}

/* --- Weekday headers ------------------------------------------- */

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: var(--space-2);
}

.cal-weekdays span {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding-block: var(--space-2);
}

/* --- Day grid -------------------------------------------------- */

.cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  cursor: default;
  position: relative;
  transition: background var(--transition-base);
  min-width: 0;
  padding: 2px;
}

/* Empty padding cells at start of month */
.cal-day--empty {
  pointer-events: none;
}

/* Past dates */
.cal-day--past {
  opacity: 0.3;
}

/* Today */
.cal-day--today {
  color: var(--color-text-primary);
  background: rgba(255,255,255,0.04);
}

/* Days with sessions */
.cal-day--has-session {
  cursor: pointer;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.cal-day--has-session:hover,
.cal-day--has-session:focus {
  background: rgba(200,121,65,0.1);
  border-color: rgba(200, 121, 65, 0.45);
  outline: none;
}

.cal-day--selected {
  background: rgba(200,121,65,0.18) !important;
  border: 1px solid rgba(200,121,65,0.5);
}

/* Status dots under day number */
.cal-day-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
  justify-content: center;
  max-width: calc(6 * 5px + 5 * 2px); 
/* 6 dots + 5 gaps */
  margin: 0 auto;
}

.cal-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-dot--available { background: #4caf7d; }

.cal-dot--limited   { background: var(--color-accent-500); }

.cal-dot--full      { background: rgba(255,255,255,0.2); }

/* --- Legend ---------------------------------------------------- */

.cal-legend {
  display: flex;
  gap: var(--space-5);
  justify-content: center;
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.cal-legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* --- Detail panel ---------------------------------------------- */

.cal-detail-panel {
  display: flex;
  flex-direction: column;
  min-height: 240px;
}

.cal-detail-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  height: 100%;
  flex: 1;
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.6;
  opacity: 0.5;
}

.cal-detail-placeholder svg {
  color: var(--color-text-muted);
}

.cal-sessions-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.cal-sessions-list:empty + .cal-detail-placeholder,
.cal-sessions-list:not(:empty) ~ .cal-detail-placeholder {
  display: none;
}

/* Session detail card */
.cal-session-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  background: rgba(255,255,255,0.02);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: border-color var(--transition-base);
}

.cal-session-card:hover {
  border-color: var(--color-border-accent);
}

.cal-session-card--linkable { cursor: pointer; }

.cal-session-date-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-500);
}

.cal-session-name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-primary);
  line-height: 1.3;
}

.cal-session-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.cal-session-meta-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.cal-session-meta-row svg {
  flex-shrink: 0;
  color: var(--color-accent-500);
  opacity: 0.7;
}

.cal-session-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.cal-session-spots {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.cal-session-spots--available { color: #4caf7d; }

.cal-session-spots--limited   { color: var(--color-accent-500); }

.cal-session-spots--full      { color: var(--color-text-muted); }

.cal-session-price {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-style: italic;
  margin-left: auto;
  flex-shrink: 0;
}

/* The book button inside session cards */
.cal-book-btn {
  font-size: var(--text-xs);
  padding: 0.4rem 1rem;
  height: auto;
  white-space: nowrap;
}

/* Full-session overlay */
.cal-session-card--full {
  opacity: 0.6;
}

.cal-session-full-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.07);
  color: var(--color-text-muted);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

/* ── Future Dates section (inside session detail panel) ─────────── */
.cal-future-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-5) 0 var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cal-future-divider::before,
.cal-future-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.cal-future-item {
  background: var(--color-charcoal-3);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.cal-future-item:hover,
.cal-future-item:focus {
  border-color: var(--color-border-accent);
  background: var(--color-charcoal-4);
  outline: none;
}

.cal-future-item:focus-visible {
  outline: 2px solid var(--color-accent-500);
  outline-offset: 2px;
}

.cal-future-date-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent-500);
  margin-bottom: 4px;
  font-family: 'Oswald', var(--font-body);
  letter-spacing: 0.04em;
}

.cal-future-sessions {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cal-future-sessions span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.cal-see-more-btn {
  width: 100%;
  background: transparent;
  border: 1px solid var(--color-border-accent);
  color: var(--color-accent-500);
  border-radius: 8px;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  font-family: 'Oswald', var(--font-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: var(--space-2);
  transition: background 0.2s, border-color 0.2s;
}

.cal-see-more-btn:hover {
  background: rgba(200, 121, 65, 0.1);
  border-color: var(--color-accent-500);
}

@media (prefers-reduced-motion: reduce) {
  .cal-grid-panel,
  .cal-month-content {
    transition: none !important;
  }
}

/* "Calendar" divider — prominent centered title with ruled lines */
.calendar-label {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  margin-top: calc(var(--space-16) + 8px);
  margin-bottom: calc(var(--space-8) + 8px);
  padding-top: 0.75em;
  color: var(--color-text-primary);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.calendar-label::before,
.calendar-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border-accent));
}

.calendar-label::after {
  background: linear-gradient(90deg, var(--color-border-accent), transparent);
}

/* Calendar flash — briefly highlights the calendar to draw the user's eye */
@keyframes calFlash {
  0%   { box-shadow: 0 0 0 0 rgba(200,121,65,0); }
  25%  { box-shadow: 0 0 0 8px rgba(200,121,65,0.45); border-color: var(--color-accent-500); }
  60%  { box-shadow: 0 0 0 4px rgba(200,121,65,0.2); border-color: var(--color-accent-500); }
  100% { box-shadow: 0 0 0 0 rgba(200,121,65,0); }
}

.cal-flash {
  animation: calFlash 1.4s ease-out 0.5s;
}

/* ----------------------------------------------------------------
   Contact enroll notice banner
   Always in the DOM — height:0 + opacity:0 when hidden so the form
   never shifts. JS adds .is-visible to show, .is-fading to fade out.
   ---------------------------------------------------------------- */

#contact-enroll-notice {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.5s ease 0.5s,
    opacity    0.5s ease 0.5s,
    margin     0.5s ease 0.5s;
  margin-bottom: 0;
}

#contact-enroll-notice.is-visible {
  max-height: 80px;
  opacity: 1;
  margin-bottom: var(--space-5);
}

#contact-enroll-notice.is-fading {
  opacity: 0;
  max-height: 0;
  margin-bottom: 0;
}

.contact-enroll-notice-inner {
  display: block;
  padding: var(--space-3) var(--space-5);
  background: rgba(200,121,65,0.12);
  border: 1px solid var(--color-border-accent);
  border-radius: var(--radius-md);
  color: var(--color-accent-400);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--fw-normal);
  letter-spacing: 0.01em;
  text-align: center;
}

/* Validation summary notice — shown on submit failure, cleared on next valid submit */
#form-validation-notice {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.3s ease,
    opacity    0.3s ease,
    margin     0.3s ease;
  margin-bottom: 0;
}

#form-validation-notice.is-visible {
  max-height: 80px;
  opacity: 1;
  margin-bottom: var(--space-5);
}

.form-validation-notice-inner {
  display: block;
  padding: var(--space-3) var(--space-5);
  background: rgba(184,64,64,0.1);
  border: 1px solid rgba(184,64,64,0.4);
  border-radius: var(--radius-md);
  color: #e07979;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--fw-normal);
  letter-spacing: 0.01em;
  text-align: center;
}

/* ----------------------------------------------------------------
   15. Safety Section
   ---------------------------------------------------------------- */

.safety-section {
  position: relative;
}

.safety-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 40px,
      rgba(200,121,65,0.015) 40px,
      rgba(200,121,65,0.015) 41px
    );
  pointer-events: none;
}

.safety-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  position: relative;
}

.safety-item {
  display: flex;
  gap: var(--space-5);
  padding: var(--space-8) var(--space-6);
  border-bottom: 1px solid var(--color-border);
  transition: background-color var(--transition-base);
}

.safety-item:hover {
  background: rgba(200,121,65,0.03);
}

.safety-num {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--fw-bold);
  color: rgba(200,121,65,0.15);
  line-height: 1;
  flex-shrink: 0;
  letter-spacing: -0.02em;
  user-select: none;
}

.safety-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-primary);
  margin-bottom: var(--space-3);
  line-height: 1.2;
}

.safety-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.65;
}

/* ----------------------------------------------------------------
   16. FAQ Section
   ---------------------------------------------------------------- */

.faq-list {
  max-width: 800px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-6) var(--space-6);
  background: var(--color-charcoal-4);
  text-align: left;
  font-size: var(--text-base);
  font-weight: var(--fw-medium);
  color: var(--color-text-primary);
  cursor: pointer;
  gap: var(--space-4);
  transition: background-color var(--transition-fast), color var(--transition-fast);
  border: none;
}

.faq-question:hover {
  background: var(--color-charcoal-5);
  color: var(--color-accent-400);
}

.faq-question[aria-expanded="true"] {
  background: var(--color-charcoal-5);
  color: var(--color-accent-400);
}

/* Chevron */
.faq-chevron {
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  position: relative;
}

.faq-chevron::before,
.faq-chevron::after {
  content: '';
  position: absolute;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--transition-base);
}

.faq-chevron::before {
  width: 9px;
  height: 1.5px;
  top: 7px;
  left: 1px;
  transform: rotate(45deg);
}

.faq-chevron::after {
  width: 9px;
  height: 1.5px;
  top: 7px;
  right: 1px;
  transform: rotate(-45deg);
}

.faq-question[aria-expanded="true"] .faq-chevron::before {
  transform: rotate(-45deg);
}

.faq-question[aria-expanded="true"] .faq-chevron::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: var(--space-5) var(--space-6) var(--space-6);
  background: var(--color-charcoal-3);
  border-top: 1px solid var(--color-border);
}

.faq-answer p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ----------------------------------------------------------------
   17. Contact Section
   ---------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--color-text-secondary);
  letter-spacing: 0.02em;
}

.required {
  color: var(--color-accent-400);
  margin-left: 2px;
}

.form-optional {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: var(--fw-regular);
}

.form-input {
  padding: var(--space-3) var(--space-4);
  background: var(--color-charcoal-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--text-base);
  transition:
    border-color var(--transition-fast),
    background-color var(--transition-fast),
    box-shadow var(--transition-fast);
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

.form-input::placeholder {
  color: var(--color-text-muted);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-accent-500);
  background-color: var(--color-charcoal-5);
  box-shadow: 0 0 0 3px rgba(200,121,65,0.15);
}

.form-input:invalid:not(:placeholder-shown) {
  border-color: var(--color-error);
}

/* Per-field inline error messages — always in DOM, animated in when .has-error is set */
.form-field-error {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  transition:
    max-height 0.25s ease,
    opacity    0.25s ease,
    margin-top 0.25s ease;
  font-size: var(--text-xs);
  color: var(--color-error);
  font-family: var(--font-body);
}

.form-group.has-error .form-field-error {
  max-height: 3rem;
  opacity: 1;
  margin-top: var(--space-1);
}

.form-group.has-error .form-input {
  border-color: var(--color-error);
}

.form-group.has-error .form-checkbox {
  outline: 2px solid var(--color-error);
  outline-offset: 2px;
}

.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%23767d8c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-10);
}

.form-select option {
  background: var(--color-charcoal-4);
  color: var(--color-text-primary);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form-checkbox-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.form-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  cursor: pointer;
  line-height: 1.5;
}

.form-checkbox {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--color-accent-500);
  margin-top: 2px;
}

/* Form status messages */
.form-status {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
}

.form-success {
  background: rgba(61,139,101,0.15);
  border: 1px solid rgba(61,139,101,0.4);
  color: #6fcca0;
}

.form-error {
  background: rgba(184,64,64,0.12);
  border: 1px solid rgba(184,64,64,0.35);
  color: #e07979;
}

/* Contact info sidebar */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding: var(--space-8) var(--space-6);
  background: var(--color-charcoal-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  height: fit-content;
}

.contact-info-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-primary);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(200,121,65,0.1);
  border: 1px solid var(--color-border-accent);
  border-radius: var(--radius-md);
  color: var(--color-accent-500);
  flex-shrink: 0;
}

.contact-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-steel-5);
  margin-bottom: var(--space-1);
}

.contact-value {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
  transition: color var(--transition-fast);
}

a.contact-value:hover {
  color: var(--color-accent-400);
}

.contact-social {
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.contact-social-title {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-steel-5);
  margin-bottom: var(--space-3);
}

.social-links {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--color-charcoal-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  transition:
    color var(--transition-fast),
    border-color var(--transition-fast),
    background-color var(--transition-fast);
}

.social-link:hover {
  color: var(--color-accent-400);
  border-color: var(--color-border-accent);
  background-color: rgba(200,121,65,0.08);
}

.social-note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-style: italic;
}

/* ----------------------------------------------------------------
   18. Footer
   ---------------------------------------------------------------- */

.site-footer {
  position: relative;
  overflow: hidden;
  background-color: var(--color-charcoal-1);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-20);
  padding-bottom: var(--space-10);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-16);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer-logo-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.footer-logo-ace {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--color-accent-500);
  border-radius: var(--radius-sm);
}

.footer-logo-ace img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer-logo-text {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-primary);
}

.footer-brand-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
  max-width: 320px;
}

.footer-cert-link {
  display: inline-block;
  width: min(100%, 180px);
  margin-top: var(--space-4);
  border-radius: var(--radius-sm);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.footer-cert-link:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.footer-cert-link:focus-visible {
  outline: 2px solid var(--color-accent-400);
  outline-offset: 3px;
}

.footer-cert-badge {
  display: block;
  width: 100%;
  height: auto;
  
/* Recolor white-on-transparent WEBP badge to match footer text/link palette */
  filter: brightness(0) saturate(100%) invert(52%) sepia(9%) saturate(371%) hue-rotate(187deg) brightness(92%) contrast(86%);
  transition: filter var(--transition-fast);
}

.footer-cert-link:hover .footer-cert-badge,
.footer-cert-link:focus-visible .footer-cert-badge {
  filter: brightness(0) saturate(100%) invert(64%) sepia(43%) saturate(908%) hue-rotate(342deg) brightness(93%) contrast(89%);
}

.footer-col-title {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  list-style: none;
}

.footer-link {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
  line-height: 1.4;
}

.footer-link:hover {
  color: var(--color-accent-400);
}

.footer-bottom {
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  text-align: center;
}

.footer-copyright {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.footer-disclaimer {
  font-size: var(--text-xs);
  color: var(--color-steel-3);
  line-height: 1.65;
  max-width: 680px;
}

.footer-disclaimer a:hover {
  color: var(--color-accent-400);
  transition: color var(--transition-fast);
}

.footer-credit {
  font-size: var(--text-xs);
  color: var(--color-steel-3);
}

.footer-credit-tag {
  font-family: monospace;
  font-size: calc(var(--text-xs) + 2px);
  font-weight: 700;
  opacity: 0.7;
  letter-spacing: -0.04em;
}

.footer-credit a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-base);
}

.footer-credit a:hover {
  color: var(--color-accent-400);
}

/* background-attachment:fixed positions the image relative to the
   viewport so it appears stationary while footer content scrolls.
   overflow:hidden on .site-footer clips it to the footer area. */
.site-footer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/assets/img/icon.webp') no-repeat right bottom;
  background-attachment: fixed;
  background-size: 280px;
  opacity: 0.07;
  pointer-events: none;
  z-index: 1;
}

/* Footer content floats above watermark */
.footer-grid,
.footer-bottom {
  position: relative;
  z-index: 5;
}

/* ----------------------------------------------------------------
   19. Scroll Reveal Animations
   ---------------------------------------------------------------- */

.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 0;
  transition:
    opacity var(--transition-slow),
    transform var(--transition-slow);
}

.reveal-up {
  transform: translateY(28px);
  transition-delay: var(--delay, 0s);
}

.reveal-left {
  transform: translateX(-32px);
}

.reveal-right {
  transform: translateX(32px);
}

.reveal-up.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible {
  opacity: 1;
  transform: none;
}

/* Restore hover-rise on cards that also use reveal-up — .is-visible + class
   gives higher specificity than either rule alone, so this wins cleanly. */
.why-card.is-visible:hover {
  transform: translateY(-3px);
}

/* ----------------------------------------------------------------
   20. Section padding adjustments for nav offset
   ---------------------------------------------------------------- */

section[id],
#calendar {
  scroll-margin-top: var(--nav-height);
}

/* ----------------------------------------------------------------
   21. Print styles (basic)
   ---------------------------------------------------------------- */

@media print {
  .site-header,
  .hero-scroll-indicator,
  .hamburger,
  .mobile-menu {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
}

/* ----------------------------------------------------------------
   22. Waiver Page
   ---------------------------------------------------------------- */

.nav-link-current {
  color: var(--color-accent-300);
}

.waiver-main {
  padding-top: 0;
}

.waiver-section {
  background:
    radial-gradient(ellipse at 65% 0%, rgba(200, 121, 65, 0.09) 0%, transparent 55%),
    linear-gradient(180deg, var(--color-charcoal-1) 0%, var(--color-black) 100%);
  min-height: calc(100vh - var(--nav-height));
  position: relative;
  overflow: hidden;
}

.waiver-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.018'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.waiver-section > .container {
  position: relative;
  z-index: 1;
}

.waiver-shell {
  background: linear-gradient(180deg, rgba(37, 40, 48, 0.96) 0%, rgba(24, 25, 28, 0.98) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--space-8);
}

.waiver-form {
  gap: var(--space-8);
}

.waiver-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.waiver-block-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-xl), 2.9vw, var(--text-3xl));
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-primary);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.waiver-legal {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: rgba(10, 10, 10, 0.35);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.waiver-legal p,
.waiver-legal li {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.72;
}

.waiver-legal ol {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  list-style: decimal;
  margin-left: var(--space-6);
}

.waiver-legal h3 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.01em;
  color: var(--color-accent-200);
  margin-bottom: var(--space-2);
}

.waiver-signature-note {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.signature-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.signature-header .waiver-signature-note {
  flex: 1 1 auto;
  min-width: 0;
}

.signature-actions {
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.signature-actions .btn {
  width: auto;
}

.signature-pad-wrap {
  border: 1px solid var(--color-border-accent);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.72), rgba(24, 25, 28, 0.88));
  overflow: hidden;
}

#signature-canvas {
  display: block;
  width: 100%;
  height: 220px;
  cursor: crosshair;
  touch-action: none;
}

.signature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.waiver-submit-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}

.waiver-submit-wrap .btn-submit {
  width: 100%;
  min-width: 220px;
}

/* Make the clear signature button match submit button width when stacked */
@media (max-width: 760px) {
  .signature-header {
    flex-direction: column;
    align-items: stretch;
  }

  .signature-actions {
    width: 100%;
  }

  .signature-actions .btn {
    width: 100%;
  }
}

.waiver-submit-wrap .form-status {
  width: 100%;
}

.waiver-home-wrap {
  margin-top: var(--space-12);
  align-items: center;
}

.grecaptcha-badge {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Accessibility contrast tune-up */
.services-note,
.services-note p,
.cal-detail-panel,
.cal-detail-panel p,
.form-checkbox-label span {
  color: rgba(245, 247, 250, 0.82) !important;
}

.contact-label {
  color: rgba(245, 247, 250, 0.78) !important;
}

.cal-detail-placeholder p {
  color: rgba(245, 247, 250, 1) !important;
}

/* ----------------------------------------------------------------
   23. Responsive — consolidated by breakpoint
   ---------------------------------------------------------------- */

@media (min-width: 540px) {
.services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

.why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

.form-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 640px) {
.footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

.footer-bottom {
    text-align: left;
  }

  .footer-cert-link {
    width: min(100%, 220px);
  }

.site-footer::after {
    background-position: right 20px bottom;
    background-size: 380px;
  }
}

@media (min-width: 768px) {
.about-grid {
    grid-template-columns: 380px 1fr;
    gap: var(--space-16);
  }

.booking-grid {
    grid-template-columns: repeat(3, 1fr);
  }

.cal-body {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

.cal-detail-panel {
    overflow-y: auto;
    
/* Firefox */
    scrollbar-width: thin;
    scrollbar-color: var(--color-steel-1) transparent;
    transition: border-top-right-radius var(--transition-base),
                border-bottom-right-radius var(--transition-base);
  }
  
/* Flatten right corners when the panel is scrollable so the scrollbar
     sits flush against a straight edge — no clipping or arrow overflow */
  .cal-detail-panel.cal-detail-panel--scrollable {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }
  .cal-detail-panel::-webkit-scrollbar {
    width: 5px;
  }
  .cal-detail-panel::-webkit-scrollbar-track {
    background: transparent;
  }
  .cal-detail-panel::-webkit-scrollbar-thumb {
    background: var(--color-steel-1);
    border-radius: 999px;
  }
  .cal-detail-panel::-webkit-scrollbar-thumb:hover {
    background: var(--color-steel-2);
  }

.safety-grid {
    grid-template-columns: repeat(2, 1fr);
  }

.safety-item:nth-child(odd) {
    border-right: 1px solid var(--color-border);
  }
  .safety-item:nth-last-child(-n+2) {
    border-bottom: none;
  }
}

@media (min-width: 768px) and (max-width: 1180px) {
.about-cta-group .about-contact-btn {
    display: none;
  }
}

@media (min-width: 900px) {
.btn-cal-icon--mobile {
    display: none;
  }

.services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

.why-grid {
    grid-template-columns: repeat(3, 1fr);
  }

.contact-grid {
    grid-template-columns: 1fr 360px;
    gap: var(--space-16);
    align-items: start;
  }

.footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-12);
  }

.waiver-shell {
    padding: var(--space-10);
  }
}

@media (min-width: 1024px) {
.cal-body {
    grid-template-columns: 3fr 2fr;
  }
}

@media (max-width: 639px) {
.about-aces-img {
    width: 225px;
  }
  .about-section {
    padding-bottom: 220px; 
/* room below content for the centered card */
  }
  .about-bg-aces {
    right: auto;
    left: 50%;
    transform-origin: bottom center;
    transform: translate(-50%, 80%) rotate(44deg) scale(0.45); 
/* start state */
  }
  .about-bg-aces.in-view {
    transform: translate(-50%, 0) rotate(0deg) scale(1); 
/* centered landing */
  }

.why-section::after {
    display: none;
  }
}

@media (max-width: 640px) {
.home-gallery-grid {
    gap: 8px;
    --home-gallery-row-max-width: 100%;
  }

  .home-gallery-row {
    gap: 8px;
  }

  .home-gallery-size-note {
    margin-top: var(--space-4);
    text-align: center;
  }

  .home-gallery-page-number {
    min-width: 34px;
    height: 34px;
  }

  .home-gallery-page-btn {
    min-width: 78px;
  }

  .home-gallery-modal {
    padding: 0.45rem;
  }

  .home-gallery-modal-panel {
    max-height: calc(100vh - 1.2rem);
  }

  .home-gallery-modal-media,
  .home-gallery-modal-video {
    max-height: min(60vh, 560px);
  }

  .home-gallery-modal-head {
    padding: 0.65rem 0.75rem;
  }

  .home-gallery-modal-foot {
    padding: 0.65rem 0.75rem 0.75rem;
  }

  .home-gallery-modal-nav {
    top: auto;
    bottom: 0.75rem;
    transform: none;
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.1rem;
  }

  .home-gallery-modal-prev {
    left: 0.75rem;
  }

  .home-gallery-modal-next {
    right: 0.75rem;
  }

  .home-gallery-modal-zoom-controls {
    top: 50%;
  }

  .home-gallery-modal-zoom-btn {
    min-width: 30px;
    height: 30px;
    font-size: var(--text-xs);
    padding: 0 8px;
  }

  html.is-ios .home-gallery-modal-panel {
    max-height: calc(100dvh - 1.2rem);
  }

  html.is-ios .home-gallery-modal-nav {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }
}

@media (max-width: 767px) {
.booking-calendar.cal-filters-collapsible-ready .cal-filters-toggle {
    display: inline-flex;
  }

  .booking-calendar.cal-filters-collapsible-ready .cal-filters {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition: max-height var(--transition-base), opacity var(--transition-base), transform var(--transition-base);
  }

  .booking-calendar.cal-filters-collapsible-ready.cal-filters-open .cal-filters {
    max-height: 420px;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .booking-calendar.cal-filters-collapsible-ready.cal-filters-open .cal-filters-toggle-icon {
    transform: rotate(180deg);
  }

.cal-grid-panel {
    transition: padding var(--transition-base);
  }

  .cal-month-content {
    max-height: 2000px;
    opacity: 1;
    transition: max-height var(--transition-base), opacity var(--transition-base);
  }

  .booking-calendar.cal-mobile-compact-active .cal-grid-panel {
    padding: var(--space-5);
  }

  .booking-calendar.cal-mobile-compact-active .cal-month-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
  }

  .booking-calendar.cal-mobile-compact-active .cal-mobile-week {
    display: block;
  }

  .cal-mobile-weekdays {
    margin-bottom: var(--space-1);
  }

  .cal-mobile-weekdays span {
    font-size: 0.62rem;
    padding-block: var(--space-1);
  }

  .cal-mobile-week-days {
    gap: 3px;
  }

  .cal-mobile-week-days .cal-day {
    min-height: 46px;
    aspect-ratio: auto;
    gap: 2px;
    border-radius: var(--radius-sm);
    padding: 4px 2px;
  }

  .cal-mobile-week-days .cal-day--empty {
    display: none;
  }

.safety-item:last-child {
    border-bottom: none;
  }
}

@media (max-width: 900px) {
.home-gallery-grid {
    --home-gallery-row-max-width: 860px;
  }

  .home-gallery-modal-panel {
    max-height: calc(100vh - 1.4rem);
  }

  .home-gallery-modal-media,
  .home-gallery-modal-video {
    max-height: min(68vh, 780px);
  }

.waiver-section > .container {
    padding-inline: var(--space-3);
  }

  .waiver-shell {
    padding: var(--space-4);
  }

  .waiver-legal {
    padding: var(--space-3);
  }

  .waiver-legal ol {
    margin-left: var(--space-4);
  }

  .waiver-legal p,
  .waiver-legal li {
    line-height: 1.58;
  }

  .grecaptcha-badge {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}
