/* Общий каркас для вариантов первого экрана */
:root {
  --paper: #ecebe8;
  --paper-hi: #f4f3f0;
  --stone: #dad9d5;
  --stone-2: #cdccc7;
  --ink: #1b1b1a;
  --ink-hover: #343432;
  --ink-2: #474745;
  --mute: #696864;
  --line: rgb(27 27 26 / 0.14);
  --ochre: #c4932f;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --pad: clamp(20px, 3.2vw, 56px);
  --body: system-ui, sans-serif;
}

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

html {
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scrollbar-width: thin;
  scrollbar-color: var(--stone-2) var(--paper);
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body { min-height: 100svh; font-family: var(--body); font-size: 16px; line-height: 1.5; }
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 6px; }

.photo { filter: grayscale(1) contrast(1.06) brightness(1.03); user-select: none; }

/* Меню: плашка справа сверху, следует за скроллом */
.menu {
  position: fixed;
  top: 20px;
  right: var(--pad);
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 6px 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: 500 15px/1 var(--body);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 0.2s ease-out, box-shadow 0.3s ease-out, transform 0.15s ease-out;
}
@media (min-width: 861px) and (hover: hover) and (pointer: fine) {
  .menu:hover { background: var(--ink-hover); }
}
.menu:active { transform: scale(0.97); }
.menu__icon {
  display: grid;
  place-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--paper);
}
.menu__icon i { display: block; width: 14px; height: 1.5px; background: var(--ink); transition: transform 0.35s var(--ease); }
@media (min-width: 861px) and (hover: hover) and (pointer: fine) {
  .menu:hover .menu__icon i:last-child { transform: translateX(-3px); }
}
.is-scrolled .menu { box-shadow: 0 8px 24px rgb(0 0 0 / 0.14); }

/* Основная кнопка */
.cta {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 16px;
  height: 56px;
  padding: 0 6px 0 28px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font: 500 15px/1 var(--body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background-color 0.2s ease-out;
}
@media (min-width: 861px) and (hover: hover) and (pointer: fine) {
  .cta:hover { background: var(--ink-hover); }
}
.cta__arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  transition: transform 0.45s var(--ease);
}
@media (min-width: 861px) and (hover: hover) and (pointer: fine) {
  .cta:hover .cta__arrow { transform: rotate(45deg); }
}

/* Появление: контент видим по умолчанию, прячем только при работающем JS */
.line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.line > span { display: inline-block; }
.js .line > span { transform: translateY(108%); transition: transform 1.25s var(--ease) var(--d, 0s); }
.js.is-in .line > span { transform: none; }

.js .hero [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(6px);
  transition: opacity 0.9s var(--ease) var(--d, 0s), transform 1.1s var(--ease) var(--d, 0s), filter 0.9s var(--ease) var(--d, 0s);
}
.js.is-in .hero [data-reveal] { opacity: 1; transform: none; filter: none; }

.js .photo-reveal { clip-path: inset(100% 0 0 0); transition: clip-path 1.5s var(--ease) var(--d, 0.1s); }
.js.is-in .photo-reveal { clip-path: var(--clip-end, inset(0)); }
.js .photo-reveal .photo { scale: 1.07; transition: scale 2s var(--ease) var(--d, 0.1s); }
.js.is-in .photo-reveal .photo { scale: 1; }

.js .next [data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.js .next [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .line > span, .js .hero [data-reveal], .js .next [data-reveal], .js .photo-reveal, .js .photo-reveal .photo {
    transform: none !important; opacity: 1 !important; filter: none !important; clip-path: none !important; scale: 1 !important; transition: none !important;
  }
}

/* Следующий блок: только чтобы проверить скролл и меню */
.next { padding: clamp(96px, 16vh, 180px) var(--pad); background: var(--paper); }
.next p { max-width: 36ch; font-size: clamp(22px, 2.3vw, 36px); line-height: 1.32; color: var(--ink); }

/* Переключатель вариантов внизу экрана, чтобы не закрывать зону логотипа сверху слева */
.variants {
  position: fixed;
  bottom: 16px;
  left: var(--pad);
  z-index: 60;
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgb(27 27 26 / 0.08);
  backdrop-filter: blur(10px);
  font: 500 13px/1 system-ui, sans-serif;
}
.variants a { display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 10px; border-radius: 999px; text-decoration: none; color: var(--ink-2); }
.variants a:hover { background: rgb(27 27 26 / 0.08); }
.variants a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.in-frame .variants { display: none; }
