/* ============================================
   WP POOL BUILDER — Design Tokens & Styles
   Art Direction: Water/outdoor/trust/conversion
   ============================================ */

/* --- Type Scale (Fluid) --- */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);

  /* --- Spacing (4px base) --- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* --- Fonts --- */
  --font-display: 'Cabinet Grotesk', 'Arial', sans-serif;
  --font-body: 'Satoshi', 'Helvetica Neue', sans-serif;

  /* --- Radius --- */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* --- Transitions --- */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);

  /* --- Shadows --- */
  --shadow-sm: 0 1px 2px oklch(0.22 0.02 240 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.22 0.02 240 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.22 0.02 240 / 0.12);
  --shadow-xl: 0 20px 48px oklch(0.22 0.02 240 / 0.16);

  /* --- Content Widths --- */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;
}

/* --- LIGHT MODE (Default) --- */
:root,
[data-theme='light'] {
  --color-bg: #f8fafb;
  --color-surface: #ffffff;
  --color-surface-2: #f0f5f7;
  --color-surface-offset: #e8eff2;
  --color-surface-offset-2: #dde7ec;
  --color-divider: #cdd8de;
  --color-border: #bcc9d0;

  --color-text: #0f2027;
  --color-text-muted: #4a6572;
  --color-text-faint: #8fa3ad;
  --color-text-inverse: #f8fafb;

  /* Primary — Deep pool blue */
  --color-primary: #0369a1;
  --color-primary-hover: #075985;
  --color-primary-active: #0c4a6e;
  --color-primary-highlight: #e0f2fe;

  /* Accent — Warm amber for CTAs */
  --color-accent: #d97706;
  --color-accent-hover: #b45309;
  --color-accent-active: #92400e;
  --color-accent-highlight: #fef3c7;

  /* Success */
  --color-success: #15803d;
  --color-success-highlight: #dcfce7;

  /* Error */
  --color-error: #b91c1c;
}

/* --- DARK MODE --- */
[data-theme='dark'] {
  --color-bg: #0c1820;
  --color-surface: #111f2a;
  --color-surface-2: #162636;
  --color-surface-offset: #132030;
  --color-surface-offset-2: #1a2d3c;
  --color-divider: #1e3448;
  --color-border: #2a4458;

  --color-text: #d4e3ec;
  --color-text-muted: #7e9bac;
  --color-text-faint: #4f6d7e;
  --color-text-inverse: #0f2027;

  --color-primary: #38bdf8;
  --color-primary-hover: #7dd3fc;
  --color-primary-active: #bae6fd;
  --color-primary-highlight: #0c3d5e;

  --color-accent: #fbbf24;
  --color-accent-hover: #fcd34d;
  --color-accent-active: #fde68a;
  --color-accent-highlight: #3b2f0a;

  --color-success: #4ade80;
  --color-success-highlight: #14532d;

  --color-error: #f87171;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
  --shadow-xl: 0 20px 48px oklch(0 0 0 / 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0c1820;
    --color-surface: #111f2a;
    --color-surface-2: #162636;
    --color-surface-offset: #132030;
    --color-surface-offset-2: #1a2d3c;
    --color-divider: #1e3448;
    --color-border: #2a4458;
    --color-text: #d4e3ec;
    --color-text-muted: #7e9bac;
    --color-text-faint: #4f6d7e;
    --color-text-inverse: #0f2027;
    --color-primary: #38bdf8;
    --color-primary-hover: #7dd3fc;
    --color-primary-active: #bae6fd;
    --color-primary-highlight: #0c3d5e;
    --color-accent: #fbbf24;
    --color-accent-hover: #fcd34d;
    --color-accent-active: #fde68a;
    --color-accent-highlight: #3b2f0a;
    --color-success: #4ade80;
    --color-success-highlight: #14532d;
    --color-error: #f87171;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
    --shadow-xl: 0 20px 48px oklch(0 0 0 / 0.5);
  }
}

