/**
 * AI Try-On landing page — full marketing page styles.
 * Brand tokens match the Flutter app (colors.dart). Mobile-first, scales to a
 * proper multi-column desktop layout. Critical hero/nav styles are inlined in page.html.
 */

/* DM Sans loaded via <link> in page.html (font-display: swap). */

:root {
  --fb-purple: #6B4EFF;
  --fb-purple-dark: #21194D;
  --fb-purple-light: #E7E7FF;
  --fb-purple-soft: #F3F1FF;
  --fb-black: #2B3340;
  --fb-gray: #72777A;
  --fb-gray-bg: #E2E2E4;
  --fb-gray-button: #F2F4F5;
  --fb-beige: #FFEFD7;
  --fb-white: #FFFFFF;

  --container: 1120px;
  --section-pad-x: clamp(16px, 5vw, 48px);
  --section-pad-y: clamp(48px, 7vw, 96px);
  --radius-card: 20px;
  --radius-pill: 40px;
  --shadow-sm: 0 4px 16px rgba(33, 25, 77, 0.06);
  --shadow-md: 0 16px 40px rgba(33, 25, 77, 0.12);
  --shadow-lg: 0 30px 70px rgba(33, 25, 77, 0.18);
  --sticky-cta-height: 76px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn-pill {
  border-radius: var(--radius-pill);
  padding: 15px 28px;
  min-height: 52px;
}
.btn-primary {
  background: var(--fb-purple);
  color: var(--fb-white);
  box-shadow: 0 10px 24px rgba(107, 78, 255, 0.32);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(107, 78, 255, 0.4); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: transparent;
  color: var(--fb-purple-dark);
  border: 1.5px solid var(--fb-gray-bg);
}
.btn-ghost:hover { border-color: var(--fb-purple); color: var(--fb-purple); }
.btn-light {
  background: var(--fb-white);
  color: var(--fb-purple-dark);
  box-shadow: var(--shadow-md);
}
.btn-light:hover { transform: translateY(-2px); }
.btn-nav {
  padding: 10px 20px;
  min-height: 0;
  font-size: 0.9rem;
  background: var(--fb-purple);
  color: var(--fb-white);
}
.btn-nav:hover { transform: translateY(-1px); }

/* ---------- Hero ---------- */
.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}
.hero-copy { text-align: center; }
.hero-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--fb-purple-light);
  color: var(--fb-purple);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero-headline {
  font-size: clamp(1.9rem, 6vw, 3.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--fb-purple-dark);
  margin-bottom: 16px;
}
.hero-subhead {
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  color: var(--fb-gray);
  max-width: 540px;
  margin: 0 auto 28px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
}
.hero-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 0.9rem;
  color: var(--fb-gray);
  font-weight: 500;
}
.stars { color: #FFB23E; letter-spacing: 2px; font-size: 1rem; }
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.store-badge { display: inline-block; transition: transform 0.15s ease, opacity 0.15s ease; }
.store-badge:hover { transform: translateY(-2px); }
.store-badge img { height: 48px; width: auto; border-radius: 10px; }

/* Hero media: interactive before/after slider in a phone-ish framed card. */
.hero-media { display: flex; justify-content: center; }
.hero-slider {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  overflow: hidden;
  background: var(--fb-beige);
  box-shadow: var(--shadow-lg);
  touch-action: none;
  cursor: ew-resize;
  border: 6px solid var(--fb-white);
  /* Prevent blue selection/drag highlight while scrubbing the handle. */
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.hero-slider:focus { outline: none; }
.hero-slider:focus-visible {
  outline: 2px solid var(--fb-purple);
  outline-offset: 4px;
}
.hero-slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}
.hero-slider-after { position: absolute; inset: 0; }
.hero-slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: var(--fb-white);
  transform: translateX(-50%);
  z-index: 3;
  box-shadow: 0 0 0 1px rgba(33, 25, 77, 0.12);
}
.hero-slider-grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--fb-white);
  box-shadow: var(--shadow-sm);
}
.hero-slider-grip::before {
  content: '‹ ›';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fb-purple);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 2px;
}
.hero-tag {
  position: absolute;
  bottom: 12px;
  z-index: 4;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(33, 25, 77, 0.78);
  color: var(--fb-white);
  backdrop-filter: blur(4px);
}
.hero-tag-before { left: 12px; }
.hero-tag-after { right: 12px; background: rgba(107, 78, 255, 0.9); }

/* ---------- Stats band ---------- */
.stats-band {
  background: var(--fb-purple-dark);
  padding: clamp(28px, 4vw, 40px) var(--section-pad-x);
}
.stats-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 16px;
  text-align: center;
}
.stat-value {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--fb-white);
  line-height: 1.1;
}
.stat-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 4px;
}

/* ---------- Generic section ---------- */
.section {
  padding: var(--section-pad-y) var(--section-pad-x);
  max-width: var(--container);
  margin: 0 auto;
}
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-title {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fb-purple-dark);
  line-height: 1.15;
}
.section-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--fb-gray);
  margin-top: 12px;
}
.section-cta { text-align: center; margin-top: 36px; }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(10px, 2vw, 18px);
}
.gallery-item {
  margin: 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--fb-gray-button);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
}
.gallery-item figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fb-purple-dark);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
}

