/* ═══════════════════════════════════════════════════════
   GoalFlow Landing Page Styles (index.html)
   ═══════════════════════════════════════════════════════ */

/* ── Base / Layout ── */
body { font-family: "Space Grotesk", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }

/* At /: collapse #root so React's loading spinner takes zero space */
#root { position: absolute; top: -9999px; height: 0; overflow: hidden; }
/* App routes: show #root full-screen, hide static shell */
.app-route #seo-shell { display: none !important; }
.app-route #root { position: fixed; inset: 0; top: 0; height: auto; overflow-y: auto; background: #FAFAF9; z-index: 9999; }

/* All orange gradient buttons — Tailwind CDN doesn't render bg-gradient reliably */
#hero-cta, a[class*="from-orange"], button[class*="from-orange"] {
  background: linear-gradient(135deg, #f97316, #ea580c) !important;
  color: #fff !important;
}

/* ── Rotating headline text — fixed height clips animation without layout shift ── */
#rotating-text-wrap { display: inline-block !important; overflow: hidden; height: 1.12em; vertical-align: bottom; }
#rotating-text { display: inline-block; transition: opacity .35s, transform .35s; }

/* ── Static page nav (scoped to #seo-nav to avoid conflicting with React) ── */
#seo-nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.92); backdrop-filter: blur(16px); border-bottom: 1px solid #e4e4e7; }
#seo-nav .nav-wrap { max-width: 1160px; margin: 0 auto; padding: 0 28px; height: 60px; display: flex; align-items: center; justify-content: space-between; }
#seo-nav .logo { display: flex; align-items: center; gap: 9px; font-weight: 900; font-size: 15px; text-decoration: none; color: inherit; }
#seo-nav .logo-icon { width: 32px; height: 32px; background: #f97316; border-radius: 10px; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(249,115,22,.28); flex-shrink: 0; }
#seo-nav .logo-goal { color: #f97316; }
#seo-nav .logo-flow { color: #09090b; }
#seo-nav .nav-links { display: flex; align-items: center; gap: 2px; }
#seo-nav .nav-link { font-size: 13.5px; font-weight: 600; color: #71717a; padding: 6px 12px; border-radius: 9px; transition: color .15s, background .15s; text-decoration: none; }
#seo-nav .nav-link:hover { color: #09090b; background: #fafafa; }
#seo-nav .nav-cta { background: #f97316; color: #fff; font-size: 13px; font-weight: 800; padding: 8px 18px; border-radius: 10px; margin-left: 10px; transition: opacity .15s, transform .15s; box-shadow: 0 2px 10px rgba(249,115,22,.28); text-decoration: none; }
#seo-nav .nav-cta:hover { opacity: .9; transform: translateY(-1px); }
@media (max-width: 768px) { #seo-nav .nav-links .nav-link { display: none; } #seo-nav .nav-cta { display: none; } }

/* ── Mobile menu ── */
#seo-nav .burger { display: none; width: 36px; height: 36px; border: none; background: transparent; cursor: pointer; padding: 6px; flex-direction: column; justify-content: center; gap: 5px; }
#seo-nav .burger span { display: block; width: 100%; height: 2px; background: #09090b; border-radius: 2px; transition: transform .25s, opacity .25s; }
#seo-nav .burger.open span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
#seo-nav .burger.open span:nth-child(2) { opacity: 0; }
#seo-nav .burger.open span:nth-child(3) { transform: translateY(-3.5px) rotate(-45deg); }
@media (max-width: 768px) { #seo-nav .burger { display: flex; } }
#mobile-menu { display: none; position: absolute; top: 60px; left: 0; right: 0; background: rgba(255,255,255,.98); backdrop-filter: blur(16px); border-bottom: 1px solid #e4e4e7; padding: 16px 24px; z-index: 50; flex-direction: column; gap: 4px; box-shadow: 0 12px 32px rgba(0,0,0,.08); }
#mobile-menu.open { display: flex; }
#mobile-menu a { font-size: 15px; font-weight: 600; color: #3f3f46; padding: 10px 12px; border-radius: 10px; text-decoration: none; transition: background .15s; }
#mobile-menu a:hover { background: #fafafa; }
#mobile-menu .mob-cta { background: #f97316; color: #fff; font-weight: 800; text-align: center; border-radius: 12px; margin-top: 6px; }

/* ── Hero responsive breakpoints ── */

/* Desktop: 1024px+ — side-by-side 40/60 split */
@media (min-width: 1024px) {
  #hero-inner { flex-direction: row !important; align-items: center !important; min-height: 680px !important; }
  #hero-text-col {
    flex: 0 0 40% !important; width: 40% !important;
    text-align: left !important;
    padding: 48px 32px 48px 64px !important;
  }
  #hero-badge { justify-content: flex-start !important; }
  #hero-text-col p { margin-left: 0 !important; margin-right: 0 !important; }
  #hero-trust { align-items: flex-start !important; }
  #hero-features { margin-left: 0 !important; }
  #hero-cta-wrap { align-items: flex-start !important; }
  #hero-feat-link { justify-content: flex-start !important; }
  #device-switcher { margin: 0 auto !important; }
  #demo-panel { flex: 0 0 60% !important; width: 60% !important; min-height: unset !important; padding: 32px 48px 32px 8px !important; align-items: flex-start !important; }
  /* Shift mockup stack slightly right so it sits visually on-screen */
  #right-stack { margin-left: 24px; }
}

/* Large desktop: 1280px+ */
@media (min-width: 1280px) {
  #hero-text-col { padding: 48px 40px 48px 80px !important; }
  #demo-panel { padding: 32px 64px 32px 16px !important; }
  #right-stack { margin-left: 32px; }
}

/* Tablet and below: 1023px — stacked layout */
@media (max-width: 1023px) {
  #demo-panel { padding: 12px 20px 48px !important; }
  #hero-inner { min-height: auto !important; }
  #right-stack { margin-left: 0 !important; }
}

/* Tablet: 768–1023px */
@media (min-width: 768px) and (max-width: 1023px) {
  #hero-text-col { padding: 48px 40px 28px !important; }
  #app-mockup-wrap { max-width: 580px !important; margin: 0 auto !important; }
  /* Desktop mockup — slight zoom to keep it readable */
  #right-stack:not(.phone-mode) #app-mockup { zoom: 0.88; }
}

/* Mobile landscape / large mobile: 481–767px */
@media (max-width: 767px) {
  #hero-text-col { padding: 36px 24px 24px !important; }
  #hero-text-col h1 { font-size: clamp(28px,7vw,42px) !important; }
  #hero-text-col p { font-size: 14px !important; }
  #hero-cta { padding: 14px 32px !important; font-size: 14px !important; width: 100% !important; justify-content: center !important; }
  #hero-cta-wrap { width: 100% !important; padding: 0 8px !important; }
  #demo-panel { padding: 8px 16px 32px !important; min-height: unset !important; }
  /* Desktop mockup scaled to fit narrow screen */
  #right-stack:not(.phone-mode) #app-mockup { zoom: 0.72; }
  #right-stack:not(.phone-mode) #app-interior { height: 300px !important; }
  /* Phone mockup fills width */
  .phone-mode #app-mockup-wrap { width: 100% !important; max-width: 380px !important; }
  .phone-mode #app-interior { height: 520px !important; }
  #news-strip { display: none !important; }
  .review-card { width: 280px !important; padding: 20px !important; }
}

/* Small mobile: 480px and below */
@media (max-width: 480px) {
  #hero-text-col { padding: 32px 16px 20px !important; }
  #hero-text-col h1 { font-size: clamp(26px,8vw,34px) !important; margin-bottom: 16px !important; }
  #hero-text-col p { font-size: 13.5px !important; max-width: 100% !important; margin-bottom: 22px !important; }
  #hero-badge { margin-bottom: 18px !important; flex-wrap: wrap !important; justify-content: center !important; }
  #hero-badge span { font-size: 10px !important; }
  #hero-trust { gap: 4px !important; margin-bottom: 20px !important; }
  #hero-trust span { font-size: 10.5px !important; }
  #hero-features { gap: 8px !important; margin-bottom: 18px !important; }
  #hero-features span { font-size: 12.5px !important; }
  #hero-cta { padding: 13px 28px !important; font-size: 14px !important; border-radius: 12px !important; width: 100% !important; }
  #demo-panel { padding: 4px 12px 28px !important; min-height: unset !important; }
  #device-switcher { transform: scale(.88) !important; transform-origin: center !important; margin-bottom: -4px !important; }
  /* Desktop mockup: more aggressive zoom */
  #right-stack:not(.phone-mode) #app-mockup { zoom: 0.58; }
  #right-stack:not(.phone-mode) #app-interior { height: 280px !important; }
  /* Phone mockup: compact */
  .phone-mode #app-mockup-wrap { width: 100% !important; max-width: 340px !important; }
  .phone-mode #app-interior { height: 490px !important; }
  .phone-mode #app-mockup { border-radius: 40px !important; border-width: 6px !important; }
  .review-card { width: 260px !important; padding: 18px !important; }
}

/* Extra small: 360px and below */
@media (max-width: 360px) {
  #hero-text-col { padding: 28px 12px 16px !important; }
  #hero-text-col h1 { font-size: 24px !important; }
  #hero-text-col p { font-size: 13px !important; }
  #hero-badge { gap: 4px !important; }
  #hero-trust > div { gap: 10px !important; flex-wrap: wrap !important; justify-content: center !important; }
  #hero-features span { font-size: 12px !important; }
  #device-switcher { transform: scale(.82) !important; }
  /* Desktop mockup: smallest zoom */
  #right-stack:not(.phone-mode) #app-mockup { zoom: 0.5; }
  #right-stack:not(.phone-mode) #app-interior { height: 260px !important; }
  /* Phone mockup: smallest */
  .phone-mode #app-mockup-wrap { width: 100% !important; max-width: 300px !important; }
  .phone-mode #app-interior { height: 460px !important; }
  .phone-mode #app-mockup { border-radius: 36px !important; border-width: 5px !important; }
  .review-card { width: 240px !important; padding: 16px !important; }
}

/* ── Phone frame (mobile device preview) ── */
#phone-status-bar { display: none; }
#phone-home-bar { display: none; }

.phone-mode #phone-status-bar { display: flex !important; }
.phone-mode #phone-home-bar { display: flex !important; }
.phone-mode #browser-chrome { display: none !important; }
.phone-mode #app-sidebar { display: none !important; }

.phone-mode #app-mockup-wrap {
  width: 420px;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  transition: width .4s cubic-bezier(.22,1,.36,1);
}
/* Glow bloom behind the phone */
.phone-mode #app-mockup-wrap::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -10px;
  width: 75%;
  height: 80px;
  background: radial-gradient(ellipse at center, rgba(249,115,22,.22) 0%, transparent 70%);
  filter: blur(12px);
  pointer-events: none;
  z-index: -1;
}
/* Side buttons (volume + power) via sibling shadow trick */
.phone-mode #app-mockup-wrap::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 120px;
  width: 4px;
  height: 56px;
  background: #2a2a2a;
  border-radius: 0 3px 3px 0;
  box-shadow: 0 -68px 0 #2a2a2a, -0px -34px 0 #2a2a2a;
  pointer-events: none;
}
.phone-mode #app-mockup {
  border-radius: 46px !important;
  border: 8px solid #1c1c1e !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.1),
    inset 0 1px 0 rgba(255,255,255,.06),
    0 0 0 1px rgba(0,0,0,.6),
    0 4px 8px rgba(0,0,0,.4),
    0 20px 60px rgba(0,0,0,.32),
    0 40px 100px rgba(0,0,0,.18),
    0 6px 28px rgba(249,115,22,.12) !important;
  overflow: hidden;
  background: #1c1c1e;
}
.phone-mode #app-interior {
  height: 580px !important;
  background: #f9f9f8;
}
/* Status bar shimmer */
.phone-mode #phone-status-bar {
  background: linear-gradient(180deg, #222 0%, #1a1a1a 100%) !important;
}
/* Home bar — thin pill */
.phone-mode #phone-home-bar {
  background: #111 !important;
  padding: 10px 0 14px !important;
}
.phone-mode #phone-home-bar > div {
  width: 130px !important;
  height: 5px !important;
  background: rgba(255,255,255,.25) !important;
  border-radius: 5px !important;
}
/* Phone bottom nav icons overlay */
.phone-mode .phone-bottom-nav { display: flex !important; }
.phone-bottom-nav { display: none; }

