/* ── Design tokens ───────────────────────────────────────── */
:root {
  --bg:          #0A0A0A;
  --bg-card:     #111111;
  --bg-card2:    #161616;
  --amber:       #F59E0B;
  --amber-dim:   rgba(245,158,11,0.12);
  --amber-glow:  rgba(245,158,11,0.35);
  --gold:        #FFD700;
  --white:       #FFFFFF;
  --muted:       #888888;
  --border:      rgba(255,255,255,0.08);
  --border-amber:rgba(245,158,11,0.3);
  --glass:       rgba(255,255,255,0.04);
  --glass-hover: rgba(255,255,255,0.07);
  --radius:      16px;
  --radius-lg:   24px;
  --font-head:   'Space Grotesk', sans-serif;
  --font-body:   'DM Sans', sans-serif;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  color-scheme: dark;
  max-width: 100%;
  overflow-x: hidden;
}
body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
}
img, video, canvas { display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }

/* ── Typography ──────────────────────────────────────────── */
h1,h2,h3,h4,h5 {
  font-family: var(--font-head);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.display {
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.headline {
  font-size: clamp(1.9rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.subhead {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  color: var(--muted);
  line-height: 1.7;
  font-weight: 400;
}
.label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
}
.gradient-text {
  background: linear-gradient(125deg, var(--amber) 0%, var(--gold) 60%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.8rem 1.8rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 100px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.btn-primary {
  background: var(--amber);
  color: #000;
}
.btn-primary:hover {
  background: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 10px 35px var(--amber-glow);
}
.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--amber);
  background: var(--amber-dim);
  transform: translateY(-2px);
}
.btn-lg { padding: 1rem 2.2rem; font-size: 1rem; }

/* ── Layout ──────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section {
  padding: 6rem 0;
  position: relative;
}

/* ── Section tag pill ────────────────────────────────────── */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.85rem;
  background: var(--amber-dim);
  border: 1px solid var(--border-amber);
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.25rem;
}

/* ── Glass card ──────────────────────────────────────────── */
.glass-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}
.glass-card:hover {
  border-color: var(--border-amber);
  background: var(--glass-hover);
}

/* ── Dividers ────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 30%, var(--border) 70%, transparent);
}

/* ── Utility ─────────────────────────────────────────────── */
.text-amber { color: var(--amber); }
.text-gold  { color: var(--gold);  }
.text-muted { color: var(--muted); }
.text-center{ text-align: center;  }
.flex-center{ display: flex; align-items: center; justify-content: center; }
.flex-col   { flex-direction: column; }

/* ── Marquee animation ───────────────────────────────────── */
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }

/* ── Glow pulse ──────────────────────────────────────────── */
@keyframes glow-pulse {
  0%,100% { box-shadow: 0 0 20px var(--amber-glow); }
  50%     { box-shadow: 0 0 45px var(--amber-glow), 0 0 80px rgba(245,158,11,0.15); }
}
.glow-pulse { animation: glow-pulse 3s ease-in-out infinite; }

/* ── Scroll bar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--amber); }

/* ── Selection ───────────────────────────────────────────── */
::selection { background: var(--amber-dim); color: var(--amber); }

/* ── Float animation ─────────────────────────────────────── */
@keyframes float {
  0%,100% { transform: translateY(0px) rotate(0deg); }
  50%     { transform: translateY(-14px) rotate(1deg); }
}

/* ── Shimmer skeleton ────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

/* ── Mobile sticky bar ── */
@media (min-width: 769px) {
  .mobile-sticky-bar { display: none !important; }
}
@media (max-width: 768px) {
  main { padding-bottom: 80px; }
}

/* ── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ════════════════════════════════════════════════════════════
   GLOBAL MOBILE RESPONSIVE — 768px and below
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Layout */
  .section { padding: 3.5rem 0; }
  .container { padding: 0 1.1rem; }

  /* Typography scale-down */
  .display  { font-size: clamp(2rem, 9vw, 3rem); }
  .headline { font-size: clamp(1.6rem, 7vw, 2.4rem); }
  .subhead  { font-size: 0.97rem; }

  /* Buttons — stack vertically and go full width on very small screens */
  .btn-lg { padding: 0.9rem 1.6rem; font-size: 0.92rem; }

  /* FAQ grid: sticky sidebar → stacked */
  .faq-grid { grid-template-columns: 1fr !important; gap: 2rem !important; }
  .faq-grid > *:first-child { position: static !important; }

  /* Problem comparison: stack on mobile */
  .problem-grid { grid-template-columns: 1fr !important; }

  /* Hide floating WhatsApp button — sticky bar covers it on mobile */
  .whatsapp-float { display: none !important; }

  /* ROI cards: 3-col → 1-col */
  .roi-grid { grid-template-columns: 1fr !important; }

  /* Viewfinder: hide all camera HUD on mobile */
  .viewfinder-hide-mobile { display: none !important; }
}

