/* ══════════════════════════════════════════════════
   SERVIZIO — film.css
   The home page plays a real-photo / real-video film full screen
   BEHIND the text.

   1. the stage     fixed, full screen (.stb-stage.film)
   2. the film      .cine — one fixed screen that plays like a film:
                    the scroll moves the camera forward and the words
                    fly in from deep in the scene and out past the camera
   3. the sections  .stb-flow — the rest of the page (text over the film)
   Loaded after stb.css and overrides its two-column stage.
   ══════════════════════════════════════════════════ */

/* the film is always dark, so the home page is always dark */
html.stb-home, html.stb-home[data-theme] {
  --bg: #0D0700; --bg-lift: #130c01; --text: #F5F3EF;
  --muted: rgba(245,243,239,0.72); --faint: rgba(245,243,239,0.3);
  --gold: #D4B868; --gold-lt: #F0DEAD; --gold-dk: #A08338;
  --gold-grad: linear-gradient(135deg, #F0DEAD 0%, #E5CA82 22%, #D4B868 50%, #A08338 78%, #8A6E2A 100%);
  --div: rgba(245,243,239,0.10); --div-strong: rgba(245,243,239,0.2);
  --card-bg: rgba(10,6,2,0.55);
  --stb-dim: #4A4237;
}
html.stb-home body { background: #000; }
html.stb-home .theme-toggle { display: none; }

/* ── 1 · stage: fixed, full screen, behind everything ── */
.stb-home .stb { display: block; }
.stb-home .stb-stage.film {
  position: fixed; inset: 0; width: 100%; height: 100vh; height: 100lvh;
  z-index: 0; background: #000; overflow: hidden; grid-column: auto; grid-row: auto;
}
.stb-home .stb-stage.film::before { display: none; }
/* the layer is wider than the screen and pushed right, so the tear sits clear of the words
   and the picture still reaches the left edge of the screen.
   film.js moves this layer when the camera pushes in or pulls back */
.film-media { position: absolute; inset: 0 -9vw; transform: translate3d(9vw, 0, 0); will-change: transform; }
.film-key, .film-clip {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%;
  opacity: 0; will-change: opacity, transform;
  transition: opacity .35s linear;
}
/* photos are drawn a touch larger so they line up with the clips made from them (film.js sets --key-fit) */
.film-key { scale: var(--key-fit, 1); }
.film-key.is-on { opacity: 1; }
/* a clip always sits above the photos */
.film-clip { transition: opacity .25s linear; z-index: 3; }
.film-clip.is-on { opacity: 1; }
/* the tall close-up of the needle: film.js sizes it and slides it as the camera travels down */
.film-tall {
  position: absolute; left: 0; top: 0; max-width: none;
  opacity: 0; will-change: opacity, transform;
  transition: opacity .35s linear;
}
.film-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.82) 30%, rgba(0,0,0,.45) 50%, rgba(0,0,0,0) 64%),
    linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 16%, rgba(0,0,0,0) 80%, rgba(0,0,0,.6) 100%);
  transition: opacity .5s linear;
}
.film-shade--cine { display: none; }

/* ── 2 · THE FILM ────────────────────────────────── */
/* plain version (no JavaScript): the beats stack like ordinary sections */
.cine { position: relative; z-index: 2; }
.cine-beat {
  --hero-p: 0;                      /* sentence two of the line stays unlit until the tear is sewn */
  position: relative;
  padding: clamp(72px, 12vh, 140px) var(--stb-pad-r) clamp(40px, 7vh, 90px) var(--stb-pad-l);
  text-shadow: 0 1px 18px rgba(0,0,0,.6);
}
.cine-beat--hero { display: flex; flex-direction: column; justify-content: center; min-height: 100vh; }
.cine-beat--sewn { --hero-p: 1; }
.cine-col {
  width: calc(52vw - var(--stb-pad-l) - var(--stb-pad-r));
  max-width: calc(max(760px, 52vw) - var(--stb-pad-l) - var(--stb-pad-r));
}
.cine-col--wide { width: auto; max-width: 66vw; }
.cine-beat .stb-h2 { margin: 0; }
.cine-line { margin: 0; }
.cine-beat [data-cl] { display: block; }
.cine-beat--hero .stb-hero-eyebrow { text-wrap: balance; }
/* a comfortable tap area for the small text link, without moving anything */
.cine-beat--hero .stb-textlink--caps { padding: 13px 0; margin: -13px 0; }
.cine-beat .stb-hero-eyebrow[data-cl], .cine-beat .stb-hero-ctas[data-cl], .cine-beat .stb-beat[data-cl] { display: flex; }

