/* G&K Location — landing page: cinematic stage, opening, beats, panels, HUD. */

/* touch screens: the finger drives the film at its own pace (app.js), the page does not pan by
   itself meanwhile; pinch zoom stays available (the class is off once zoomed in, and in the showroom) */
html.touch-drive, html.touch-drive body { touch-action: pinch-zoom; overscroll-behavior: none; }
/* touch screens: no blur recomputed over the moving film at every picture (the ghost buttons'
   frosted glass, the texts' blur while they fade): a phone's graphics chip keeps it for the film */
@media (pointer: coarse) {
  .btn--ghost { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(5,5,5,.55); }
  .beat__copy { filter: none; will-change: opacity; }
  /* the progress box's small buttons: a larger area to touch, the same look */
  .hud__jump, .hud__play { position: relative; }
  .hud__jump::after { content: ""; position: absolute; inset: -7px -2px; }
  .hud__play::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; }
}
/* a touch leaves no hover behind: the progress box's buttons do not stay lit after a tap */
@media (hover: none) {
  .hud__jump:hover { background: rgba(242,237,228,.06); border-color: var(--line); }
  .hud__play:hover { background: rgba(242,237,228,.08); border-color: rgba(242,237,228,.35); }
}

/* ---------- Stage: sticky inside .cinema, so the closing frame scrolls away with the page ---------- */
.cinema { position: relative; z-index: 1; }
/* the footer waits underneath, pinned to the bottom; the whole page (closing frame and text) slides up off it */
.site-footer.is-reveal { position: sticky; bottom: 0; z-index: 0; }
.stage { position: sticky; top: 0; z-index: 0; height: calc(var(--vh) * 100); background: #000; overflow: hidden; }
/* content starts over the stage; the pull sits on main (not a negative margin on the sticky stage,
   which would let it overflow .cinema and stay pinned over the footer) */
.cinema > main { margin-top: calc(var(--vh) * -100); }
.stage canvas { width: 100%; height: 100%; display: block; }
/* back from /devis: the picture that was on screen, until the film shows it again */
.stage__snap { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; transition: opacity .18s ease; }
.stage__vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 50% 50%, transparent 58%, rgba(0,0,0,.45) 100%), linear-gradient(to bottom, rgba(0,0,0,.38), transparent 18%, transparent 74%, rgba(0,0,0,.5)); }
.film-sources { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.film-sources video { width: 1px; height: 1px; }

main { position: relative; z-index: 2; }
.gap { height: calc(var(--vh) * var(--h, 200)); }

/* ---------- Opening: logo + CTAs held over the first shot, then they scroll up ---------- */
.opening { position: relative; height: calc(var(--vh) * 210); }
.opening__inner { transform: translate3d(0, calc(var(--exit, 0) * -108vh), 0);
  position: sticky; top: 0; height: calc(var(--vh) * 100);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: calc(var(--header-h) + 8px) var(--gutter) 28px;
}
.opening__inner::before { /* restrained warm key light, then a soft shade for legibility over the video */
  content: ""; position: absolute; left: 50%; top: 48%; width: min(120vw, 1400px); aspect-ratio: 1.9; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(0,0,0,calc(var(--shade, 0) * .62)), rgba(0,0,0,calc(var(--shade, 0) * .35)) 60%, transparent 78%), radial-gradient(closest-side, rgba(255, 236, 214, .1), rgba(215, 15, 20, .04) 55%, transparent 75%);
  pointer-events: none; z-index: -1;
}
.opening__logo { position: relative; width: min(74vw, 820px); }
.opening__logo img:first-child { width: 100%; height: auto; filter: drop-shadow(0 1px 0 rgba(255,255,255,.35)) drop-shadow(0 18px 30px rgba(0,0,0,.85)) drop-shadow(0 0 42px rgba(255,236,214,.12)); animation: logo-in 1.6s cubic-bezier(.2,.7,.2,1) both; }
.opening__reflection { position: absolute; left: 0; top: 100%; width: 100%; height: auto; margin-top: 6px; transform: scaleY(-1); opacity: calc(.16 * (1 - var(--shade, 0))); filter: blur(2px); -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,.9), transparent 55%); mask-image: linear-gradient(to top, rgba(0,0,0,.9), transparent 55%); animation: refl-in 1.6s ease both; }
@keyframes logo-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes refl-in { from { opacity: 0; } }
.opening__title { margin: clamp(40px, 7vh, 72px) 0 0; max-width: 24ch; font: 300 clamp(20px, 2vw, 30px)/1.3 var(--text); letter-spacing: .01em; text-wrap: balance; text-shadow: 0 2px 24px rgba(0,0,0,.6); }
.opening__kicker { margin: 12px 0 0; font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--ink-2); text-shadow: 0 2px 16px rgba(0,0,0,.7); }
.opening__ctas { margin-top: clamp(22px, 4vh, 36px); justify-content: center; }
.scroll-cue { position: absolute; bottom: 18px; left: 0; right: 0; margin: 0; display: grid; justify-items: center; gap: 10px; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-3); opacity: calc(1 - var(--shade, 0)); }
.scroll-cue span { width: 1px; height: 36px; background: linear-gradient(to bottom, transparent, var(--ink)); animation: cue 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- HUD ---------- */
.hud { position: fixed; right: var(--gutter); top: calc(var(--header-h) + 12px); z-index: 9; width: 248px; padding: 12px 14px 11px; background: rgba(5,5,5,.66); border: 1px solid var(--line); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; transition: opacity .4s ease, transform .4s ease; }
.hud.is-hidden { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.hud__row { display: flex; align-items: center; gap: 10px; }
.hud__pct { font: 700 26px/1 var(--display); letter-spacing: .02em; min-width: 54px; font-variant-numeric: tabular-nums; }
.hud__bar { flex: 1; height: 1px; background: var(--line); position: relative; }
.hud__bar span { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--red); box-shadow: 0 0 8px var(--red-glow); }
.hud__jumps { display: flex; gap: 4px; }
.hud__jump { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; background: rgba(242,237,228,.06); border: 1px solid var(--line); color: var(--ink); cursor: pointer; transition: background .2s ease, border-color .2s ease; }
.hud__jump:hover { background: rgba(215,15,20,.2); border-color: rgba(215,15,20,.6); }
.hud__jump svg { width: 18px; height: 18px; }
.hud__body { display: flex; align-items: center; gap: 12px; margin: 10px 0 0; }
.hud__meta { flex: 1; min-width: 0; margin: 0; display: grid; gap: 4px; }
.hud__meta div { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.hud__play { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; background: rgba(242,237,228,.08); border: 1px solid rgba(242,237,228,.35); border-radius: 50%; color: var(--ink); cursor: pointer; transition: background .2s ease, border-color .2s ease; }
.hud__play:hover { background: rgba(215,15,20,.25); border-color: rgba(215,15,20,.7); }
.hud__play svg { width: 18px; height: 18px; }
.hud__icon-pause, .hud__play.is-playing .hud__icon-play { display: none; }
.hud__play.is-playing .hud__icon-pause { display: block; }
.hud__meta dt { color: var(--ink-3); }
.hud__meta dd { margin: 0; white-space: nowrap; transition: opacity .3s ease; }
.hud__meta dd.is-swap { opacity: 0; }

/* ---------- Beats: the copy rises, pauses while the shot keeps playing, then leaves upwards ---------- */
.beat { position: relative; height: calc(var(--vh) * 380); }
.beat--long { height: calc(var(--vh) * 700); }   /* texts over moving footage: twice the reading time */
.beat__inner { position: sticky; top: 0; height: calc(var(--vh) * 100); display: flex; flex-direction: column; justify-content: flex-end; padding: 120px var(--gutter) clamp(80px, 13vh, 160px); }
.beat__copy { opacity: var(--o, 0); filter: blur(calc((1 - var(--o, 0)) * 8px)); will-change: opacity, filter; }
.beat__copy { max-width: 760px; }
.beat--right .beat__inner { align-items: flex-end; text-align: right; }
.beat--right .eyebrow { justify-content: flex-end; }
.beat--right .body { margin-left: auto; }
.beat--finale { height: calc(var(--vh) * 516); }
.beat--finale .beat__inner { padding-bottom: clamp(40px, 9vh, 96px); }
.beat--finale .beat__copy { max-width: min(28vw, 420px); }
.beat--finale .cta-row { margin-top: 26px; flex-direction: column; align-items: stretch; max-width: 300px; }
.end-mark { position: absolute; left: 0; bottom: calc(var(--vh) * 100); width: 1px; height: 1px; }

/* ---------- Horizontal Service panel (over the foreground tree) ---------- */
.hpanel { position: relative; height: calc(var(--vh) * 340); }
.hpanel__mark { position: absolute; left: 0; top: calc(var(--vh) * 192); width: 1px; height: 0; pointer-events: none; }
.hpanel__mark--out { top: calc(var(--vh) * 240); }
/* fleet: pinned for a hold (same length as the Service menu), arriving and leaving with the page */
.vpanel { position: relative; height: calc(var(--vh) * 300); }
.vpanel__inner { position: sticky; top: 0; height: calc(var(--vh) * 100); overflow: hidden; display: flex; align-items: center; align-items: safe center; }
@media (max-width: 980px) { .vpanel__inner { align-items: flex-start; } }
.vpanel .panel { width: 100%; padding: calc(var(--header-h) + 8px) var(--gutter) 28px; background: linear-gradient(to bottom, rgba(5,5,5,0), rgba(5,5,5,.86) 12%, rgba(5,5,5,.86) 88%, rgba(5,5,5,0)); transform: translate3d(0, var(--vy, 0px), 0); will-change: transform; }
.vpanel .panel__head { margin-bottom: clamp(20px, 3.5vh, 44px); }
.vpanel .panel__ctas { margin-top: clamp(20px, 3.5vh, 40px); }
.hpanel__inner { position: sticky; top: 0; height: calc(var(--vh) * 100); overflow: hidden; display: flex; align-items: center; padding: calc(var(--header-h) + 12px) var(--gutter) 28px; }
.hpanel__card { width: min(1200px, 100%); margin: 0 auto; transform: translate3d(var(--hx, 100vw), var(--hy, 0px), 0); will-change: transform; }
.hpanel .panel__head { margin-bottom: clamp(24px, 4vh, 48px); }

/* ---------- Static panels (fleet) ---------- */
.panel { position: relative; padding: clamp(110px, 16vh, 180px) var(--gutter); background: linear-gradient(to bottom, rgba(5,5,5,0), rgba(5,5,5,.86) 12%, rgba(5,5,5,.86) 88%, rgba(5,5,5,0)); }
.panel__head { max-width: 1100px; margin-bottom: clamp(36px, 6vh, 72px); }
.panel__ctas { margin-top: clamp(32px, 5vh, 56px); }

.fleet { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2vw, 28px); }
@media (max-width: 1199px) { .fleet { grid-template-columns: repeat(2, 1fr); } }
.car { background: var(--bg-2); border: 1px solid var(--line); display: flex; flex-direction: column; transition: border-color .3s ease, transform .4s ease; }
.car:hover { border-color: rgba(215,15,20,.6); transform: translateY(-4px); }
.car__media { aspect-ratio: 16 / 10; overflow: hidden; background: #0d0d0d; }
.car__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.car:hover .car__media img { transform: scale(1.04); }
.car__body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.car__type { margin: 0; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3); }
.car__name { margin: 0; font: 800 clamp(30px, 2.6vw, 42px)/.95 var(--display); text-transform: uppercase; }
.car__desc { margin: 4px 0 6px; color: var(--ink-2); font-size: 15px; font-weight: 300; flex: 1; }
.car__price { margin: 0 0 12px; font-size: 13px; color: var(--ink-2); }
.car__price strong { color: var(--ink); font-weight: 600; }
.link-cta { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; font: 600 12px/1 var(--text); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--red); }
.link-cta span { display: inline-block; transition: transform .25s ease; }
.link-cta:hover span { transform: translateX(4px); }