/* ============================================
   GLOBAL STYLES
   ============================================ */

a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover {
  color: var(--color-primary-hover);
}

.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}
@media (min-width: 768px) {
  .container {
    padding-inline: var(--space-8);
  }
}

/* ============================================
   HEADER / NAV
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid oklch(from var(--color-border) l c h / 0.5);
  transition: box-shadow 0.3s var(--ease-out);
}
.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
}
.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
}
.logo-text span {
  color: var(--color-primary);
}

.nav-links {
  display: none;
  list-style: none;
  gap: var(--space-6);
  align-items: center;
}
@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}
.nav-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition-interactive);
}
.nav-links a:hover {
  color: var(--color-text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Mobile menu button */
.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--color-text);
}
@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  z-index: 49;
  padding: var(--space-6) var(--space-4);
}
.mobile-nav.open {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.mobile-nav a {
  font-size: var(--text-lg);
  color: var(--color-text);
  font-weight: 500;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-divider);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-lg);
  text-decoration: none;
  white-space: nowrap;
  transition:
    background var(--transition-interactive),
    color var(--transition-interactive),
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  color: var(--color-text-inverse);
}

.btn-accent {
  background: var(--color-accent);
  color: #fff;
}
.btn-accent:hover {
  background: var(--color-accent-hover);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-outline:hover {
  background: var(--color-surface-2);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  border-radius: var(--radius-xl);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

/* ============================================
   THEME TOGGLE
   ============================================ */

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition:
    color var(--transition-interactive),
    background var(--transition-interactive);
}
.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-16) 0 var(--space-12);
}
@media (min-width: 768px) {
  .hero {
    padding: var(--space-20) 0 var(--space-16);
  }
}

.hero-grid {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}
@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
  }
}

.hero-content {
  max-width: 580px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-highlight);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.hero h1 .highlight {
  color: var(--color-primary);
}

.hero-subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-8);
  max-width: 48ch;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.hero-proof {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.hero-proof-item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.hero-proof-item svg {
  width: 16px;
  height: 16px;
  color: var(--color-success);
  flex-shrink: 0;
}

.hero-image {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Floating stat cards on hero image */
.hero-float-card {
  position: absolute;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow-lg);
  display: none;
}
@media (min-width: 768px) {
  .hero-float-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
  }
}
.hero-float-card.top-right {
  top: var(--space-6);
  right: var(--space-6);
}
.hero-float-card.bottom-left {
  bottom: var(--space-6);
  left: var(--space-6);
}
.float-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.float-icon.blue {
  background: var(--color-primary-highlight);
  color: var(--color-primary);
}
.float-icon.green {
  background: var(--color-success-highlight);
  color: var(--color-success);
}
.float-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.2;
}
.float-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-text);
}

/* ============================================
   SECTION STYLING
   ============================================ */

.section {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) 0;
}

.section-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 56ch;
  line-height: 1.7;
}

.section-header {
  margin-bottom: var(--space-12);
}
.section-header.center {
  text-align: center;
}
.section-header.center .section-subtitle {
  margin-inline: auto;
}

/* Alternating background */
.section-alt {
  background: var(--color-surface-2);
}

/* ============================================
   POOL TYPES GRID (Built For)
   ============================================ */

.pool-types-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}
@media (min-width: 768px) {
  .pool-types-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
  }
}

.pool-type-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 3/4;
  cursor: default;
}
.pool-type-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.pool-type-card:hover img {
  transform: scale(1.05);
}
.pool-type-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, oklch(0.1 0.02 240 / 0.85) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-4);
}
.pool-type-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: #fff;
  line-height: 1.2;
}
.pool-type-desc {
  font-size: var(--text-xs);
  color: oklch(1 0 0 / 0.7);
  margin-top: var(--space-1);
}

/* ============================================
   HOW IT WORKS — Steps
   ============================================ */

