/* ============================================================
   LANDING PAGE STYLES
   All classes scoped to .landing-* to avoid collisions
   with the app's existing CSS.
   ============================================================ */

/* === SCROLL FADE-IN === */

.landing-section,
.landing-hero {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity  0.45s ease,
    transform 0.45s ease;
}

.landing-section.is-visible,
.landing-hero.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .landing-section,
  .landing-hero {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* === TOPBAR === */

.landing-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--stroke-soft-200);
  background: var(--bg-white-0);
  position: sticky;
  top: 0;
  z-index: 10;
}

.landing-topbar .landing-logo img {
  max-width: 120px;
  height: auto;
  display: block;
}

.landing-topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}


/* === LAYOUT === */

.landing-body {
  background: var(--bg-default);
  font-family: var(--font-primary);
  color: var(--text-strong-950);
}

.landing-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 max(16px, env(safe-area-inset-left));
}

.landing-section {
  padding: 64px 0;
}

@media (min-width: 768px) {
  .landing-section {
    padding: 80px 0;
  }
}

.landing-section--alt {
  background: var(--bg-weak-50);
}


/* === HERO === */

.landing-hero {
  text-align: center;
  padding: 80px 0 64px;
}

@media (min-width: 768px) {
  .landing-hero {
    padding: 120px 0 80px;
  }
}

.landing-hero h1 {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.72px;
  color: var(--text-strong-950);
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .landing-hero h1 {
    font-size: 52px;
    letter-spacing: -1.04px;
  }
}

.landing-hero__subtitle {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-sub-600);
  max-width: 560px;
  margin: 0 auto 32px;
}

@media (min-width: 768px) {
  .landing-hero__subtitle {
    font-size: 18px;
  }
}

.landing-hero__trust {
  font-size: 14px;
  color: var(--text-soft-400);
  margin: -16px auto 28px;
  max-width: 480px;
  line-height: 1.6;
}

.landing-hero__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}


/* === BUTTONS (landing-specific, anchor-tag friendly) === */

.landing-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-primary);
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

/* Primary — accent fill */
.landing-btn--primary {
  background: var(--primary-accent);
  color: var(--static-white);
}

.landing-btn--primary:hover {
  background: var(--primary-accent-hover);
  color: var(--static-white);
}

/* Secondary — dark fill */
.landing-btn--secondary {
  background: var(--primary-dark);
  color: var(--static-white);
}

.landing-btn--secondary:hover {
  background: #003a57;
  color: var(--static-white);
}

/* Ghost — outlined, no fill */
.landing-btn--ghost {
  background: transparent;
  color: var(--text-sub-600);
  border-color: var(--stroke-soft-200);
}

.landing-btn--ghost:hover {
  background: var(--bg-weak-50);
  color: var(--text-strong-950);
}


/* === HOW IT WORKS === */

.landing-how-it-works h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.56px;
  color: var(--text-strong-950);
  margin-bottom: 12px;
}

.landing-how-it-works p {
  font-size: 16px;
  color: var(--text-sub-600);
  line-height: 1.6;
  max-width: 600px;
}


/* === SCENARIO DISPLAY === */

.scenario-display {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-weak-50);
}

.scenario-display__video,
.scenario-display__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scenario-display__video--hidden,
.scenario-display__poster--hidden {
  display: none;
}

.scenario-display__caption {
  padding: 20px 0 24px;
  min-height: 72px;
}

.scenario-display__title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-strong-950);
  margin-bottom: 6px;
}

.scenario-display__description {
  font-size: 14px;
  color: var(--text-sub-600);
  line-height: 1.5;
  max-width: 560px;
}


/* === SCENARIO RAIL === */