.pillars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.pillars li { padding: 30px clamp(16px, 2.4vw, 40px) 10px 0; }
.pillars li + li { padding-left: clamp(16px, 2.4vw, 40px); border-left: 1px solid var(--line); }
.pillars__n { font: 700 14px/1 var(--display); letter-spacing: .1em; color: var(--red); }
.pillars h3 { margin: 14px 0 10px; font: 800 clamp(30px, 3vw, 48px)/.95 var(--display); text-transform: uppercase; }
.pillars p { margin: 0; color: var(--ink-2); font-weight: 300; max-width: 36ch; }

/* ---------- Garage entry overlay ---------- */
.entry { position: fixed; inset: 0; z-index: 60; background: #000; }
.entry video { max-width: none; width: 100%; height: 100%; object-fit: cover; transform-origin: 0 0; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .pillars { grid-template-columns: 1fr; }
  .pillars li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .fleet { grid-template-columns: 1fr; }
  .opening__logo { width: 88vw; }
  .opening__title { margin-top: 34px; font-size: 20px; }
  .opening__kicker { font-size: 10.5px; letter-spacing: .2em; line-height: 1.6; }
  .opening__ctas { width: 100%; flex-direction: column; }
  .opening__ctas .btn { width: 100%; }
  .scroll-cue { display: none; }
  .hud { right: 12px; top: calc(var(--header-h) + 6px); width: 196px; padding: 8px 10px 7px; font-size: 9.5px; letter-spacing: .1em; }
  .hud__pct { font-size: 20px; min-width: 40px; }
  .hud__jump { width: 28px; height: 28px; }
  .hud__body { margin-top: 7px; gap: 8px; }
  .hud__play { width: 32px; height: 32px; }
  .hud__play svg { width: 15px; height: 15px; }
  /* the copy's top pauses at mid-screen, then continues upwards */
  .beat__inner { justify-content: flex-start; padding: calc(var(--vh) * 50) 16px 24px; }
  .beat--right .beat__inner { align-items: flex-start; text-align: left; }
  .beat--right .eyebrow { justify-content: flex-start; }
  .beat--right .body { margin-left: 0; }
  .display { font-size: clamp(38px, 11.5vw, 58px); }
  .beat--finale .beat__copy { max-width: none; }
  .beat--finale .cta-row { flex-direction: column; max-width: none; }
  .hpanel__inner { align-items: flex-start; padding: calc(var(--header-h) + 16px) 16px 16px; }
  .panel { padding: 100px 16px; }
  .panel__ctas { flex-direction: column; }
  .panel__ctas .btn { width: 100%; }
}
/* a phone held sideways (a short screen): the same page sized to the height; the progress box
   gives its room to the picture and the texts */
@media (orientation: landscape) and (max-height: 500px) {
  :root { --header-h: 56px; }
  .hud, .scroll-cue { display: none; }
  .opening__logo { width: min(74vw, 100vh); }
  .opening__title { margin-top: 3vh; font-size: 17px; }
  .opening__ctas { margin-top: 3vh; }
  .display { font-size: clamp(30px, 10.5vh, 48px); }
  .display--sm, .display--xs { font-size: clamp(26px, 9vh, 40px); }
  .eyebrow { margin-bottom: 10px; }
  .body { margin-top: 12px; font-size: 15px; }
  .beat__inner { padding: calc(var(--header-h) + 8px) var(--gutter) 6vh; }
  .panel { padding: calc(var(--header-h) + 12px) var(--gutter) 24px; }
  /* iPhone held sideways: texts and header clear of the camera notch (the film still fills the screen) */
  .nav { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .beat__inner, .panel, .hpanel__inner { padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue span, .opening__logo img { animation: none !important; }
  .beat__copy { filter: none !important; }
  .car, .car__media img { transition: none; }
}
