/* ============================================
   HAVEN CITY DIGITAL — Animations & Motion
   Scroll-driven reveals, keyframes, demos
   ============================================ */

/* ======= @PROPERTY for animated gradients ======= */
@property --gradient-angle {
  syntax: '<angle>';
  initial-value: 135deg;
  inherits: false;
}

@property --gradient-pos {
  syntax: '<percentage>';
  initial-value: 0%;
  inherits: false;
}

/* ======= HERO GRADIENT BACKGROUND ======= */
.hero-gradient {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: 
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(0,191,255,0.15), transparent),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(0,102,255,0.08), transparent),
    radial-gradient(ellipse 50% 50% at 20% 60%, rgba(0,191,255,0.06), transparent);
  animation: gradientShift 12s ease-in-out infinite;
  pointer-events: none;
}

@keyframes gradientShift {
  0%, 100% {
    --gradient-angle: 135deg;
    opacity: 1;
  }
  33% {
    --gradient-angle: 200deg;
    opacity: 0.8;
  }
  66% {
    --gradient-angle: 80deg;
    opacity: 1;
  }
}

/* Animated gradient orbs */
.hero-gradient::before,
.hero-gradient::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.hero-gradient::before {
  width: 600px;
  height: 600px;
  top: -200px;
  left: -100px;
  background: rgba(0,191,255,0.12);
  animation: orbFloat1 15s ease-in-out infinite;
}

.hero-gradient::after {
  width: 400px;
  height: 400px;
  bottom: -100px;
  right: -50px;
  background: rgba(0,102,255,0.1);
  animation: orbFloat2 18s ease-in-out infinite;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, 40px) scale(1.1); }
  66% { transform: translate(-30px, 20px) scale(0.95); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, -30px) scale(1.05); }
}

/* ======= HERO WORD REVEAL ======= */
.hero-word {
  display: inline-block;
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  animation: wordReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-word:nth-child(1) { animation-delay: 0.1s; }
.hero-word:nth-child(2) { animation-delay: 0.2s; }
.hero-word:nth-child(3) { animation-delay: 0.3s; }
.hero-word:nth-child(4) { animation-delay: 0.4s; }

@keyframes wordReveal {
  to {
    opacity: 1;
    clip-path: inset(0 0% 0 0);
  }
}

.hero-sub-reveal {
  opacity: 0;
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

.hero-actions-reveal {
  opacity: 0;
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}

.hero-trust-reveal {
  opacity: 0;
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 1s forwards;
}

@keyframes fadeUp {
  to { opacity: 1; }
}

/* ======= SCROLL REVEAL — Opacity + Clip-path (No translateY per spec) ======= */
.reveal {
  opacity: 1;
}

/* JS Fallback: add .reveal--hidden then .reveal--visible */
.reveal--hidden {
  opacity: 0;
  clip-path: inset(8% 0 0 0);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), clip-path 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal--visible {
  opacity: 1;
  clip-path: inset(0 0 0 0);
}

/* Staggered children */
.reveal-stagger > * {
  opacity: 1;
}

.reveal-stagger--hidden > * {
  opacity: 0;
  clip-path: inset(8% 0 0 0);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), clip-path 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stagger--visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger--visible > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger--visible > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger--visible > *:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger--visible > *:nth-child(5) { transition-delay: 0.32s; }
.reveal-stagger--visible > *:nth-child(6) { transition-delay: 0.4s; }

.reveal-stagger--visible > * {
  opacity: 1;
  clip-path: inset(0 0 0 0);
}

/* ======= CSS Scroll-Driven Animations (Progressive Enhancement) ======= */
@supports (animation-timeline: view()) {
  .scroll-reveal {
    opacity: 0;
    clip-path: inset(10% 0 0 0);
    animation: scrollFadeIn linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 80%;
  }
  
  @keyframes scrollFadeIn {
    to {
      opacity: 1;
      clip-path: inset(0 0 0 0);
    }
  }

  .scroll-reveal-left {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    animation: scrollRevealLeft linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 80%;
  }

  @keyframes scrollRevealLeft {
    to {
      opacity: 1;
      clip-path: inset(0 0 0 0);
    }
  }

  .scroll-reveal-right {
    opacity: 0;
    clip-path: inset(0 0 0 100%);
    animation: scrollRevealRight linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 80%;
  }

  @keyframes scrollRevealRight {
    to {
      opacity: 1;
      clip-path: inset(0 0 0 0);
    }
  }
}

/* ======= PHONE RING VIBRATION ======= */
@keyframes phoneRing {
  0%, 100% { transform: rotate(0deg); }
  5% { transform: rotate(15deg); }
  10% { transform: rotate(-12deg); }
  15% { transform: rotate(10deg); }
  20% { transform: rotate(-8deg); }
  25% { transform: rotate(5deg); }
  30% { transform: rotate(0deg); }
}

.phone-ring {
  animation: phoneRing 1.5s ease-in-out infinite;
  transform-origin: 50% 50%;
}

.phone-ring--paused {
  animation-play-state: paused;
}

/* Phone vibrate (faster, more urgent) */
@keyframes phoneVibrate {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  10% { transform: translate(-2px, 1px) rotate(-2deg); }
  20% { transform: translate(2px, -1px) rotate(2deg); }
  30% { transform: translate(-1px, 2px) rotate(-1deg); }
  40% { transform: translate(1px, -2px) rotate(1deg); }
  50% { transform: translate(-2px, 0) rotate(-2deg); }
  60% { transform: translate(2px, 1px) rotate(2deg); }
  70% { transform: translate(-1px, -1px) rotate(-1deg); }
  80% { transform: translate(1px, 2px) rotate(1deg); }
  90% { transform: translate(0, -1px) rotate(0deg); }
}

.phone-vibrate {
  animation: phoneVibrate 0.4s linear infinite;
}

/* ======= RING TEXT ANIMATION ======= */
@keyframes ringTextPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.ring-text {
  display: inline-block;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ring-text--visible {
  opacity: 1;
  animation: ringTextPulse 1s ease-in-out infinite;
}

.ring-text--faded {
  opacity: 0.3;
  animation: none;
}

/* ======= TYPING CURSOR ======= */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--color-primary);
  margin-left: 2px;
  animation: blink 0.8s step-end infinite;
  vertical-align: text-bottom;
}

.typing-cursor--hidden {
  opacity: 0;
}

/* ======= COUNT-UP NUMBERS ======= */
.count-up {
  font-variant-numeric: tabular-nums lining-nums;
}

/* ======= PULSE EFFECTS ======= */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,191,255,0.3); }
  50% { box-shadow: 0 0 20px 4px rgba(0,191,255,0.15); }
}

