/* ═══════════════════════════════════════════════════════════════════════
   HOME — one screen, no scroll.

   The homepage is a single stage: the claim, one button, one image. Every
   section that used to live below the fold now lives on the page that owns
   it (/platform, /engagements, /security), which is where the links go.

   Everything here is scoped to body.home-single so no other page inherits
   the locked viewport.
   ═══════════════════════════════════════════════════════════════════════ */

html:has(body.home-single) {
  height: 100%;
  overflow: hidden;
}

body.home-single {
  height: 100dvh;
  overflow: hidden;
  padding-bottom: 0;
  display: grid;
  grid-template-rows: var(--topbar-h) 1fr auto;
}

/* The mobile rule in site-subpage-chrome.css reserves 142px under every
   page for a bar this layout does not use. */
@media (max-width: 500px) {
  body.home-single {
    padding-bottom: 0;
  }
}

body.home-single .home-stage {
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  width: min(1180px, 100%);
  margin: 0 auto;
  padding-inline: clamp(20px, 5vw, 56px);
  min-height: 0;
}

/* ── Copy ───────────────────────────────────────────────────────────── */

body.home-single .home-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(12px, 1.6vh, 22px);
  min-width: 0;
}

body.home-single .home-eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta);
}

body.home-single .editorial-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(38px, 5.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

body.home-single .editorial-title em {
  font-style: italic;
  color: var(--terracotta);
}

body.home-single .editorial-lead {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(15px, 1.15vw, 19px);
  line-height: 1.45;
  color: var(--thread);
  text-wrap: pretty;
}

/* ── Actions ────────────────────────────────────────────────────────── */

body.home-single .home-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  margin-top: clamp(2px, 1vh, 10px);
}

body.home-single .home-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 30px;
  border-radius: 999px;
  background: var(--terracotta);
  color: var(--chalk);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

body.home-single .home-cta:hover,
body.home-single .home-cta:focus-visible {
  background: var(--ink);
  transform: translateY(-1px);
}

body.home-single .home-quiet {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(10, 10, 10, 0.22);
  padding-bottom: 2px;
}

body.home-single .home-quiet:hover,
body.home-single .home-quiet:focus-visible {
  color: var(--terracotta);
  border-bottom-color: var(--terracotta);
}

body.home-single .home-reassure {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--thread);
}

/* ── Art ────────────────────────────────────────────────────────────── */

body.home-single .home-art {
  margin: 0;
  height: min(72vh, 620px);
  border-radius: 18px;
  overflow: hidden;
  background: var(--calico);
}

body.home-single .home-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 28% center;
  display: block;
}

/* ── Foot rail ──────────────────────────────────────────────────────── */

body.home-single .home-rail {
  grid-row: 3;
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(10px, 2vw, 26px);
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(10px, 2vh, 20px) clamp(20px, 5vw, 56px);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--thread);
}

body.home-single .home-rail a {
  color: var(--thread);
  text-decoration: none;
}

body.home-single .home-rail a:hover,
body.home-single .home-rail a:focus-visible {
  color: var(--terracotta);
}

body.home-single .home-rail__spacer {
  margin-left: auto;
}

body.home-single .home-rail .editorial-last-updated {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--thread);
}

/* ── Narrow: the art becomes the ground, the copy sits on it ────────── */

@media (max-width: 860px) {
  body.home-single .home-stage {
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
  }

  /* The art is a child of the stage, so the copy needs its own positioned
     layer to stay above it. */
  body.home-single .home-copy {
    position: relative;
    z-index: 1;
  }

  /* The art stops being a panel and becomes the ground the copy sits on.
     z-index 0 rather than -1: a negative layer would sit behind the body
     background and disappear entirely. */
  body.home-single .home-art {
    position: fixed;
    inset: 0;
    z-index: 0;
    height: auto;
    border-radius: 0;
  }

  body.home-single .home-art img {
    object-position: 62% center;
    opacity: 0.2;
  }

  body.home-single .editorial-lead {
    max-width: 34ch;
  }

  body.home-single .home-reassure {
    font-size: 10px;
    letter-spacing: 0.04em;
  }

  body.home-single .home-rail {
    gap: 6px 14px;
    font-size: 10px;
    letter-spacing: 0.04em;
  }

  body.home-single .home-rail__spacer,
  body.home-single .home-rail .editorial-last-updated {
    display: none;
  }
}

@media (max-width: 520px) {
  /* Only the four routes a phone visitor actually needs; the rest are one
     tap away in the menu. */
  body.home-single .home-rail span:first-child,
  body.home-single .home-rail a[href="/about"],
  body.home-single .home-rail a[href="/apps"],
  body.home-single .home-rail a[href="/security"],
  body.home-single .home-rail a[href="/engagements"] {
    display: none;
  }

  body.home-single .home-rail {
    justify-content: center;
    gap: 6px 18px;
  }
}

@media (max-height: 620px) {
  body.home-single .home-eyebrow,
  body.home-single .home-reassure {
    display: none;
  }

  body.home-single .home-art {
    height: min(64vh, 420px);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.home-single .home-cta {
    transition: none;
  }
}