/* the five steps */
.cine-list { list-style: none; margin: 0; padding: 0; }
.cine-list-head { margin-bottom: clamp(14px, 2.6vh, 28px); }
.cine-row {
  display: grid;
  grid-template-columns: clamp(44px, 5vw, 80px) minmax(0, 1fr);
  column-gap: 16px; padding: 14px 0;
}
.cine-row > .stb-step-num { grid-row: 1 / span 2; font-size: clamp(40px, 4.4vw, 70px); line-height: 1; padding: 0; }
.cine-row > .stb-step-title { margin: 0 0 6px; }
.cine-row > .stb-step-body { grid-column: 2; }

/* film version (film.js adds .cine-on): one fixed screen, the beats share it */
html.cine-on .cine { height: calc((var(--cine-len) + 1) * 100vh); }
html.cine-on .cine-view {
  position: -webkit-sticky; position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
}
html.cine-on .cine-beat {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  min-height: 0;
  padding: 112px var(--stb-pad-r) 84px var(--stb-pad-l);
  pointer-events: none;
}
html.cine-on .cine-beat.is-live { pointer-events: auto; }
/* words that belong to the bill sit in the dark under it, clear of the falling drop */
html.cine-on .cine-beat--low { justify-content: flex-start; padding-top: 51vh; padding-bottom: 2vh; }   /* under the close-up bill too */
html.cine-on .cine-beat--sewn .cine-line { white-space: nowrap; margin: 0; }
/* each line is drawn by film.js: it starts small and far away, arrives, then flies past the camera */
html.cine-on .cine-beat [data-cl] {
  opacity: 0;
  will-change: transform, opacity;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}

/* the five steps in the film: one compact list that builds up line by line;
   the detail of the newest step shows beside it, like a caption */
html.cine-on .cine-col--list { width: auto; max-width: none; }
html.cine-on .cine-list-head .stb-eyebrow { margin-bottom: 10px; }
html.cine-on .cine-list-head .stb-h2 { font-size: clamp(26px, min(3.6vw, 5.6vh), 58px); }
html.cine-on .cine-list {
  display: grid;
  grid-template-columns: [num] auto [title] max-content [body] minmax(0, clamp(340px, 26vw, 520px));
  column-gap: clamp(12px, 1.4vw, 24px);
  row-gap: clamp(6px, 1.5vh, 16px);
  align-items: baseline;
  justify-content: start;            /* keep the columns together at the left, do not stretch them */
}
html.cine-on .cine-row { display: contents; }
html.cine-on .cine-row:nth-child(1) > .stb-step-num, html.cine-on .cine-row:nth-child(1) > .stb-step-title { grid-row: 1; }
html.cine-on .cine-row:nth-child(2) > .stb-step-num, html.cine-on .cine-row:nth-child(2) > .stb-step-title { grid-row: 2; }
html.cine-on .cine-row:nth-child(3) > .stb-step-num, html.cine-on .cine-row:nth-child(3) > .stb-step-title { grid-row: 3; }
html.cine-on .cine-row:nth-child(4) > .stb-step-num, html.cine-on .cine-row:nth-child(4) > .stb-step-title { grid-row: 4; }
html.cine-on .cine-row:nth-child(5) > .stb-step-num, html.cine-on .cine-row:nth-child(5) > .stb-step-title { grid-row: 5; }
html.cine-on .cine-row > .stb-step-num {
  grid-column: num; min-width: 1.1em;
  font-size: clamp(26px, min(2.9vw, 5vh), 48px); line-height: 1; letter-spacing: 0; padding: 0;
}
html.cine-on .cine-row > .stb-step-title {
  grid-column: title; margin: 0; white-space: nowrap;
  font-size: clamp(20px, min(2.3vw, 4vh), 38px); line-height: 1.15;
}
html.cine-on .cine-row > .stb-step-body {
  grid-column: body; grid-row: 1 / span 5; align-self: start;
  margin: 0 0 0 clamp(20px, 3vw, 56px);
  font-size: clamp(15px, min(1.6vw, 2.7vh), 24px); line-height: 1.55; max-width: 22em;
}
/* in the film only the last step shows its detail; the other four stay readable by screen readers */
html.cine-on .cine-row > .cine-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* what we do, on the steel of the needle */
html.cine-on .cine-beat--metal .stb-statement { margin-bottom: 0; }
.cine-beat .stb-beats { grid-template-columns: minmax(0, 1fr); gap: clamp(14px, 2.6vh, 30px); }
.cine-beat .stb-beat { flex-direction: row; align-items: baseline; gap: 20px; padding-top: clamp(14px, 2.4vh, 26px); }
.cine-beat .stb-beat-text { font-size: clamp(22px, min(2.5vw, 4.4vh), 42px); }