.steps-grid {
  display: grid;
  gap: var(--space-8);
}
@media (min-width: 768px) {
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }
}

.step-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  border: 1px solid oklch(from var(--color-border) l c h / 0.5);
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

.step-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.step-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

.step-screenshot {
  margin-top: var(--space-4);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid oklch(from var(--color-border) l c h / 0.3);
}
.step-screenshot img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   KEY FEATURES
   ============================================ */

.features-layout {
  display: grid;
  gap: var(--space-8);
  align-items: start;
}
@media (min-width: 1024px) {
  .features-layout {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
  }
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.feature-item {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  transition: background var(--transition-interactive);
}
.feature-item:hover {
  background: var(--color-surface-2);
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.feature-icon svg {
  width: 20px;
  height: 20px;
}

.feature-text h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color-text);
  margin-bottom: var(--space-1);
}
.feature-text p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.features-visual {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.features-visual img {
  width: 100%;
  height: auto;
}

/* ============================================
   WHY IT WORKS — Benefits
   ============================================ */

.benefits-grid {
  display: grid;
  gap: var(--space-6);
}
@media (min-width: 768px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.benefit-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  border: 1px solid oklch(from var(--color-border) l c h / 0.5);
  transition:
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}
.benefit-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.benefit-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}
.benefit-icon svg {
  width: 24px;
  height: 24px;
}
.benefit-icon.blue {
  background: var(--color-primary-highlight);
  color: var(--color-primary);
}
.benefit-icon.amber {
  background: var(--color-accent-highlight);
  color: var(--color-accent);
}
.benefit-icon.green {
  background: var(--color-success-highlight);
  color: var(--color-success);
}

.benefit-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.benefit-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ============================================
   DEMO CTA SECTION
   ============================================ */

.demo-section {
  position: relative;
  overflow: hidden;
  background: var(--color-primary);
  padding: clamp(var(--space-12), 8vw, var(--space-20)) 0;
}
.demo-section .container {
  position: relative;
  z-index: 1;
}
.demo-bg-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: radial-gradient(circle at 1px 1px, currentColor 1px, transparent 0);
  background-size: 32px 32px;
  color: white;
}
.demo-content {
  text-align: center;
  max-width: 600px;
  margin-inline: auto;
}
.demo-content h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: var(--space-4);
}
.demo-content p {
  font-size: var(--text-base);
  color: oklch(1 0 0 / 0.8);
  margin-bottom: var(--space-8);
  margin-inline: auto;
}
.demo-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.btn-white {
  background: #fff;
  color: var(--color-primary);
  font-weight: 700;
}
.btn-white:hover {
  background: oklch(1 0 0 / 0.9);
  color: var(--color-primary-hover);
}
.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid oklch(1 0 0 / 0.3);
}
.btn-ghost:hover {
  background: oklch(1 0 0 / 0.1);
  border-color: oklch(1 0 0 / 0.5);
  color: #fff;
}

/* ============================================
   FINAL CTA
   ============================================ */

.final-cta {
  text-align: center;
  padding: clamp(var(--space-16), 10vw, var(--space-32)) 0;
}
.final-cta h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}
.final-cta p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  margin-inline: auto;
  max-width: 48ch;
}
.final-cta-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-divider);
  padding: var(--space-8) 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
  text-align: center;
}
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-copy {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.footer-links {
  display: flex;
  gap: var(--space-4);
  list-style: none;
}
.footer-links a {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-interactive);
}
.footer-links a:hover {
  color: var(--color-text);
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */

.fade-in {
  opacity: 1;
}

@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 80%;
  }
}

@keyframes reveal-fade {
  to {
    opacity: 1;
  }
}

/* ============================================
   BONUS CALLOUT
   ============================================ */

.bonus-callout {
  background: var(--color-accent-highlight);
  border: 1px solid oklch(from var(--color-accent) l c h / 0.2);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-top: var(--space-8);
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}
.bonus-callout svg {
  width: 24px;
  height: 24px;
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 2px;
}
.bonus-callout h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-text);
  margin-bottom: var(--space-1);
}
.bonus-callout p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ============================================
   FULL-WIDTH PAGE TEMPLATE (Pool Plugin host)
   ============================================ */

