/* ==========================================================================
   I Got A Dom — style.css
   Design tokens are the source of truth (kept in sync with /wiki/design.md)
   ========================================================================== */

:root {
  /* Dark obsidian base */
  --bg:            #0d0d0f;
  --surface:       #131316;
  --surface-2:     #1a1a1f;
  --surface-3:     #212128;
  --border:        rgba(255,255,255,0.07);
  --border-strong: rgba(255,255,255,0.14);

  /* Text */
  --text:          #f0ede8;
  --text-muted:    rgba(240,237,232,0.55);
  --text-faint:    rgba(240,237,232,0.28);

  /* Accents */
  --teal:          #00d4c8;
  --teal-dim:      rgba(0,212,200,0.10);
  --teal-glow:     rgba(0,212,200,0.25);
  --gold:          #c9a84c;
  --gold-dim:      rgba(201,168,76,0.12);
  --chrome:        rgba(255,255,255,0.82);

  /* Type */
  --font-display:  'Barlow Condensed', 'Impact', sans-serif;
  --font-body:     'DM Sans', 'Inter', sans-serif;

  /* Fluid type */
  --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-hero:  clamp(3.5rem,   0.5rem  + 9vw,    9rem);

  /* Spacing */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem;    --space-6: 1.5rem; --space-8: 2rem;
  --space-12: 3rem;   --space-16: 4rem;  --space-24: 6rem;

  /* Radius */
  --radius-sm: 6px; --radius-md: 10px;
  --radius-lg: 16px; --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:  cubic-bezier(0.4, 0, 1, 1);
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; }

.container {
  width: min(1180px, 100% - 2 * var(--space-6));
  margin-inline: auto;
}

.section { padding: var(--space-24) 0; }
.section-alt { background: var(--surface); }

/* --------------------------------------------------------------------------
   Section heads
   -------------------------------------------------------------------------- */
.section-head { max-width: 640px; margin-bottom: var(--space-16); }

