/* =====================================================================
   PART 2 — LANDING PAGE (public marketing site, scoped to body.landing)
   ---------------------------------------------------------------------
   A1. Utilities
   A2. Header (solid black)
   A3. Hero
   A4. Marquee (solid black)
   A5. Footer (solid gray)
   A6. Reveal-on-scroll
   A7. Short-viewport compaction
   A8. Mobile-app refinements (screen only)
   ===================================================================== */

body.landing {
  font-size: 16px;
  line-height: 1.6;
  background: var(--secondary);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body.landing.nav-open { overflow: hidden; }
body.landing h1,
body.landing h2,
body.landing h3,
body.landing h4,
body.landing h5 { line-height: 1.1; }

body.landing > main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
body.landing > .site-header,
body.landing > .site-footer { flex-shrink: 0; }


/* --- A1. Utilities ------------------------------------------------ */
.landing .wrap { width: var(--wrap); margin-inline: auto; }

.landing .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 54px;
  padding: 0 28px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background .35s var(--ease),
              color .35s var(--ease),
              border-color .35s var(--ease),
              transform .35s var(--ease),
              box-shadow .35s var(--ease);
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
}
.landing .btn svg { width: 16px; height: 16px; }

.landing .btn-primary {
  background: #000000;
  color: #ffffff;
  transition: background .35s var(--ease),
              transform .35s var(--ease),
              box-shadow .35s var(--ease);
}
.landing .btn-primary:hover {
  background: #676464;
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
}

.landing .btn-light {
  background: transparent;
  border-color: var(--secondary-30);
  color: var(--secondary);
  height: 33px;
  padding: 0 22px;
  font-size: 0.88rem;
}
.landing .btn-light:hover {
  background: var(--secondary);
  color: var(--primary);
  border-color: var(--secondary);
}

.landing .btn-ghost {
  background: transparent;
  border-color: var(--primary-30);
  color: var(--text);
}
.landing .btn-ghost:hover {
  background: var(--primary-08);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.landing .btn-outline {
  background: transparent;
  border: 1px solid var(--secondary-50);
  color: var(--secondary);
  height: 44px;
  padding: 0 22px;
  font-size: 0.88rem;
}
.landing .btn-outline:hover {
  background: var(--secondary);
  color: var(--primary);
  border-color: var(--secondary);
}

.landing .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding: 6px 0;
  margin-bottom: 22px;
}
.landing .eyebrow::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 1px;
  background: var(--accent);
}

.landing .lead {
  color: var(--text-soft);
  font-size: 1.04rem;
  max-width: 620px;
}

.landing section { position: relative; }


/* --- A2. Header (SOLID BLACK) ------------------------------------ */
.landing .site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: #000000;
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.landing .site-header.is-scrolled {
  border-bottom-color: var(--secondary-10);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .28);
}

.landing .nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
}

.landing .brand {
  display: inline-flex;
  align-items: center;
  color: var(--secondary);
  transition: opacity .3s var(--ease);
}
.landing .brand:hover { opacity: 0.85; }

.landing .brand-logo {
  display: block;
  height: 44px;
  width: auto;
  max-width: 220px;
}

.landing .nav { display: flex; align-items: center; gap: 4px; }
.landing .nav a {
  position: relative;
  padding: 9px 16px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--secondary-70);
  transition: color .3s var(--ease);
}
.landing .nav a::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 4px;
  height: 1px;
  background: var(--secondary);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .35s var(--ease);
}
.landing .nav a:hover { color: var(--secondary); }
.landing .nav a:hover::after { transform: scaleX(1); }

.landing .nav-actions { display: flex; align-items: center; gap: 14px; }

.landing .menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--secondary-20);
  background: var(--secondary-05);
  padding: 0 11px;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.landing .menu-toggle span {
  display: block;
  width: 100%;
  height: 1.6px;
  border-radius: 2px;
  background: var(--secondary);
  transition: transform .35s var(--ease), opacity .25s var(--ease);
}
.landing .menu-toggle.is-active span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.landing .menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.landing .menu-toggle.is-active span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }


/* --- A3. Hero ---------------------------------------------------- */
.landing .hero {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0;
  background: #ffffff;
  min-height: 0;
}

.landing .hero-inner {
  display: block;
  max-width: 820px;
  width: var(--wrap);
  margin-inline: auto;
}

.landing .hero-copy h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 26px;
}
.landing .hero-copy h1 em {
  font-style: italic;
  font-weight: 400;
  color: #676464;
}

.landing .hero-copy .lead {
  margin-bottom: 38px;
  font-size: 1.08rem;
}

.landing .hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}


/* --- A4. Marquee (SOLID BLACK) -----------------------------------
   Seamless infinite scroll.

   Why the old rule "ended" after some time:
     .marquee-track used `gap: 48px`. CSS gap has no trailing gap,
     so the total width was (12·span + 11·gap). But the animation
     shifts the track by 50%, i.e. (6·span + 5.5·gap). The 7th span
     actually starts at (6·span + 6·gap) — a 0.5-gap = 24px
     mismatch. Every 38 s the track reset with a visible 24px
     "pop".

   Fix:
     • The inter-item spacing now lives on each span as
       `margin-right: 48px`. Every span therefore carries its own
       trailing gap, so 50% of the track width lands EXACTLY on
       the start of copy #2 → seamless loop, no pop.
     • The marquee content is repeated 4× in the markup (see
       index.php). After the 50% shift, two full copies are still
       inside the viewport, so wide screens never see the right
       edge go empty before the loop resets.
   ----------------------------------------------------------------- */
.landing .marquee {
  flex-shrink: 0;
  background: #000000;
  border-top: 1px solid var(--secondary-10);
  border-bottom: 1px solid var(--secondary-10);
  padding: 16px 0;
  overflow: hidden;
}
.landing .marquee-track {
  display: flex;
  width: max-content;
  animation: scrollX 152s linear infinite;
}
.landing .marquee:hover .marquee-track { animation-play-state: paused; }
.landing .marquee-track span {
  font-family: var(--font);
  font-weight: 500;
  font-size: 0.94rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--secondary);
  display: inline-flex;
  align-items: center;
  gap: 48px;
  white-space: nowrap;
  margin-right: 48px;   /* per-item trailing gap → seamless 50% loop */
}
.landing .marquee-track span::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary-light);
}
@keyframes scrollX { to { transform: translateX(-50%); } }


/* --- A5. Footer -------------------------------------------------- */
.landing .site-footer {
  flex-shrink: 0;
  background: #676464;
  color: #ffffff;
  padding: 44px 0 0;
}

.landing .footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1.3fr 1fr;
  gap: 48px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--secondary-30);
}

.landing .footer-brand .brand { margin-bottom: 22px; }
.landing .footer-brand .brand-logo { height: 46px; max-width: 220px; }

.landing .footer-brand p {
  color: var(--secondary-80);
  font-size: 0.92rem;
  line-height: 1.65;
  max-width: 340px;
}

.landing .footer-col h5 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--secondary-50);
  margin-bottom: 22px;
}
.landing .footer-col ul { display: grid; gap: 12px; }
.landing .footer-col li,
.landing .footer-col a {
  font-size: 0.92rem;
  color: var(--secondary-80);
  line-height: 1.6;
  transition: color .3s var(--ease);
}
.landing .footer-col a:hover { color: var(--secondary); }

.landing .footer-bottom {
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--secondary-50);
}


/* --- A6. Reveal -------------------------------------------------- */
.landing .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  will-change: opacity, transform;
}
.landing .reveal.is-in { opacity: 1; transform: none; }


