:root {
  --bg: #fff;
  --surface: #fff;
  --ink: #000;
  --ink-inverse: #fff;
  --font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif-italic: Georgia, "Times New Roman", serif;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --radius-sm: 0.375rem;
  --radius-pill: 999px;
  --fs-ui: max(11px, 0.6875rem);
  --fs-brand: max(11px, 0.75rem);
}

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

html { font-size: clamp(11px, 0.833vw, 16px); }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}

/* ------------------------------------------------------------- header */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-5) var(--space-6);
  background: transparent;
  color: var(--ink-inverse);
  mix-blend-mode: difference;
  pointer-events: none;
}

.site-header a { pointer-events: auto; }

.brand-frame {
  width: 130px;
  height: 56px;
  overflow: hidden;
  flex: none;
}

.brand {
  width: 168px;
  height: 56px;
  object-fit: cover;
  margin-left: -19px;
  display: block;
}

.tagline-hero {
  margin: 0;
  max-width: 21.25rem;
  text-transform: uppercase;
  font-weight: 700;
  font-size: var(--fs-ui);
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.menu { margin: 0; }

.menu ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu a {
  display: inline-block;
  color: inherit;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 700;
  font-size: var(--fs-ui);
  line-height: 1.55;
  letter-spacing: 0.02em;
}

.menu-word { position: relative; }

.menu-word__b {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.account {
  display: flex;
  gap: var(--space-5);
}

.account a {
  color: inherit;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 700;
  font-size: var(--fs-ui);
  line-height: 1.55;
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------- hero */

.hero {
  position: fixed;
  inset: 0;
  z-index: 10;
  margin-top: 30vh;
  background: #000;
}

.hero-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  outline: 0;
  display: block;
}

.hero-title {
  position: fixed;
  z-index: 40;
  left: var(--space-6);
  right: var(--space-6);
  bottom: calc(70vh + var(--space-5));
  margin: 0;
  color: var(--ink-inverse);
  mix-blend-mode: difference;
  pointer-events: none;
  font-size: 2.5rem;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.hero-title .italic {
  font-family: var(--font-serif-italic);
  font-style: italic;
  font-weight: 400;
}

/* ------------------------------------------------------- hero footer */

.hero-footer {
  position: fixed;
  bottom: var(--space-6);
  left: var(--space-6);
  right: var(--space-6);
  z-index: 20;
  display: flex;
  align-items: flex-end;
  gap: var(--space-5);
  color: var(--ink-inverse);
  mix-blend-mode: difference;
  pointer-events: none;
}

.cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  margin-left: auto;
}

.cta-copy {
  margin: 0 0 var(--space-4);
  max-width: 21.25rem;
  text-transform: uppercase;
  font-weight: 700;
  font-size: var(--fs-ui);
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.shop-now {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 2.5rem;
  background: var(--surface);
  color: var(--ink-inverse);
  border-radius: var(--radius-pill);
  text-decoration: none;
  text-transform: uppercase;
  font-size: var(--fs-brand);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.shop-now__label { mix-blend-mode: difference; }

/* ------------------------------------------------------------ product */

.product {
  position: fixed;
  bottom: var(--space-6);
  left: var(--space-6);
  z-index: 20;
  display: flex;
  gap: var(--space-4);
  color: var(--ink-inverse);
  opacity: 0;
}

.product-thumb {
  position: relative;
  flex: none;
  width: calc(7rem * var(--card-scale, 1));
  height: calc(7rem * var(--card-scale, 1));
  background: var(--surface);
  border-radius: var(--radius-sm);
}

.product-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
  display: block;
}

.product-info {
  display: flex;
  flex-direction: column;
}

.product-info h2 {
  margin: 0 0 0.625rem;
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.product-info .desc {
  margin: 0 0 0.875rem;
  max-width: 34rem;
  text-transform: uppercase;
  font-weight: 700;
  font-size: var(--fs-ui);
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.product-info .price {
  margin-top: auto;
  font-size: 1.375rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* ----------------------------------------------------------- add button */

.add-btn {
  position: fixed;
  bottom: var(--space-6);
  z-index: 20;
  width: 3.375rem;
  height: 3.375rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-inverse);
  font-family: inherit;
  font-size: 1.625rem;
  line-height: 1;
  cursor: pointer;
  mix-blend-mode: difference;
  opacity: 0;
}

.add-btn__label {
  display: block;
  mix-blend-mode: difference;
  padding-bottom: 0.1875rem;
}

/* ------------------------------------------------------- scroll track */

.scroll-spacer {
  height: 220vh;
  pointer-events: none;
}

/* ------------------------------------------- страница после перемотки */
/* Пока идёт прокрутка видео, неподвижный слой держит экран. Как только
   трек кончился, он уходит и начинается обычная страница: сам товар,
   его устройство и подвал. Шапка остаётся, но перестаёт выворачивать
   цвета — под ней уже белая бумага, а не видео. */

body.past .hero,
body.past .hero-title,
body.past .hero-footer,
body.past .product,
body.past .add-btn {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity .35s ease;
}

body.past .site-header {
  mix-blend-mode: normal;
  color: var(--ink);
}

.story {
  position: relative;
  z-index: 30;
  background: var(--bg);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
  gap: var(--space-6);
  align-items: center;
  padding: 7rem var(--space-6) 5rem;
}

.story-media {
  position: relative;
  /* Снимок товара — 399 px по ширине. Рамку держим уже него, иначе картинку
     раздувает вдвое и она мылится. */
  width: 100%;
  max-width: 26rem;
  margin-inline: auto;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2, #f3f3f3);
}

.story-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.story-copy { max-width: 42rem; }

.story-eyebrow {
  margin: 0 0 var(--space-5);
  text-transform: uppercase;
  font-weight: 700;
  font-size: var(--fs-ui);
  letter-spacing: 0.08em;
}

.story-title {
  margin: 0 0 var(--space-5);
  font-size: 3rem;
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.015em;
}

.story-title .italic {
  font-family: var(--font-serif-italic);
  font-style: italic;
  font-weight: 400;
}

.story-lede {
  margin: 0 0 var(--space-6);
  max-width: 34rem;
  font-size: 1.0625rem;
  line-height: 1.5;
}

.story-specs {
  margin: 0 0 var(--space-6);
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(0, 0, 0, .14);
}

.story-specs > div {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  gap: var(--space-4);
  padding: 0.875rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, .14);
}

.story-specs dt {
  margin: 0;
  text-transform: uppercase;
  font-weight: 700;
  font-size: var(--fs-ui);
  letter-spacing: 0.02em;
}

.story-specs dd {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.story-buy {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.story-price {
  font-size: 1.625rem;
  letter-spacing: -0.01em;
}

.story-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 2.5rem;
  background: var(--ink);
  color: var(--ink-inverse);
  border-radius: var(--radius-pill);
  text-decoration: none;
  text-transform: uppercase;
  font-size: var(--fs-brand);
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: opacity .2s ease;
}

.story-order:hover { opacity: .82; }

.story-note {
  margin: var(--space-5) 0 0;
  text-transform: uppercase;
  font-weight: 700;
  font-size: var(--fs-ui);
  line-height: 1.45;
  opacity: .55;
}

/* ------------------------------------------------------------- подвал */

.site-footer {
  position: relative;
  z-index: 30;
  background: var(--ink);
  color: var(--ink-inverse);
  padding: 4.5rem var(--space-6) 2.5rem;
  display: grid;
  gap: var(--space-6);
}

.footer-word {
  margin: 0 0 var(--space-4);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.footer-line {
  margin: 0;
  max-width: 28rem;
  text-transform: uppercase;
  font-weight: 700;
  font-size: var(--fs-ui);
  line-height: 1.45;
  opacity: .6;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
  max-width: 48rem;
}

.footer-head {
  margin: 0 0 var(--space-4);
  text-transform: uppercase;
  font-weight: 700;
  font-size: var(--fs-ui);
  letter-spacing: 0.06em;
  opacity: .5;
}

.footer-cols ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }

.footer-cols a {
  color: inherit;
  text-decoration: none;
  font-size: 0.9375rem;
  opacity: .85;
}

.footer-cols a:hover { opacity: 1; text-decoration: underline; }

.footer-baseline {
  margin: 0;
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, .16);
  text-transform: uppercase;
  font-weight: 700;
  font-size: var(--fs-ui);
  opacity: .45;
}

@media (max-width: 860px) {
  .story { grid-template-columns: 1fr; padding-top: 5rem; }
  .story-title { font-size: 2.25rem; }
  .story-specs > div { grid-template-columns: 1fr; gap: 0.25rem; }
  .footer-cols { grid-template-columns: 1fr; }
}
