/* ---------------------------------------------------------------------------
 * "Sunset Promenade" beach scene + coastal login presentation.
 *
 * Copied from Tru3Meta (converse-market, src/components/marketing/ryze/
 * beach-scene.css at f48b214). Only the home-page hero rules were left out.
 * Keep this file identical to its source: the page's own wording, fields and
 * links live in login.html, and the card's controls in coast_auth.css.
 *
 *
 * Restores the positioning and animation rules the original walk scene
 * expected, scoped to `.beach-scene` so nothing leaks into other surfaces.
 * All travel is transform-based on the outer wrappers; the actor SVGs keep
 * their inline scale transforms, and their limb classes
 * (`ins-garden-leg/arm/dog-leg/cat-leg`) only ever receive rotations.
 *
 * Motion contract:
 * - every animation lives behind `prefers-reduced-motion: no-preference`;
 *   without it the cast rests at a deliberate static arrangement
 *   (each actor's `--actor-x`), never an empty scene.
 * - `[data-paused='true']` freezes all scene animation in place.
 * - `--actor-size` multiplies wrapper width and height together: 1 on the
 *   hero, 3 on login, preserving proportions exactly.
 * Served as a plain file at /static/coast/coast_scene.css (server/static_assets.py) and linked from coast_base.html;
 * it is not a template, so no value from a page can reach it.
 * ------------------------------------------------------------------------ */

