/* ==========================================================================
   Longines boutique LP — section & motion styles (Phase 3, v3)
   Light editorial ground; dark reserved for the climaxes (hero, timeline,
   Majetek, sport). One signature motion moment per section — GSAP layers
   reveals on top; everything here must be legible with motion off.
   ========================================================================== */

/* ---------- NAV ----------------------------------------------------------
   Always present: transparent + paper-white over the hero film, then turns
   solid (paper ground, ink type, hairline) once the page scrolls. */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  color: var(--c-paper);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: color var(--dur-ui) ease, background var(--dur-ui) ease,
              border-color var(--dur-ui) ease;
}
.nav.is-solid {
  color: var(--c-ink);
  background: color-mix(in srgb, var(--c-paper) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--c-line);
}
.nav__inner {
  max-width: var(--maxw); margin-inline: auto;
  padding: 1.35rem var(--gutter);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
}
.nav__logo { grid-column: 2; justify-self: center; color: currentColor; display: block; }
.logo-mark {
  display: block; height: 1.7rem; aspect-ratio: 119 / 30;
  background: currentColor;
  -webkit-mask: url("../../assets/longines.com-3.svg") center / contain no-repeat;
  mask: url("../../assets/longines.com-3.svg") center / contain no-repeat;
}
.footer__logo .logo-mark { height: 1.6rem; margin-inline: auto; }
.nav__cta { grid-column: 1; justify-self: start; }
.nav__lang { grid-column: 3; justify-self: end; display: flex; gap: 0.4rem; align-items: center; font-size: var(--fs-small); }
.nav__lang button { color: currentColor; opacity: 0.55; letter-spacing: 0.08em; transition: opacity var(--dur-hover) ease; }
.nav__lang button[aria-pressed="true"] { opacity: 1; }
.nav__lang span { opacity: 0.35; }

button { background: none; border: 0; cursor: pointer; font: inherit; color: inherit; }

/* ---------- PANELS -------------------------------------------------------- */
#stack { position: relative; }

.panel {
  position: relative;
  min-height: 100svh;
  display: flex;
  overflow: hidden;
}
.panel--dark  { background: var(--c-ink);  color: var(--c-paper); }
.panel--light { background: var(--c-paper); color: var(--c-text); }

.panel > .panel__media { position: absolute; inset: 0; z-index: 0; }
.panel__media img,
.panel__media video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* hero stays put while the next section slides up over it (the one "překrytí") */
#hero { position: sticky; top: 0; }
#hero > .panel__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(14,26,43,0.88) 0%, rgba(14,26,43,0.35) 42%, rgba(14,26,43,0.30) 100%);
}

.panel__inner {
  position: relative; z-index: 2;
  width: 100%; max-width: var(--maxw);
  margin-inline: auto; padding: clamp(6rem, 12vh, 10rem) var(--gutter) clamp(4rem, 8vh, 7rem);
  display: flex; flex-direction: column; justify-content: center; gap: var(--space-3);
  min-height: 100svh;
}
.panel__inner.center { align-items: center; text-align: center; }
.panel__inner.narrow { max-width: 68ch; }

/* ---------- CINEMATIC SCENES (the Majetek chapter + film invitation) -----
   Each scene is its own composition: typographic arrival, full-bleed image
   moments with a bottom scrim, and a mirrored editorial split. Copy over
   imagery never exceeds a label + a few lines + CTA. */
.scene__year {
  font-family: var(--font-display); font-size: clamp(5.5rem, 13vw, 11rem); line-height: 0.9;
  color: var(--c-ink); margin: 0;
}
.scene__label { font-size: var(--fs-small); letter-spacing: 0.18em; text-transform: uppercase; color: var(--c-ink-soft); }
.scene__text { font-size: clamp(1.05rem, 1.4vw, 1.25rem); line-height: 1.7; max-width: 46ch; }
.scene__text--light { color: var(--c-paper); opacity: 0.95; }
.scene--bleed .scene__label,
.boutique .scene__label { color: color-mix(in srgb, var(--c-paper) 70%, transparent); }
.scene__close {
  font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.6rem); line-height: 1.25;
  color: var(--c-paper); max-width: 24ch; margin-top: var(--space-2);
}
.scene--bleed > .panel__media::after,
.boutique > .panel__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(14,26,43,0.92) 0%, rgba(14,26,43,0.55) 32%, rgba(14,26,43,0.08) 62%, rgba(14,26,43,0) 100%);
}
.scene__foot { justify-content: flex-end; gap: var(--space-2); padding-bottom: clamp(3.5rem, 9vh, 6rem); }
.scene__foot .btn { margin-top: var(--space-2); }

