/* FantasyLab front door: the bench (restored on branch bench-back, see /docs/BENCH-BACK.md).
   A sticky 100svh stage holds the three.js bench (/shared/hub/bench.js); the intro and six index cards scroll over it and
   the camera walks the bench from one product to the next. Restyled for craft v3: Goudy for everything the house says,
   each product's name on its card in its own face (the same 2 KB marks as the shelf), no numbered eyebrows.
   Layers on /shared/fl.css + /shared/hub/home.css. */

.bench { position: relative; }
.bench-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--ink-0); z-index: 0; }
.bench-stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; opacity: 0; transition: opacity 1.2s var(--ease); }
.bench-stage.ready canvas { opacity: 1; }
.bench-stage::after {   /* vignette + the hero's left-side scrim, which fades as you walk in */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(15, 13, 11, calc(var(--hero-k, 1) * .78)) 0%, rgba(15, 13, 11, calc(var(--hero-k, 1) * .35)) 38%, rgba(15, 13, 11, 0) 60%),
    radial-gradient(120% 90% at 55% 45%, rgba(15, 13, 11, 0) 55%, rgba(15, 13, 11, .55) 100%);
}
.bench-stage .fallback { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.bench-stage.no-webgl .fallback, html:not(.js) .bench-stage .fallback { display: block; }
.bench-stage .hint { position: absolute; right: var(--gut); bottom: 22px; z-index: 2; margin: 0; color: var(--paper-faint);
  font: 400 17px/1 var(--display); font-variant-caps: all-small-caps; letter-spacing: .07em; opacity: 0; transition: opacity .8s var(--ease); }
.bench-stage.ready .hint { opacity: 1; }
.bench-stage.no-webgl .hint { display: none; }

.bench-track { position: relative; z-index: 1; margin-top: -100vh; margin-top: -100svh; pointer-events: none; }
.chapter { min-height: 125vh; min-height: 125svh; display: flex; align-items: center; padding: 96px var(--gut); }
.chapter.left { justify-content: flex-start; }
.chapter.right { justify-content: flex-end; }
@media (min-width: 1240px) { .chapter.left { padding-left: calc((100vw - var(--wrap)) / 2 + var(--gut)); } .chapter.right { padding-right: calc((100vw - var(--wrap)) / 2 + var(--gut)); } }
.chapter > * { pointer-events: auto; }

/* the intro: the hero, set over the bench */
.chapter.intro { min-height: 100vh; min-height: 100svh; padding-top: 120px; padding-bottom: 120px; }
.intro .copy { max-width: 660px; }
.intro .who { margin: 0 0 22px; font-size: 19px; line-height: 1.4; letter-spacing: .08em; color: var(--paper-dim); }
.intro h1 { font-size: clamp(52px, 7vw, 108px); margin-bottom: 26px; }
.intro h1 em { color: var(--lamp); }
.intro .lede { color: #d6ccba; max-width: 46ch; }
.intro .actions { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; margin-top: 32px; }

/* the chapter card: an index card set down beside the thing it describes */
.card {
  --ink: #8a5a1f; position: relative; width: min(440px, 100%); background: var(--paper); color: var(--ink-0);
  padding: 28px 32px 22px; border-radius: 2px; transform: rotate(var(--rot, -.8deg));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset, 0 34px 60px -28px rgba(0, 0, 0, .85), 0 4px 10px rgba(0, 0, 0, .25);
  transition: transform 1.1s var(--ease), opacity 1.1s var(--ease);
}
.card::before {   /* a strip of masking tape holding it down */
  content: ""; position: absolute; top: -11px; left: 50%; width: 92px; height: 24px; margin-left: -46px;
  background: rgba(226, 210, 172, .78); transform: rotate(2.4deg); box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}
.chapter.right .card { --rot: .9deg; }
.js .chapter:not(.on) .card { opacity: 0; transform: translateX(-34px) rotate(var(--rot, -.8deg)); }
.js .chapter.right:not(.on) .card { transform: translateX(34px) rotate(var(--rot, .9deg)); }
.card .nm { display: block; font-size: 30px; line-height: 1; margin: 0 0 16px; color: var(--ink); }
.card .nm.listinglint { color: #23262a; }
.card .nm.aurora::after { display: none; }
.card h2 { font-size: clamp(34px, 3.2vw, 46px); margin-bottom: .32em; }
.card h2 em { color: var(--ink); }
.card .one { font-size: 19px; line-height: 1.45; color: #3d352b; margin: 0 0 16px; }
.card .facts { list-style: none; margin: 0 0 16px; padding: 0; border-top: 1px solid rgba(15, 13, 11, .16); }
.card .facts li { font-size: 17px; line-height: 1.4; color: #2b251e; padding: 8px 0 8px 22px; border-bottom: 1px solid rgba(15, 13, 11, .12); position: relative; }
.card .facts li::before { content: ""; position: absolute; left: 2px; top: 19px; width: 10px; height: 1.5px; background: var(--ink); transform: rotate(-8deg); }
.card .row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 18px; }
.card .row .pf { font-style: italic; font-size: 17px; color: #6d6458; }
.card .row .link { display: inline-flex; align-items: center; min-height: 44px; padding-bottom: 0; color: var(--ink-0); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.card .row .link::after { display: none; }
.card .row .link:hover { color: var(--ink); }
.card[data-p="studio"] { --ink: #a33a20; }
.card[data-p="aurora"] { --ink: #0a4fc4; }
.card[data-p="spotless"] { --ink: #0a6e57; }
.card[data-p="counsel"] { --ink: #2f5f4b; }
.card[data-p="true-rate"] { --ink: #8a4a1e; }
.card[data-p="listinglint"] { --ink: #b42c24; }
.card-mark { position: absolute; top: -34px; right: 14px; width: 74px; height: auto; transform: rotate(6deg); filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35)); }   /* Aurora's bear, peeking over the card */

/* the shelf, now its own band right after the walk */
.door.after { padding-top: clamp(80px, 9vw, 128px); }
.door.after h2 { margin: 0 0 18px; }
.door.after .lede { max-width: 44ch; }

@media (max-width: 900px) {
  .chapter, .chapter.left, .chapter.right { justify-content: center; }
}
@media (max-width: 760px) {
  .bench-stage::after { background:
    linear-gradient(180deg, rgba(15, 13, 11, calc(var(--hero-k, 1) * .82)) 0%, rgba(15, 13, 11, calc(var(--hero-k, 1) * .35)) 52%, rgba(15, 13, 11, 0) 72%),
    radial-gradient(130% 80% at 50% 40%, rgba(15, 13, 11, 0) 55%, rgba(15, 13, 11, .5) 100%); }
  /* phones: a shorter walk (each stop about one screen) and a lighter card; the plates below carry the details */
  .chapter { min-height: 96svh; align-items: flex-end; padding: 72px var(--gut) 24px; }
  .chapter.intro { align-items: flex-start; padding-top: 104px; padding-bottom: 40px; min-height: 100svh; }
  .intro .who { font-size: 17px; margin-bottom: 16px; }
  .card { padding: 22px 20px 12px; --rot: -.5deg; }
  .chapter.right .card { --rot: .5deg; }
  .js .chapter:not(.on) .card, .js .chapter.right:not(.on) .card { transform: translateY(26px) rotate(var(--rot)); }
  .card .nm { font-size: 26px; margin-bottom: 12px; }
  .card h2 { font-size: 31px; }
  .card .one { font-size: 18px; margin-bottom: 8px; }
  .card .facts { display: none; }
  .card-mark { width: 56px; top: -26px; right: 10px; }
  .bench-stage .hint { display: none; }
}

/* reduced motion: one still of the whole bench, then the six as a plain list (cards always shown) */
@media (prefers-reduced-motion: reduce) {
  .bench { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .bench-stage, .chapter.intro { grid-column: 1 / -1; }
  .chapter, .chapter.left, .chapter.right { justify-content: center; align-items: flex-start; }
  .bench-stage { position: relative; height: 70vh; order: 1; }
  .bench-stage canvas, .bench-stage .hint, .card { transition: none; }
  .bench-stage::after { background: radial-gradient(130% 90% at 50% 45%, rgba(15, 13, 11, 0) 55%, rgba(15, 13, 11, .5) 100%); }
  .bench-track { display: contents; }
  .chapter { min-height: 0; padding-top: 56px; padding-bottom: 56px; order: 2; }
  .chapter.intro { order: 0; min-height: 0; padding-top: 130px; }
  .js .chapter:not(.on) .card, .js .chapter.right:not(.on) .card { opacity: 1; transform: rotate(var(--rot, -.8deg)); }
  .card .facts { display: block; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 900px) { .bench { grid-template-columns: minmax(0, 1fr); } }
.card .row .link span { margin-left: .35em; }
/* keyboard: a card whose link has focus is always shown, even if the walk has not reached its stop yet */
.js .chapter:focus-within .card, .js .chapter.right:focus-within .card { opacity: 1; transform: rotate(var(--rot, -.8deg)); }
