/* ============================================================
   TRACK - cinematic scroll experience
   Scoped under .track-page. Does not touch global theme styles.
   ============================================================ */

.track-page {
  --tk-bg: #050506;
  --tk-bg-soft: #0b0b0d;
  --tk-fg: #f4f4f5;
  --tk-fg-dim: rgba(244, 244, 245, 0.62);
  --tk-fg-faint: rgba(244, 244, 245, 0.38);
  --tk-line: rgba(244, 244, 245, 0.14);
  --tk-silver: #b9bdc4;
  --tk-graphite: #17181b;
  /* Archivo has no Cyrillic - Inter fills in per-glyph for Bulgarian copy */
  --tk-display: 'Archivo', 'Inter', 'Arial Narrow', Impact, sans-serif;
  --tk-text: 'Inter', 'Archivo', Helvetica, Arial, sans-serif;
  --tk-ease: cubic-bezier(0.22, 1, 0.36, 1);

  position: relative;
  background: var(--tk-bg);
  color: var(--tk-fg);
  font-family: var(--tk-text);
  overflow: clip;
}

.track-page *,
.track-page *::before,
.track-page *::after { box-sizing: border-box; }

.track-page ::selection { background: rgba(244, 244, 245, 0.9); color: #050506; }

/* film grain overlay (absolute, so it never bleeds onto store
   sections rendered below the intro) */
.track-page::after {
  content: '';
  position: absolute;
  inset: -2%;
  width: 104%;
  height: 104%;
  pointer-events: none;
  z-index: 40;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: tk-grain 1.1s steps(4) infinite;
}
@keyframes tk-grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1.4%); }
  50% { transform: translate(1.6%, -1%); }
  75% { transform: translate(-1%, -1.8%); }
  100% { transform: translate(0, 0); }
}

/* ---------- typography ---------- */

.tk-display {
  font-family: var(--tk-display);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 0.86;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  margin: 0;
}

.tk-label {
  font-family: var(--tk-text);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--tk-fg-dim);
}

.tk-copy {
  font-size: clamp(1rem, 1.1vw + 0.6rem, 1.25rem);
  font-weight: 400;
  line-height: 1.55;
  color: var(--tk-fg-dim);
  max-width: 34em;
  margin: 0;
}

/* line-reveal primitives: each .tk-line wraps a masked inner span.
   The hidden offset is applied by track.js so content stays visible
   without JavaScript. */
.tk-line { display: block; overflow: hidden; }
.tk-line > .tk-line-inner { display: block; will-change: transform; }

/* ---------- scenes ---------- */

.tk-scene { position: relative; }

.tk-viewport {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tk-canvas,
.tk-media-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* soft vignette so type stays readable at frame edges */
.tk-vignette::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(115% 90% at 50% 42%, transparent 55%, rgba(5, 5, 6, 0.72) 100%),
    linear-gradient(to bottom, rgba(5, 5, 6, 0.5), transparent 18% 78%, rgba(5, 5, 6, 0.72));
}

/* =============== 1. HERO =============== */

.tk-hero .tk-canvas { z-index: 1; }

.tk-hero-poster {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease;
}
.tk-hero-poster.is-hidden { opacity: 0; }

.tk-hero-type {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: clamp(84px, 12vh, 128px) 4vw clamp(28px, 6vh, 72px);
  pointer-events: none;
}

.tk-hero-brand {
  display: flex;
  gap: 0.55em;
  color: var(--tk-fg);
  font-size: clamp(0.8rem, 1.2vw, 1.1rem);
  font-weight: 600;
  letter-spacing: 0.55em;
  text-indent: 0.55em; /* balance tracking */
}
.tk-hero-brand span { display: inline-block; }

.tk-hero-word {
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translate(-50%, -50%);
  font-size: clamp(6rem, 24vw, 22rem);
  color: var(--tk-fg);
  mix-blend-mode: difference;
  white-space: nowrap;
  display: flex;
}
.tk-hero-word span { display: inline-block; will-change: transform, opacity; }

.tk-hero-tagline {
  position: absolute;
  left: 50%;
  bottom: clamp(96px, 18vh, 180px);
  transform: translateX(-50%);
  font-size: clamp(0.95rem, 1.4vw, 1.25rem);
  font-style: italic;
  font-weight: 300;
  color: var(--tk-fg-dim);
  letter-spacing: 0.04em;
}

