/* ==========================================================================
   IMMERSIVE ENCOUNTER HERO  (desktop layer of the hybrid hero)
   --------------------------------------------------------------------------
   Every rule is scoped to html.hero-immersive. The head script sets that class
   in "auto" mode on screens at least 3:2 and 960x540, or always with
   ?hero=immersive. Portrait tablets and phones keep the approved framed hero,
   untouched. Remove the <link> to this file and the site is the framed design.
   The Bloom / Breath / wordmark system is shared and untouched.
   ========================================================================== */

/* ---------- 1. The first screen IS the Encounter ------------------------ */
/* The header leaves the flow and floats over the art, so the hero can start at
   the very top of the viewport and fill it. */
html.hero-immersive .site-header {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  background: transparent;
  border-bottom-color: transparent;
  transition:
    opacity 1100ms var(--ease-quiet),
    background-color 500ms var(--ease-quiet),
    border-color 500ms var(--ease-quiet);
}
/* Once the hero wordmark has passed under the header, it becomes the usual solid
   bar, fading in so there is no jump. */
html.hero-immersive .site-header.is-scrolled {
  background: var(--dark-bg);
  border-bottom-color: var(--dark-rule);
}
html.hero-immersive .site-header__inner { max-width: var(--maxw); }

/* While the hero wordmark is visible the header carries no brand mark at all:
   SONDER is already at the centre of the screen. It returns, in full, on scroll. */
html.hero-immersive .wordmark.is-collapsed { opacity: 0; pointer-events: none; }
html.hero-immersive .wordmark { transition: opacity 500ms var(--ease-quiet); }

/* Editorial navigation over the art: cream, quiet, letter-spaced a touch. */
html.hero-immersive .site-nav__list a {
  color: var(--dark-text);
  letter-spacing: 0.02em;
  opacity: 0.82;
  transition: opacity 250ms var(--ease-out), color 250ms var(--ease-out);
}
html.hero-immersive .site-nav__list a[aria-current="true"] { opacity: 1; }
html.hero-immersive .site-nav__list a::after {
  height: 1px;
  background: var(--dark-text);
  transition: transform 400ms var(--ease-out);
}
/* A very small orange point marks the focused or current link. */
html.hero-immersive .site-nav__list a::before {
  content: "";
  position: absolute;
  left: -0.7rem;
  top: 50%;
  width: 0.25rem;
  height: 0.25rem;
  margin-top: -0.125rem;
  border-radius: 50%;
  background: var(--c-orange);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out);
}
html.hero-immersive .site-nav__list a[aria-current="true"]::before,
html.hero-immersive .site-nav__list a:focus-visible::before { opacity: 1; transform: none; }
@media (hover: hover) and (pointer: fine) {
  html.hero-immersive .site-nav__list a:hover { opacity: 1; }
}
html.hero-immersive .site-nav__contact { color: var(--dark-text) !important; }

/* Over the art the links sit in the Encounter's dark space (offset set by
   site.js); once the header turns solid they glide to the usual right edge. */
html.hero-immersive .site-nav { transition: transform 600ms var(--ease-in-out); }
html.hero-immersive .site-header.is-scrolled .site-nav { transform: none !important; }

/* ---------- 2. Full-viewport stage, no frame ---------------------------- */
/* The hero is full-bleed: no gutters, no maximum width. Its first row is the
   whole viewport; the copy band moves just below the fold. */
html.hero-immersive .hero {
  height: auto;
  min-height: 0;
  max-width: none;
  padding-inline: 0;
  /* Same centred framing the intro uses, so on most screens the picture does not
     move at all between the Bloom and the living homepage. */
  --crop-x: 0.5;
  --crop-y: 0.5;
}
html.hero-immersive .hero__plate { container-type: size; }
html.hero-immersive .hero__slot { width: 100%; height: 100%; aspect-ratio: auto; }

/* No conventional hero band in the immersive layout: after the Encounter the page
   flows straight into Approach. The band's headline and description stay in the
   document for screen readers (the page keeps its <h1>); its buttons are removed
   from this layout only. The framed layout shows the band exactly as approved. */
