/* Single source for header + CTA. Loaded by partials/header.html on every page. */
/* Depends on page :root (--border, --text-primary, --text-secondary). */

.header {
  position: sticky;
  top: 0;
  background: rgba(11,11,12,.95);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.logo {
  height: 45px;
  width: auto;
  filter: brightness(0.95);
}

.main-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--text-primary);
}

.cta-btn {
  display: inline-block;
  padding: 1.5rem 3rem;
  background: linear-gradient(135deg, #FF9E53 0%, #FF7A2D 100%);
  color: #0B0B0C;
  text-decoration: none;
  border-radius: 16px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: .3px;
  box-shadow: 0 10px 30px rgba(255,122,45,.32);
  border: none;
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(255,122,45,.4);
}

.cta-btn-secondary {
  background: linear-gradient(135deg, #FF9E53 0%, #FF7A2D 100%);
  color: #0B0B0C;
  border: none;
  box-shadow: 0 10px 30px rgba(255,122,45,.32);
}

.cta-btn-secondary:hover {
  transform: translateY(-3px);
  background: linear-gradient(135deg, #FF9E53 0%, #FF7A2D 100%);
  color: #0B0B0C;
  box-shadow: 0 20px 40px rgba(255,122,45,.4);
}

.header-cta {
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .main-nav {
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
  }

  .header-cta,
  .cta-btn {
    width: 100%;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta-btn:hover {
    transform: none;
  }
}

/* ----- Install badges (Apple / Google) ----- */
.install-badges {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.install-badges a {
  display: inline-flex;
  transition: transform .2s ease, opacity .2s ease;
}

.install-badges a:hover { transform: translateY(-2px); }

.install-badges img {
  height: 56px;
  width: auto;
  display: block;
}

/* Match Apple visual height to Google's badge (Google PNG has ~10% padding) */
.install-badges .badge-ios img    { height: 56px; }
.install-badges .badge-android img{ height: 82px; margin: -13px 0; }

@media (max-width: 768px) {
  .install-badges img             { height: 50px; }
  .install-badges .badge-android img { height: 72px; margin: -11px 0; }
}

/* Hide the platform-mismatched badge on mobile (set by JS) */
.install-badges.ua-ios     .badge-android,
.install-badges.ua-android .badge-ios { display: none; }

/* Header CTA looks like a small primary button */
.header-cta-link {
  text-decoration: none;
  display: inline-block;
}

/* ----- Sticky bottom mobile install bar ----- */
.install-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom, 0));
  background: rgba(11,11,12,.92);
  backdrop-filter: blur(16px) saturate(160%);
  border-top: 1px solid var(--border, rgba(255,255,255,.08));
  align-items: center;
  gap: .75rem;
  box-shadow: 0 -10px 40px rgba(0,0,0,.5);
}

.install-bar.is-visible { display: flex; }

.install-bar .ib-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-align: left;
}

.install-bar .ib-title {
  color: #F3F3F5;
  font-weight: 700;
  font-size: .95rem;
}

.install-bar .ib-sub {
  color: #8A8A92;
  font-size: .8rem;
  margin-top: 2px;
}

.install-bar .ib-cta {
  background: linear-gradient(135deg, #FF9E53 0%, #FF7A2D 100%);
  color: #0B0B0C;
  text-decoration: none;
  padding: .75rem 1.1rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: .95rem;
  white-space: nowrap;
}

.install-bar .ib-close {
  background: none;
  border: none;
  color: #8A8A92;
  font-size: 1.4rem;
  line-height: 1;
  padding: 0 .25rem;
  cursor: pointer;
}

@media (min-width: 769px) {
  .install-bar { display: none !important; }
}

/* When the install bar is showing, lift the page bottom so footer isn't hidden */
body.has-install-bar { padding-bottom: 90px; }
@media (min-width: 769px) {
  body.has-install-bar { padding-bottom: 0; }
}

/* ----- Hero install row + secondary waitlist link ----- */
.cta-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.cta-secondary-link {
  background: none;
  border: none;
  color: var(--text-muted, #8A8A92);
  font-size: .95rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-family: inherit;
}

.cta-secondary-link:hover { color: #FF8A3D; }

/* Hero: secondary science link (replaces prominent newsletter CTA) */
a.cta-science-link {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-muted, #8A8A92);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: inherit;
  cursor: pointer;
}
a.cta-science-link:hover {
  color: #FF8A3D;
}

/* Final CTA: newsletter kept but lower visual weight */
.cta-newsletter-subtle {
  font-size: 0.8rem !important;
  opacity: 0.85;
}

/* ----- Hero phone mockup ----- */
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 3rem;
  align-items: center;
  text-align: left;
}

.hero-grid .hero-copy { text-align: left; }
.hero-grid .hero-copy .cta-stack { align-items: flex-start; }

.phone-mockup {
  position: relative;
  width: 280px;
  max-width: 100%;
  margin: 0 auto;
  aspect-ratio: 9 / 19.5;
  border-radius: 38px;
  background: #0a0a0a;
  border: 2px solid rgba(255,255,255,.12);
  box-shadow:
    0 30px 80px rgba(0,0,0,.55),
    0 0 0 6px rgba(0,0,0,.6),
    inset 0 0 0 2px rgba(255,255,255,.04);
  overflow: hidden;
}

.phone-mockup::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 22px;
  background: #000;
  border-radius: 14px;
  z-index: 2;
}

.phone-mockup .screens {
  position: absolute;
  inset: 0;
  border-radius: 36px;
  overflow: hidden;
}

.phone-mockup .screens img,
.phone-mockup .screens video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .6s ease;
  background: #0a0a0a;
}

.phone-mockup .screens img.active,
.phone-mockup .screens video.active { opacity: 1; }

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }
  .hero-grid .hero-copy { text-align: center; }
  .hero-grid .hero-copy .cta-stack { align-items: center; }
  .phone-mockup { width: 240px; }
}

/* ----- Trust row near install CTAs ----- */
.trust-row {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  justify-content: center;
  color: var(--text-muted, #8A8A92);
  font-size: .9rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.trust-row .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 10px rgba(74,222,128,.7);
}

.hero-grid .hero-copy .trust-row { justify-content: flex-start; }

@media (max-width: 900px) {
  .hero-grid .hero-copy .trust-row { justify-content: center; }
}