.section-kicker {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: var(--space-3);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.section-lead {
  margin-top: var(--space-4);
  font-size: var(--text-lg);
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Glass
   -------------------------------------------------------------------------- */
.glass {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: all 0.2s var(--ease-out);
}

.btn-primary { background: var(--teal); color: #0d0d0f; }
.btn-primary:hover {
  background: #00ffe6;
  box-shadow: 0 0 30px var(--teal-glow);
  transform: translateY(-2px);
}

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

/* --------------------------------------------------------------------------
   NAV
   -------------------------------------------------------------------------- */
#nav {
  position: fixed; top: 0; left: 0; width: 100%;
  z-index: 100;
  transition: background 0.3s var(--ease-out), backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
#nav.scrolled {
  background: rgba(13,13,15,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  width: min(1180px, 100% - 2 * var(--space-6));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-4) 0;
}

.nav-links {
  display: flex;
  gap: var(--space-8);
  font-size: var(--text-sm);
  font-weight: 500;
}
.nav-links a { color: var(--text-muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--teal); }

.nav-cta { display: inline-flex; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none;
  padding: var(--space-2);
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(13,13,15,0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
  z-index: 90;
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu a { transform: translateY(12px); opacity: 0; transition: all 0.4s var(--ease-out); }
.mobile-menu.open a { transform: none; opacity: 1; }
.mobile-menu.open a:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu.open a:nth-child(2) { transition-delay: 0.10s; }
.mobile-menu.open a:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu.open a:nth-child(4) { transition-delay: 0.20s; }
.mobile-menu.open a:nth-child(5) { transition-delay: 0.25s; }
.mobile-menu .btn { font-family: var(--font-body); font-size: var(--text-base); }

/* --------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--bg);
}

.hero-bg { position: absolute; inset: 0; z-index: 0; }

.teal-orb {
  position: absolute;
  width: clamp(300px, 60vw, 700px);
  height: clamp(300px, 60vw, 700px);
  background: radial-gradient(circle, var(--teal-glow) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -60%);
  pointer-events: none;
  filter: blur(40px);
}

.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.4;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 75%);
  mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 75%);
}

/* Canvas particle field — sits above the bg orb/grid, below the cards + text */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 900px;
  padding: var(--space-8) var(--space-4);
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: var(--space-4);
}

.hero-headline {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-6);
}
.hero-headline span { display: inline-block; }
.word-chaos { color: var(--text-muted); }
.word-to    { color: var(--text-faint); font-weight: 600; margin: 0 0.25em; }
.word-clarity { color: var(--teal); text-shadow: 0 0 60px var(--teal-glow); }

.hero-sub {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 56ch;
  margin: 0 auto var(--space-8);
  line-height: 1.6;
}

.hero-cta-row {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* Chaos + clarity floating cards */
.chaos-field, .clarity-field {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 5;
}

.chaos-card {
  position: absolute;
  width: clamp(80px, 12vw, 140px);
  height: clamp(100px, 16vw, 180px);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  opacity: 0.6;
  filter: blur(1px);
}
/* faux "messy lines" inside chaos cards */
.chaos-card::after {
  content: "";
  position: absolute; inset: 14px;
  background-image: repeating-linear-gradient(
    transparent 0 6px, var(--border-strong) 6px 7px);
  opacity: 0.7;
  transform: rotate(-3deg);
}

.clarity-card {
  position: absolute;
  width: clamp(100px, 14vw, 160px);
  height: clamp(120px, 18vw, 200px);
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
  border: 1px solid rgba(0,212,200,0.2);
  border-radius: var(--radius-md);
  opacity: 0;
  box-shadow: 0 0 30px var(--teal-dim);
}
/* clean aligned lines + check */
.clarity-card::after {
  content: "";
  position: absolute; left: 14px; right: 14px; top: 16px;
  height: 4px; border-radius: 2px;
  background: var(--teal);
  box-shadow: 0 12px 0 var(--border-strong), 0 24px 0 var(--border-strong), 0 36px 0 var(--border-strong);
}

.glass-surface {
  position: absolute;
  bottom: 20%; left: 50%;
  transform: translateX(-50%);
  width: 80vw; max-width: 900px;
  height: 2px;
  background: linear-gradient(90deg,
    transparent, var(--teal), var(--chrome), var(--teal), transparent);
  opacity: 0;
  z-index: 8;
}

/* Hero card positions live in CSS (no inline styles); GSAP animates transforms */
.chaos-card:nth-child(1) { top: 12%; left: 5%; }
.chaos-card:nth-child(2) { top: 15%; right: 8%; }
.chaos-card:nth-child(3) { top: 58%; left: 3%; }
.chaos-card:nth-child(4) { top: 60%; right: 5%; }
.chaos-card:nth-child(5) { top: 32%; left: 16%; }
.chaos-card:nth-child(6) { top: 36%; right: 14%; }
.clarity-card:nth-child(1) { top: 20%; left: 6%; }
.clarity-card:nth-child(2) { top: 20%; right: 6%; }
.clarity-card:nth-child(3) { top: 55%; left: 4%; }
.clarity-card:nth-child(4) { top: 55%; right: 4%; }

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-6); left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-faint);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 0.2s var(--ease-out);
}
.scroll-indicator:hover { color: var(--teal); }
.scroll-chevron {
  width: 14px; height: 14px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  animation: chevron-pulse 1.8s var(--ease-out) infinite;
}
@keyframes chevron-pulse {
  0%   { transform: translateY(-3px) rotate(45deg); opacity: 0.3; }
  50%  { transform: translateY(3px) rotate(45deg);  opacity: 1; }
  100% { transform: translateY(-3px) rotate(45deg); opacity: 0.3; }
}

/* --------------------------------------------------------------------------
   BEFORE / AFTER slider
   -------------------------------------------------------------------------- */
.ba-section { padding: var(--space-24) 0; }
.ba-head { margin-bottom: var(--space-12); }

.ba {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  min-height: 280px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  user-select: none;
  touch-action: pan-y;
  /* --pos drives the clip + divider position (set in JS, defaults to 50%) */
  --pos: 50%;
}