.scenario-rail {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.scenario-rail::-webkit-scrollbar {
  display: none;
}

/*
 * Viewport-relative width ensures 2 thumbs are always fully visible plus
 * ~30px peek of the third, on any phone width. min-width/max-width bound
 * the extremes. Explicit height prevents collapse when images are slow/missing.
 */
.scenario-thumb {
  width: calc(50vw - 36px);
  min-width: 120px;
  max-width: 200px;
  height: 100px;

  padding: 0;
  background: var(--bg-weak-50);
  cursor: pointer;

  border-radius: 8px;
  border: 2px solid transparent;
  overflow: hidden;
  flex-shrink: 0;

  position: relative;

  transition: border-color 0.2s ease, transform 0.2s ease;
}

.scenario-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scenario-thumb:hover {
  border-color: var(--primary-accent);
  transform: translateY(-2px);
}

.scenario-thumb--active {
  border-color: var(--primary-accent);
}

/* Tablet — fixed width replaces the viewport-relative mobile sizing */
@media (min-width: 640px) {
  .scenario-thumb {
    width: 120px;
    min-width: unset;
    max-width: unset;
    height: 80px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .scenario-thumb {
    width: 140px;
    height: 90px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scenario-thumb {
    transition: none;
  }
  .scenario-thumb:hover {
    transform: none;
  }
}


/* === CTA BLOCK === */

.landing-cta {
  text-align: center;
}

.landing-cta p {
  font-size: 16px;
  color: var(--text-sub-600);
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.landing-cta__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}


/* === FOOTER === */

.landing-footer {
  background: var(--bg-weak-50);
  border-top: 1px solid var(--stroke-soft-200);
  padding: 48px 0 0;
}

.landing-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 48px;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 40px;
}

.landing-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.landing-footer__logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.36px;
  color: var(--primary-dark);
  text-decoration: none;
  transition: color 0.15s;
}

.landing-footer__logo:hover {
  color: var(--primary-accent);
}

.landing-footer__address {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-soft-400);
  max-width: 200px;
}

.landing-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  align-items: flex-start;
}

.landing-footer__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-sub-600);
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}

.landing-footer__link:hover {
  color: var(--text-strong-950);
}

.landing-footer__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.landing-footer__social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--stroke-soft-200);
  border-radius: 8px;
  background: var(--bg-white-0);
  color: var(--text-sub-600);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.landing-footer__social-btn:hover {
  border-color: var(--primary-accent);
  color: var(--primary-accent);
  background: var(--bg-weak-50);
}

.landing-footer__bottom {
  border-top: 1px solid var(--stroke-soft-200);
  padding: 16px 0;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
}

@media (max-width: 640px) {
  .landing-footer__inner {
    flex-direction: column;
    gap: 32px;
  }
}


/* ============================================================
   PUBLIC PAGES — about / contact / legal
   ============================================================ */

/* === SHARED PAGE SHELL === */

.public-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 16px 80px;
}

.public-page__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-sub-600);
  text-decoration: none;
  margin-bottom: 40px;
  transition: color 0.15s;
}

.public-page__back:hover {
  color: var(--text-strong-950);
}

.public-page__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-accent);
  margin-bottom: 12px;
}

.public-page__title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.64px;
  color: var(--text-strong-950);
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .public-page__title {
    font-size: 42px;
    letter-spacing: -0.84px;
  }
}

.public-page__divider {
  width: 40px;
  height: 3px;
  background: var(--primary-accent);
  border-radius: 2px;
  margin-bottom: 32px;
}

.public-page__empty {
  padding: 48px 0;
  color: var(--text-soft-400);
  font-size: 15px;
}

.public-page__intro {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-sub-600);
  margin-bottom: 40px;
  max-width: 520px;
}


/* === ABOUT PAGE === */

.about-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-sub-600);
}

.about-body p {
  margin-bottom: 1.2em;
}


/* === CONTACT PAGE === */

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 40px;
}

.contact-channel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--stroke-soft-200);
  border-radius: 10px;
  background: var(--bg-white-0);
  text-decoration: none;
  color: var(--text-strong-950);
  transition: border-color 0.15s, background 0.15s;
}

.contact-channel:hover {
  border-color: var(--primary-accent);
  background: var(--bg-weak-50);
}

