/* ==========================================================================
   CrossAIHub · Home flow (2026-10-16, Yousef-approved layout exception)
   One continuous page on desktop AND mobile: hero → "What is CrossAIHub?" → the
   Living Family Tree. Layout only: the hero image, hero wording, the intro video
   and the sealed tree are untouched (the tree is the /family-tree/ page itself,
   embedded by reference in an iframe).
   ========================================================================== */

/* Desktop/laptop: the hero leaves a visible strip below it so the page clearly continues. */
@media (min-width: 900px), (orientation: landscape) {
  .house-scene { height: 88vh; height: 88dvh; min-height: 460px; }
  /* the hero words sit just above the scroll cue, never under it */
  .house-scene .fi-invite { bottom: calc(4vh + 44px); }
}
/* Phones (portrait): the hero is a short band and the next section is already in view — no cue needed. */
@media (max-width: 899px) and (orientation: portrait) { .house-scene .home-scroll-cue { display: none; } }

/* Gentle scroll cue at the foot of the hero (never over the intro video: it sits below it in z-order). */
.home-scroll-cue {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  z-index: 30; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  color: #FDF6E5; background: rgba(42, 36, 24, .38);
  font: 600 22px/1 Georgia, serif; text-decoration: none;
  box-shadow: 0 0 0 1px rgba(253, 246, 229, .45);
  animation: home-cue 2.6s ease-in-out infinite;
}
.home-scroll-cue span { transform: translateY(-4px); }
.home-scroll-cue:focus-visible { outline: 2px solid #E8C87A; outline-offset: 3px; }
@keyframes home-cue { 0%, 100% { translate: 0 0; } 50% { translate: 0 6px; } }
@media (prefers-reduced-motion: reduce) { .home-scroll-cue { animation: none; } }

/* Lead-in from the text to the tree */
.home-tree-lead {
  display: inline-block; margin-top: 28px;
  font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(18px, 2vw, 21px);
  color: #6B1F2E; text-decoration: none; border-bottom: 1px solid rgba(107, 31, 46, .35);
}
.home-tree-lead:hover, .home-tree-lead:focus-visible { border-bottom-color: currentColor; }
html[data-lamp="on"] .home-tree-lead { color: #E8C87A; border-bottom-color: rgba(232, 200, 122, .5); }

/* The tree section: same cream as the tree page so the frame edge disappears. */
.home-tree { background: #FDF6E5; padding: 8px 0 40px; position: relative; z-index: 20; scroll-margin-top: 0; }
.home-tree__frame {
  display: block; width: 100%; max-width: 1408px; margin: 0 auto; border: 0;
  /* no-JS fallback: the tree stage is 1376×768 plus its caption */
  aspect-ratio: 1376 / 900; background: #FDF6E5;
}
.home-tree__open { text-align: center; margin: 14px 0 0; font: italic 15px/1.4 "Cormorant Garamond", Georgia, serif; }
.home-tree__open a { color: #6A6355; }
html[data-lamp="on"] .home-tree { background: #3A4A6C; }
html[data-lamp="on"] .home-tree__open a { color: #F5E7C8; }
@media (max-width: 720px) { .home-tree__frame { aspect-ratio: 390 / 760; } }

/* ── SAFE GUTTER · home (2026-10-21, strict gutter gate) — LAYOUT ONLY: no image, wording, video or tree change.
   1. "English · Español" (nav.lang-nav at the top of the hero) had no side padding: its first letter sat at x = 0.
   2. Portrait phones/tablets put the welcome caption in the flow under the house (portrait-refinement.css:
      transform: none !important), but with "reduce motion" on, phase4-tokens' .reduced-motion .welcome-caption
      { transform: translateX(-50%) !important } (written for the absolutely-centred caption) is more specific and
      still won, pushing the in-flow caption half its width off the left edge ("Peace be to this house." cut). */
.house-scene .lang-nav,
body > .lang-nav {
  box-sizing: border-box;
  padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px));
}
@media (max-width: 899px) and (orientation: portrait) {
  html.reduced-motion .welcome-caption,
  html .reduced-motion .welcome-caption { transform: none !important; }
}
/* ── end SAFE GUTTER · home ── */