.fullwidth-page {
  width: 100%;
  min-height: calc(100dvh - 64px - 80px); /* viewport minus header + footer */
  background: var(--color-bg);
}

.fullwidth-page-header {
  padding: var(--space-12) 0 var(--space-6);
  border-bottom: 1px solid oklch(from var(--color-border) l c h / 0.4);
  background: var(--color-surface);
}

.fullwidth-page-content {
  /* No max-width — let the plugin take the full viewport. */
  width: 100%;
  padding: 0;
}

/* Reset WP / block defaults that would constrain the plugin */
.fullwidth-page-content > * {
  max-width: none;
}

/* Tighten any default <p>/<div> margins WP adds around shortcodes */
.fullwidth-page-content > p:empty {
  display: none;
}

/* If the plugin wraps itself in .wp-block-shortcode or similar, undo container limits */
.fullwidth-page-content .alignwide,
.fullwidth-page-content .alignfull,
.fullwidth-page-content .wp-block-shortcode {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  width: 100%;
}

/* Optional inner spacing — comment in if the plugin has no internal padding */
.fullwidth-page-content.has-padding {
  padding: var(--space-6) var(--space-4);
}
@media (min-width: 768px) {
  .fullwidth-page-content.has-padding {
    padding: var(--space-8) var(--space-6);
  }
}

/* ============================================
   LIVE SITE REFERENCE (iframe-like preview)
   ============================================ */