@media (max-width: 480px) {
  .section { padding: 2.8rem 0; }
  .container { padding: 0 0.9rem; }
  .btn { white-space: normal; text-align: center; }
}

/* ════════════════════════════════════════════════════════════
   PHASE 4 — VIEWFINDER SLIDESHOW MODE
   ════════════════════════════════════════════════════════════ */

/* HUD height variables — overridden on mobile */
:root {
  --slide-nav-h:  60px;
  --slide-ctrl-h: 56px;
}

/* Lock scroll when slideshow is active — use dvh for mobile browser chrome */
body.slideshow-active {
  overflow: hidden;
  height: 100dvh;
}

/* ── Timer bar — 7s, resets via React key prop ── */
@keyframes timer-sweep {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
.slide-timer-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--amber), var(--gold), var(--amber));
  transform-origin: left center;
  animation: timer-sweep 7s linear forwards;
  box-shadow: 0 0 8px var(--amber-glow), 0 0 16px rgba(245,158,11,0.3);
  z-index: 500;
}
.slide-timer-bar.paused { animation-play-state: paused; }

/* ── Slide frame (between nav and controls) ── */
.slide-frame {
  position: fixed;
  left: 0; right: 0;
  top: var(--slide-nav-h);
  bottom: var(--slide-ctrl-h);
  overflow: hidden;
  will-change: opacity;
}

/* Swipe layer fills the frame */
.slide-swipe-layer {
  width: 100%;
  height: 100%;
  position: relative;
  touch-action: pan-y; /* allow vertical scroll on mobile, detect horizontal drags */
}

/* Content wrapper — fills by default, scrollable on mobile */
.slide-content-wrapper {
  position: absolute;
  inset: 0;
}

/* ── Camera metadata ── */
.cam-meta {
  font-family: 'Space Mono', 'Courier New', monospace;
  font-size: 0.6rem;
  color: rgba(255,255,255,0.28);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  user-select: none;
  pointer-events: none;
  line-height: 1.8;
}

/* ── Viewfinder corner brackets ── */
.vf-bracket {
  position: fixed;
  width: 22px; height: 22px;
  z-index: 450;
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.3s;
}
.vf-bracket-tl { top: calc(var(--slide-nav-h) + 8px); left: 10px; border-top: 1.5px solid var(--amber); border-left: 1.5px solid var(--amber); }
.vf-bracket-tr { top: calc(var(--slide-nav-h) + 8px); right: 10px; border-top: 1.5px solid var(--amber); border-right: 1.5px solid var(--amber); }
.vf-bracket-bl { bottom: calc(var(--slide-ctrl-h) + 8px); left: 10px; border-bottom: 1.5px solid var(--amber); border-left: 1.5px solid var(--amber); }
.vf-bracket-br { bottom: calc(var(--slide-ctrl-h) + 8px); right: 10px; border-bottom: 1.5px solid var(--amber); border-right: 1.5px solid var(--amber); }

/* ── REC blink ── */
@keyframes rec-blink {
  0%,49% { opacity: 1; }
  50%,100% { opacity: 0; }
}
.rec-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #EF4444;
  animation: rec-blink 1.2s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(239,68,68,0.8);
  flex-shrink: 0;
}

/* ── Slide outer wrapper ── */
.slide-outer {
  width: 100%;
  min-height: 100%;
  position: relative;
}

/* ── Blur-in keyframe ── */
@keyframes blur-in {
  from { filter: blur(12px); opacity: 0; transform: translateY(10px); }
  to   { filter: blur(0); opacity: 1; transform: translateY(0); }
}
.slide-blur-in { animation: blur-in 0.55s cubic-bezier(0.22,1,0.36,1) forwards; }