/* ---------- How it works ---------- */
.how-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 3vw, 28px);
}
.how-step {
  text-align: center;
  padding: clamp(20px, 3vw, 32px) 20px;
  background: var(--fb-purple-soft);
  border-radius: var(--radius-card);
  position: relative;
}
.how-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--fb-purple);
  color: var(--fb-white);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 16px;
  box-shadow: 0 8px 18px rgba(107, 78, 255, 0.3);
}
.how-step-img {
  width: 100%;
  max-width: 220px;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
  margin: 0 auto 16px;
  background: var(--fb-beige);
  box-shadow: var(--shadow-sm);
}
.how-step h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--fb-purple-dark);
  margin-bottom: 8px;
}
.how-step p { font-size: 0.95rem; color: var(--fb-gray); }

/* ---------- Testimonials ---------- */
.testimonials-section { background: var(--fb-purple-soft); max-width: none; }
.testimonials-section > .section-head,
.testimonials-grid { max-width: var(--container); margin-left: auto; margin-right: auto; }
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 3vw, 24px);
}
.testimonial-card {
  background: var(--fb-white);
  border-radius: var(--radius-card);
  padding: clamp(20px, 3vw, 28px);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.testimonial-stars { color: #FFB23E; letter-spacing: 2px; font-size: 0.95rem; }
.testimonial-quote {
  font-size: 1.02rem;
  color: var(--fb-black);
  line-height: 1.55;
  flex: 1;
}
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.testimonial-name { display: block; font-weight: 700; color: var(--fb-purple-dark); font-size: 0.95rem; }
.testimonial-location { display: block; font-size: 0.82rem; color: var(--fb-gray); }

/* ---------- Feature / trust strip ---------- */
.features-section .section-title { text-align: center; margin-bottom: 32px; }
.trust-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(12px, 2vw, 20px);
}
.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: clamp(20px, 3vw, 28px) 16px;
  background: var(--fb-white);
  border: 1px solid var(--fb-gray-bg);
  border-radius: var(--radius-card);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fb-purple-dark);
  text-align: center;
}
.trust-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--fb-purple-light);
  color: var(--fb-purple);
  font-size: 1.35rem;
  line-height: 1;
}

/* ---------- Final CTA band ---------- */
.final-cta {
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(107, 78, 255, 0.55) 0%, rgba(107, 78, 255, 0) 60%),
    linear-gradient(135deg, #2A2160 0%, #21194D 100%);
  padding: var(--section-pad-y) var(--section-pad-x);
}
.final-cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.final-cta-title {
  font-size: clamp(1.7rem, 5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fb-white);
  line-height: 1.12;
}
.final-cta-subtitle {
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  color: rgba(255, 255, 255, 0.82);
  margin: 16px auto 28px;
  max-width: 520px;
}
.final-cta .btn { margin-inline: auto; }
.store-badges-center {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  justify-content: center;
  justify-items: center;
  align-items: center;
  margin-top: 24px;
  width: 100%;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--fb-purple-dark); padding: clamp(36px, 5vw, 56px) var(--section-pad-x); }
.site-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 720px);
  margin: 0 auto;
  text-align: center;
}
.site-footer-logo { height: 28px; width: auto; margin: 0 auto 16px; }
.site-footer-tagline {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 420px;
  width: 100%;
  margin: 0 auto 20px;
  text-align: center;
}
.site-footer-links { display: flex; gap: 20px; justify-content: center; margin-bottom: 20px; }
.site-footer-links a { color: var(--fb-white); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.site-footer-links a:hover { text-decoration: underline; }
.site-footer-copy {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  line-height: 1.5;
  width: 100%;
  text-align: center;
}

/* ---------- Sticky mobile CTA ---------- */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--fb-gray-bg);
  box-shadow: 0 -6px 18px rgba(43, 51, 64, 0.1);
}
.sticky-cta[hidden] { display: none; }
.sticky-cta .btn { width: 100%; }

/* ---------- Cookie consent banner (above sticky CTA) ---------- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 110;
  padding: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  pointer-events: none;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-inner {
  pointer-events: auto;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--fb-white);
  border: 1px solid rgba(107, 78, 255, 0.2);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(33, 25, 77, 0.12);
}
.cookie-banner-text {
  flex: 1 1 220px;
  margin: 0;
  font-size: 0.9rem;
  color: var(--fb-gray);
  line-height: 1.5;
}
.cookie-banner-link {
  color: var(--fb-purple);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-banner-link:hover { color: var(--fb-purple-dark); }
.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}
.cookie-banner-actions .btn { white-space: nowrap; }

@media (max-width: 599px) {
  .cookie-banner-actions {
    width: 100%;
    flex-direction: column;
  }
  .cookie-banner-actions .btn { width: 100%; }
}

/* When banner is visible on mobile, lift sticky CTA above it */
body:has(#cookie-banner:not([hidden])) .sticky-cta:not([hidden]) {
  bottom: calc(120px + env(safe-area-inset-bottom));
}

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .how-steps { grid-template-columns: repeat(3, 1fr); }
  .testimonials-grid { grid-template-columns: repeat(3, 1fr); }
  .trust-strip { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 420px) {
  .store-badges-center { grid-template-columns: 1fr; }
  .store-badges-center .store-badge { justify-self: center; }
}

/* ---------- Desktop: real two-column hero, no app feel ---------- */
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.05fr 0.95fr; }
  .hero-copy { text-align: left; }
  .hero-subhead { margin-left: 0; margin-right: 0; }
  .hero-actions { justify-content: flex-start; }
  .hero-rating { justify-content: flex-start; }
  .hero-copy .store-badges { justify-content: flex-start; }
  .hero-media { justify-content: flex-end; }
  .hero-slider { max-width: 420px; }
  .gallery-grid { grid-template-columns: repeat(6, 1fr); }
  /* Sticky CTA is a mobile pattern only; desktop keeps the nav CTA. */
  .sticky-cta { display: none !important; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .gallery-item, .store-badge { transition: none; }
}