.stb-home .stb-flow { position: relative; z-index: 2; width: 52%; max-width: 760px; }
.stb-home .stb-sec { border-top: 0; text-shadow: 0 1px 18px rgba(0,0,0,.6); }
.stb-home .stb-fact, .stb-home .stb-price, .stb-home .stb-cta {
  background: rgba(8,5,1,.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
/* gold-gradient letters must not get a text shadow (it shows through the clear letters and dulls them) */
.stb-home .stb-gold-text, .stb-home .stb-step-num, .stb-home .stb-fact-num, .stb-home .stb-price-fig, .stb-home .stb-h1-b { text-shadow: none; }
.stb-home .footer { position: relative; z-index: 2; background: #050300; }

/* ── phones and tablets: the film fills the screen ── */
@media (max-width: 900px) {
  .film-media { inset: 0; transform: none; }
  .film-shade { background: linear-gradient(180deg, rgba(0,0,0,.66) 0%, rgba(0,0,0,.7) 40%, rgba(0,0,0,.8) 100%); }
  /* while the bill is on screen it stays bright at the top and the words sit in the dark below it */
  .film-shade--cine {
    display: block; opacity: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.42) 0%, rgba(0,0,0,0) 13%, rgba(0,0,0,0) 27%, rgba(0,0,0,.62) 41%, rgba(0,0,0,.62) 100%);
  }
  html.cine-bill .film-shade { opacity: 0; }
  html.cine-metal .film-shade { opacity: .5; }      /* let the steel of the needle shine through */
  html.cine-bill .film-shade--cine { opacity: 1; }

  .stb-home .stb-sec { text-shadow: 0 1px 3px rgba(0,0,0,.9), 0 0 22px rgba(0,0,0,.85); }
  .stb-home .stb-stage.film { height: 100vh; height: 100lvh; z-index: 0; }
  .stb-home .stb-flow { width: 100%; max-width: none; }
  .stb-home .stb-flow::before { display: none; }
  .stb-home { scroll-padding-top: 72px; }
  .stb-home .stb-sec { min-height: 100vh; min-height: 100svh; }
  /* keep in step with PHONE_X in film.js */
  .film-key[data-key="k0"], .film-key[data-key="k1"], .film-clip[data-pos="right"] { object-position: 71% 50%; }

  .cine-beat { text-shadow: 0 1px 3px rgba(0,0,0,.9), 0 0 22px rgba(0,0,0,.85); }
  html.cine-on .cine-beat--hero .stb-hero-eyebrow { text-shadow: 0 1px 10px rgba(0,0,0,.85); }
  .cine-col, .cine-col--wide { width: auto; max-width: none; }
  html.cine-on .cine-beat { justify-content: flex-end; padding: 84px var(--stb-pad-r) max(8vh, 54px) var(--stb-pad-l); }
  html.cine-on .cine-beat--low { justify-content: flex-start; padding-top: 53vh; padding-top: 53svh; padding-bottom: 12px; }
  html.cine-on .cine-beat--metal { justify-content: center; padding-bottom: 84px; }
  html.cine-on .cine-beat--sewn .cine-line { white-space: normal; }

  html.cine-on .cine-list-head { margin-bottom: 12px; }
  html.cine-on .cine-list-head .stb-eyebrow { margin-bottom: 6px; }
  html.cine-on .cine-list-head .stb-h2 { font-size: clamp(24px, 7vw, 34px); }
  html.cine-on .cine-list { grid-template-columns: [num] 1.9em [title] minmax(0, 1fr); column-gap: 10px; row-gap: 7px; }
  html.cine-on .cine-row > .stb-step-num { font-size: clamp(22px, 6.4vw, 30px); }
  html.cine-on .cine-row > .stb-step-title { white-space: normal; font-size: clamp(17px, 5vw, 23px); }
  html.cine-on .cine-row > .stb-step-body { grid-column: 1 / -1; grid-row: 6; margin: 12px 0 0; font-size: 15.5px; line-height: 1.5; max-width: min(34em, 76vw); }
  .cine-beat .stb-beat-text { font-size: clamp(21px, 5.8vw, 30px); }
}
@media (orientation: landscape) and (max-height: 500px) {
  .stb-home .stb-flow { width: 60%; }
  .cine-col { width: 60vw; max-width: none; }
  html.cine-on .cine-beat, html.cine-on .cine-beat--low, html.cine-on .cine-beat--metal { justify-content: center; padding: 60px var(--stb-pad-r) 12px var(--stb-pad-l); }
  html.cine-on .cine-list-head .stb-h2 { font-size: 22px; }
  html.cine-on .cine-list { grid-template-columns: [num] auto [title] max-content [body] minmax(0, 1fr); row-gap: 3px; }
  html.cine-on .cine-row > .stb-step-title { white-space: nowrap; font-size: 16px; }
  html.cine-on .cine-row > .stb-step-num { font-size: 18px; }
  html.cine-on .cine-row > .stb-step-body { grid-column: body; grid-row: 1 / span 5; margin: 0 0 0 18px; font-size: 13.5px; max-width: 24em; }
  /* a phone on its side: keep the small gold labels on the dark, off the pale bill */
  html.cine-on .cine-beat--hero { justify-content: flex-end; padding-bottom: 22px; }
  html.cine-on .cine-beat--low { justify-content: flex-start; padding-top: 42vh; padding-top: 42svh; }
  .cine-beat--hero .stb-hero-ctas .btn { padding-top: 12px; padding-bottom: 12px; }
}
/* short phones (a small phone with the browser bars showing) */
@media (max-width: 900px) and (max-height: 640px) and (orientation: portrait) {
  html.cine-on .cine-beat--low { padding-top: 43vh; padding-top: 43svh; }
  html.cine-on .cine-list-head { margin-bottom: 8px; }
  html.cine-on .cine-list { row-gap: 4px; }
  html.cine-on .cine-row > .stb-step-body { margin-top: 8px; font-size: 14.5px; line-height: 1.45; }
}

/* the safe: words stand on the gold picture. Each line carries its own soft dark backing, so the backing fades in and out with the line */
html.cine-on .cine-beat--vault { justify-content: center; }
html.cine-on .cine-beat--vault [data-cl] { width: fit-content; background: rgba(8,6,2,.62); box-shadow: 0 0 34px 26px rgba(8,6,2,.62); border-radius: 6px; }
html.cine-on .cine-beat--vault .stb-h1, html.cine-on .cine-beat--vault .stb-eyebrow, html.cine-on .cine-beat--vault .stb-offer-line { text-shadow: 0 2px 14px rgba(0,0,0,.9), 0 0 3px rgba(0,0,0,.95); }
html.cine-on .cine-beat--vault .stb-h1-b { background: none; -webkit-text-fill-color: #fff6dc; color: #fff6dc; }
html.cine-on .cine-beat--vault .stb-offer-line { color: #f4ecd8; max-width: 30em; margin: 0; }
html.cine-vault .film-shade { opacity: 0; }
