/* ============================================================
   vTime landing — «скролл-кино»
   Пришпиленная сцена: скролл = перемотка фильма. Титул летит
   сквозь экран, телефон вращается в 3D, экраны сменяются
   шторкой, камера ныряет в экран, финал с золотой пылью.
   ============================================================ */

:root {
  --porcelain: #f5efe6;
  --card: #ffffff;
  --ink: #201711;
  --ink-soft: #6f5e4c;
  --gold: #c08a34;
  --gold-deep: #a8762f;
  --champagne: #e8c988;
  --hairline: rgba(32, 23, 17, 0.12);
  --hairline-soft: rgba(32, 23, 17, 0.07);

  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Onest", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --shell: 78rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- база ---------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(70rem 50rem at 75% -8%, rgba(232, 201, 136, 0.35), transparent 60%),
    radial-gradient(55rem 40rem at 8% 22%, rgba(236, 200, 189, 0.3), transparent 55%),
    var(--porcelain);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* зерно плёнки — кинематографичность */

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 210;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

img {
  max-width: 100%;
  display: block;
}

figure {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

h1 em,
h2 em,
.zoom-text em {
  font-style: normal;
  color: var(--gold);
}

p {
  margin: 0;
}

a {
  color: inherit;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.shell {
  width: min(var(--shell), 100% - 3rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  z-index: 400;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--porcelain);
  border-radius: 0 0 10px 10px;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

::selection {
  background: var(--gold);
  color: #fff8ec;
}

/* ---------- кнопки и общие элементы ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: box-shadow 0.25s ease, background-color 0.25s ease;
}

.button--gold {
  background: linear-gradient(120deg, #c9973f, #e3bc74);
  color: #241207;
  box-shadow: 0 10px 30px -12px rgba(168, 118, 47, 0.55);
}

.button--gold:hover {
  box-shadow: 0 14px 40px -10px rgba(168, 118, 47, 0.7);
}

.button--ink {
  background: var(--ink);
  color: var(--porcelain);
}

.button--ink:hover {
  background: #3a2c1e;
}

.button--small {
  padding: 0.55rem 1.3rem;
  font-size: 0.9rem;
}

.chip {
  display: inline-block;
  padding: 0.45rem 1rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--gold-deep);
}

.chip--light {
  border-color: rgba(245, 239, 230, 0.3);
  color: var(--champagne);
  margin-bottom: 1.5rem;
}

.eyebrow {
  color: var(--gold-deep);
}

/* ---------- шапка ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 140;
  background: color-mix(in srgb, var(--porcelain) 65%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline-soft);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-block: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
}

.brand img {
  border-radius: 9px;
}

.site-nav {
  display: flex;
  gap: 1.75rem;
  margin-inline: auto;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-header .button {
  margin-left: auto;
}

/* ============================================================
   СКРОЛЛ-КИНО
   ============================================================ */

.movie {
  position: relative;
  height: 640vh;
}

.stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}

.dust {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* --- глава 1: титул --- */

.scene-title {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  text-align: center;
  transform: translate(-50%, -50%);
  will-change: transform, opacity, filter;
  animation: title-in 1.1s var(--ease-out) 0.15s backwards;
}

@keyframes title-in {
  from {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.scene-title .eyebrow,
.fallback-hero .eyebrow {
  display: block;
  margin-bottom: 1.75rem;
  font-size: 1.05rem;
  letter-spacing: 0.2em;
}

.scene-title h1 {
  font-size: clamp(2.8rem, 11vw, 8.5rem);
  font-weight: 640;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  line-height: 0.98;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--ink-soft);
  animation: title-in 1s ease 1s backwards;
}

.cue-line {
  display: inline-block;
  width: 4rem;
  height: 1px;
  background: var(--hairline);
  position: relative;
  overflow: hidden;
}

.cue-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: translateX(-100%);
  animation: cue-run 2.2s var(--ease-out) infinite;
}

@keyframes cue-run {
  60%,
  100% {
    transform: translateX(100%);
  }
}

/* --- главы 2–4: телефон --- */

.phone-wrap {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1300px;
  opacity: 0;
  will-change: opacity;
}

.phone3d {
  width: min(300px, 62vw);
  padding: 10px;
  border-radius: 42px;
  background: linear-gradient(160deg, #4a3527, #241812);
  border: 1px solid rgba(62, 44, 30, 0.4);
  box-shadow:
    0 60px 120px -40px rgba(62, 44, 30, 0.55),
    0 0 80px -30px rgba(192, 138, 52, 0.4);
  transform-style: preserve-3d;
  will-change: transform, filter;
}

.screen-stack {
  position: relative;
  aspect-ratio: 810 / 1440;
  border-radius: 32px;
  overflow: hidden;
  background: #efe6d8;
}

.screen-stack img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.screen-stack img[data-screen="1"],
.screen-stack img[data-screen="2"] {
  opacity: 0;
}

/* --- парящие факты --- */

.fact {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: min(16.5rem, 42vw);
  padding: 1.2rem 1.4rem;
  background: color-mix(in srgb, var(--card) 72%, transparent);
  border: 1px solid var(--hairline-soft);
  border-radius: 18px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 24px 50px -30px rgba(32, 23, 17, 0.4);
  opacity: 0;
  will-change: transform, opacity;
}

.fact--left {
  left: max(4vw, calc((100vw - var(--shell)) / 2));
}

.fact--right {
  right: max(4vw, calc((100vw - var(--shell)) / 2));
}

.fact h3 {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
}

.fact p {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* --- глава 4: зум --- */

.zoom-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  text-align: center;
  opacity: 0;
  will-change: transform, opacity;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 6vw, 4.5rem);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  text-shadow: 0 2px 30px rgba(245, 239, 230, 0.8);
}

/* --- глава 5: финал --- */

.finale {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  text-align: center;
  padding: 1.5rem;
  background: color-mix(in srgb, var(--porcelain) 86%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}

.finale h2 {
  font-size: clamp(2.6rem, 9vw, 7rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.025em;
}

.finale > p {
  color: var(--ink-soft);
  font-size: 1.15rem;
}

/* --- HUD: главы --- */

.hud {
  position: absolute;
  right: 1.75rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  text-align: right;
}

.hud-item {
  color: var(--ink-soft);
  font-size: 0.6rem;
  opacity: 0.45;
  transition: opacity 0.3s ease, color 0.3s ease;
}

.hud-item::after {
  content: "";
  display: inline-block;
  width: 1.2rem;
  height: 1px;
  background: currentColor;
  margin-left: 0.6rem;
  vertical-align: middle;
}

.hud-item.is-active {
  color: var(--gold-deep);
  opacity: 1;
}

/* ---------- store-кнопки ---------- */

.store-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

.store-button {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1.6rem;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.store-button:hover {
  border-color: var(--gold);
  box-shadow: 0 14px 34px -16px rgba(168, 118, 47, 0.45);
}

.store-button__icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--gold-deep);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.store-button small {
  display: block;
  color: var(--ink-soft);
  font-size: 0.58rem;
  margin-bottom: 0.15rem;
  text-align: left;
}

.store-button strong {
  font-size: 1.05rem;
  display: block;
  text-align: left;
}

/* ---------- фолбэк-хиро ---------- */

.fallback-hero {
  display: none;
  padding-block: 8rem 4rem;
}

.fallback-inner {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 3rem;
  align-items: center;
}

.fallback-hero h1 {
  font-size: clamp(2.4rem, 7vw, 5rem);
  font-weight: 640;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-block: 1.25rem;
}

.fallback-sub {
  color: var(--ink-soft);
  max-width: 28rem;
  margin-bottom: 2rem;
}

.fallback-hero .store-buttons {
  justify-content: flex-start;
}

.fallback-phone {
  width: min(260px, 70vw);
  padding: 9px;
  border-radius: 36px;
  background: linear-gradient(160deg, #4a3527, #241812);
  justify-self: center;
}

.fallback-phone img {
  border-radius: 28px;
}

/* ---------- бегущая строка ---------- */

.tape {
  border-block: 1px solid var(--hairline-soft);
  padding-block: 1.4rem;
  overflow: hidden;
}

.tape-row {
  display: flex;
  align-items: center;
  gap: 1.2em;
  width: max-content;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4.5vw, 3rem);
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  animation: tape-run 40s linear infinite;
}

.tape-row i {
  font-style: normal;
  font-size: 0.45em;
  color: var(--gold);
}

@keyframes tape-run {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- клиентам и салонам ---------- */

.section {
  padding-block: 6rem;
  scroll-margin-top: 4.5rem;
}

/* якорь «скачать»: приземляемся на финал фильма (экран со стор-кнопками),
   а не на секцию после него */

#get {
  display: block;
  height: 0;
  scroll-margin-top: 100svh;
}

@media (prefers-reduced-motion: reduce) {
  #get {
    scroll-margin-top: 0;
  }
}

.section-head {
  max-width: 48rem;
  margin-bottom: 3rem;
}

.section-head h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-top: 1.25rem;
}

.salons-panel {
  background: var(--ink);
  color: var(--porcelain);
  border-radius: 32px;
  padding: 4rem;
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 3.5rem;
  align-items: center;
}

.salons-copy .chip {
  margin-bottom: 1.5rem;
}

.salons-panel h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.salons-lede {
  color: rgba(245, 239, 230, 0.7);
  font-size: 1.1rem;
  max-width: 28rem;
  margin-bottom: 2.25rem;
}

.salons-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.salons-list li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-block: 1.1rem;
  border-top: 1px solid rgba(232, 201, 136, 0.25);
}

.salons-list li:last-child {
  border-bottom: 1px solid rgba(232, 201, 136, 0.25);
}

.salons-list strong {
  color: var(--champagne);
}

.salons-list span {
  color: rgba(245, 239, 230, 0.65);
  font-size: 0.95rem;
}

/* блок «Клиентам» — та же панель в светлом исполнении */

.clients {
  padding-top: 0;
}

.salons-panel--light {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--hairline-soft);
}

.salons-panel--light .salons-lede {
  color: var(--ink-soft);
}

.salons-panel--light .salons-list li {
  border-color: var(--hairline-soft);
}

.salons-panel--light .salons-list strong {
  color: var(--gold-deep);
}

.salons-panel--light .salons-list span {
  color: var(--ink-soft);
}

/* ---------- соцсети ---------- */

.socials {
  padding-top: 0;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.social-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.75rem;
  background: var(--card);
  border: 1px solid var(--hairline-soft);
  border-radius: 24px;
  text-decoration: none;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.social-card::after {
  content: "↗";
  position: absolute;
  top: 1.4rem;
  right: 1.6rem;
  color: var(--gold-deep);
  font-weight: 600;
  transition: transform 0.25s var(--ease-out);
}

.social-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 20px 44px -22px rgba(168, 118, 47, 0.4);
}

.social-card:hover::after {
  transform: translate(3px, -3px);
}

.social-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  color: var(--gold-deep);
  margin-bottom: 0.9rem;
}

.social-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-icon--at {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 500;
}

.social-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  text-transform: uppercase;
}