.pulse-glow {
  animation: pulseGlow 2.5s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.dot-pulse {
  animation: dotPulse 1.5s ease-in-out infinite;
}

/* Green success pulse */
@keyframes successPulse {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  70% { box-shadow: 0 0 0 12px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

.success-pulse {
  animation: successPulse 1.5s ease-out infinite;
}

/* ======= PROBLEM SECTION — Scroll Sequence ======= */
.problem-scene {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-8);
}

.problem-phone-wrapper {
  position: relative;
  width: 200px;
  height: 360px;
}

.problem-phone {
  width: 100%;
  height: 100%;
  background: var(--color-surface-2);
  border: 2px solid var(--color-border);
  border-radius: 32px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-4);
}

.problem-phone__notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 24px;
  background: var(--color-surface);
  border-radius: 0 0 16px 16px;
}

.problem-phone__screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-8) var(--space-4);
  text-align: center;
  width: 100%;
  height: 100%;
}

.problem-phone__caller-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.problem-phone__caller-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.problem-phone__status {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Ring pulse waves around phone */
.ring-wave {
  position: absolute;
  inset: -20px;
  border: 2px solid rgba(0,191,255,0.2);
  border-radius: 40px;
  opacity: 0;
}

.ring-wave--active {
  animation: ringWave 2s ease-out infinite;
}

.ring-wave:nth-child(2) {
  animation-delay: 0.5s;
}

.ring-wave:nth-child(3) {
  animation-delay: 1s;
}

@keyframes ringWave {
  0% { 
    opacity: 0.6; 
    inset: -10px; 
  }
  100% { 
    opacity: 0; 
    inset: -50px; 
  }
}

/* Problem sequence text */
.problem-sequence {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.problem-text {
  font-size: var(--text-xl);
  font-weight: 700;
  text-align: center;
  opacity: 0;
  transition: opacity 0.5s ease;
  line-height: 1.3;
}

.problem-text--visible {
  opacity: 1;
}

.problem-text--ring {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: 0.1em;
}

.problem-text--voicemail {
  color: var(--color-accent-orange);
}

.problem-text--lost {
  color: var(--color-accent-red);
}

/* Stats row in problem section */
.problem-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  width: 100%;
  max-width: 800px;
  margin-top: var(--space-12);
}

@media (max-width: 640px) {
  .problem-stats {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

.problem-stat {
  text-align: center;
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.problem-stat__number {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-accent-red);
  font-variant-numeric: tabular-nums;
}

.problem-stat__label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}

/* ======= BEFORE / AFTER COMPARISON ======= */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  max-width: 1000px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .compare-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

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

.compare-col--before {
  --col-accent: var(--color-accent-red);
}

.compare-col--after {
  --col-accent: var(--color-primary);
}

.compare-header {
  font-size: var(--text-lg);
  font-weight: 700;
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--col-accent);
  color: var(--col-accent);
}

.compare-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  opacity: 1;
}

