/* FEEL AT HOME (his yes, Wednesday 25 November 2026: "use these ones that you have"). Casa Momo's "Feel at Home.
   Beautifully." section, measured on casamomo.at that day (phone 390 x 664, laptop 1440 x 900; reference/tools/
   measure-feel-at-home.js), in her colours, with HER pieces and HER door:
     the screen holds still for 3.5 screens of scrolling (phone; the section is 4.5 screens tall; laptop 5)
     8 pieces sit in 8 places around the words and come towards you, one after another, growing and fading as they
       pass (Casa Momo's own numbers, played back from js/feel-data.js by js/feel.js)
     a thin drawing of a door grows behind them until you pass through it (cream lines, never more than 20% solid)
     the words rise out of their masks as the section comes in and rise away at the end
   The pieces are cut out of her own photos (scripts/cut-pieces.py), every pixel as it was, nothing shrunk.
   The colour: her soft black, as the footer (docs/DESIGN.md section 4: "pinned on soft black"). Its own colours, so the
   trial looks (?ink=black, ?bg=navy) never change it. */
.fah {
  --fah-bg: #302F2F;          /* her soft black */
  --fah-ink: #FFF0CA;         /* the site's cream */
  position: relative; height: 450vh;
  background: var(--fah-bg); color: var(--fah-ink);
}
.fah-pin { position: sticky; top: 0; height: 100vh; overflow: hidden; }

/* the door: the whole screen, the drawing zoomed by its viewBox (as Casa Momo's), its lines always 1px */
.fah-door { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.fah-door svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fah-door path { fill: none; stroke: var(--fah-ink); stroke-width: 1px; vector-effect: non-scaling-stroke; }

/* the pieces: each sits in the middle, js/feel.js sizes and moves it; the first to pass sits on top */
.fah-piece { position: absolute; left: 50%; top: 50%; opacity: 0; visibility: hidden; will-change: transform, opacity; }
.fah-piece img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-select: none; }

/* the words (Casa Momo: 44px, lines 44px, letter spacing -0.8px, in the middle; laptop 100px, -2px). Above the pieces */
.fah-words {
  position: absolute; left: var(--gutter); right: var(--gutter); top: 50%; transform: translateY(-50%); z-index: 3000;
  margin: 0; text-align: center; font-weight: 400;
  font-size: 44px; line-height: 44px; letter-spacing: -.8px;
}
.fah-line { display: block; }
.fah-words .fm { display: inline-flex; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; vertical-align: top; }
.fah-words .fm > span { display: inline-block; white-space: pre; transform-origin: 0% 100%; will-change: transform;
                        transform: translateY(115%) rotate(8deg); }

@media (min-width: 900px) {
  .fah { height: 500vh; }
  .fah-words { font-size: 100px; line-height: 100px; letter-spacing: -2px; }
}

/* reduce motion: no holding, no flying; the words and the pieces shown still, the door faint */
@media (prefers-reduced-motion: reduce) {
  .fah { height: auto; }
  .fah-pin { position: relative; }
  .fah-words .fm > span { transform: none; }
}