/* Both panels occupy the same box so the doc lines overlay exactly */
.ba-panel {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.ba-after-panel  { background: linear-gradient(135deg, var(--surface), var(--surface-2)); }
.ba-before-panel {
  background: linear-gradient(135deg, #1c1715, #211a18);
  /* reveal only the left portion, up to the divider */
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

/* Floating BEFORE / AFTER labels */
.ba-tag {
  position: absolute;
  top: var(--space-4);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  z-index: 3;
}
.ba-tag-before { left: var(--space-4); background: rgba(255,122,122,0.16); color: #ff9b9b; border: 1px solid rgba(255,122,122,0.3); }
.ba-tag-after  { right: var(--space-4); background: var(--teal-dim); color: var(--teal); border: 1px solid rgba(0,212,200,0.3); }

/* Document mockup — identical geometry in both panels */
.ba-doc {
  width: min(440px, 84%);
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 1.4vw, 0.95rem);
  padding: clamp(1rem, 3vw, 2rem);
}
.ba-line {
  font-size: clamp(0.85rem, 0.6rem + 1vw, 1.15rem);
  line-height: 1.3;
  white-space: nowrap;
}

/* AFTER — clean, aligned, ivory */
.ba-doc-after .ba-line { color: var(--text); font-family: var(--font-body); letter-spacing: 0; }
.ba-doc-after .ba-title-line { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.05rem, 0.7rem + 1.5vw, 1.6rem); }
.ba-dash { color: var(--text-muted); }
.ba-skills { display: flex; gap: var(--space-2); }
.ba-chip {
  font-size: 0.78em;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: var(--teal-dim);
  color: var(--teal);
  border: 1px solid rgba(0,212,200,0.25);
}
.ba-stamp { color: var(--teal); font-weight: 600; display: flex; align-items: center; gap: var(--space-2); }
.ba-check {
  display: inline-grid; place-items: center;
  width: 20px; height: 20px;
  border-radius: var(--radius-full);
  background: var(--teal); color: #0d0d0f;
  font-size: 0.72em; font-weight: 800;
}

/* BEFORE — messy, mis-cased, red squiggles, off rhythm */
.ba-doc-before .ba-line { color: #b6aaa2; font-family: 'Comic Sans MS', 'DM Sans', cursive; letter-spacing: 0.02em; }
.ba-doc-before .ba-title-line { font-weight: 700; font-size: clamp(1.05rem, 0.7rem + 1.5vw, 1.6rem); transform: skewX(-3deg); }
.ba-bad {
  text-decoration: underline wavy #ff5d5d;
  text-underline-offset: 3px;
}
.ba-skills-messy { transform: translateX(8px) rotate(-1deg); color: #a89a90; }
.ba-stamp-messy { color: #ff8f8f; font-style: italic; transform: rotate(-2deg); opacity: 0.85; }

/* Divider + handle */
.ba-divider {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos);
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--teal), transparent);
  transform: translateX(-1px);
  z-index: 4;
  pointer-events: none;
}
.ba-handle {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  border: 1px solid var(--teal);
  color: var(--teal);
  box-shadow: 0 0 24px var(--teal-glow);
  display: grid; place-items: center;
  pointer-events: auto;
  cursor: ew-resize;
  touch-action: none;
  transition: transform 0.15s var(--ease-out), box-shadow 0.2s;
}
.ba-handle:hover { box-shadow: 0 0 34px var(--teal-glow); }
.ba-handle:active { transform: translate(-50%, -50%) scale(0.94); }
.ba-handle:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.ba-handle-arrows { font-size: 0.95rem; font-weight: 700; letter-spacing: -1px; }

@media (max-width: 540px) {
  .ba { aspect-ratio: 4 / 5; }
  .ba-line { white-space: normal; }
}

/* --------------------------------------------------------------------------
   SERVICES — bento
   -------------------------------------------------------------------------- */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
.bento-card {
  position: relative;
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  overflow: hidden;
  transition: transform 0.25s var(--ease-out), border-color 0.25s, box-shadow 0.25s;
}
/* subtle teal left-accent, revealed on hover */
.bento-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--teal);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.25s var(--ease-out);
}
.bento-card.anchor { grid-column: span 2; }
.bento-card:hover {
  transform: scale(1.02);
  border-color: var(--teal);
  box-shadow: 0 0 40px var(--teal-dim);
}
.bento-card:hover::before { transform: scaleY(1); }
.bento-icon { font-size: 2rem; }
.bento-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
}
.bento-card p { color: var(--text-muted); font-size: var(--text-base); }