.xl { font-size: clamp(2.4rem, 6vw, 5rem); line-height: 1.02; font-weight: 400; }

/* ---------- BOUTIQUE PHOTOGRAPHY BAND (placeholders for the shoot) ------- */
.photos { min-height: 0; }
.photos__band {
  position: relative; width: 100%; max-width: var(--maxw); margin-inline: auto;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2.5vw, 2.5rem);
  padding: clamp(5rem, 12vh, 9rem) var(--gutter);
}
.boutique__frame { position: relative; overflow: hidden; background: var(--c-paper-alt); border-radius: 2px; }
.boutique__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; will-change: transform; }
.photos__a { grid-column: 1 / 8; grid-row: 1; aspect-ratio: 16 / 10; }
.photos__b { grid-column: 9 / 13; grid-row: 1; aspect-ratio: 3 / 4; align-self: end; transform: translateY(clamp(2rem, 6vh, 4rem)); }
.photos__c { grid-column: 4 / 9; grid-row: 2; aspect-ratio: 4 / 3; margin-top: clamp(4rem, 10vh, 7rem); }
@media (max-width: 820px) {
  .photos__band { display: flex; flex-direction: column; gap: var(--space-3); padding: clamp(3rem, 8vh, 5rem) var(--gutter); }
  .photos__a, .photos__c { aspect-ratio: auto; height: 40vh; margin: 0; }
  .photos__b { display: none; transform: none; }
}


/* small text bits */
.caption  { font-size: var(--fs-small); letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-muted); margin-top: var(--space-2); }

/* media must clip its scaling/curtain-revealing image */
.panel__media { overflow: hidden; }
/* scroll-driven darken layer (added by JS) */
.scroll-shade { position: absolute; inset: 0; background: var(--c-ink); pointer-events: none; z-index: 1; }

/* ---------- HISTORY: horizontal pinned timeline (the showpiece) --------- */
.timeline-section { position: relative; background: var(--c-paper); color: var(--c-text); }
.timeline { position: relative; height: 100svh; overflow: hidden; }
.timeline__intro { position: absolute; z-index: 4; top: clamp(4.5rem, 11vh, 8rem); left: var(--gutter); max-width: 40ch; }
.timeline__track { display: flex; height: 100%; width: max-content; will-change: transform; }
.milestone { flex: 0 0 100vw; height: 100%; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(2rem, 5vw, 6rem); padding: 0 var(--gutter); }
.milestone__media { position: relative; z-index: 2; height: min(60vh, 600px); overflow: hidden; border-radius: 2px; background: var(--c-paper-alt); will-change: transform; }
.milestone__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.milestone__text { position: relative; z-index: 1; max-width: 44ch; }
/* oversized ink year, fully on paper — depth comes from its slower travel,
   never from clipping it behind the photograph */
.milestone__year {
  font-family: var(--font-display); font-size: clamp(4rem, 10vw, 9rem); line-height: 0.95;
  display: block; color: var(--c-ink);
}
.milestone__head { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.4rem); font-weight: 400; color: var(--c-ink); margin: 0.6rem 0 1.1rem; }
.milestone__body { font-size: var(--fs-body); line-height: 1.7; opacity: 0.85; max-width: 40ch; }
.timeline__rail { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(2rem, 5vh, 3.5rem); height: 1px; background: var(--c-line); z-index: 4; }
.timeline__rail span { display: block; height: 100%; width: 100%; background: var(--c-ink); transform: scaleX(0); transform-origin: left; }

/* timeline falls back to a vertical stack on small screens or reduced motion */
@media (max-width: 820px) {
  .timeline { height: auto; overflow: visible; }
  .timeline__intro { position: static; max-width: none; padding: clamp(4rem, 12vh, 6rem) var(--gutter) 0; }
  .timeline__track { flex-direction: column; width: 100%; }
  .milestone { flex: none; width: 100%; height: auto; grid-template-columns: 1fr; padding: clamp(3rem, 8vh, 5rem) var(--gutter); }
  .milestone__media { height: 42vh; order: -1; }
  .milestone__year { margin-left: 0; }
  .timeline__rail { display: none; }
}