.contact-channel__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-weak-50);
  color: var(--primary-accent);
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.contact-channel:hover .contact-channel__icon {
  background: var(--primary-accent);
  color: var(--static-white);
}

.contact-channel__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft-400);
  margin-bottom: 1px;
}

.contact-channel__value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-strong-950);
}

.contact-channel--static {
  cursor: default;
}

.contact-channel--static:hover {
  border-color: var(--stroke-soft-200);
  background: var(--bg-white-0);
}

.contact-channel--static:hover .contact-channel__icon {
  background: var(--bg-weak-50);
  color: var(--primary-accent);
}

.contact-socials__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft-400);
  margin-bottom: 12px;
}

.contact-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--stroke-soft-200);
  border-radius: 8px;
  background: var(--bg-white-0);
  color: var(--text-sub-600);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.contact-social-btn:hover {
  border-color: var(--primary-accent);
  color: var(--primary-accent);
  background: var(--bg-weak-50);
}


/* === LEGAL PAGE === */

.legal-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-sub-600);
}

.legal-body h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text-strong-950);
  margin-top: 2.5em;
  margin-bottom: 0.6em;
}

.legal-body h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-strong-950);
  margin-top: 1.8em;
  margin-bottom: 0.5em;
}

.legal-body p {
  margin-bottom: 1em;
}

.legal-body ul,
.legal-body ol {
  margin-left: 1.5em;
  margin-bottom: 1em;
}

.legal-body li {
  margin-bottom: 0.4em;
}

.legal-body a {
  color: var(--primary-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-body a:hover {
  color: var(--primary-accent-hover);
}

.legal-body strong {
  color: var(--text-strong-950);
  font-weight: 600;
}

.legal-body hr {
  border: none;
  border-top: 1px solid var(--stroke-soft-200);
  margin: 2em 0;
}

.legal-body blockquote {
  border-left: 3px solid var(--stroke-soft-200);
  padding-left: 16px;
  color: var(--text-soft-400);
  margin: 1.5em 0;
}


/* ============================================================
   MOBILE OPTIMIZATIONS
   ============================================================ */

/* === EXTRA-SMALL SCREENS (< 480px) === */

@media (max-width: 479px) {
  /* Hero — tighten vertical rhythm */
  .landing-hero {
    padding: 48px 0 40px;
  }

  .landing-hero h1 {
    font-size: 28px;
    letter-spacing: -0.56px;
  }

  /* Stack CTA buttons full-width so they're easy to tap */
  .landing-hero__actions,
  .landing-cta__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .landing-btn {
    width: 100%;
  }

  /* Section headings */
  .landing-how-it-works h2 {
    font-size: 24px;
  }

  /* Scenario caption — remove fixed min-height to save vertical space */
  .scenario-display__caption {
    padding: 12px 0 16px;
    min-height: auto;
  }

  /* Public sub-pages */
  .public-page {
    padding: 32px 16px 56px;
  }

  .public-page__title {
    font-size: 26px;
  }

  .public-page__back {
    margin-bottom: 28px;
  }

  /* Slightly larger social icon targets */
  .landing-footer__social-btn {
    width: 40px;
    height: 40px;
  }
}


/* === TOUCH-FRIENDLY TAP TARGETS (coarse pointer = finger) === */

@media (hover: none) and (pointer: coarse) {
  /* Minimum 48px height per WCAG 2.5.5 */
  .landing-btn {
    min-height: 48px;
  }

  .landing-footer__social-btn,
  .contact-social-btn {
    min-height: 44px;
    min-width: 44px;
  }

  /* No hover lift on touch — suppress pointer-only effects */
  .scenario-thumb:hover {
    transform: none;
    border-color: transparent;
  }

  /* Keep active state visible regardless */
  .scenario-thumb--active {
    border-color: var(--primary-accent);
  }

  /* Visible resting border so thumbs don't look borderless */
  .scenario-thumb {
    border-color: var(--stroke-soft-200);
  }
}