/* ─── Shared Scroll Animation Styles ─── */

/* Base reveal state */
[data-reveal],
[data-reveal-group] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.05s cubic-bezier(0.22, 1, 0.36, 1),
              transform 1.05s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

/* Visible state */
.reveal-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Phone mockup floating animation */
@keyframes phoneFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.phone-mockup {
  animation: phoneFloat 3.5s ease-in-out infinite;
}

/* Card hover enhancement — applies to existing cards */
.feature-card,
.pricing-card,
.problem-card,
.triangle-node,
.trust-item,
.timeline-body,
.step-body,
.summary-step {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover,
.pricing-card:hover,
.triangle-node:hover,
.trust-item:hover {
  transform: translateY(-5px);
}

.problem-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.15);
  border-color: rgba(230,126,34,0.2);
}

.trust-item:hover {
  box-shadow: 0 16px 40px rgba(0,0,0,0.07);
  border-color: rgba(230,126,34,0.2);
}

/* Summary diagram sequential reveal */
.summary-step,
.summary-arrow {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.95s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.95s cubic-bezier(0.22, 1, 0.36, 1);
}

.summary-step.summary-visible,
.summary-arrow.summary-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stepper sequential activation */
.tracker-step {
  opacity: 0.3;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease, background 0.4s, border-color 0.4s, color 0.4s;
}

.tracker-step.tracker-active {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Nav Policy Dropdown ─── */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid rgba(229,231,235,0.9);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown.open .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown:hover .nav-menu-btn svg,
.nav-dropdown.open .nav-menu-btn svg {
  transform: rotate(180deg);
}
.nav-dropdown-item {
  display: block;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.nav-dropdown-item:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .nav-dropdown:hover .nav-dropdown-panel {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
  }

  .nav-dropdown.open .nav-dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-dropdown:hover .nav-menu-btn svg {
    transform: none;
  }

  .nav-dropdown.open .nav-menu-btn svg {
    transform: rotate(180deg);
  }
}

/* ─── Mobile Sub-Menu Toggle ─── */
.mobile-sub-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 24px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 1px solid rgba(229,231,235,0.6);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.mobile-sub-toggle:hover { background: var(--bg-subtle); color: var(--text-primary); }
.mobile-sub-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}
.mobile-sub-toggle.open svg { transform: rotate(180deg); }
.mobile-sub-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.mobile-sub-list.open { max-height: 300px; }

/* ── Reduced motion: disable everything ── */
@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-reveal-group],
  .summary-step,
  .summary-arrow,
  .tracker-step {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .phone-mockup {
    animation: none !important;
  }

  .feature-card:hover,
  .pricing-card:hover,
  .problem-card:hover,
  .triangle-node:hover,
  .trust-item:hover {
    transform: none !important;
  }
}