.beach-scene {
  --actor-size: 1;
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.beach-scene[data-variant='auth'] {
  --actor-size: 3;
}

.beach-stage {
  position: absolute;
  inset: 0;
}

.beach-stage > * {
  position: absolute;
}

/* --- Environment ---------------------------------------------------------- */

.beach-sky {
  inset: 0;
  background: linear-gradient(180deg, #eff8ff 0%, #dceffe 32%, #c9e8fa 46%, #ffe4b4 64%, #ffc674 100%);
}

.beach-sun-halo {
  top: 48%;
  left: 60%;
  width: 120px;
  height: 120px;
  border-radius: 9999px;
  background: radial-gradient(circle, #fef3c7 0%, #fde68a 40%, #f59e0b 70%, transparent 100%);
  filter: blur(2px);
  opacity: 0.55;
}

.beach-sun {
  top: 50%;
  left: 62%;
  width: 80px;
  height: 80px;
  border-radius: 9999px;
  background: #fff1c9;
  opacity: 0.85;
}

.beach-sun-rays {
  top: 40%;
  left: 55%;
  width: 200px;
  height: 200px;
  opacity: 0.12;
}

.beach-cloudlet {
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.38);
  filter: blur(2px);
}

.beach-cloudlet--1 { top: 8%; left: 10%; width: 140px; height: 50px; }
.beach-cloudlet--2 { top: 12%; left: 35%; width: 100px; height: 36px; background: rgba(255, 255, 255, 0.3); filter: blur(1px); }
.beach-cloudlet--3 { top: 6%; right: 20%; width: 180px; height: 55px; background: rgba(255, 255, 255, 0.34); }
.beach-cloudlet--4 { top: 18%; right: 8%; width: 80px; height: 28px; background: rgba(255, 255, 255, 0.25); filter: blur(1px); }

.beach-cloud {
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0.45;
}

.beach-cloud--1 { top: 10%; left: 8%; width: 120px; height: 40px; }
.beach-cloud--2 { top: 15%; left: 43%; width: 90px; height: 32px; }
.beach-cloud--3 { top: 8%; left: 76%; width: 150px; height: 45px; }

.beach-birds {
  overflow: visible;
}

.beach-birds--1 { top: 22%; left: 20%; width: 60px; height: 20px; opacity: 0.5; }
.beach-birds--2 { top: 18%; right: 30%; width: 50px; height: 16px; opacity: 0.4; }

/* Wing rotation pivots sit on each gull's body joint (viewBox units). */
.beach-bird-wing { transform-box: view-box; }
.beach-bird--a .beach-bird-wing { transform-origin: 20px 10px; }
.beach-bird--b .beach-bird-wing { transform-origin: 42.5px 8px; }
.beach-bird--c .beach-bird-wing { transform-origin: 16px 8px; }

.beach-sea {
  top: 62%;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(180deg, #37bfcb 0%, #20aabb 48%, #118da5 100%);
}

.beach-waves--upper { top: 62%; left: 0; right: 0; width: 100%; height: 40px; }
.beach-waves--lower { top: 68%; left: 0; right: 0; width: 100%; height: 30px; }
.beach-wave--1 { fill: #62d2d8; opacity: 0.8; --wave-shift: -300px; --wave-speed: 15s; }
.beach-wave--2 { fill: #25b2c3; opacity: 0.6; --wave-shift: 300px; --wave-speed: 24s; }
.beach-wave--3 { fill: #149bb2; opacity: 0.5; --wave-shift: -400px; --wave-speed: 19s; }

.beach-glint {
  border-radius: 9999px;
}

.beach-glint--wide {
  top: 64%;
  left: 58%;
  width: 60px;
  height: 80px;
  background: linear-gradient(180deg, rgba(253, 230, 138, 0.33), transparent);
  filter: blur(8px);
}

.beach-glint--narrow {
  top: 66%;
  left: 60%;
  width: 30px;
  height: 50px;
  background: linear-gradient(180deg, rgba(254, 243, 199, 0.2), transparent);
  filter: blur(4px);
}

.beach-boat { top: 66%; left: 25%; width: 50px; height: 20px; opacity: 0.6; }

.beach-sand {
  bottom: 0;
  left: 0;
  right: 0;
  height: 18%;
  background: linear-gradient(180deg, #ffe1a3, #ffc875);
}

.beach-palm--left { left: -8px; bottom: 14%; width: 94px; height: 118px; opacity: 0.52; }
.beach-palm--right { right: 22px; bottom: 13%; width: 80px; height: 108px; opacity: 0.48; }
.beach-umbrella { left: 89%; bottom: 14%; width: 50px; height: 45px; opacity: 0.3; }
.beach-starfish { left: 60%; bottom: 3%; width: 16px; height: 16px; opacity: 0.4; }

/* --- Actors ---------------------------------------------------------------- */

.beach-actors {
  position: absolute;
  inset: 0;
}

/* Both surfaces share one walk lane above the text layer: on the hero the
   cast passes in front of the product window's lower edge, and on login it
   walks in front of the story headline. The scene never intercepts pointer
   events, so the window and form stay fully interactive. The login card
   raises itself above the lane so the form is never covered. */
.beach-scene[data-variant='hero'] .beach-actors,
.beach-scene[data-variant='auth'] .beach-actors {
  z-index: 20;
}

.beach-walker {
  position: absolute;
  bottom: 49px;
  left: var(--actor-x);
  width: calc(47px * var(--actor-size));
  height: calc(86px * var(--actor-size));
}

.beach-scene .ins-garden-side-person {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.beach-walker--dad { --actor-x: 8%; --travel: 74s; --offset: -11s; }
.beach-walker--mom { --actor-x: 15%; --travel: 78s; --offset: -17s; bottom: 51px; }

.beach-walker--traveler {
  --actor-x: 70%;
  --travel: 82s;
  --offset: -57s;
  width: calc(63px * var(--actor-size));
  bottom: 47px;
}

.beach-walker--teen {
  --actor-x: 48%;
  --travel: 66s;
  --offset: -8s;
  width: calc(42px * var(--actor-size));
  height: calc(78px * var(--actor-size));
  bottom: 50px;
}

.beach-walker--kid {
  --actor-x: 55%;
  --travel: 60s;
  --offset: -40s;
  width: calc(31px * var(--actor-size));
  height: calc(57px * var(--actor-size));
  bottom: 44px;
}

.beach-walker--elder {
  --actor-x: 27%;
  --travel: 96s;
  --offset: -71s;
  width: calc(46px * var(--actor-size));
  height: calc(84px * var(--actor-size));
  bottom: 50px;
}

.beach-walker--jogger {
  --actor-x: 33%;
  --travel: 46s;
  --offset: -25s;
  bottom: 46px;
}

.beach-walker--reader {
  --actor-x: 88%;
  --travel: 90s;
  --offset: -62s;
  width: calc(45px * var(--actor-size));
  height: calc(82px * var(--actor-size));
  bottom: 52px;
}

.beach-dog,
.beach-cat {
  position: absolute;
  left: var(--actor-x);
  bottom: 45px;
  overflow: visible;
}

.beach-dog {
  width: calc(61px * var(--actor-size));
  height: calc(37px * var(--actor-size));
}

.beach-dog--1 { --actor-x: 35%; --travel: 70s; --offset: -30s; }

.beach-dog--2 {
  --actor-x: 79%;
  --travel: 64s;
  --offset: -12s;
  width: calc(56px * var(--actor-size));
  height: calc(34px * var(--actor-size));
  bottom: 43px;
}

.beach-dog--3 {
  --actor-x: 58%;
  --travel: 56s;
  --offset: -47s;
  width: calc(52px * var(--actor-size));
  height: calc(32px * var(--actor-size));
  bottom: 44px;
}

.beach-cat {
  width: calc(44px * var(--actor-size));
  height: calc(30px * var(--actor-size));
  bottom: 48px;
}

.beach-cat--1 { --actor-x: 88%; --travel: 80s; --offset: -68s; }

.beach-cat--2 {
  --actor-x: 5%;
  --travel: 84s;
  --offset: -50s;
  width: calc(41px * var(--actor-size));
  height: calc(28px * var(--actor-size));
  bottom: 44px;
}

/* Limb pivots for the shared actor artwork. */
.beach-scene .ins-garden-leg { transform-origin: 24px 49px; }
.beach-scene .ins-garden-arm { transform-origin: 24px 27px; }
.beach-scene .ins-garden-dog-leg { transform-origin: 38px 30px; }
.beach-scene .ins-garden-cat-leg { transform-origin: 27px 26px; }
.beach-scene .ins-point-arm { transform-origin: 27px 26px; }

/* --- Spectators -------------------------------------------------------------
 * Two onlookers standing in the walk lane, facing the workflow window. The
 * pointer gestures at it; the listener faces back toward them, and their two
 * chat bubbles alternate like a short conversation. They never travel, so
 * their positioning is a fixed spot rather than an `--actor-x` walk start.
 * ------------------------------------------------------------------------- */

.beach-spectators {
  position: absolute;
  z-index: 10;
  left: 55%;
  bottom: 49px;
  width: calc(110px * var(--actor-size));
  height: calc(96px * var(--actor-size));
}

.beach-spectator {
  position: absolute;
  bottom: 0;
}

.beach-spectator--pointer {
  left: 0;
  width: calc(48px * var(--actor-size));
  height: calc(86px * var(--actor-size));
}

.beach-spectator--listener {
  left: calc(54px * var(--actor-size));
  width: calc(44px * var(--actor-size));
  height: calc(80px * var(--actor-size));
}

.beach-bubble {
  position: absolute;
  z-index: 10;
  /* Clear the pointing actor's 86px SVG at 1.3x scale, including the tail. */
  bottom: calc(112px * var(--actor-size) + 16px);
  max-width: calc(170px * var(--actor-size));
  padding: 0.4em 0.7em;
  border-radius: 0.9em;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 6px rgba(30, 60, 90, 0.18);
  color: #334155;
  font-family: var(--font-manrope), ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(10px, calc(6.5px + 3.5px * var(--actor-size)), 16px);
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  /* Hidden unless the motion rules below fade them in; reduced motion keeps
     the pair quietly standing without text overhead. */
  opacity: 0;
}

.beach-bubble::after {
  content: '';
  position: absolute;
  bottom: -0.28em;
  width: 0.6em;
  height: 0.6em;
  border-radius: 0.12em;
  background: inherit;
  transform: rotate(45deg);
}

.beach-bubble--a {
  left: calc(-8px * var(--actor-size));
}

.beach-bubble--a::after {
  left: calc(40px * var(--actor-size));
}

.beach-bubble--b {
  left: calc(50px * var(--actor-size));
}

.beach-bubble--b::after {
  left: calc(16px * var(--actor-size));
}

/* --- Motion ---------------------------------------------------------------- */

@keyframes coast-travel {
  from { transform: translateX(calc(-170px * var(--actor-size))); }
  to { transform: translateX(calc(100vw + 170px * var(--actor-size))); }
}

@keyframes coast-step {
  from { transform: rotate(-17deg); }
  to { transform: rotate(17deg); }
}

@keyframes coast-arm {
  from { transform: rotate(10deg); }
  to { transform: rotate(-10deg); }
}

/* Each wave path repeats every `--wave-shift`, so translating exactly one
   period per cycle loops with no visible seam; the small translateY steps in
   between read as the swell rising and falling while the water travels. */
@keyframes coast-wave-drift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(calc(var(--wave-shift) * 0.25), 1.4px); }
  50% { transform: translate(calc(var(--wave-shift) * 0.5), 0); }
  75% { transform: translate(calc(var(--wave-shift) * 0.75), -1.1px); }
  100% { transform: translate(var(--wave-shift), 0); }
}

@keyframes coast-glint {
  from { opacity: 0.55; transform: scaleY(0.94); }
  to { opacity: 1; transform: scaleY(1.06); }
}

@keyframes coast-boat {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(1.6px) rotate(1.5deg); }
}

/* Gulls cross the whole sky slowly, like the walkers below them. */
@keyframes coast-bird-glide {
  from { transform: translate3d(-22vw, 0, 0); }
  to { transform: translate3d(105vw, -8px, 0); }
}

@keyframes coast-bird-bob {
  from { transform: translateY(-1.4px); }
  to { transform: translateY(1.4px); }
}

/* Real gull cadence: a few wingbeats, then a short glide before the next
   burst. Left and right wings mirror each other around the body joint. */
@keyframes coast-flap-left {
  0% { transform: rotate(-24deg); }
  14% { transform: rotate(18deg); }
  28% { transform: rotate(-24deg); }
  42% { transform: rotate(18deg); }
  56% { transform: rotate(-12deg); }
  72% { transform: rotate(8deg); }
  84% { transform: rotate(2deg); }
  100% { transform: rotate(-24deg); }
}

@keyframes coast-flap-right {
  0% { transform: rotate(24deg); }
  14% { transform: rotate(-18deg); }
  28% { transform: rotate(24deg); }
  42% { transform: rotate(-18deg); }
  56% { transform: rotate(12deg); }
  72% { transform: rotate(-8deg); }
  84% { transform: rotate(-2deg); }
  100% { transform: rotate(24deg); }
}

@keyframes coast-cloud {
  from { transform: translateX(-25px); }
  to { transform: translateX(25px); }
}

/* Spectators barely move: a soft standing bob and a slow sway of the raised
   arm, so attention stays on the workflow window they are reacting to. */
@keyframes coast-idle {
  from { transform: translateY(0); }
  to { transform: translateY(2.5px); }
}

@keyframes coast-point {
  from { transform: rotate(-5deg); }
  to { transform: rotate(5deg); }
}

/* One 16s conversation loop: the pointer's remark fades in first, then the
   listener's answer, with a quiet beat in between. */
@keyframes coast-bubble-a {
  0%, 5% { opacity: 0; transform: translateY(4px); }
  11%, 42% { opacity: 1; transform: translateY(0); }
  48%, 100% { opacity: 0; transform: translateY(-3px); }
}

@keyframes coast-bubble-b {
  0%, 52% { opacity: 0; transform: translateY(4px); }
  58%, 88% { opacity: 1; transform: translateY(0); }
  94%, 100% { opacity: 0; transform: translateY(-3px); }
}

@media (prefers-reduced-motion: no-preference) {
  .beach-walker,
  .beach-dog,
  .beach-cat {
    left: 0;
    animation: coast-travel var(--travel, 80s) linear var(--offset, -20s) infinite;
  }

  /* Only travellers swing their limbs; the standing spectator pair keeps a
     calm posture (the pointing arm has its own slower sway below). */
  .beach-walker .ins-garden-leg,
  .beach-dog .ins-garden-dog-leg,
  .beach-cat .ins-garden-cat-leg {
    animation: coast-step 0.58s ease-in-out infinite alternate;
  }

  .beach-walker .ins-garden-leg--back,
  .beach-cat .ins-garden-cat-leg--2,
  .beach-dog .ins-garden-dog-leg--2 {
    animation-delay: -0.58s;
  }

  .beach-walker .ins-garden-arm {
    animation: coast-arm 0.58s ease-in-out infinite alternate;
  }

  .beach-walker .ins-garden-arm--back {
    animation-delay: -0.58s;
  }

  .beach-spectator {
    animation: coast-idle 3.2s ease-in-out infinite alternate;
  }

  .beach-spectator--listener {
    animation-delay: -1.6s;
  }

  .beach-scene .ins-point-arm {
    animation: coast-point 2.6s ease-in-out infinite alternate;
  }

  .beach-bubble--a {
    animation: coast-bubble-a 16s ease-in-out infinite;
  }

  .beach-bubble--b {
    animation: coast-bubble-b 16s ease-in-out infinite;
  }

  .beach-wave {
    animation: coast-wave-drift var(--wave-speed, 18s) linear infinite;
  }

  .beach-glint--wide {
    animation: coast-glint 4.6s ease-in-out infinite alternate;
  }

  .beach-glint--narrow {
    animation: coast-glint 3.4s ease-in-out -1.7s infinite alternate;
  }

  .beach-boat {
    animation: coast-boat 7s ease-in-out infinite;
  }

  .beach-birds {
    animation: coast-bird-glide var(--glide, 80s) linear var(--glide-offset, -24s) infinite;
  }

  .beach-birds--1 { --glide: 78s; --glide-offset: -26s; }
  .beach-birds--2 { --glide: 96s; --glide-offset: -58s; }

  .beach-bird {
    animation: coast-bird-bob 3.4s ease-in-out infinite alternate;
  }

  .beach-bird--b { animation-duration: 3.9s; animation-delay: -1.2s; }
  .beach-bird--c { animation-delay: -2.1s; }

  .beach-bird-wing--left {
    animation: coast-flap-left 1.9s ease-in-out infinite;
  }

  .beach-bird-wing--right {
    animation: coast-flap-right 1.9s ease-in-out infinite;
  }

  .beach-bird--b .beach-bird-wing { animation-duration: 2.15s; animation-delay: -0.7s; }
  .beach-bird--c .beach-bird-wing { animation-delay: -1.3s; }

  .beach-cloud {
    animation: coast-cloud 38s ease-in-out infinite alternate;
  }
}

.beach-scene[data-paused='true'] *,
.beach-scene[data-paused='true'] *::before,
.beach-scene[data-paused='true'] *::after {
  animation-play-state: paused !important;
}

/* --- Responsive scene ------------------------------------------------------- */

@media (width < 1024px) {
  .beach-sky {
    background: linear-gradient(180deg, #eff8ff 0%, #e0f1ff 58%, #cbeafa 67%, #ffe0a5 85%, #ffc875 100%);
  }

  .beach-sea { top: 78%; height: 13%; }
  .beach-sand { height: 10%; }
  .beach-waves--upper { top: 78%; }
  .beach-waves--lower { top: 83%; }
  .beach-glint--wide { top: 80%; }
  .beach-glint--narrow { top: 82%; }
  .beach-boat { top: 81%; }

  .beach-palm--left,
  .beach-palm--right,
  .beach-umbrella {
    bottom: 8%;
  }
}

@media (width < 640px) {
  /* Mobile cast: one person and one dog with a shallow beach. */
  .beach-walker--mom,
  .beach-walker--traveler,
  .beach-walker--teen,
  .beach-walker--kid,
  .beach-walker--elder,
  .beach-walker--jogger,
  .beach-walker--reader,
  .beach-dog--2,
  .beach-dog--3,
  .beach-cat,
  .beach-spectators,
  .beach-birds--1,
  .beach-birds--2,
  .beach-sun-rays {
    display: none;
  }

  .beach-walker--dad {
    --actor-x: 20%;
    --travel: 38s;
    --offset: -14s;
    bottom: 40px;
    width: calc(34px * var(--actor-size));
    height: calc(64px * var(--actor-size));
  }

  .beach-dog--1 {
    --actor-x: 65%;
    --travel: 43s;
    --offset: -27s;
    bottom: 42px;
    width: calc(48px * var(--actor-size));
    height: calc(28px * var(--actor-size));
  }

  .beach-palm--left { left: -27px; opacity: 0.22; }
  .beach-palm--right { right: -4px; opacity: 0.22; }
}

/* --- Login (auth) variant: same scene, proportional 3x core cast ------------ */

.beach-scene[data-variant='auth'] .beach-walker--dad { --actor-x: 4%; --offset: -18s; bottom: 57px; }
.beach-scene[data-variant='auth'] .beach-walker--mom { --actor-x: 21%; --offset: -27s; bottom: 60px; }
.beach-scene[data-variant='auth'] .beach-walker--traveler { --actor-x: 83%; --offset: -64s; bottom: 56px; }
.beach-scene[data-variant='auth'] .beach-dog--1 { --actor-x: 62%; --offset: -43s; bottom: 52px; }
.beach-scene[data-variant='auth'] .beach-cat--1 { --actor-x: 43%; --offset: -39s; bottom: 61px; }

/* The login keeps the calmer core cast so the 3x actors never crowd the card;
   the spectator pair stays and watches the sign-in card from the story side. */
.beach-scene[data-variant='auth'] .beach-walker--teen,
.beach-scene[data-variant='auth'] .beach-walker--kid,
.beach-scene[data-variant='auth'] .beach-walker--elder,
.beach-scene[data-variant='auth'] .beach-walker--jogger,
.beach-scene[data-variant='auth'] .beach-walker--reader,
.beach-scene[data-variant='auth'] .beach-dog--2,
.beach-scene[data-variant='auth'] .beach-dog--3,
.beach-scene[data-variant='auth'] .beach-cat--2 {
  display: none;
}

/* The login spectator pair stays between the story and the card at a calmer
   scale than the 3x walkers, so its chat bubbles clear the story subcopy. */
.beach-scene[data-variant='auth'] .beach-spectators {
  --actor-size: 2.2;
  left: min(34%, calc(100% - 790px));
  bottom: 58px;
}

.beach-scene[data-variant='auth'] .beach-palm--left { width: 128px; height: 166px; left: -38px; bottom: 16%; }
.beach-scene[data-variant='auth'] .beach-palm--right { width: 108px; height: 145px; right: -10px; bottom: 15%; }

/* Login keeps the gulls (they fly above the story column) but not the sun
   rays, which would fight the header. */
.beach-scene[data-variant='auth'] .beach-sun-rays {
  display: none;
}

@media (width < 1024px) {
  .beach-scene[data-variant='auth'] .beach-walker--dad { --actor-x: 8%; }
  .beach-scene[data-variant='auth'] .beach-walker--mom { --actor-x: 35%; }
  .beach-scene[data-variant='auth'] .beach-walker--traveler { --actor-x: 71%; }
  .beach-scene[data-variant='auth'] .beach-dog--1 { --actor-x: 58%; }
  .beach-scene[data-variant='auth'] .beach-cat--1 { display: none; }
  .beach-scene[data-variant='auth'] .beach-spectators { left: 20%; }
  /* The centered form leaves no room for dialogue beside it. */
  .beach-scene[data-variant='auth'] .beach-bubble { display: none; }
}

@media (width < 640px) {
  .beach-scene[data-variant='auth'] .beach-walker--dad { --actor-x: 14%; --offset: -19s; bottom: 55px; }
  .beach-scene[data-variant='auth'] .beach-dog--1 { --actor-x: 60%; --offset: -28s; bottom: 50px; }
  .beach-scene[data-variant='auth'] .beach-palm--left,
  .beach-scene[data-variant='auth'] .beach-palm--right { opacity: 0.42; }
}

/* ---------------------------------------------------------------------------
 * Coastal presentation: typography and framing shared by hero and login.
 * Outfit carries display headlines at weight 780 (matching the reference
 * homepage) with a readable line-height; Manrope carries body and controls.
 * ------------------------------------------------------------------------ */

.coast-display {
  font-family: var(--font-outfit), var(--font-manrope), ui-sans-serif, system-ui, sans-serif;
  font-weight: 780;
  /* Outfit's word space is narrow; with tight tracking "Meta Ads" and
     "under your" visibly fused, so the gap is restored explicitly. */
  letter-spacing: -0.045em;
  word-spacing: 0.08em;
  line-height: 1.08;
  text-wrap: balance;
}

.coast-body {
  font-family: var(--font-manrope), ui-sans-serif, system-ui, sans-serif;
}

/* The hero owns the bottom caption + pause row; auth uses the same control
   rendered as a quiet icon in the same sand lane. */
.coast-scene-controls {
  position: absolute;
  z-index: 30;
  bottom: 12px;
  left: 48px;
  right: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  pointer-events: none;
}

.coast-scene-caption {
  font-family: var(--font-manrope), ui-sans-serif, system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: #664224;
}

@media (width < 640px) {
  .coast-scene-controls {
    left: 20px;
    right: 20px;
    bottom: 9px;
    gap: 10px;
  }

  .coast-scene-caption {
    font-size: 9px;
  }
}

.coast-motion-toggle {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(144, 97, 58, 0.31);
  border-radius: 6px;
  background: rgba(255, 247, 232, 0.55);
  color: #53391f;
  font-family: var(--font-manrope), ui-sans-serif, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.coast-motion-toggle:focus-visible {
  outline: 3px solid #153d62;
  outline-offset: 3px;
}

/* The auth card owns its space; scenery never adds height to the form. */
.coast-auth {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  background: #eff8ff;
  color: #102d53;
}

.coast-auth-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 40px;
}

.coast-auth-content {
  /* No z-index here: the column must not form a stacking context, so the
     story text can sit under the walk lane (z-20) while the card rises
     above it (z-30). */
  position: relative;
  display: grid;
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding: 16px 40px 48px;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  align-items: center;
  gap: clamp(40px, 7vw, 100px);
}

.coast-auth-story {
  /* Reserve space above the dialogue lane on shorter laptop screens. */
  align-self: center;
  max-width: 560px;
  padding-bottom: clamp(48px, calc(1050px - 100dvh), 208px);
}

.coast-auth-panel {
  position: relative;
  z-index: 30;
  width: 100%;
  min-width: 0;
  max-width: 440px;
  justify-self: center;
}

.coast-auth-card {
  --color-accent: #a63822;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--color-border);
  border-top: 3px solid #ff6947;
  border-radius: 16px;
  box-shadow: 0 20px 60px -24px rgb(22 59 101 / 30%);
}

.coast-auth-title {
  font-size: 32px;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.15;
  text-wrap: balance;
}

.coast-auth-description {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.coast-auth-form {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.coast-auth-submit {
  background: #d83b18;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 2px rgb(150 40 16 / 24%), inset 0 1px 0 rgb(255 255 255 / 12%);
}

.coast-auth-submit:hover:not(:disabled) {
  background: #c2371a;
}

.coast-auth-switch {
  margin-top: auto;
  padding-top: 24px;
  text-align: center;
}

/* The lock sits in the first line of the text, so it stays beside the words when they are centred and wrap. */
.coast-auth-assurance {
  display: block;
  margin: 0 auto;
  max-width: 350px;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  text-wrap: pretty;
}

.coast-auth-assurance svg {
  display: inline-block;
  margin: 0 6px 0 0;
  vertical-align: -2px;
}

@media (width < 1024px) {
  .coast-auth-header { padding: 16px 24px; }
  .coast-auth-content {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 12px 24px 28px;
  }
  .coast-auth-story { display: none; }
}

@media (width < 480px) {
  .coast-auth-header { padding: 12px 20px; }
  .coast-auth-content { padding: 8px 20px 20px; }
  .coast-auth-card { padding: 24px; }
  .coast-auth-title { font-size: 28px; }
}

@media (height <= 740px) {
  .coast-auth-header { padding-block: 10px; }
  .coast-auth-content { padding-top: 8px; padding-bottom: 16px; }
  .coast-auth-card { padding-block: 20px; }
  .coast-auth-form { margin-top: 18px; gap: 10px; }
  .coast-auth-switch { padding-top: 14px; }
  .coast-auth-assurance { margin-top: 10px; }
}

@media (width < 360px) {
  .coast-auth-header { padding-inline: 16px; }
  .coast-auth-content { padding-inline: 12px; }
  .coast-auth-card { padding-inline: 20px; }
  .coast-auth-title { font-size: 26px; }
}

@media (width < 640px) and (height <= 620px) {
  .coast-auth-header { padding-block: 8px; }
  .coast-auth-content { padding-block: 4px; }
  .coast-auth-card { padding: 16px 20px; }
  .coast-auth-title { font-size: 26px; }
  .coast-auth-description { margin-top: 4px; }
  .coast-auth-form { margin-top: 12px; gap: 8px; }
  .coast-auth-form input,
  .coast-auth-form select,
  .coast-auth-submit { height: 44px; }
  .coast-auth-terms { line-height: 16px; }
  .coast-auth-switch { padding-top: 12px; }
  .coast-auth-assurance { margin-top: 6px; font-size: 11px; line-height: 16px; }
}