.live-preview-wrapper {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid oklch(from var(--color-border) l c h / 0.5);
  background: var(--color-surface);
}
.live-preview-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-offset);
  border-bottom: 1px solid var(--color-divider);
}
.preview-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
}
.preview-dot.red { background: #ef4444; }
.preview-dot.yellow { background: #eab308; }
.preview-dot.green { background: #22c55e; }
.preview-url-bar {
  flex: 1;
  margin-left: var(--space-2);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  border: 1px solid oklch(from var(--color-border) l c h / 0.3);
}
.live-preview-content {
  aspect-ratio: 16/9;
  background: var(--color-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.live-preview-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   LOGO — Dark mode safe
   The logo mark always uses brand colors regardless of theme,
   and the wordmark sits on a chip that adapts to background.
   ============================================================ */
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-mark svg {
  display: block;
}
.logo-mark-bg {
  fill: var(--color-primary);
}
.logo-mark-wave {
  stroke: #ffffff;
}
.logo-mark-wave--soft {
  opacity: 0.55;
}

/* Dark mode: brighten the chip so the wordmark contrasts the dark bg */
[data-theme='dark'] .logo-mark-bg {
  fill: #38bdf8; /* light cyan-blue */
}
[data-theme='dark'] .logo-mark-wave {
  stroke: #0c1820; /* dark waves on light chip */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .logo-mark-bg { fill: #38bdf8; }
  :root:not([data-theme]) .logo-mark-wave { stroke: #0c1820; }
}

/* Wordmark contrast */
.logo-text {
  color: var(--color-text);
}
.logo-text-accent {
  color: var(--color-primary);
}
[data-theme='dark'] .logo-text {
  color: #f0f7fb;
}
[data-theme='dark'] .logo-text-accent {
  color: #7dd3fc;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .logo-text { color: #f0f7fb; }
  :root:not([data-theme]) .logo-text-accent { color: #7dd3fc; }
}

/* ============================================================
   DARK MODE — extra contrast fixes
   ============================================================ */
[data-theme='dark'] .hero h1,
[data-theme='dark'] h1,
[data-theme='dark'] h2,
[data-theme='dark'] h3 {
  color: #f0f7fb;
}
[data-theme='dark'] .nav-links a {
  color: #b9cdd9;
}
[data-theme='dark'] .nav-links a:hover {
  color: #ffffff;
}
[data-theme='dark'] .btn-primary {
  background: #0ea5e9;
  color: #ffffff;
}
[data-theme='dark'] .btn-primary:hover {
  background: #38bdf8;
}
[data-theme='dark'] .btn-secondary {
  background: #f59e0b;
  color: #1c1407;
}
[data-theme='dark'] .btn-secondary:hover {
  background: #fbbf24;
}
/* Site header glass in dark mode — make sure border is visible */
[data-theme='dark'] .site-header {
  border-bottom-color: rgba(56, 189, 248, 0.18);
}

/* ============================================================
   SPLASH PAGE — Lead capture front page
   ============================================================ */
.site-header--splash {
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
}

.splash {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 0 60px;
  overflow: hidden;
  isolation: isolate;
}

.splash-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.splash-bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.splash-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(3, 105, 161, 0.85) 0%, rgba(12, 24, 32, 0.7) 100%);
}
.splash-bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at top left, rgba(56, 189, 248, 0.18), transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(217, 119, 6, 0.12), transparent 55%),
    linear-gradient(180deg, var(--color-bg) 0%, var(--color-surface) 100%);
}
.splash-bg:has(.splash-bg-image) .splash-bg-gradient {
  display: none;
}

.splash-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-card {
  max-width: 620px;
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  padding: clamp(28px, 5vw, 56px);
  box-shadow:
    0 30px 60px -20px rgba(15, 32, 39, 0.25),
    0 12px 24px -10px rgba(15, 32, 39, 0.15);
  text-align: center;
}
[data-theme='dark'] .splash-card {
  background: #142231;
  border-color: rgba(56, 189, 248, 0.22);
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(56, 189, 248, 0.08) inset;
}

.splash-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  margin-bottom: 20px;
}
[data-theme='dark'] .splash-eyebrow {
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
}

.splash-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 44px);
  line-height: 1.1;
  margin: 0 0 16px;
  color: var(--color-text);
  letter-spacing: -0.02em;
}
.splash-headline .highlight {
  color: var(--color-accent);
}
[data-theme='dark'] .splash-headline {
  color: #f0f7fb;
}
[data-theme='dark'] .splash-headline .highlight {
  color: #fbbf24;
}

.splash-subheadline {
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--color-text-muted);
  margin: 0 0 28px;
}
[data-theme='dark'] .splash-subheadline {
  color: #b9cdd9;
}

.splash-form {
  margin: 0 0 18px;
  text-align: left;
}
.splash-form-empty {
  padding: 20px;
  background: var(--color-surface-2);
  border: 1px dashed var(--color-border);
  border-radius: 12px;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
  text-align: left;
}
.splash-form-empty code {
  background: var(--color-surface-offset);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

/* Gravity Forms styling inside the splash card */
.splash-form .gform_wrapper {
  margin: 0;
}
.splash-form .gform_wrapper .gform_fields,
.splash-form .gform_wrapper ul.gform_fields {
  display: grid;
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.splash-form .gform_wrapper .gfield label,
.splash-form .gform_wrapper label.gfield_label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}
[data-theme='dark'] .splash-form .gform_wrapper .gfield label,
[data-theme='dark'] .splash-form .gform_wrapper label.gfield_label {
  color: #f0f7fb;
}
.splash-form .gform_wrapper input[type="text"],
.splash-form .gform_wrapper input[type="email"],
.splash-form .gform_wrapper input[type="tel"],
.splash-form .gform_wrapper input[type="url"],
.splash-form .gform_wrapper input[type="number"],
.splash-form .gform_wrapper textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.splash-form .gform_wrapper input:focus,
.splash-form .gform_wrapper textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.18);
}
[data-theme='dark'] .splash-form .gform_wrapper input,
[data-theme='dark'] .splash-form .gform_wrapper textarea {
  background: #0c1820;
  border-color: rgba(56, 189, 248, 0.22);
  color: #f0f7fb;
}
[data-theme='dark'] .splash-form .gform_wrapper input:focus,
[data-theme='dark'] .splash-form .gform_wrapper textarea:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}
.splash-form .gform_footer,
.splash-form .gform_wrapper .gform_footer {
  margin-top: 18px;
  padding: 0;
}
.splash-form .gform_button,
.splash-form .gform_wrapper input[type="submit"] {
  width: 100%;
  padding: 14px 24px;
  background: var(--color-accent);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-interactive), transform var(--transition-interactive);
}
.splash-form .gform_button:hover,
.splash-form .gform_wrapper input[type="submit"]:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}
.splash-form .gform_confirmation_message,
.splash-form .gform_confirmation_wrapper {
  padding: 18px;
  background: var(--color-success-highlight);
  color: var(--color-success);
  border-radius: 10px;
  text-align: center;
  font-weight: 500;
}
.splash-form .validation_error,
.splash-form .gfield_error .gfield_label {
  color: var(--color-error);
}

