/* V3 — the two new sections only (Savoir-faire in 3D, showroom film). main.css is the V2 file, unchanged.
   Default = plain, complete page (no 3D, reduced motion). `.is-live` = the scroll story. */

/* ---------- Savoir-faire: plain version ---------- */
.sf { position: relative; background: var(--night); color: var(--on); }
.sf__sticky { position: relative; padding-block: var(--sec); }
.sf__gl, .sf__tags { display: none; }
.sf__head { margin-bottom: clamp(2rem, 4vh, 3rem); }
.sf__poster { width: calc(100% - 2 * var(--gut)); margin-inline: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.sf__steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; padding: 1.4rem var(--gut); }
.sf__steps li, .sf__final { background: #fff; color: var(--ink); border-radius: 2px; }
.sf__steps li { padding: 1.5rem 1.6rem 1.6rem; }
.sf__n { font: italic 300 1.2rem var(--serif); color: var(--magenta); }
.sf__steps h3 { font: 300 clamp(1.9rem, 2.6vw, 2.5rem)/1 var(--serif); margin: .25rem 0 .7rem; }
.sf__steps p { color: var(--ink-2); }
.sf__cloth { display: flex; align-items: center; gap: .8rem; margin-top: 1.1rem; font-size: .84rem; line-height: 1.4; color: var(--ink); }
.sf__cloth img { width: 46px; height: 46px; object-fit: cover; }
.sf__cloth a { color: var(--magenta); font-weight: 600; }
.sf__final { margin-inline: var(--gut); padding: clamp(1.4rem, 2.4vw, 2.2rem); }
.sf__final > p:first-child { font: 300 clamp(1.7rem, 2.6vw, 2.5rem)/1.05 var(--serif); letter-spacing: -.01em; }
.sf__final > p:first-child em { font-weight: 300; color: var(--magenta); }
.sf__pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.6rem; margin: 1.4rem 0; }
.sf__pillars div { border-top: 1px solid var(--line); padding-top: .6rem; }
.sf__pillars dt { font: 300 1.5rem/1.1 var(--serif); color: var(--plum); }
.sf__pillars dd { margin-top: .2rem; font-size: .9rem; line-height: 1.45; color: var(--ink-2); }
.sf__remote { display: none; }
.sf__note { padding: 1rem var(--gut) 0; font-size: .8rem; color: var(--on-3); }
.sf [data-ambience]:focus-visible, .sf__final :focus-visible, .sf__steps :focus-visible { outline-color: var(--magenta); }