/* ── Phone mode: adapt slide content to mobile layout ── */
/* Hide the 110px right sidebar panels in phone mode */
.phone-mode #app-interior div[style*="width:110px"] {
  display: none !important;
}
/* Remove right margin from main panels when sidebar is hidden */
.phone-mode #app-interior div[style*="margin-right:8px"] {
  margin-right: 0 !important;
}
/* Analytics: 4-col stat grid → 2-col */
.phone-mode #app-interior div[style*="repeat(4,1fr)"] {
  grid-template-columns: repeat(2, 1fr) !important;
}

/* ── Phone mode: realistic mobile content sizing ── */

/* Slide page headers — bigger padding & title */
.phone-mode .app-slide > div[style*="border-bottom"] {
  padding: 16px 18px 14px !important;
}

/* Slide content containers — more padding, gap, room for bottom nav */
.phone-mode .app-slide > div[style*="flex:1"] {
  padding: 14px !important;
  gap: 12px !important;
  padding-bottom: 68px !important;
}

/* ── Font size scale-up for mobile readability ── */
.phone-mode .app-slide [style*="font-size:7px"] { font-size: 10px !important; }
.phone-mode .app-slide [style*="font-size:7.5px"] { font-size: 11px !important; }
.phone-mode .app-slide [style*="font-size:8px"] { font-size: 12px !important; }
.phone-mode .app-slide [style*="font-size:8.5px"] { font-size: 13px !important; }
.phone-mode .app-slide [style*="font-size:9px"] { font-size: 13px !important; }
.phone-mode .app-slide [style*="font-size:9.5px"] { font-size: 14px !important; }
.phone-mode .app-slide [style*="font-size:10.5px"] { font-size: 15px !important; }
.phone-mode .app-slide [style*="font-size:12px"] { font-size: 17px !important; }
.phone-mode .app-slide [style*="font-size:13px"] { font-size: 18px !important; }
.phone-mode .app-slide [style*="font-size:15px"] { font-size: 21px !important; }
.phone-mode .app-slide [style*="font-size:16px"] { font-size: 22px !important; }
.phone-mode .app-slide [style*="font-size:18px"] { font-size: 26px !important; }
.phone-mode .app-slide [style*="font-size:19px"] { font-size: 28px !important; }