.tk-scroll-hint {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--tk-fg-faint);
  font-size: 0.625rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.tk-scroll-hint::after {
  content: '';
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--tk-fg-faint), transparent);
  animation: tk-hint 2.2s var(--tk-ease) infinite;
}
@keyframes tk-hint {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* =============== 2. LAYERS OF MOTION =============== */

.tk-layers { background: var(--tk-bg); }

.tk-layers-ghost {
  position: absolute;
  right: -6vw;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  font-size: clamp(10rem, 30vw, 30rem);
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 244, 245, 0.07);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.tk-layers-copy {
  position: relative;
  z-index: 3;
  padding: 0 6vw;
  max-width: 1200px;
  width: 100%;
}

.tk-layers-copy .tk-display {
  font-size: clamp(2.6rem, 7vw, 6.5rem);
  margin-bottom: 0.35em;
}

.tk-layers-copy em {
  display: block;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  color: var(--tk-fg-dim);
  letter-spacing: 0.02em;
}

/* =============== 3 + 4. SCRUB SCENES with callouts =============== */

.tk-scrub-head {
  position: absolute;
  z-index: 3;
  top: clamp(84px, 12vh, 140px);
  left: 6vw;
  right: 6vw;
  display: flex;
  flex-direction: column;
  gap: 14px;
  pointer-events: none;
}
.tk-scrub-head .tk-display { font-size: clamp(2rem, 4.6vw, 4.2rem); }
.tk-scrub-head em {
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  color: var(--tk-fg-dim);
}

.tk-callout {
  position: absolute;
  z-index: 3;
  max-width: 260px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.tk-callout-tick {
  display: block;
  width: 56px;
  height: 1px;
  background: var(--tk-silver);
  margin-bottom: 10px;
  transform-origin: left center;
}
.tk-callout-title {
  display: block;
  font-family: var(--tk-text);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--tk-fg);
  margin-bottom: 6px;
}
.tk-callout-note {
  display: block;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--tk-fg-dim);
}

.tk-progress {
  position: absolute;
  z-index: 3;
  left: 6vw;
  bottom: clamp(24px, 5vh, 48px);
  width: min(180px, 30vw);
  height: 1px;
  background: var(--tk-line);
}
.tk-progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--tk-silver);
  transform: scaleX(0);
  transform-origin: left center;
}

/* =============== 5. IMPACT =============== */

.tk-impact-copy {
  position: absolute;
  z-index: 3;
  left: 6vw;
  bottom: clamp(64px, 14vh, 160px);
  pointer-events: none;
}
.tk-impact-copy .tk-display { font-size: clamp(2.4rem, 6vw, 5.6rem); }

/* =============== 6. PRODUCT STATEMENT =============== */

.tk-product {
  position: relative;
  background: linear-gradient(to bottom, var(--tk-bg), var(--tk-bg-soft) 30% 70%, var(--tk-bg));
  padding: clamp(90px, 16vh, 200px) 6vw;
}

.tk-product-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 6vw, 96px);
  max-width: 1440px;
  margin: 0 auto;
  align-items: center;
}

.tk-product-visual { position: relative; }
.tk-product-visual img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--tk-line);
}

.tk-product-info { display: flex; flex-direction: column; gap: 22px; }
.tk-product-info .tk-display { font-size: clamp(3.4rem, 8vw, 7rem); }
.tk-product-info em {
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  color: var(--tk-fg-dim);
}