/* --- A7. Short-viewport compaction ------------------------------- */
@media (max-height: 780px) and (min-width: 641px) {
  .landing .hero { padding: 24px 0; }
  .landing .hero-copy h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
    margin-bottom: 18px;
  }
  .landing .hero-copy .lead { font-size: 1rem; margin-bottom: 26px; }
  .landing .eyebrow { margin-bottom: 14px; padding: 2px 0; }
  .landing .btn { height: 48px; }
  .landing .site-footer { padding: 32px 0 0; }
  .landing .footer-top { padding-bottom: 24px; gap: 32px; }
  .landing .footer-brand .brand { margin-bottom: 14px; }
  .landing .footer-col h5 { margin-bottom: 14px; }
  .landing .footer-bottom { padding: 14px 0; }
}

@media (max-height: 640px) and (min-width: 641px) {
  .landing .hero { padding: 16px 0; }
  .landing .hero-copy h1 {
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    margin-bottom: 12px;
  }
  .landing .hero-copy .lead { font-size: 0.92rem; margin-bottom: 18px; }
  .landing .eyebrow { font-size: 0.65rem; margin-bottom: 10px; }
  .landing .btn { height: 42px; font-size: 0.85rem; }
  .landing .site-footer { padding: 24px 0 0; }
  .landing .footer-top { padding-bottom: 18px; gap: 24px; }
  .landing .footer-brand p,
  .landing .footer-col li,
  .landing .footer-col a { font-size: 0.82rem; }
  .landing .footer-brand .brand-logo { height: 38px; }
}


/* =====================================================================
   A8. MOBILE-APP REFINEMENTS  (screen only)
   ---------------------------------------------------------------------
   · Safe-area-aware slide-in drawer with premium transitions
   · Compact hero with comfortable spacing
   · Touch-friendly 44px+ nav links and buttons
   · Footer stacks cleanly
   ===================================================================== */
@media screen and (max-width: 900px) {
  .landing .site-header { padding-top: env(safe-area-inset-top); }

  .landing .nav {
    padding-top: max(96px, calc(env(safe-area-inset-top) + 72px));
    padding-bottom: max(40px, env(safe-area-inset-bottom));
    padding-left: max(26px, env(safe-area-inset-left));
    padding-right: max(26px, env(safe-area-inset-right));
    width: min(340px, 86vw);
    gap: 2px;
  }
  .landing .nav a {
    padding: 18px 18px;
    font-size: 1.04rem;
    border-radius: 12px;
    min-height: 52px;
    display: flex;
    align-items: center;
  }
}

@media screen and (max-width: 640px) {
  .landing .wrap { width: calc(100% - 32px); }

  .landing .nav-wrap { padding: 14px 0; gap: 14px; }
  .landing .brand-logo { height: 38px; }
  .landing .menu-toggle { width: 42px; height: 42px; }

  .landing .hero { padding: 32px 0 40px; }
  .landing .hero-copy h1 {
    font-size: clamp(2rem, 8.5vw, 3rem);
    margin-bottom: 18px;
    line-height: 1.06;
  }
  .landing .hero-copy .lead {
    font-size: 1rem;
    margin-bottom: 28px;
    line-height: 1.55;
  }
  .landing .hero-actions { gap: 10px; }
  .landing .hero-actions .btn {
    flex: 1 1 auto;
    min-width: 140px;
    height: 50px;
    padding: 0 20px;
    font-size: 0.95rem;
  }

  .landing .eyebrow {
    margin-bottom: 14px;
    padding: 4px 0;
    font-size: 0.68rem;
  }

  .landing .marquee-track span {
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    margin-right: 36px;
    gap: 36px;
  }

  .landing .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-bottom: 28px;
  }
  .landing .footer-brand .brand-logo { height: 42px; }
  .landing .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }
}

@media screen and (max-width: 380px) {
  .landing .hero-copy h1 { font-size: clamp(1.8rem, 8vw, 2.4rem); }
  .landing .hero-actions .btn { height: 46px; font-size: 0.9rem; }
  .landing .brand-logo { height: 34px; }
}