/* ---------- TYPOGRAPHY BLOCKS ------------------------------------------- */
.italic { font-style: italic; }
.ink { color: var(--c-ink); }

.hero { justify-content: flex-end; padding-bottom: clamp(4rem, 10vh, 8rem); gap: var(--space-3); }
.hero__title {
  font-size: clamp(3rem, 11vw, 9rem); line-height: 0.98; letter-spacing: 0.01em; font-weight: 400;
  text-transform: uppercase;
}
.hero__title .italic { text-transform: none; font-size: 0.62em; }
.hero__sub { font-size: clamp(1.05rem, 1.6vw, 1.35rem); max-width: 40ch; opacity: 0.85; }

.big  { font-size: var(--fs-h2); max-width: 20ch; }
.mid  { font-size: clamp(1.5rem, 3vw, 2.4rem); max-width: 24ch; }
.body { font-size: var(--fs-body); line-height: var(--lh-body); max-width: 54ch; opacity: 0.9; }
.center-text { margin-inline: auto; }

/* fill-on-scroll headline (E7) */
.fillhead { font-size: var(--fs-h2); font-weight: 400; }
.fillhead span {
  background-image: linear-gradient(90deg, var(--c-ink) 0 50%, color-mix(in srgb, var(--c-ink) 18%, transparent) 50% 100%);
  background-size: 220% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.xl.fillhead { font-size: clamp(2.4rem, 6vw, 5rem); }

.scrollcue { font-size: var(--fs-small); letter-spacing: var(--tracking-wide); text-transform: uppercase; opacity: 0.8; }
.scrollcue::after { content: " ↓"; }

/* opening statement — words ink in as you scroll (JS dims them; full ink without) */
.wordscrub {
  font-family: var(--font-body); font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.5rem); line-height: 1.42;
  color: var(--c-ink); max-width: 34ch;
}

/* ---------- FULLSCREEN GALLERY (centre-stage slider) --------------------- */
.gallery { min-height: 100svh; flex-direction: column; justify-content: center; }
.gallery .panel__inner.gallery__head {
  min-height: 0; padding-bottom: clamp(2rem, 5vh, 3.5rem);
}
.gallery__viewport { position: relative; width: 100%; }
/* default (no JS / reduced motion): native horizontal scroll with snap */
.gallery__track {
  display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding-inline: max(var(--gutter), calc((100vw - min(58vw, 980px)) / 2));
}
.gallery__track::-webkit-scrollbar { display: none; }
/* enhanced (JS): slides are absolutely centred and individually positioned
   by wrapped distance — the infinite loop has no track translation at all */
.gallery__viewport.is-enhanced .gallery__track {
  display: block; position: relative; overflow: visible;
  scroll-snap-type: none; cursor: grab; padding-inline: 0;
}
.gallery__viewport.is-enhanced .gallery__track:active { cursor: grabbing; }
.gallery__viewport.is-enhanced .gslide { position: absolute; left: 50%; top: 0; will-change: transform; }
.gslide {
  flex: 0 0 auto; width: min(52vw, 900px); aspect-ratio: 16 / 10;
  margin: 0; overflow: hidden; border-radius: 2px; background: var(--c-paper-alt);
  scroll-snap-align: center; transform-origin: center; user-select: none;
}
.gslide img, .gslide video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
/* ---------- AMBASSADORS — three portraits, names on paper ---------------- */
.ambassadors { min-height: 0; flex-direction: column; }
.ambassadors__head { min-height: 0; padding-bottom: 0; align-items: flex-start; }
.ambassadors__row {
  width: 100%; max-width: var(--maxw); margin-inline: auto;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(1.5rem, 3.5vw, 3.5rem);
  padding: clamp(4rem, 10vh, 7rem) var(--gutter) clamp(5rem, 12vh, 9rem);
  align-items: start;
}
.ambassador--offset { margin-top: clamp(3rem, 8vh, 6rem); }   /* editorial stagger */
.ambassador .boutique__frame { aspect-ratio: 3 / 4; }
.ambassador__name {
  margin-top: 0.9rem; font-size: var(--fs-small); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--c-ink-soft);
}
@media (max-width: 820px) {
  .ambassadors__row { grid-template-columns: 1fr; row-gap: var(--space-4); padding-block: clamp(3rem, 8vh, 5rem); }
  .ambassador--offset { margin-top: 0; }
}
.gallery__btn {
  position: absolute; top: 50%; z-index: 5;
  width: 3.25rem; height: 3.25rem; display: grid; place-items: center;
  background: var(--c-paper-pure); color: var(--c-ink);
  border: 1px solid var(--c-line); border-radius: 50%; font-size: 1.1rem;
  box-shadow: 0 0.5rem 1.5rem rgba(23, 40, 74, 0.12);
  transform: translateY(-50%);
  transition: background var(--dur-hover) ease, color var(--dur-hover) ease, transform var(--dur-press) var(--ease-out-strong);
}
.gallery__btn:active { transform: translateY(-50%) scale(0.94); }
@media (hover: hover) and (pointer: fine) {
  .gallery__btn:hover { background: var(--c-ink); color: var(--c-paper); }
}
.gallery__btn--prev { left: clamp(1rem, 4vw, 4rem); }
.gallery__btn--next { right: clamp(1rem, 4vw, 4rem); }
@media (max-width: 820px) {
  .gslide { width: 78vw; }
  .gallery__track { padding-inline: 11vw; }
}