.tk-spec {
  border-top: 1px solid var(--tk-line);
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tk-spec dt { margin: 0; }
.tk-spec dd {
  margin: 0;
  font-size: 0.95rem;
  color: var(--tk-fg);
  line-height: 1.6;
}
.tk-spec dd .price { display: inline; font-size: 1.15rem; font-weight: 600; }
.tk-spec dd .price > span { color: var(--tk-fg); }

.tk-colorways { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.tk-colorway {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid var(--tk-line);
  color: var(--tk-fg-dim);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.tk-colorway:hover,
.tk-colorway:focus-visible { border-color: var(--tk-silver); color: var(--tk-fg); }
.tk-colorway[aria-current='true'] { border-color: var(--tk-fg); color: var(--tk-fg); }

/* =============== 7. FINAL CTA =============== */

.tk-cta { text-align: center; }

.tk-cta video,
.tk-cta .tk-cta-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0.55;
}

.tk-cta-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(24px, 4vh, 40px);
  padding: 0 6vw;
}
.tk-cta-content .tk-display { font-size: clamp(2.6rem, 7.5vw, 7.5rem); }

.tk-cta-sub {
  margin: 0;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 300;
  color: var(--tk-fg-dim);
  max-width: 36em;
}

/* hero mode: campaign-style bottom-left art direction instead of centered */
.track-page--hero .tk-cta { text-align: left; }
.track-page--hero .tk-cta .tk-viewport {
  align-items: flex-end;
  justify-content: flex-start;
}
.track-page--hero .tk-cta-content {
  align-items: flex-start;
  padding: 0 6vw clamp(48px, 10vh, 96px);
  gap: clamp(16px, 2.5vh, 28px);
  width: 100%;
}
.track-page--hero .tk-cta-content .tk-display {
  font-size: clamp(2.4rem, 6.2vw, 6rem);
  max-width: 16ch;
}
.track-page--hero .tk-cta-actions { justify-content: flex-start; }
.track-page--hero .tk-cta video { opacity: 0.62; }
@media (max-width: 749px) {
  .track-page--hero .tk-cta-content { padding-bottom: 72px; }
  .track-page--hero .tk-cta-actions { flex-direction: column; width: 100%; }
}

.tk-cta-actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

.tk-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 44px;
  font-family: var(--tk-text);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--tk-fg);
  color: var(--tk-fg);
  background: transparent;
  cursor: pointer;
  transition: background-color 0.3s var(--tk-ease), color 0.3s var(--tk-ease);
  will-change: transform;
}
.tk-btn--solid { background: var(--tk-fg); color: #050506; }
.tk-btn--solid:hover, .tk-btn--solid:focus-visible { background: var(--tk-silver); border-color: var(--tk-silver); color: #050506; }
.tk-btn--ghost:hover, .tk-btn--ghost:focus-visible { background: var(--tk-fg); color: #050506; }

.track-page :focus-visible {
  outline: 2px solid var(--tk-fg);
  outline-offset: 4px;
}

/* hands the page from the black film back to the store's background */
.tk-outro-bridge {
  height: 140px;
  background: linear-gradient(to bottom, var(--tk-bg), var(--color-background, var(--tk-bg)));
}

/* ---------- cursor dot (desktop, fine pointers only) ---------- */

.tk-cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 60;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--tk-fg);
  mix-blend-mode: difference;
  pointer-events: none;
  opacity: 0;
  transition: width 0.25s ease, height 0.25s ease, margin 0.25s ease, opacity 0.3s ease;
}
.tk-cursor.is-active { opacity: 0.9; }
.tk-cursor.is-hover { width: 40px; height: 40px; margin: -20px 0 0 -20px; }

@media (hover: none), (pointer: coarse) {
  .tk-cursor { display: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 989px) {
  .tk-product-grid { grid-template-columns: 1fr; }
  .tk-callout { max-width: 210px; }
  .tk-layers-ghost { right: -14vw; }
}

@media (max-width: 749px) {
  .tk-hero-word { top: 60%; }
  .tk-scrub-head { left: 5vw; right: 5vw; }
  .tk-callout {
    left: 5vw !important;
    right: 5vw !important;
    top: auto !important;
    bottom: clamp(56px, 12vh, 110px) !important;
    max-width: none;
  }
  .tk-impact-copy { left: 5vw; right: 5vw; }
  .tk-btn { padding: 16px 32px; }
  .tk-cta-actions { flex-direction: column; width: 100%; }
  .tk-cta-actions .tk-btn { width: 100%; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .track-page::after { animation: none; }
  .tk-scroll-hint::after { animation: none; height: 32px; }
  .tk-hero-poster.is-hidden { opacity: 1; }
}

/* static mode (reduced motion): callouts become a readable list */
.tk-static .tk-callout {
  opacity: 1;
  visibility: visible;
  position: static !important;
  margin: 10px 6vw;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
}