/* ════════════════════════════════════════════════════════════
   MOBILE — ≤ 768px
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Reduce HUD heights to reclaim vertical space */
  :root {
    --slide-nav-h:  50px;
    --slide-ctrl-h: 48px;
  }

  /* Top bar → 50px */
  .slide-topbar { height: 50px !important; }

  /* Bottom bar → 48px */
  .slide-bottombar { height: 48px !important; padding: 0 0.75rem !important; }

  /* Allow vertical scroll inside slide frame on mobile */
  .slide-frame { overflow-y: auto; }

  /* Inner wrapper — clear overflow:hidden so FAQ content can scroll out */
  .slide-inner-wrapper { overflow: visible !important; }

  /* Content wrapper — let it size to content on mobile */
  .slide-content-wrapper { position: relative; inset: unset; height: auto; min-height: 100%; }

  /* Swipe layer no longer position-relative absolute */
  .slide-swipe-layer { height: auto; min-height: 100%; }

  /* Hide decorative HUD */
  .vf-bracket    { display: none; }
  .cam-meta      { display: none; }
  .slide-nav-links { display: none !important; }
  .slide-nav-lang  { display: none !important; }
  .slide-dots-row  { display: none !important; }

  /* ── Slide grids: collapse all multi-column layouts ── */
  /* Problem before/after */
  .problem-grid { grid-template-columns: 1fr !important; }

  /* ROI grids (pain tiles + revenue cards) */
  .roi-grid { grid-template-columns: 1fr !important; gap: 0.6rem !important; }

  /* HowItWorks steps */
  .hiw-grid { grid-template-columns: 1fr !important; gap: 0.85rem !important; }

  /* Features grid */
  .features-strip { grid-template-columns: 1fr !important; }

  /* Pricing grid */
  .pricing-grid { grid-template-columns: 1fr !important; }

  /* FAQ 2-col → 1-col */
  .faq-slide-grid { grid-template-columns: 1fr !important; gap: 1.25rem !important; }

  /* Testimonials → stacked */
  .testi-slide-grid { grid-template-columns: 1fr !important; }

  /* CustomApp 2-col → 1-col; hide phone mockup on small screens */
  .custom-app-grid { grid-template-columns: 1fr !important; gap: 1.25rem !important; }
  .custom-app-phone { display: none !important; }

  /* Instagram growth — shrink the giant number */
  .ig-big-number { font-size: clamp(4rem, 22vw, 7rem) !important; }

  /* Slide outer — !important overrides inline minHeight:'100%' on every slide component */
  .slide-outer {
    min-height: calc(100dvh - var(--slide-nav-h) - var(--slide-ctrl-h)) !important;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  /* FAQ slide — stack from top so expanded FAQs can scroll naturally */
  .faq-slide-outer {
    justify-content: flex-start !important;
  }

  /* Swipe layer sizing */
  .slide-swipe-layer { height: auto; min-height: 100%; }

  /* Add safe bottom padding for content above the controls bar */
  .slide-outer > * { padding-bottom: 0.5rem; }

  /* Reduce top/bottom padding on all slide containers */
  .slide-outer[style*="padding"] { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }

  /* Tighter spacing between sections */
  .slide-outer h2.headline { margin-bottom: 0.6rem !important; }
  .section-tag { margin-bottom: 0.4rem !important; }

  /* Stats strip in hero → 2×2 grid on mobile */
  .hero-stats { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 0.75rem !important; }

  /* Reduce section-tag size on mobile */
  .section-tag { font-size: 0.6rem !important; padding: 0.2rem 0.65rem !important; }

  /* Headline scale in slides */
  .headline { font-size: clamp(1.3rem, 6vw, 2rem) !important; }

  /* Reduce padding inside slide wrappers */
  .slide-pad { padding: 0.75rem 0.9rem !important; }

  /* Reduce headline size in slides */
  .slide-headline { font-size: clamp(1.3rem, 6vw, 2rem) !important; }

  /* Features: 2-col grid + hide body text + smaller cards */
  .feat-grid { grid-template-columns: 1fr 1fr !important; gap: 0.5rem !important; }
  .feat-body-text { display: none !important; }

  /* HowItWorks: hide SVG connector + detail chips */
  .hiw-connector { display: none !important; }
  .hiw-detail-chip { display: none !important; }
  .hiw-step-body { display: none !important; }

  /* ROI: hide pain tiles, show mobile view */
  .roi-pain-tiles { display: none !important; }

  /* IG: hide math callout strip */
  .ig-math-strip { display: none !important; }

  /* Pricing: hide non-Pro cards + feature lists */
  .pricing-non-pro { display: none !important; }
  .plan-features-list { display: none !important; }
  .pricing-trust-row { display: none !important; }
}

