/* ═══ BASE ═══ */
html {
  scroll-behavior: smooth;
}

/* ═══ NAVBAR ═══ */
/* Note: backdrop-filter removed — iOS Safari creates a GPU compositing layer
   for fixed+backdrop-filter elements whose default black texture bleeds into
   content beneath it (especially near -webkit-background-clip:text). Using a
   slightly more opaque solid bg achieves the same readability without the bug. */
#navbar {
  background: rgba(250, 249, 247, 0.95);
}
@media (prefers-color-scheme: dark) {
  #navbar {
    background: rgba(10, 20, 32, 0.95);
  }
}
#navbar.scrolled {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}


/* ═══ HERO SECTION ═══ */
/* Background applied directly to the section (not an absolute child) to avoid
   iOS Safari compositing issues with absolute inset-0 children inside overflow:hidden.
   overflow:hidden also removed from the section — body handles x-clipping. */
.hero-section {
  background: linear-gradient(150deg, #fef8f5 0%, #fde4d4 42%, #fef3ee 80%, #faf9f7 100%);
}
@media (prefers-color-scheme: dark) {
  .hero-section {
    background: linear-gradient(150deg, #0a1420 0%, #0f1d2e 35%, #162435 70%, #0a1420 100%);
  }
}

/* ═══ HERO PHONE ═══ */
.hero-phone-wrapper {
  animation: hero-float 6s ease-in-out infinite;
}

.hero-phone {
  position: relative;
  width: 280px;
  height: 570px;
}

@media (min-width: 640px) {
  .hero-phone {
    width: 320px;
    height: 652px;
  }
}

@media (min-width: 1024px) {
  .hero-phone {
    width: 340px;
    height: 693px;
  }
}

/* Screenshot carousel inside hero phone */
.phone-screenshot-carousel {
  position: absolute;
  inset: 3.2%;
  border-radius: 8% 8% 12% 12% / 4.5% 4.5% 6% 6%;
  overflow: hidden;
  z-index: 1;
  background: #0a1420;
}

.carousel-slide {
  position: absolute;
  top: 52px;
  left: 0;
  width: 100%;
  height: calc(100% - 52px);
  object-fit: cover;
  object-position: top;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

/* iPhone frame overlay - sits on top */
.phone-frame-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* Floating animation — rotateX/rotateY removed: caused iOS Safari compositing
   black-box artifact (3D transforms on animated elements bleed to parent origin) */
@keyframes hero-float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

/* ═══ FEATURE PHONE MOCKUPS ═══ */
.feature-phone {
  position: relative;
  width: 260px;
  height: 530px;
}

@media (min-width: 640px) {
  .feature-phone {
    width: 300px;
    height: 612px;
  }
}

@media (min-width: 1024px) {
  .feature-phone {
    width: 320px;
    height: 652px;
  }
}

.feature-phone-screen {
  position: absolute;
  inset: 3.2%;
  border-radius: 12% / 6%;
  overflow: hidden;
  z-index: 1;
  object-fit: cover;
  object-position: top;
  width: 93.6%;
  height: 93.6%;
}

/* ═══ MARQUEE ═══ */
.marquee {
  display: flex;
  overflow: hidden;
  position: relative;
}
.marquee::before,
.marquee::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 1;
  pointer-events: none;
}
.marquee::before {
  left: 0;
  background: linear-gradient(to right, #faf9f7, transparent);
}
.marquee::after {
  right: 0;
  background: linear-gradient(to left, #faf9f7, transparent);
}
@media (prefers-color-scheme: dark) {
  .marquee::before {
    background: linear-gradient(to right, #0a1420, transparent);
  }
  .marquee::after {
    background: linear-gradient(to left, #0a1420, transparent);
  }
}
.marquee-track {
  display: flex;
  gap: 12px;
  animation: marquee-scroll 40s linear infinite;
  padding: 8px 0;
}
.pill,
.pill-accent {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
}
.pill {
  color: #675c53;
  background: #f0eeea;
  border: 1px solid #e0dbd3;
}
.pill-accent {
  color: #de390b;
  background: #fef3ee;
  border: 1px solid #fde4d4;
}
@media (prefers-color-scheme: dark) {
  .pill {
    color: #c5d6e8;
    background: #1e3048;
    border-color: #2a4060;
  }
  .pill-accent {
    color: #f69e71;
    background: #1e3048;
    border-color: #2a4060;
  }
}
@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ═══ FEATURE BADGE ═══ */
.feature-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

/* ═══ SMART CARDS ═══ */
.smart-card {
  background: rgba(50, 22, 12, 0.55);
  border: 1px solid rgba(110, 48, 22, 0.35);
  border-radius: 20px;
  padding: 28px;
  transition: all 0.3s ease;
}
.smart-card:hover {
  background: rgba(65, 28, 15, 0.85);
  border-color: rgba(140, 60, 28, 0.55);
  transform: translateY(-2px);
}

/* ═══ TRUST CARDS ═══ */
.trust-card {
  background: white;
  border-radius: 20px;
  padding: 32px 24px;
  border: 1px solid #f0eeea;
  transition: all 0.3s ease;
}
.trust-card:hover {
  border-color: #e0dbd3;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}
@media (prefers-color-scheme: dark) {
  .trust-card {
    background: #162435;
    border-color: #1e3048;
  }
  .trust-card:hover {
    border-color: #2a4060;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  }
}

/* ═══ PRICING CARDS ═══ */
.pricing-card {
  transition: all 0.3s ease;
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}
@media (prefers-color-scheme: dark) {
  .pricing-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  }
}

/* ═══ FADE-IN + SLIDE ANIMATIONS ═══ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.slide-left {
  transform: translateX(-40px) translateY(0);
}

.fade-in.slide-right {
  transform: translateX(40px) translateY(0);
}

.fade-in.visible {
  opacity: 1;
  transform: translateX(0) translateY(0);
}

/* Stagger children */
.fade-in.visible:nth-child(2) {
  transition-delay: 0.15s;
}
.fade-in.visible:nth-child(3) {
  transition-delay: 0.3s;
}

/* Smart card stagger */
.smart-card.fade-in.visible:nth-child(1) { transition-delay: 0s; }
.smart-card.fade-in.visible:nth-child(2) { transition-delay: 0.1s; }
.smart-card.fade-in.visible:nth-child(3) { transition-delay: 0.2s; }
.smart-card.fade-in.visible:nth-child(4) { transition-delay: 0.3s; }
.smart-card.fade-in.visible:nth-child(5) { transition-delay: 0.4s; }
.smart-card.fade-in.visible:nth-child(6) { transition-delay: 0.5s; }

/* ═══ PROSE CONTENT (legal pages) ═══ */
.prose-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: #554c45;
}
.prose-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  color: #675c53;
}
.prose-content p {
  margin-bottom: 0.75rem;
  line-height: 1.7;
  color: #7d6e61;
}
.prose-content ul {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  list-style: disc;
}
.prose-content li {
  margin-bottom: 0.35rem;
  line-height: 1.6;
  color: #7d6e61;
}
@media (prefers-color-scheme: dark) {
  .prose-content h2 { color: #e4ecf4; }
  .prose-content h3 { color: #c5d6e8; }
  .prose-content p,
  .prose-content li { color: #9ab5d4; }
}

/* ═══ COMPARISON TABLE ═══ */
.comparison-cat-rows .cmp-alt {
  background: rgba(250, 249, 247, 0.4);
}
@media (prefers-color-scheme: dark) {
  .comparison-cat-rows .cmp-alt {
    background: rgba(15, 29, 46, 0.4);
  }
}

.cmp-dash {
  color: #cbc3b6;
  font-weight: 500;
  letter-spacing: 0.05em;
}
@media (prefers-color-scheme: dark) {
  .cmp-dash {
    color: #2a4060;
  }
}

.cmp-check {
  font-size: 0.9rem;
  font-weight: 700;
}

/* ═══ PRICING TOGGLE ═══ */
#pricing-toggle.active {
  background-color: #ed5115;
}
#pricing-toggle.active #toggle-thumb {
  transform: translateX(24px);
}

/* ═══ PHONE STATUS BAR ═══ */
.phone-status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px 6px 36px;
  z-index: 5;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.45);
}
.phone-status-bar .status-time {
  font-size: 15px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.4px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}
.phone-status-bar .status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}
.phone-status-bar .battery-pct {
  font-size: 12px;
  font-weight: 600;
  color: white;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

/* ═══ FEATURE PHONE SCREEN WRAP ═══ */
.feature-phone-screen-wrap {
  position: absolute;
  inset: 3.2%;
  border-radius: 8% 8% 12% 12% / 4.5% 4.5% 6% 6%;
  overflow: hidden;
  z-index: 1;
  background: #0a1420;
  padding-top: 52px;
}
.feature-phone-screen-wrap > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 767px) {
  .hero-phone {
    width: 260px;
    height: 530px;
  }
}

/* ═══ DISPLAY FONT — Plus Jakarta Sans on all headings ═══ */
h1, h2 {
  font-family: 'Plus Jakarta Sans', Inter, system-ui, -apple-system, sans-serif;
}

/* ═══ WARM DARK SECTION ═══ */
.warm-dark-section {
  background: linear-gradient(135deg, #1c0d08 0%, #261209 50%, #1c0d08 100%);
}

/* ═══ JOURNEY MODE SECTION ═══ */
.journey-mode-section {
  background: linear-gradient(160deg, #120a02 0%, #2c1204 35%, #1f0e04 65%, #100802 100%);
}

/* ═══ BLUR-FREE GLOW ORBS ═══ */
/* All filter:blur() decorative orbs replaced with radial-gradient backgrounds.
   iOS Safari promotes blur() elements to GPU compositing layers that render with
   a black default texture before painting — visible as black boxes. Radial gradients
   achieve the same soft-glow appearance without any compositing layer promotion. */

.hero-orb-tr {
  background: radial-gradient(circle, rgba(246,158,113,0.30) 0%, transparent 65%);
}
@media (prefers-color-scheme: dark) {
  .hero-orb-tr {
    background: radial-gradient(circle, rgba(237,81,21,0.15) 0%, transparent 65%);
  }
}

.hero-orb-bl {
  background: radial-gradient(circle, rgba(250,197,168,0.40) 0%, transparent 65%);
}
@media (prefers-color-scheme: dark) {
  .hero-orb-bl {
    background: radial-gradient(circle, rgba(237,81,21,0.10) 0%, transparent 65%);
  }
}

.journey-orb-amber {
  background: radial-gradient(circle, rgba(245,158,11,0.10) 0%, transparent 65%);
}
.journey-orb-orange {
  background: radial-gradient(circle, rgba(234,88,12,0.10) 0%, transparent 65%);
}
.journey-orb-center {
  background: radial-gradient(circle, rgba(244,63,94,0.07) 0%, transparent 65%);
}

.smart-orb-primary {
  background: radial-gradient(circle, rgba(237,81,21,0.18) 0%, transparent 65%);
}
.smart-orb-amber {
  background: radial-gradient(circle, rgba(245,158,11,0.18) 0%, transparent 65%);
}
.smart-orb-rose {
  background: radial-gradient(circle, rgba(251,113,133,0.18) 0%, transparent 65%);
}

.cta-orb-center {
  background: radial-gradient(circle, rgba(250,197,168,0.45) 0%, transparent 65%);
}
@media (prefers-color-scheme: dark) {
  .cta-orb-center {
    background: radial-gradient(circle, rgba(237,81,21,0.15) 0%, transparent 65%);
  }
}

/* ═══ SPARKLE ICONS ═══ */
/* Opacity-only animation: avoids GPU compositing layers that transform animations
   force on iOS Safari. Each transform animation = new compositing layer = black
   initialization texture that can bleed through on WebKit. */
.sparkle-icon {
  position: absolute;
  pointer-events: none;
  opacity: var(--op, 0.75);
  animation: sparkle-pulse 4s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  z-index: 0;
}

@keyframes sparkle-pulse {
  0%, 100% { opacity: var(--op, 0.75); }
  50%       { opacity: 1; }
}
