/* ================================================
   HabitApex — Brand Elevation CSS v1
   Loading Screen, Scroll Progress, Ticker, Footer,
   Sticky Bar, Cookie Consent, Compare Table,
   Testimonial Upgrades, App Trust Row, iOS Waitlist
   ================================================ */

/* ── LOADING SCREEN ─────────────────────────── */
.ha-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s cubic-bezier(0.42,0,0.58,1),
              visibility 0.6s cubic-bezier(0.42,0,0.58,1);
}

.ha-loader.ha-loader--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.ha-loader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.ha-loader__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: loaderFadeIn 0.5s ease both;
}

.ha-loader__icon {
  font-size: 2.5rem;
  filter: drop-shadow(0 0 20px rgba(37,99,235,0.8));
  animation: loaderIconPulse 2s ease-in-out infinite;
}

.ha-loader__wordmark {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.ha-loader__bar-wrap {
  width: 200px;
  height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
  overflow: hidden;
}

.ha-loader__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563EB, #06B6D4);
  border-radius: 999px;
  transition: width 0.05s linear;
}

.ha-loader__sub {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@keyframes loaderFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes loaderIconPulse {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(37,99,235,0.8)); }
  50%       { filter: drop-shadow(0 0 40px rgba(6,182,212,1)); }
}

/* ── SCROLL PROGRESS ────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #2563EB 0%, #06B6D4 50%, #10b981 100%);
  z-index: 9998;
  transition: width 0.05s linear;
  box-shadow: 0 0 8px rgba(37,99,235,0.5);
  pointer-events: none;
}



/* ── STICKY MOBILE DOWNLOAD BAR ─────────────── */
.mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  background: rgba(10,10,10,0.97);
  border-top: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(20px);
  padding: 0.75rem 1rem;
  align-items: center;
  gap: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
}

.mobile-sticky-bar.mobile-sticky-bar--hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.mobile-sticky-bar.mobile-sticky-bar--visible {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 768px) {
  .mobile-sticky-bar { display: flex; }
}

.mobile-sticky-bar__btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
  text-align: left;
}

.mobile-sticky-bar__btn:hover { background: rgba(255,255,255,0.05); }

.mobile-sticky-bar__btn--android { color: #4ade80; }
.mobile-sticky-bar__btn--ios     { color: #a78bfa; }

.mobile-sticky-bar__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}

.mobile-sticky-bar__sub {
  display: block;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.45);
  margin-top: 2px;
}

.mobile-sticky-bar__divider {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.1);
  margin: 0 0.25rem;
  flex-shrink: 0;
}

.mobile-sticky-bar__close {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.mobile-sticky-bar__close:hover { color: rgba(255,255,255,0.7); }

/* ── TESTIMONIAL UPGRADES ───────────────────── */
.testimonial-stars {
  font-size: 1rem;
  color: #F59E0B;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

.author-avatar--gradient-blue {
  background: linear-gradient(135deg, #2563EB, #06B6D4) !important;
}

.author-avatar--gradient-green {
  background: linear-gradient(135deg, #10b981, #34d399) !important;
}

.author-avatar--gradient-purple {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa) !important;
}

/* Add 3rd testimonial support */
.testimonials-row {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
}

/* ── APP TRUST ROW ──────────────────────────── */
.app-trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  padding: 1.25rem;
  background: #f8fafc;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 20px;
}

.app-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 14px;
  color: #0f172a;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.app-badge-btn svg {
  fill: #0f172a;
}

.app-badge-btn:hover {
  background: #f1f5f9;
  border-color: rgba(0,0,0,0.2);
  transform: translateY(-1px);
}

.app-badge-btn--ios {
  opacity: 0.75;
  border-style: dashed;
}

.app-badge-btn--ios:hover { opacity: 1; }

.app-badge-sub {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: #64748b;
  text-transform: uppercase;
  line-height: 1;
}

.app-badge-name {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 2px;
  color: #0f172a;
}

.app-rating-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 999px;
}