/* ── Avatar / icon circles scale-up ── */
.phone-mode .app-slide [style*="width:11px"][style*="height:11px"] {
  width: 18px !important; height: 18px !important; border-radius: 5px !important;
}
.phone-mode .app-slide [style*="width:22px"][style*="height:22px"] {
  width: 34px !important; height: 34px !important; font-size: 13px !important;
}
.phone-mode .app-slide [style*="width:26px"][style*="height:26px"] {
  width: 40px !important; height: 40px !important; font-size: 14px !important;
}
.phone-mode .app-slide [style*="width:28px"][style*="height:28px"] {
  width: 42px !important; height: 42px !important; font-size: 14px !important;
}

/* ── Card styling ── */
.phone-mode .app-slide [style*="border:1px solid #eeeeed"][style*="border-radius:10px"] {
  padding: 16px !important; border-radius: 14px !important;
}
.phone-mode .app-slide [style*="border:1px solid #eeeeed"][style*="border-radius:9px"] {
  padding: 14px !important; border-radius: 12px !important;
}
.phone-mode .app-slide [style*="background:linear-gradient"][style*="border-radius:10px"] {
  padding: 16px !important; border-radius: 14px !important;
}

/* ── Progress bars thicker ── */
.phone-mode .app-slide [style*="height:5px"][style*="border-radius:5px"] {
  height: 8px !important; border-radius: 8px !important;
}
.phone-mode .app-slide [style*="height:4px"][style*="border-radius:4px"] {
  height: 7px !important; border-radius: 7px !important;
}
.phone-mode .app-slide [style*="height:3px"][style*="border-radius:3px"] {
  height: 5px !important; border-radius: 5px !important;
}