/* ---------- Savoir-faire: the scroll story ---------- */
.sf.is-live { height: 640vh; height: 640svh; }
.is-live .sf__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; padding: 0; overflow: hidden; }
.is-live .sf__gl { display: block; position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1s; }
.is-live.is-ready .sf__gl { opacity: 1; }
.is-live .sf__poster { display: none; }
/* night on the left keeps the title readable; it lifts with the day */
.is-live .sf__sticky::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(27, 15, 26, .88), rgba(27, 15, 26, .5) 34%, rgba(27, 15, 26, 0) 60%); transition: opacity 1.1s var(--ease); }
.is-live[data-step="3"] .sf__sticky::before, .is-live[data-step="4"] .sf__sticky::before { opacity: 0; }
.is-live .sf__head { position: absolute; z-index: 2; left: 0; top: clamp(96px, 15vh, 150px); margin: 0; transition: opacity .6s, translate .9s var(--ease); }
.is-live[data-step="3"] .sf__head, .is-live[data-step="4"] .sf__head { opacity: 0; translate: 0 -24px; }
.is-live .sf__head h2 { font-size: clamp(2.6rem, min(6vw, 11vh), 6.4rem); }
.is-live .sf__steps { position: absolute; z-index: 2; left: var(--gut); bottom: clamp(2rem, 7vh, 4.5rem); width: min(25rem, calc(100% - 2 * var(--gut))); padding: 0; display: grid; align-items: end; grid-template-columns: minmax(0, 1fr); }
.is-live .sf__steps li { grid-area: 1 / 1; opacity: 0; visibility: hidden; translate: 0 18px; transition: opacity .35s, translate .7s var(--ease), visibility .35s; }
.is-live[data-step="0"] li:nth-child(1), .is-live[data-step="1"] .sf__steps li:nth-child(2),
.is-live[data-step="2"] .sf__steps li:nth-child(3), .is-live[data-step="3"] .sf__steps li:nth-child(4) { opacity: 1; visibility: visible; translate: none; transition-delay: .18s; }
.is-live .sf__final { position: absolute; z-index: 2; left: var(--gut); bottom: clamp(1.6rem, 6vh, 4rem); width: min(33rem, calc(100% - 2 * var(--gut))); max-height: calc(100% - 6rem); overflow: auto; margin: 0; opacity: 0; pointer-events: none; translate: 0 24px; transition: opacity .5s, translate .9s var(--ease); }
.is-live[data-step="4"] .sf__final { opacity: 1; pointer-events: auto; translate: none; transition-delay: .15s; }
.is-live .sf__remote { display: block; margin-bottom: 1.3rem; }
.sf__remote .lbl { margin-bottom: .5rem; }
.sf__modes { display: flex; flex-wrap: wrap; gap: .4rem; }
.sf__modes button { min-height: 46px; padding: .4rem 1.1rem; border: 1px solid var(--line); border-radius: 2px; background: none; font-size: .9rem; font-weight: 500; transition: background-color .3s, color .3s; }
.sf__modes button:hover { border-color: var(--ink); }
.sf__modes [aria-pressed="true"] { background: var(--night); border-color: var(--night); color: #fff; }
.sf__status { margin-top: .6rem; font-size: .9rem; color: var(--ink-2); }
.is-live .sf__note { position: absolute; z-index: 2; right: var(--gut); bottom: clamp(1rem, 3vh, 2rem); max-width: 17rem; padding: .45rem .8rem; line-height: 1.4; background: var(--night); color: var(--on-2); }

/* part names, held on the 3D points */
.is-live .sf__tags { display: block; position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.sf__tag { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform; }
.sf__tag::before { content: ''; position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--rose); }
.sf__tag::after { content: ''; position: absolute; left: 0; top: 0; width: 54px; height: 1px; background: var(--rose); transform: rotate(-32deg); transform-origin: 0 50%; }
.sf__tag b { position: absolute; left: 50px; top: -42px; padding: .1rem .4rem; white-space: nowrap; font-size: .9rem; font-weight: 600; color: #fff; text-shadow: 0 1px 12px var(--night); }
.sf__tag--l::after { transform: rotate(-148deg); }
.sf__tag--l b { left: auto; right: 50px; }

/* ---------- the showroom film ---------- */
.film { background: var(--night); color: var(--on); padding-block: var(--sec); }
.film__run { position: relative; height: 210vh; height: 210svh; }
.film__stage {
  --w: min(calc(100vw - 2 * var(--gut)), 1240px, calc((100vh - 13.5rem) * 1.7778));
  --w: min(calc(100vw - 2 * var(--gut)), 1240px, calc((100svh - 13.5rem) * 1.7778));
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; align-content: center; justify-items: center; gap: 1.3rem;
}
.film__frame { position: relative; z-index: 1; width: var(--w); aspect-ratio: 16 / 9; overflow: hidden; background: #0f080e; clip-path: inset(0 calc(36% * (1 - var(--k, 1)))); }
.film__video { display: block; width: 100%; height: 100%; object-fit: cover; background: #0f080e; transform: scale(calc(1.14 - .14 * var(--k, 1))); }
.film__frame:fullscreen { width: 100vw; height: 100vh; aspect-ratio: auto; clip-path: none; background: #000; }
.film__frame:fullscreen .film__video { object-fit: contain; transform: none; background: #000; }
/* two stills stand beside the opening and slide away as the picture widens */
.film__still { position: absolute; top: 50%; width: calc(var(--w) * .3); aspect-ratio: 3 / 4; height: auto; object-fit: cover; opacity: calc(1 - var(--k, 1) * 1.15); }
.film__still--l { left: calc(50% - var(--w) * .46); transform: translate3d(calc(var(--k, 1) * -46%), calc(-58% + var(--k, 1) * -6%), 0); }
.film__still--r { right: calc(50% - var(--w) * .46); transform: translate3d(calc(var(--k, 1) * 46%), calc(-44% + var(--k, 1) * 8%), 0); }

.film__play { position: absolute; left: 1.4rem; bottom: 1.4rem; display: inline-flex; align-items: center; gap: .9rem; min-height: 62px; padding: .5rem 1.6rem .5rem 1.1rem; border: 0; border-radius: 2px; background: #fff; color: var(--plum); text-align: left; font-size: 1rem; font-weight: 600; line-height: 1.25; opacity: var(--ui, 1); transition: background-color .3s, color .3s; }
.film__play[hidden], .film__bar[hidden] { display: none; }
.film__play:hover { background: var(--magenta); color: #fff; }
.film__play svg { width: 30px; height: 30px; flex: none; }
.film__play small { display: block; font-size: .82rem; font-weight: 500; }
.film__bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: .5rem; padding: 2.4rem 1rem .7rem; background: linear-gradient(180deg, rgba(15, 8, 14, 0), rgba(15, 8, 14, .86)); color: #fff; }
.film__ctl { display: grid; place-items: center; width: 46px; height: 46px; flex: none; padding: 0; border: 0; border-radius: 2px; background: none; color: #fff; transition: background-color .3s; }
.film__ctl:hover { background: rgba(255, 255, 255, .16); }
.film__ctl svg { width: 22px; height: 22px; }
.film .i-play, .film .i-off { display: none; }
.is-paused .i-play, .is-muted .i-off { display: block !important; }
.is-paused .i-pause, .is-muted .i-on { display: none; }
.film__seek { flex: 1; min-width: 0; height: 46px; margin: 0; background: none; -webkit-appearance: none; appearance: none; cursor: pointer; }
.film__seek::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(90deg, var(--rose) var(--v, 0%), rgba(255, 255, 255, .34) var(--v, 0%)); }
.film__seek::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; margin-top: -6px; border-radius: 50%; background: #fff; }
.film__seek::-moz-range-track { height: 3px; background: rgba(255, 255, 255, .34); }
.film__seek::-moz-range-progress { height: 3px; background: var(--rose); }
.film__seek::-moz-range-thumb { width: 15px; height: 15px; border: 0; border-radius: 50%; background: #fff; }
.film__time { min-width: 2.6rem; font-size: .88rem; font-variant-numeric: tabular-nums; text-align: right; }

.film__chapters { position: relative; z-index: 1; width: var(--w); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .7rem; opacity: var(--ui, 1); }
.film__chapters button { display: block; width: 100%; padding: 0; border: 0; background: none; color: var(--on-2); text-align: left; }
.film__chapters img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; opacity: .7; transition: opacity .3s; }
.film__chapters span { display: flex; justify-content: space-between; align-items: baseline; gap: .4rem; margin-top: .5rem; padding-top: .4rem; border-top: 2px solid transparent; font-size: .88rem; }
.film__chapters small { font-size: .82rem; color: var(--on-3); font-variant-numeric: tabular-nums; }
.film__chapters button:hover img, .film__chapters .is-on img { opacity: 1; }
.film__chapters .is-on { color: var(--on); } .film__chapters .is-on span { border-top-color: var(--rose); }

/* ---------- smaller screens ---------- */
@media (max-width: 1180px) { .nav__links { gap: 1.1rem; padding: 0 1rem; } }
@media (max-width: 1000px) {
  .sf__steps { grid-template-columns: 1fr 1fr; }
  .film__run { height: auto; }
  .film__stage { --w: 100%; position: relative; height: auto; display: block; justify-items: stretch; align-content: normal; overflow: visible; }
  .film__frame { clip-path: none; } .film__video { transform: none; } .film__still { display: none; }
  .film__chapters { display: flex; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--rose) transparent; width: auto; margin-top: 1rem; padding: .2rem var(--gut) .6rem; scroll-snap-type: x proximity; scroll-padding-left: var(--gut); }
  .film__chapters li { flex: 0 0 max(38vw, 150px); scroll-snap-align: start; }
}
/* upright screens: title on top, picture in the middle, card at the bottom */
@media (max-aspect-ratio: 95/100) {
  .is-live .sf__sticky::before { background: linear-gradient(180deg, rgba(27, 15, 26, .86), rgba(27, 15, 26, 0) 38%); }
  .is-live .sf__head { top: 92px; }
  .is-live .sf__head h2 { font-size: clamp(2.4rem, 10vw, 5.4rem); }
  .is-live .sf__steps, .is-live .sf__final { bottom: calc(1rem + env(safe-area-inset-bottom)); }
  .is-live .sf__steps { width: calc(100% - 2 * var(--gut)); }
  .is-live .sf__final { width: calc(100% - 2 * var(--gut)); }
  .is-live .sf__note { display: none; }
}
@media (max-width: 680px) {
  .sf.is-live { height: 560vh; height: 560svh; }
  .sf__steps { grid-template-columns: minmax(0, 1fr); }
  .sf__steps li { padding: 1.1rem 1.2rem 1.2rem; }
  .sf__pillars { gap: .6rem 1rem; margin: .9rem 0; }
  .sf__pillars dt { font-size: 1.25rem; } .sf__pillars dd { font-size: .82rem; line-height: 1.35; }
  .is-live .sf__final { padding: 1.1rem 1.2rem 1.2rem; }
  .is-live .sf__remote { margin-bottom: .9rem; }
  .sf__modes button { flex: 1; padding: .4rem .3rem; } .sf__final .btn { width: 100%; }
  .sf__tag b { left: 30px; top: -34px; font-size: .82rem; } .sf__tag::after { width: 34px; } .sf__tag--l b { left: auto; right: 30px; }
  .film__play { left: .9rem; bottom: .9rem; min-height: 54px; padding: .4rem 1.1rem .4rem .8rem; font-size: .92rem; }
  .film__bar { padding: 1.6rem .4rem .3rem; gap: .2rem; }
}
@media (min-width: 681px) and (max-height: 760px) {
  .sf__pillars { margin: 1rem 0; gap: .7rem 1.6rem; } .sf__pillars dd { font-size: .84rem; }
  .is-live .sf__head { top: 84px; } .is-live .sf__head h2 { font-size: clamp(2.2rem, 4.4vw, 4rem); }
}
@media (prefers-reduced-motion: reduce) {
  .film__run { height: auto; } .film__stage { position: relative; height: auto; padding-block: 1rem; } .film__still { display: none; }
}