/* assurance — shorter, airy beat */
.assurance { min-height: 0; }
.assurance .panel__inner { min-height: 72svh; border-top: 1px solid var(--c-line); }
.statement-line {
  font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.3; color: var(--c-ink); max-width: 24ch;
}

/* ---------- LAYOUT HELPERS ---------------------------------------------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.grid-2 .panel__media { position: relative; min-height: min(70vh, 640px); border-radius: 2px; }
.grid-2 .panel__media.tall { min-height: min(80vh, 720px); }
.col { display: flex; flex-direction: column; gap: var(--space-3); }

/* ---------- WATCH GRID (uncropped packshots on quiet tiles) -------------- */
.watch-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem); margin: var(--space-3) 0;
}
.watch { display: flex; flex-direction: column; gap: 0.4rem; color: var(--c-text); transition: transform var(--dur-press) var(--ease-out-strong); }
.watch:active { transform: scale(0.98); }
.watch__img {
  display: block; position: relative; aspect-ratio: 4 / 5; background: var(--c-paper-alt); border-radius: 2px;
  overflow: hidden; transition: transform 0.25s var(--ease-out-strong), background 0.25s ease;
}
/* watches are never cropped — contained, centred, breathing room around the case */
.watch__img img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; padding: clamp(0.9rem, 2vw, 1.6rem); display: block;
  transition: transform 0.45s var(--ease-out-strong);
}
/* "před & po": the story shot (a second photograph, never a recolour)
   sits over the packshot and fades in on hover */
.watch__img .watch__then {
  object-fit: cover; padding: 0; opacity: 0;
  transition: opacity 0.45s var(--ease-out-strong);
}
/* era meta line — the then→now pairing from the concept */
.watch__era { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-muted); margin-top: 0.6rem; }