/* ── Grid & flex gaps ── */
.phone-mode .app-slide [style*="gap:8px"] { gap: 12px !important; }
.phone-mode .app-slide [style*="gap:6px"] { gap: 10px !important; }
.phone-mode .app-slide [style*="gap:5px"] { gap: 8px !important; }
.phone-mode .app-slide [style*="gap:3px"] { gap: 5px !important; }

/* ── Gauge SVG (goal forecast) ── */
.phone-mode .app-slide svg[viewBox="0 0 100 56"] {
  width: 110px !important; height: 62px !important;
}

/* ── Phone bottom nav ── */
.phone-mode .phone-bottom-nav {
  height: 60px !important;
  padding: 10px 20px 8px !important;
}
.phone-mode .phone-bottom-nav svg {
  width: 22px !important; height: 22px !important;
}
.phone-mode .phone-bottom-nav [style*="font-size:8px"] {
  font-size: 11px !important;
}
.phone-mode .phone-bottom-nav [style*="width:32px"][style*="height:32px"] {
  width: 42px !important; height: 42px !important; margin-top: -18px !important;
}
.phone-mode .phone-bottom-nav [style*="min-width:36px"] {
  min-width: 48px !important;
}

/* ── Phone status bar ── */
.phone-mode #phone-status-bar [style*="font-size:12px"] {
  font-size: 14px !important;
}