/* Global: mobile-only hidden by default (desktop, no !important so mobile override works) */
.mobile-only { display: none; }
@media (max-width: 768px) {
  /* Show mobile-only (plain block containers, no inline display on them) */
  .mobile-only { display: block; }
  /* Hide desktop-only — needs !important to beat inline display:grid/flex */
  .desktop-only { display: none !important; }
}

/* ROI revenue cards: 3-col on mobile (compact icon+title only) */
@media (max-width: 768px) {
  .roi-cards-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 0.5rem !important; }
  .roi-cards-grid > div { padding: 0.65rem 0.5rem !important; flex-direction: column !important; align-items: center !important; text-align: center !important; }
  .roi-cards-grid > div > div[style*="1.6rem"] { font-size: 1.5rem !important; margin-bottom: 0.2rem !important; }
  .roi-cards-grid h3 { font-size: 0.72rem !important; line-height: 1.3 !important; }
}

/* Hide scrollbars on snap-scroll carousels */
.testi-snap-scroll::-webkit-scrollbar { display: none; }
.testi-snap-scroll { -ms-overflow-style: none; scrollbar-width: none; }

/* Instagram chips: stay 3-col on mobile (compact enough) */
.ig-chips-grid { grid-template-columns: repeat(3, 1fr) !important; }
@media (max-width: 768px) {
  .ig-chips-grid { gap: 0.45rem !important; }
  .ig-chips-grid > div { padding: 0.6rem 0.5rem !important; }
}

/* ── Very small phones ≤ 480px ── */
@media (max-width: 480px) {
  :root {
    --slide-nav-h:  48px;
    --slide-ctrl-h: 44px;
  }
  .slide-topbar  { height: 48px !important; }
  .slide-bottombar { height: 44px !important; }
}

/* ── Testimonial cards — scale on mobile ── */
@media (max-width: 600px) {
  /* Marquee cards slightly narrower */
  .marquee-track > div { width: 280px !important; }
}

/* ── Comparison table responsive ── */
@media (max-width: 640px) {
  .comparison-scroll { font-size: 0.72rem; }
  .comparison-scroll table { min-width: 560px; }
}

/* ── HowItWorks step grid ── */
@media (max-width: 640px) {
  .hiw-grid { grid-template-columns: 1fr !important; gap: 1.5rem !important; }
}

/* ── CustomApp comparison ── */
@media (max-width: 640px) {
  .comparison-phones { flex-direction: column !important; gap: 1.5rem !important; }
  .vs-divider { display: none !important; }
}

/* ── Features bento grid ── */
@media (max-width: 480px) {
  .ig-stats-row { flex-direction: column !important; gap: 0.75rem !important; }
}

/* ── Very short screens (iPhone SE 375×667, etc.) ── */
@media (max-width: 768px) and (max-height: 700px) {
  /* Aggressive padding squeeze */
  .slide-outer,
  .slide-outer[style*="padding"] {
    padding-top: 0.2rem !important;
    padding-bottom: 0.2rem !important;
  }

  /* Compact section tag */
  .section-tag {
    margin-bottom: 0.05rem !important;
    padding: 0.12rem 0.5rem !important;
    font-size: 0.55rem !important;
  }

  /* Smaller headlines */
  .headline {
    font-size: clamp(1rem, 4.8vw, 1.5rem) !important;
  }

  /* Shrink Instagram big number */
  .ig-big-number {
    font-size: clamp(2.2rem, 14vw, 3.5rem) !important;
  }

  /* Hide Pricing 10x callout — saves ~70px */
  .pricing-callout-short { display: none !important; }

  /* Tighten Problem comparison rows */
  .problem-mobile-rows { margin-bottom: 0.5rem !important; }

  /* Tighten Problem stat tiles */
  .prob-stats-grid { margin-bottom: 0.4rem !important; }
}