.splash-footnote {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin: 0 0 24px;
  line-height: 1.5;
}

.splash-trust {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  justify-content: center;
  border-top: 1px solid var(--color-divider);
  padding-top: 24px;
}
.splash-trust li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.splash-trust svg {
  color: var(--color-success);
}
[data-theme='dark'] .splash-trust {
  border-top-color: rgba(56, 189, 248, 0.15);
}
[data-theme='dark'] .splash-trust li {
  color: #b9cdd9;
}
[data-theme='dark'] .splash-trust svg {
  color: #4ade80;
}

/* Footer adjustment when on splash */
body.home .site-footer,
body.page-template-front-page .site-footer {
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============================================================
   FIXES — Logo placement, splash spacing, light-mode default
   ============================================================ */

/* Custom uploaded logo (via Customizer > Site Identity) */
.logo--custom {
  display: inline-flex;
  align-items: center;
}
.logo--custom .custom-logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.logo--custom .custom-logo {
  display: block;
  height: auto;
  max-height: 44px; /* keeps header tidy regardless of upload size */
  width: auto;
}

/* Tighten splash spacing — header is absolute 64px, so 80px is plenty */
.splash {
  padding: 80px 0 40px;
  min-height: auto;
}
@media (min-width: 768px) {
  .splash {
    padding: 88px 0 48px;
    min-height: calc(100vh - 60px);
  }
}

/* On the splash, give the absolute header a subtle backdrop so the logo
   reads against any background (transparent header was too "floaty") */
.site-header--splash {
  position: absolute;
  background: linear-gradient(180deg, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: none;
  padding: 4px 0;
}
[data-theme='dark'] .site-header--splash {
  background: linear-gradient(180deg, rgba(12,24,32,0.85) 0%, rgba(12,24,32,0) 100%);
}

/* Default to LIGHT MODE — only opt into dark when user explicitly toggles */
:root:not([data-theme]) {
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    /* Override the auto-dark block above — keep light defaults */
    --color-bg: #f8fafb;
    --color-surface: #ffffff;
    --color-surface-2: #f0f5f7;
    --color-surface-offset: #e8eff2;
    --color-surface-offset-2: #dde7ec;
    --color-divider: #cdd8de;
    --color-border: #bcc9d0;
    --color-text: #0f2027;
    --color-text-muted: #4a6572;
    --color-text-faint: #8fa3ad;
    --color-text-inverse: #f8fafb;
    --color-primary: #0369a1;
    --color-primary-hover: #075985;
    --color-primary-active: #0c4a6e;
    --color-primary-highlight: #e0f2fe;
    --color-accent: #d97706;
    --color-accent-hover: #b45309;
    --color-accent-active: #92400e;
    --color-accent-highlight: #fef3c7;
    --color-success: #15803d;
    --color-success-highlight: #dcfce7;
    --color-error: #b91c1c;
  }
}