/* Phone frame scales on smaller screens */
@media (max-width: 480px) {
  .phone-mode #app-mockup-wrap { width: 340px !important; }
  .phone-mode #app-mockup { border-radius: 40px !important; border-width: 6px !important; }
  .phone-mode #app-interior { height: 520px !important; }
}
@media (max-width: 360px) {
  .phone-mode #app-mockup-wrap { width: 300px !important; }
  .phone-mode #app-mockup { border-radius: 36px !important; border-width: 5px !important; }
  .phone-mode #app-interior { height: 480px !important; }
}

/* ── Nav interactivity ── */
.snav { cursor: pointer !important; }
.pnav { cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* ── Section padding mobile overrides ── */
@media (max-width: 767px) {
  .mobile-py { padding-top: 56px !important; padding-bottom: 56px !important; }
}
@media (max-width: 480px) {
  .mobile-py { padding-top: 44px !important; padding-bottom: 44px !important; }
}

/* ── Mobile typography & spacing ── */
@media (max-width: 480px) {
  #seo-shell h2 { font-size: 28px !important; }
  #seo-shell .text-base { font-size: 14px !important; }
}
@media (max-width: 360px) {
  #seo-shell h2 { font-size: 24px !important; }
}

/* ── Mobile CTA full-width ── */
@media (max-width: 480px) {
  #seo-shell a[class*="from-orange"],
  #seo-shell button[class*="from-orange"] {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

/* ── Footer mobile ── */
@media (max-width: 480px) {
  footer .gap-10 { gap: 28px !important; }
  footer ul { gap: 8px !important; }
}

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

/* ── Review carousel ── */
@keyframes reviewScroll { from { transform: translateX(0) } to { transform: translateX(-50%) } }
.review-track { display: flex; width: max-content; animation: reviewScroll 40s linear infinite; }
.review-track:hover { animation-play-state: paused; }
.review-card { width: 340px; flex-shrink: 0; margin: 0 10px; background: #fff; border: 1px solid #e4e4e7; border-radius: 20px; padding: 24px; transition: box-shadow .25s, transform .25s; }
.review-card:hover { box-shadow: 0 10px 28px rgba(0,0,0,.07); transform: translateY(-2px); }