.disclaimer {
  margin-top: var(--space-12);
  font-size: var(--text-sm);
  color: var(--text-faint);
  max-width: 70ch;
  border-left: 2px solid var(--border-strong);
  padding-left: var(--space-4);
}

/* --------------------------------------------------------------------------
   PRICING
   -------------------------------------------------------------------------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  align-items: stretch;
}
.price-card {
  position: relative;
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: transform 0.25s var(--ease-out), border-color 0.25s;
}
.price-card:hover { transform: translateY(-4px); }

.price-card.featured {
  border-color: rgba(201,168,76,0.45);
  overflow: hidden;
}
.price-card.featured::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, var(--gold-dim) 50%, transparent 70%);
  background-size: 250% 100%;
  animation: shimmer 5s linear infinite;
  pointer-events: none;
}
@keyframes shimmer { to { background-position: -250% 0; } }

.price-badge {
  position: absolute; top: var(--space-4); right: var(--space-4);
  background: var(--gold);
  color: #0d0d0f;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px rgba(201,168,76,0.3);
  z-index: 2;
}
.price-name {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.price-amount {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 1.5rem + 3vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
}
.price-amount span { font-size: 0.5em; color: var(--text-muted); }
.price-for { color: var(--text-muted); font-size: var(--text-sm); }
.price-list { display: flex; flex-direction: column; gap: var(--space-2); margin: var(--space-2) 0 var(--space-4); }
.price-list li {
  position: relative; padding-left: var(--space-6);
  font-size: var(--text-sm); color: var(--text);
}
.price-list li::before {
  content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 700;
}
.price-cta { margin-top: auto; justify-content: center; position: relative; z-index: 1; }

/* --------------------------------------------------------------------------
   HOW IT WORKS
   -------------------------------------------------------------------------- */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}
.step-line {
  position: absolute; top: 28px; left: 16%; right: 16%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}
.step { position: relative; text-align: center; }
.step-num {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 1.5rem + 3vw, 3.5rem);
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
  text-shadow: 0 0 40px var(--teal-glow);
  background: var(--bg);
  display: inline-block;
  padding: 0 var(--space-4);
  position: relative; z-index: 1;
}
.step h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-top: var(--space-3);
}
.step p { color: var(--text-muted); margin-top: var(--space-2); }

/* --------------------------------------------------------------------------
   UNDERWATER DIVE — scroll-scrubbed video hero
   Default (no-JS / fallback): one screen tall, poster only.
   JS adds .is-scrub on capable devices and sets --dive-scroll-vh to make the
   section a tall scroll track that pins the sticky stage while scrubbing.
   -------------------------------------------------------------------------- */
.dive {
  position: relative;
  height: 100svh;
  background: #02060c;
}
.dive.is-scrub {
  height: calc(var(--dive-scroll-vh, 300) * 1vh);
}

.dive-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.dive-poster,
.dive-video,
.dive-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.dive-poster {
  background: #02060c url("assets/hero/underwater-poster.svg") center / cover no-repeat;
  z-index: 0;
}

.dive-video {
  object-fit: cover;
  z-index: 1;
  background: transparent;       /* if it errors, the poster behind shows through */
  opacity: 0;                    /* revealed only once metadata is ready */
  transition: opacity 0.6s var(--ease-out);
}
.dive.is-scrub.is-playable .dive-video { opacity: 1; }

.dive-scrim {
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(120% 85% at 50% 16%, rgba(2,6,12,0) 42%, rgba(2,6,12,0.55) 100%),
    linear-gradient(180deg, rgba(2,6,12,0.5) 0%, rgba(2,6,12,0) 28%, rgba(2,6,12,0) 58%, rgba(2,6,12,0.65) 100%);
}

.dive-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 900px;
  padding: var(--space-8) var(--space-4);
  color: #eaf6fb;
}
.dive-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #7fc7d8;
  margin-bottom: var(--space-3);
}
.dive-headline {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.01em;
  text-shadow: 0 6px 44px rgba(0,0,0,0.65);
}
.dive-cue {
  margin-top: var(--space-6);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(234,246,251,0.72);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.dive-cue-dot {
  width: 8px; height: 8px;
  border-radius: var(--radius-full);
  background: #7fc7d8;
  box-shadow: 0 0 12px #7fc7d8;
  animation: dive-pulse 1.8s var(--ease-out) infinite;
}
@keyframes dive-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50%      { opacity: 1;    transform: scale(1.15); }
}