.compare-item--hidden {
  opacity: 0;
  clip-path: inset(10% 0 0 0);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), clip-path 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.compare-item--visible {
  opacity: 1;
  clip-path: inset(0 0 0 0);
}

.compare-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  margin-top: 2px;
}

.compare-col--before .compare-icon {
  background: rgba(239,68,68,0.15);
  color: var(--color-accent-red);
}

.compare-col--after .compare-icon {
  background: rgba(0,191,255,0.15);
  color: var(--color-primary);
}

.compare-col--after .compare-item {
  border-color: rgba(0,191,255,0.15);
}

.compare-item__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.compare-item__text strong {
  color: var(--color-text);
  font-weight: 600;
}

/* ======= DEMO SECTION — Phone/SMS/Email Mockups ======= */
.demo-tabs {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}

.demo-tab {
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  cursor: pointer;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.demo-tab:hover,
.demo-tab:active {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.demo-tab--active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.demo-tab--active:hover {
  color: #fff;
}

.demo-panel {
  display: none;
}

.demo-panel--active {
  display: block;
}

/* Phone mockup */
.phone-mockup {
  width: 320px;
  max-width: 100%;
  margin: 0 auto;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: 36px;
  padding: var(--space-3);
  position: relative;
  overflow: hidden;
}

.phone-mockup__notch {
  width: 120px;
  height: 28px;
  background: var(--color-bg);
  border-radius: 0 0 18px 18px;
  margin: 0 auto var(--space-3);
}

.phone-mockup__screen {
  background: var(--color-bg);
  border-radius: 24px;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.phone-mockup__header {
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.phone-mockup__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 14px;
}

.phone-mockup__name {
  font-size: var(--text-sm);
  font-weight: 600;
}

.phone-mockup__subtitle {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Conversation bubbles */
.conversation {
  flex: 1;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  overflow-y: auto;
}

.msg {
  max-width: 80%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  line-height: 1.5;
  opacity: 0;
  clip-path: inset(20% 0 0 0);
  transition: opacity 0.4s ease, clip-path 0.4s ease;
}

.msg--visible {
  opacity: 1;
  clip-path: inset(0 0 0 0);
}

.msg--incoming {
  background: var(--color-surface-2);
  color: var(--color-text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.msg--outgoing {
  background: var(--color-primary);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.msg--system {
  align-self: center;
  background: var(--color-primary-dim);
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: var(--space-1) var(--space-4);
}

/* Email mockup */
.email-mockup {
  max-width: 600px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.email-mockup__toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-border);
}

.email-mockup__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border);
}

.email-mockup__dot:nth-child(1) { background: #ff5f57; }
.email-mockup__dot:nth-child(2) { background: #ffbd2e; }
.email-mockup__dot:nth-child(3) { background: #28c840; }

.email-mockup__content {
  padding: var(--space-6);
}

.email-mockup__header {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.email-mockup__field {
  display: flex;
  gap: var(--space-3);
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
}

.email-mockup__label {
  font-weight: 600;
  color: var(--color-text-muted);
  min-width: 50px;
}

.email-mockup__value {
  color: var(--color-text);
}

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

.email-mockup__body p {
  margin-bottom: var(--space-3);
}

/* ======= PERSONALITY CARDS ======= */
.personality-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  max-width: 1100px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .personality-cards {
    grid-template-columns: 1fr;
  }
}

.personality-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.personality-card:hover,
.personality-card:active {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
}

.personality-card__badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

.personality-card--professional .personality-card__badge {
  background: rgba(100,149,237,0.15);
  color: #6495ed;
}

.personality-card--friendly .personality-card__badge {
  background: rgba(34,197,94,0.15);
  color: #22c55e;
}

.personality-card--closer .personality-card__badge {
  background: rgba(255,145,0,0.15);
  color: #ff9100;
}

.personality-card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.personality-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
  line-height: 1.6;
}

.personality-card__sample {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.6;
  font-style: italic;
  border-left: 3px solid var(--color-border);
}

.personality-card--professional .personality-card__sample {
  border-left-color: #6495ed;
}

.personality-card--friendly .personality-card__sample {
  border-left-color: #22c55e;
}

.personality-card--closer .personality-card__sample {
  border-left-color: #ff9100;
}

/* Expanded state */
.personality-card__expanded {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  opacity: 0;
}

.personality-card.expanded .personality-card__expanded {
  max-height: 600px;
  opacity: 1;
  margin-top: var(--space-4);
}

.personality-card__expand-label {
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: 600;
  margin-top: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.personality-card__expand-label::after {
  content: '→';
  transition: transform var(--transition-fast);
}

.personality-card.expanded .personality-card__expand-label::after {
  transform: rotate(90deg);
}

/* ======= PRICING SECTION ANIMATION ======= */
.pricing-anchor {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
}

.pricing-anchor s {
  color: var(--color-accent-red);
  font-weight: 600;
}

/* ======= HOW IT WORKS — 3 Steps ======= */
.steps-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}

@media (max-width: 768px) {
  .steps-container {
    flex-direction: column;
    align-items: center;
    gap: var(--space-8);
  }
}

.step-card {
  flex: 1;
  max-width: 300px;
  text-align: center;
  padding: var(--space-6);
  position: relative;
}

.step-card__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-primary-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-5);
  color: var(--color-primary);
  position: relative;
}

.step-card__number {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
  font-family: var(--font-mono);
}

.step-card__title {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

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

/* Connector line between steps */
.step-connector {
  width: 80px;
  min-width: 40px;
  height: 2px;
  background: var(--color-border);
  margin-top: 52px;
  position: relative;
  overflow: hidden;
}

.step-connector__fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: var(--color-primary);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.step-connector__fill--animated {
  width: 100%;
}

@media (max-width: 768px) {
  .step-connector {
    width: 2px;
    height: 40px;
    margin-top: 0;
  }
  .step-connector__fill {
    width: 100%;
    height: 0;
  }
  .step-connector__fill--animated {
    height: 100%;
  }
}

/* SVG icon draw animation */
.icon-draw path,
.icon-draw circle,
.icon-draw line,
.icon-draw polyline,
.icon-draw rect {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.icon-draw--animated path,
.icon-draw--animated circle,
.icon-draw--animated line,
.icon-draw--animated polyline,
.icon-draw--animated rect {
  stroke-dashoffset: 0;
}

/* ======= MULTI-STEP FORM ======= */
.form-container {
  max-width: 640px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
}

@media (max-width: 640px) {
  .form-container {
    padding: var(--space-6) var(--space-4);
    border-radius: var(--radius-lg);
  }
}

.form-progress {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}

.form-progress__step {
  flex: 1;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--color-border);
  transition: background 0.3s ease;
}

.form-progress__step--active {
  background: var(--color-primary);
}

.form-progress__step--complete {
  background: var(--color-accent-green);
}

.form-step {
  display: none;
}

.form-step--active {
  display: block;
  animation: formStepIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes formStepIn {
  from {
    opacity: 0;
    clip-path: inset(0 0 0 5%);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}

.form-step__title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-6);
}

.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.form-input,
.form-select {
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  color: var(--color-text);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  -webkit-appearance: none;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-dim);
}

.form-input::placeholder {
  color: var(--color-text-faint);
}

/* Button-style options */
.form-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.form-option {
  min-height: 48px;
  padding: var(--space-2) var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
  display: inline-flex;
  align-items: center;
}

.form-option:hover,
.form-option:active {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.form-option--selected {
  border-color: var(--color-primary);
  background: var(--color-primary-dim);
  color: var(--color-primary);
  font-weight: 600;
}

/* Checkbox options */
.form-checkbox {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.form-checkbox:hover,
.form-checkbox:active {
  border-color: var(--color-primary);
}

.form-checkbox--selected {
  border-color: var(--color-primary);
  background: var(--color-primary-dim);
  color: var(--color-primary);
}

.form-checkbox__box {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--color-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.form-checkbox--selected .form-checkbox__box {
  border-color: var(--color-primary);
  background: var(--color-primary);
}

/* Radio cards */
.form-radio-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

@media (max-width: 640px) {
  .form-radio-cards {
    grid-template-columns: 1fr;
  }
}

.form-radio-card {
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
  min-height: 48px;
}

.form-radio-card:hover,
.form-radio-card:active {
  border-color: var(--color-primary);
}

.form-radio-card--selected {
  border-color: var(--color-primary);
  background: var(--color-primary-dim);
}

.form-radio-card__emoji {
  font-size: 28px;
  margin-bottom: var(--space-2);
}

.form-radio-card__title {
  font-size: var(--text-sm);
  font-weight: 700;
}

.form-radio-card__desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* Form navigation */
.form-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.form-nav .btn {
  min-height: 48px;
}

/* ======= SUCCESS / CONFETTI ======= */
.form-success {
  text-align: center;
  padding: var(--space-8) var(--space-4);
}

.form-success__icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(34,197,94,0.15);
  color: #22c55e;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-6);
  animation: successBounce 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes successBounce {
  0% { opacity: 0; transform: scale(0.3); }
  50% { transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}

.form-success__title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-3);
}

.form-success__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Confetti canvas */
.confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1000;
}

/* ======= FINAL CTA ======= */
.final-cta {
  text-align: center;
  padding: clamp(var(--space-16), 10vw, var(--space-32)) 0;
  position: relative;
}

.final-cta__headline {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-6);
}

.final-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

/* ======= MOBILE NAV OVERLAY ======= */
.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(10,10,15,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-overlay--active {
  opacity: 1;
  pointer-events: all;
}

.mobile-overlay a {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}

.mobile-overlay a:hover,
.mobile-overlay a:active {
  color: var(--color-primary);
}

.mobile-overlay__close {
  position: absolute;
  top: var(--space-5);
  right: var(--space-5);
  color: var(--color-text);
  padding: var(--space-3);
  min-width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Locations dropdown */
.nav__dropdown {
  position: relative;
}

.nav__dropdown-trigger {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  cursor: pointer;
}

.nav__dropdown-menu {
  position: absolute;
  top: calc(100% + var(--space-2));
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2);
  min-width: 180px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 50;
}

.nav__dropdown:hover .nav__dropdown-menu,
.nav__dropdown--open .nav__dropdown-menu {
  opacity: 1;
  pointer-events: all;
}

.nav__dropdown-menu a {
  display: block;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  min-height: 40px;
  display: flex;
  align-items: center;
}

.nav__dropdown-menu a:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
}

/* ======= DEMO REPLAY BUTTON ======= */
.demo-replay {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-dim);
  cursor: pointer;
  min-height: 40px;
  transition: background var(--transition-fast);
}

.demo-replay:hover,
.demo-replay:active {
  background: rgba(0,191,255,0.2);
}

.demo-replay svg {
  width: 14px;
  height: 14px;
}

/* ======= REDUCED MOTION ======= */
@media (prefers-reduced-motion: reduce) {
  .hero-gradient,
  .hero-gradient::before,
  .hero-gradient::after {
    animation: none;
  }

  .hero-word {
    opacity: 1;
    clip-path: none;
    animation: none;
  }

  .hero-sub-reveal,
  .hero-actions-reveal,
  .hero-trust-reveal {
    opacity: 1;
    animation: none;
  }

  .phone-ring,
  .phone-vibrate,
  .ring-text--visible,
  .dot-pulse,
  .pulse-glow,
  .success-pulse,
  .typing-cursor {
    animation: none;
  }

  .reveal--hidden,
  .reveal-stagger--hidden > *,
  .compare-item--hidden,
  .msg {
    opacity: 1;
    clip-path: none;
    transition: none;
  }

  .icon-draw path,
  .icon-draw circle,
  .icon-draw line,
  .icon-draw polyline,
  .icon-draw rect {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
    transition: none;
  }

  .form-step--active {
    animation: none;
  }
}

/* ======= CALL BAR — Persistent Call CTA ======= */
.call-bar {
  margin-top: var(--space-4);
  padding-top: var(--space-2);
}

.call-bar__divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.call-bar__divider::before,
.call-bar__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.call-bar__divider span {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.call-bar__hint {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
  margin-top: var(--space-3);
  line-height: 1.5;
  transition: color 0.3s ease;
}

.btn--disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.btn--disabled:hover {
  transform: none;
}

/* When enabled, the call button glows */
[data-call-now]:not(.btn--disabled) {
  animation: callPulse 2s ease-in-out infinite;
}

@keyframes callPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 191, 255, 0.4); }
  50% { box-shadow: 0 0 20px 4px rgba(0, 191, 255, 0.15); }
}

/* Form section special styling when near top */
.section--form {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}