.social-desc {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* ---------- футер ---------- */

.site-footer {
  border-top: 1px solid var(--hairline-soft);
  padding-block: 2.25rem;
}

.footer-row {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-row p {
  color: var(--ink-soft);
}

.footer-socials {
  display: flex;
  gap: 1.25rem;
}

.footer-socials a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.footer-socials a:hover {
  color: var(--gold-deep);
}

.footer-row .mono {
  margin-left: auto;
}

/* ---------- тост ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 250;
  transform: translate(-50%, 1rem);
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: min(26rem, calc(100vw - 2rem));
  padding: 0.9rem 1.25rem;
  background: var(--ink);
  color: var(--porcelain);
  border-radius: 14px;
  box-shadow: 0 18px 40px -18px rgba(32, 23, 17, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.toast button {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem;
}

/* ---------- reveal ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s var(--ease-out);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@supports (animation-timeline: view()) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
    animation: reveal-rise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 55%;
  }

  @keyframes reveal-rise {
    from {
      opacity: 0;
      transform: translateY(26px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* ---------- reduced motion: кино выключается ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .movie {
    display: none;
  }

  .fallback-hero {
    display: flex;
  }

  .tape-row,
  .cue-line::after {
    animation: none;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }
}

/* ---------- адаптив ---------- */

@media (max-width: 64rem) {
  .hud {
    display: none;
  }

  .salons-panel {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 2.75rem 2rem;
  }

  .social-grid {
    grid-template-columns: 1fr;
  }

  .fallback-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 48rem) {
  .site-nav {
    display: none;
  }

  .fact {
    width: min(13rem, 46vw);
    padding: 0.9rem 1rem;
  }

  .fact h3 {
    font-size: 0.85rem;
  }

  .fact p {
    font-size: 0.8rem;
  }

  .section {
    padding-block: 4.5rem;
  }

  .footer-row .mono {
    margin-left: 0;
    width: 100%;
  }
}