/* Poster-only fallback (mobile / coarse pointer / reduced-motion / no asset):
   no tall scroll track, no video, no scroll cue — just a clean still hero. */
.dive.dive--poster-only { height: 100svh; }
.dive.dive--poster-only .dive-video { display: none; }
.dive.dive--poster-only .dive-cue { display: none; }

@media (prefers-reduced-motion: reduce) {
  .dive-cue-dot { animation: none; }
}

/* --------------------------------------------------------------------------
   CONTACT
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: var(--space-12);
  align-items: start;
}
.contact-form { padding: var(--space-8); margin-top: var(--space-8); display: flex; flex-direction: column; gap: var(--space-4); }
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field label { font-size: var(--text-sm); font-weight: 500; color: var(--text-muted); }
.field input, .field textarea {
  font: inherit;
  font-size: var(--text-base);
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  resize: vertical;
  transition: border-color 0.2s;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-dim);
}
.field .error { font-size: var(--text-xs); color: #ff7a7a; min-height: 1em; }
.field.invalid input, .field.invalid textarea { border-color: #ff7a7a; }
.form-submit { justify-content: center; margin-top: var(--space-2); }
.form-submit:hover { transform: translateY(-2px); box-shadow: 0 10px 30px var(--teal-glow); }

/* Branded confirmation state — shown after a successful submit */
.form-confirm {
  margin-top: var(--space-8);
  padding: var(--space-12) var(--space-8);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  border-color: rgba(0,212,200,0.25);
  animation: confirm-in 0.5s var(--ease-out) both;
}
.form-confirm-check {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: var(--radius-full);
  background: var(--teal-dim);
  color: var(--teal);
  font-size: 1.75rem; font-weight: 700;
  box-shadow: 0 0 30px var(--teal-glow);
}
.form-confirm h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
}
.form-confirm p { color: var(--text-muted); max-width: 36ch; }
@keyframes confirm-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.qr-block {
  margin-top: var(--space-8);
  padding: var(--space-8);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}
.qr-img { background: var(--surface-2); padding: var(--space-3); border-radius: var(--radius-md); }
.qr-img img, .qr-img canvas { border-radius: var(--radius-sm); }
.qr-block p { font-size: var(--text-sm); color: var(--text-muted); }

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.footer { background: var(--surface); border-top: 1px solid var(--border); padding: var(--space-16) 0; }
.footer-inner { display: flex; flex-direction: column; gap: var(--space-6); }
.footer-tag {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--teal);
  margin-top: var(--space-3);
}
.footer-disclaimer { margin-top: 0; }
.footer-copy { font-size: var(--text-sm); color: var(--text-faint); }

/* --------------------------------------------------------------------------
   Scroll reveals (CSS-native)
   -------------------------------------------------------------------------- */
/* No-JS and reduced-motion: everything is visible by default. */
.reveal { opacity: 1; }

/* JS-driven reveals (IntersectionObserver). Hidden state only applies when
   JS is active (html.js) AND the user hasn't asked to reduce motion. */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
  }
  html.js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
  /* Already in the viewport on load → show immediately, no animation. */
  html.js .reveal.is-instant {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 880px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .bento { grid-template-columns: 1fr 1fr; }
  .bento-card.anchor { grid-column: span 2; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .steps { grid-template-columns: 1fr; gap: var(--space-12); }
  .step-line { display: none; }
  .contact-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .qr-block { max-width: 320px; }
}

@media (max-width: 768px) {
  /* services bento collapses to a single stacked column */
  .bento { grid-template-columns: 1fr; }
  .bento-card.anchor { grid-column: span 1; }
  /* primary form action goes full-width for easy thumb tap */
  .form-submit { width: 100%; }
}

@media (max-width: 540px) {
  .section { padding: var(--space-16) 0; }
  .hero-cta-row .btn { flex: 1; justify-content: center; }
  /* hide hero decoration cards on small screens to keep it clean & fast */
  .chaos-field, .clarity-field { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .price-card.featured::before { animation: none; }
  .scroll-chevron { animation: none; }
}
