/* Homepage atmosphere: layout and motion only (docs/design-atmosphere.md).
 * The hero shows the landscape first and tells its copy as the visitor scrolls; type is set larger and
 * quieter; How It Works uses editorial numerals. Every colour here is a token from
 * css/falmera-palette.css, which owns the colour system. Every moving property is opacity, translate or
 * scale; reduced motion and no JavaScript get the finished, one-screen hero. */

/* ── Type ──────────────────────────────────────────────────────────────── */
.fm-home.fm-atmos {
  --fm-h2: clamp(2.25rem, 1.45rem + 3.1vw, 4.25rem);
  --fm-section-y: clamp(4.5rem, 3rem + 6vw, 9rem);
  --fm-weight-heading: 500;
}
.fm-home.fm-atmos :is(h2, .fm-h2) { font-weight: 500; letter-spacing: -0.04em; line-height: 1.02; text-wrap: balance; }
.fm-home.fm-atmos .fm-rail__main h2 { font-size: var(--fm-h2); max-width: 15ch; }
.fm-home.fm-atmos .fm-lead { max-width: 36rem; }

/* Buttons: the gradient slides on hover; a one-pixel lift. */
.fm-atmos .fm-btn--brand {
  background-size: 200% 100%; background-position: 0 0;
  transition: background-position 700ms var(--at-ease), box-shadow 400ms var(--at-ease), transform 400ms var(--at-ease);
}
.fm-atmos .fm-btn--brand:is(:hover, :focus-visible) { background-position: 100% 0; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .fm-atmos .fm-btn:hover { transform: translateY(-1px); }
}

/* ── Hero: centred copy under the lettering ──────────────────────────────────
 * The hero scrolls like the rest of the page (2026-11-09: it used to hold still while its words
 * faded in, which read as a stuck page). The words rise in once on arrival, and the picture's depth
 * as it leaves comes from --fm-hero-p in css/falmera-home-hero.css. */
.fm-atmos .fm-hero__stage { width: 100%; }   /* static: the scene covers the whole hero until it is held */
.fm-atmos .fm-hero__fade { position: absolute; inset: auto 0 0; height: 22%; pointer-events: none; z-index: 0; }
.fm-atmos .hero .fm-hero__grid { position: relative; z-index: 1; }
.fm-atmos .hero .fm-hero__copy {
  position: relative; margin-inline: auto; text-align: center; max-width: 44rem;
  display: flex; flex-direction: column; align-items: center;
}
/* A soft local shade behind the copy, rather than a card. */
.fm-atmos .hero .fm-hero__copy::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: -24%; right: -24%; top: -12%; bottom: -30%;
}
.fm-atmos .hero .fm-hero__title { font-size: clamp(2.5rem, 1.4rem + 3.2vw, 4.5rem); font-weight: 500; letter-spacing: -0.045em; line-height: 1; }
.fm-atmos .hero .fm-hero__lead { max-width: 34rem; margin-inline: auto; }
.fm-atmos .hero .fm-hero__ctas { justify-content: center; }
/* Landscape: the copy sits in the lower middle, under the lettering (whose foot is at about 50%). */
@media (min-aspect-ratio: 23/20) {
  .fm-atmos .hero { align-items: flex-start; }
  .fm-atmos .hero .fm-hero__grid { padding-top: max(0px, calc(57svh - var(--fm-header-h) - 1.5rem)); }
}
@media (min-aspect-ratio: 23/20) and (max-height: 720px) {
  .fm-atmos .hero .fm-hero__title { font-size: clamp(2.25rem, 1.2rem + 3vw, 3.75rem); }
  .fm-atmos .hero .fm-hero__lead { font-size: 1rem; }
}
/* Portrait: the lettering across the top, the valley fading into dusk, the copy beneath. */
@media (max-aspect-ratio: 23/20) {
  .fm-atmos .hero .fm-hero__copy { max-width: 34rem; }
  .fm-atmos .hero .fm-hero__copy::before { top: -12%; bottom: -12%; left: -10%; right: -10%; }
}

/* Reveals: a softer, longer arrival. */
@media (prefers-reduced-motion: no-preference) {
  .fm-home.fm-atmos [data-reveal] { transition-duration: 900ms; transition-timing-function: var(--at-ease); }
}