html.hero-immersive .hero { grid-template-rows: 100svh; }
html.hero-immersive .hero__band {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
html.hero-immersive .hero__actions { display: none; }

/* Screens much wider than the art (ultrawide): the picture stops at its safe
   crop and its sides dissolve into the same near-black, so it never reads as a
   video player. */
@media (min-aspect-ratio: 209/100) {
  html.hero-immersive .stage {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
            mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
  }
}

/* ---------- 3. Descriptor --------------------------------------------------- */
/* One quiet line set under the wordmark like a lockup, right-aligned to its R.
   It is placed and sized in the artwork's own coordinates (site.js), in a band
   that stays clear through the whole Breath loop. No box, no shadow. */
.hero-descriptor { display: none; }
html.hero-immersive[data-descriptor="on"] .hero-descriptor {
  display: block;
  position: absolute;
  z-index: 6;
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 13px;             /* replaced by an artwork-relative size (site.js) */
  line-height: 1;              /* site.js measures the gap to the cap height */
  letter-spacing: 0;
  white-space: nowrap;
  text-align: center;
  /* Text-only separation: a 1.6 px knockout in the exact video black. Invisible on
     the dark field; where a moving contour line approaches a letter, the line
     stops just short of it, as if passing behind. Not a shadow or panel. */
  text-shadow:
    1.60px 0.00px 0 var(--video-black),
    1.48px 0.61px 0 var(--video-black),
    1.13px 1.13px 0 var(--video-black),
    0.61px 1.48px 0 var(--video-black),
    0.00px 1.60px 0 var(--video-black),
    -0.61px 1.48px 0 var(--video-black),
    -1.13px 1.13px 0 var(--video-black),
    -1.48px 0.61px 0 var(--video-black),
    -1.60px 0.00px 0 var(--video-black),
    -1.48px -0.61px 0 var(--video-black),
    -1.13px -1.13px 0 var(--video-black),
    -0.61px -1.48px 0 var(--video-black),
    -0.00px -1.60px 0 var(--video-black),
    0.61px -1.48px 0 var(--video-black),
    1.13px -1.13px 0 var(--video-black),
    1.48px -0.61px 0 var(--video-black);
  /* Logo lockup: left/top are set by site.js in the SVG wordmark's coordinates
     (centre of the S…R ink, a fixed gap below the O). */
  left: 50%;
  top: 58%;
  transform: translateX(-50%);
  color: var(--dark-text);
  opacity: 0.86;
  pointer-events: none;
  transition: opacity 1000ms var(--ease-quiet) 700ms;
}
html.ui-hidden.hero-immersive .hero-descriptor,
html.is-settling.hero-immersive:not(.is-revealing) .hero-descriptor { opacity: 0; }
@media (max-width: 760px), (orientation: portrait) and (max-width: 1180px) {
  html.hero-immersive .hero-descriptor { display: none !important; }
}

/* ---------- 4. Scroll invitation ----------------------------------------- */
.scroll-cue { display: none; }
html.hero-immersive .scroll-cue {
  position: absolute;
  z-index: 6;
  left: 50%;                       /* desktop: replaced by an anchor in the artwork (site.js) */
  bottom: clamp(1.25rem, 3vh, 2.25rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  color: var(--dark-text);
  text-decoration: none;
  transform: translateX(-50%);
  transition: opacity 600ms var(--ease-quiet);
}
html.hero-immersive .scroll-cue[style*="top"] { transform: translate(-50%, -50%); }
html.hero-immersive .scroll-cue__label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
}
html.hero-immersive .scroll-cue__line {
  width: 1px;
  height: 2.25rem;
  background: currentColor;
  opacity: 0.55;
  transform-origin: top;
}
@media (prefers-reduced-motion: no-preference) {
  /* An occasional, slow pulse down the line: waits, then repeats rarely. */
  html.hero-immersive .scroll-cue__line { animation: sonder-cue 3.6s var(--ease-in-out) 2.5s infinite; }
}
@keyframes sonder-cue {
  0%   { transform: scaleY(0); opacity: 0; }
  20%  { opacity: 0.55; }
  45%  { transform: scaleY(1); }
  75%, 100% { transform: scaleY(1); opacity: 0; }
}
html.ui-hidden.hero-immersive .scroll-cue,
html.is-settling.hero-immersive .scroll-cue { opacity: 0; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  html.hero-immersive .scroll-cue:hover .scroll-cue__label { opacity: 1; }
}

/* ---------- 5. Phones and tablet portrait (only when immersive is forced) --------------------------------- */
/* A 16:9 picture cannot cover a tall screen without losing both faces, so the
   picture keeps the intro's framing: full width, centred in a full-screen field of
   the same near-black, with its top and bottom edges dissolved. The existing Menu
   button stays: four links would crowd the faces. */
@media (max-width: 760px), (orientation: portrait) and (max-width: 1180px) {
  html.hero-immersive .hero__plate { container-type: size; }
  html.hero-immersive .hero__slot { aspect-ratio: auto; }
  html.hero-immersive .stage { --sw: calc(100cqw * var(--stage-ratio) / var(--stack-aspect)); }
}
@media (max-width: 760px) {
  html.hero-immersive .scroll-cue { bottom: max(1.25rem, env(safe-area-inset-bottom)); }
}

/* ---------- 6. Prototype review switches (footer) ------------------------------ */
.layout-switch button[aria-pressed="true"] { color: var(--dark-text); text-decoration-color: var(--c-orange); }