/* hover: the piece comes gently forward — nothing recolours a product shot */
@media (hover: hover) and (pointer: fine) {
  .watch:hover .watch__img { transform: translateY(-4px); background: color-mix(in srgb, var(--c-paper-alt) 70%, #fff); }
  .watch:hover .watch__img img { transform: scale(1.05); }
  .watch:hover .watch__img .watch__then { opacity: 1; }
}
.watch b { font-family: var(--font-display); font-size: 1.1rem; font-weight: 400; color: var(--c-ink); margin-top: 0.4rem; }
.watch__line { font-size: var(--fs-small); line-height: 1.5; opacity: 0.72; max-width: 30ch; }
.watch i { font-size: var(--fs-small); font-style: normal; letter-spacing: 0.02em; opacity: 0.55; }

/* ---------- BUTTONS & LINK HOVERS (E6) ---------------------------------- */
.btn {
  align-self: flex-start; display: inline-block;
  padding: 0.95rem 2rem; border: 1px solid currentColor; border-radius: var(--radius-btn);
  font-size: var(--fs-small); letter-spacing: var(--tracking-wide); text-transform: uppercase;
  cursor: pointer;
  transition: background var(--dur-hover) ease, color var(--dur-hover) ease, transform var(--dur-press) var(--ease-out-strong);
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible,
.nav__cta:focus-visible,
.nav__lang button:focus-visible,
.gallery__btn:focus-visible,
.link-hover:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}
.panel--light .btn { color: var(--c-ink); }
@media (hover: hover) and (pointer: fine) {
  .panel--dark .btn:hover { background: var(--c-paper); color: var(--c-ink); }
  .panel--light .btn:hover { background: var(--c-ink); color: var(--c-paper); }
}
.center .btn { align-self: center; }

.ghost { font-size: var(--fs-small); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: currentColor; }

.link-hover, .nav__cta, .nav__lang button { position: relative; }
.link-hover::after, .nav__cta::after {
  content: ""; position: absolute; left: 0; bottom: -3px; width: 100%; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-hover) var(--ease-out-strong);
}
@media (hover: hover) and (pointer: fine) {
  .link-hover:hover::after, .nav__cta:hover::after { transform: scaleX(1); }
}
.link-hover { align-self: flex-start; }

/* ---------- FORM -------------------------------------------------------- */
.form { gap: var(--space-2); }
.form label { display: grid; gap: 0.4rem; font-size: var(--fs-small); letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.8; }
.form input {
  font: inherit; text-transform: none; letter-spacing: normal;
  padding: 0.8rem 0; background: transparent; border: 0; border-bottom: 1px solid color-mix(in srgb, currentColor 40%, transparent);
  color: inherit; border-radius: 0;
}
.form input:focus { outline: none; border-bottom-color: currentColor; }
.form .btn { margin-top: var(--space-2); }
.form__status { font-family: var(--font-display); font-size: 1.15rem; opacity: 0.95; }

/* ---------- FOOTER ------------------------------------------------------- */
.footer { position: relative; z-index: 1; background: var(--c-ink); color: var(--c-paper); }
.footer__inner { max-width: var(--maxw); margin-inline: auto; padding: clamp(3rem, 8vh, 6rem) var(--gutter); display: grid; gap: 0.7rem; text-align: center; place-items: center; }
.footer__logo { display: block; }
.footer .muted { color: color-mix(in srgb, var(--c-paper) 55%, transparent); font-size: var(--fs-small); max-width: 52ch; }

/* Reveal initial states are set by GSAP (in the motion branch only), so content
   stays visible when motion is off — no CSS hiding, no JS-failure special-casing. */

/* ---------- RESPONSIVE --------------------------------------------------- */
@media (max-width: 820px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-2 .panel__media { min-height: 42vh; order: -1; }
  .form-grid .form { order: 0; }
  .panel__inner { padding-top: clamp(5rem, 14vh, 8rem); }
  .nav__inner { padding: 1rem var(--gutter); }
  .nav__cta { font-size: 0.7rem; letter-spacing: 0.08em; }
  .logo-mark { height: 1.35rem; }
  .footer__logo .logo-mark { height: 1.4rem; }
  .watch-grid { grid-template-columns: repeat(2, 1fr); }
  .milestone__year { margin-left: 0; font-size: clamp(3rem, 14vw, 5rem); }
  .scene__year { font-size: clamp(3.5rem, 16vw, 6rem); }
}
@media (max-width: 460px) {
  .watch-grid { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .watch__line { display: none; }   /* keep tiles scannable on a phone */
}

/* ---------- REDUCED MOTION: linear flow, everything legible -------------- */
@media (prefers-reduced-motion: reduce) {
  #hero { position: relative; }               /* no sticky cover */
  .fillhead span { background-position: 0 0; }
  html { scroll-behavior: auto; }
  /* timeline → vertical stack (no pin / horizontal) */
  .timeline { height: auto; overflow: visible; }
  .timeline__intro { position: static; max-width: none; padding: clamp(4rem, 12vh, 6rem) var(--gutter) 0; }
  .timeline__track { flex-direction: column; width: 100%; }
  .milestone { flex: none; width: 100%; height: auto; grid-template-columns: 1fr; padding: clamp(3rem, 8vh, 5rem) var(--gutter); }
  .milestone__media { height: 42vh; order: -1; }
  .milestone__year { margin-left: 0; }
  .timeline__rail { display: none; }
}