.app-rating-stars { color: #F59E0B; font-size: 0.9rem; letter-spacing: 1px; }
.app-rating-num   { font-size: 1.1rem; font-weight: 800; color: #0f172a; }
.app-rating-label { font-size: 0.72rem; color: #64748b; }

/* ── COMPARE TABLE ──────────────────────────── */
.compare-section { padding-block: clamp(3rem, 5vw, 6rem); }

.compare-table-wrap {
  overflow-x: auto;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 10px 30px -5px rgba(0,0,0,0.04);
}

.compare-table {
  width: 100%;
  min-width: 580px;
}

.compare-row {
  display: grid;
  grid-template-columns: 2fr 1.8fr 1fr 1fr 1fr;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.compare-row:last-child { border-bottom: none; }

.compare-row--header {
  background: #f8fafc;
  border-bottom: 2px solid rgba(0,0,0,0.08);
}

.compare-cell {
  padding: 0.9rem 1rem;
  font-size: 0.82rem;
  color: #475569;
  display: flex;
  align-items: center;
  border-right: 1px solid rgba(0,0,0,0.05);
}

.compare-cell:last-child { border-right: none; }

.compare-row--header .compare-cell {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1e293b;
}

.compare-cell--feature {
  font-size: 0.85rem;
  color: #0f172a;
  font-weight: 500;
}

.compare-cell--apex {
  background: #f0fdf4;
  font-weight: 600;
  color: #166534;
}

.compare-cell--yes { background: rgba(16,185,129,0.04); }
.compare-cell--no  { background: transparent; }

.compare-check {
  color: #10b981;
  font-weight: 700;
  font-size: 0.82rem;
}

.compare-cross {
  color: #cbd5e1;
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .compare-row {
    grid-template-columns: 1.5fr 1.5fr 1fr 1fr 1fr;
  }
  .compare-cell { padding: 0.65rem 0.6rem; font-size: 0.72rem; }
}

/* ── iOS WAITLIST MODAL ─────────────────────── */
.ios-waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ios-waitlist-input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  color: #0f172a;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.ios-waitlist-input:focus {
  border-color: #2563EB;
  background: #ffffff;
}

.ios-waitlist-input::placeholder { color: #94a3b8; }

.ios-waitlist-submit {
  width: 100%;
  padding: 0.9rem;
  background: linear-gradient(135deg, #2563EB, #06B6D4);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.ios-waitlist-submit:hover { opacity: 0.95; transform: translateY(-1px); }

.ios-waitlist-legal {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  text-align: center;
  margin-top: 0.5rem;
}

.ios-waitlist-success {
  text-align: center;
  padding: 1.5rem;
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 12px;
  color: #34d399;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.ios-waitlist-success p {
  color: #a7f3d0;
  font-size: 0.9rem;
  margin: 0;
}

/* ── FOOTER REDESIGN (Pure White) ───────────── */
.footer {
  background: #ffffff !important;
  border-top: 1px solid rgba(0,0,0,0.08) !important;
  padding-top: clamp(3rem, 5vw, 5rem);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 3rem;
  padding-bottom: 3rem;
}

@media (max-width: 900px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer__col--brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
  margin-bottom: 0.75rem;
}

.footer__tagline {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.6;
  max-width: 32ch;
  margin-bottom: 1.25rem;
}

.footer__socials {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid rgba(0,0,0,0.08);
  color: #0f172a;
  transition: all 0.2s ease;
  text-decoration: none;
}

.footer__social-link:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: translateY(-2px);
}

.footer__col-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0f172a;
  margin-bottom: 1rem;
}

.footer__col-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer__col-links a {
  font-size: 0.85rem;
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s ease;
  line-height: 1;
}

.footer__col-links a:hover { color: #0f172a; }

.footer__download-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  background: #f8fafc;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 12px;
  color: #0f172a;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 0.6rem;
  transition: all 0.2s ease;
  width: 100%;
}

.footer__download-btn:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
}

.footer__download-btn--ios { opacity: 0.75; }
.footer__download-btn--ios:hover { opacity: 1; }

.footer__rating {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.footer__rating-stars { color: #F59E0B; font-size: 0.85rem; }
.footer__rating-text  { font-size: 0.78rem; color: #64748b; }

.footer__bottom {
  border-top: 1px solid rgba(0,0,0,0.06);
  padding: 1.25rem 0;
}

.footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer__copy {
  font-size: 0.78rem;
  color: #94a3b8;
}

.footer__legal-links {
  display: flex;
  gap: 1.5rem;
}

.footer__legal-links a {
  font-size: 0.78rem;
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer__legal-links a:hover { color: #0f172a; }

/* Remove old footer styles that conflict */
.footer__inner { display: none; }
.footer__brand { display: none; }
.footer__links { display: none; }

/* ── CTA FINAL INVESTOR NOTE ────────────────── */
.cta-final__investor-note {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 2rem;
}

.cta-final__investor-link {
  color: #2563EB;
  text-decoration: none;
  font-weight: 600;
  margin-left: 0.4rem;
  transition: color 0.2s ease;
}

.cta-final__investor-link:hover { color: #1D4ED8; }

/* ── BUTTON GLASS DARK & OUTLINE (Light Mode Adaptations) ───── */
.btn-apple--glass-dark {
  background: #f8fafc !important;
  color: #0f172a !important;
  border: 1px solid rgba(0,0,0,0.15) !important;
}

.btn-apple--glass-dark:hover {
  background: #f1f5f9 !important;
  border-color: rgba(0,0,0,0.25) !important;
}

.btn-apple--outline-white {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid rgba(0,0,0,0.18) !important;
}

.btn-apple--outline-white:hover {
  background: #f8fafc !important;
  border-color: rgba(0,0,0,0.3) !important;
}


/* Enhanced Brand Logo Sizes */
.ha-loader__icon svg {
  width: 53px !important;
  height: 53px !important;
}

.footer__logo svg {
  width: 29px !important;
  height: 29px !important;
  flex-shrink: 0;
}

/* Suppress Netlify Drawer & Collaborative Feedback Watermark */
netlify-drawer,
#netlify-preview-drawer,
.netlify-drawer,
[data-netlify-drawer],
#netlify-feedback-drawer,
div[id*="netlify-drawer"],
iframe[src*="netlify"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

