/*
 * Общие стили публичных страниц: шрифт, цвет, «резиновая» сетка, стекло,
 * шапка, меню, подвал. Админка сюда не смотрит — у неё base.css + admin.css.
 *
 * Резина: размер rem зависит от ширины окна, поэтому вся вёрстка
 * растягивается пропорционально. 1rem = 10px на макетах 390 (телефон),
 * 768 (планшет) и 1728 (десктоп). Текст для чтения не мельче 15px — см. --fs-*.
 */

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/onest-cyrillic-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/onest-cyrillic-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/onest-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/onest-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;

  /* Цвет: тёплый крем и персик, коралл — для тонких линий и акцентов */
  --cream: #fcf4eb;
  --cream-hi: #fffbf6;        /* сплошная плашка */
  --peach: #f8d3bc;
  --apricot: #f4ad8a;
  --coral: #ee7a51;
  --coral-deep: #d9592f;
  --ink: #2c2525;
  --ink-2: #5f514c;           /* второстепенный текст */
  --ink-3: #8f7f78;           /* подписи, неактивное */
  --hair: rgba(44, 37, 37, 0.14);
  --hair-strong: rgba(44, 37, 37, 0.28);
  --danger: #b4321f;

  /* Стекло */
  --glass: rgba(255, 255, 255, 0.25);
  --glass-edge: rgba(255, 255, 255, 0.5);
  --glass-blur: blur(25px) saturate(1.15);
  --glass-strong: rgba(255, 251, 246, 0.62);

  /* Шрифт */
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-display: 5.2rem;
  --fs-h2: 3.6rem;
  --fs-h3: 2.4rem;
  --fs-lead: max(2rem, 17px);
  --fs-body: max(1.6rem, 15px);
  --fs-small: max(1.4rem, 13px);
  --fs-micro: max(1.2rem, 11.5px);

  /* Сетка */
  --gutter: 1.6rem;
  --radius: 1.6rem;
  --radius-lg: 2rem;
  --header-h: 7.2rem;

  /* Движение */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}

html { font-size: calc(100vw / 39); }
@media (min-width: 600px) {
  html { font-size: calc(100vw / 76.8); }
  :root { --gutter: 3.2rem; }
}
@media (min-width: 1024px) {
  html { font-size: calc(100vw / 172.8); }
  :root {
    --fs-display: 9.6rem;
    --fs-h2: 6.4rem;
    --fs-h3: 3.2rem;
    --fs-lead: max(2.6rem, 18px);
    --fs-body: max(1.8rem, 15px);
    --fs-small: max(1.5rem, 13px);
    --fs-micro: max(1.25rem, 11.5px);
    --gutter: 8rem;
    --radius: 1.6rem;
    --radius-lg: 2.4rem;
    --header-h: 9.6rem;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--cream);
}

/* Фон — у html: у body его нет, иначе он перекроет слой .atmos (z-index: -1) */
body {
  margin: 0;
  min-height: 100vh;
  background: transparent;
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga";
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1, h2, h3 {
  font-weight: 260;
  letter-spacing: -0.03em;
  line-height: 1.04;
  text-wrap: balance;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 0.4rem; }

::selection { background: var(--peach); color: var(--ink); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  top: 1.2rem; left: 1.2rem;
  z-index: 100;
  padding: 1rem 1.6rem;
  border-radius: 99rem;
  background: var(--ink);
  color: var(--cream-hi);
  font-size: var(--fs-small);
  text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* --- Типографика --- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-size: var(--fs-micro);
  font-weight: 450;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.eyebrow::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--coral);
}

.lead {
  font-size: var(--fs-lead);
  font-weight: 300;
  line-height: 1.32;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.muted { color: var(--ink-2); }
.small { font-size: var(--fs-small); }

/* --- Кнопки: таблетки, как в шапке --- */

.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--cream-hi);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  min-height: max(5.6rem, 46px);
  padding: 0 max(2.8rem, 22px);
  border: 0;
  border-radius: 99rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-size: var(--fs-small);
  font-weight: 450;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out), background-color 0.5s var(--ease-out);
}
/* Заливка поднимается снизу при наведении */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--coral);
  transform: translateY(101%);
  transition: transform 0.6s var(--ease-out);
}
.btn:hover::before { transform: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: progress; }
.btn:disabled::before { display: none; }

.btn__arrow {
  width: 1.1em;
  height: 1.1em;
  flex: none;
  transition: transform 0.6s var(--ease-out);
}
.btn:hover .btn__arrow { transform: translate(0.15em, -0.15em); }

.btn--glass {
  --btn-bg: var(--glass);
  --btn-fg: var(--ink);
  box-shadow: inset 0 0 0 1px var(--glass-edge);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.btn--glass:hover { color: var(--cream-hi); box-shadow: inset 0 0 0 1px transparent; }

.btn--line {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  box-shadow: inset 0 0 0 1px var(--hair-strong);
}
.btn--line:hover { color: var(--cream-hi); box-shadow: inset 0 0 0 1px transparent; }

.btn--small { min-height: max(4.4rem, 40px); padding: 0 max(2rem, 16px); }
.btn--wide { width: 100%; }

.link {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  color: inherit;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
  padding-bottom: 0.15em;
  transition: background-size 0.6s var(--ease-out), color 0.3s;
}
.link:hover { background-size: 0 1px; background-position: right bottom; color: var(--coral-deep); }

/* --- Стекло --- */

.glass {
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--glass-edge);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}

/* --- Атмосфера: фон как у Zuffa ---
 * Конический градиент крем → персик → коралл вращается вокруг центра экрана
 * (оборот за 8 с, линейно), поверх — кремовая радиальная маска по центру
 * и затухание в крем книзу. Цвет остаётся только по краям, сильнее сверху.
 * Вращаем не угол градиента, а большой квадрат через transform: для конического
 * градиента это то же самое, но без перерисовки экрана на каждом кадре.
 */

.atmos {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--cream);
  pointer-events: none;
}
.atmos__conic,
.atmos__mask,
.atmos__fade { position: absolute; inset: 0; }
.atmos__conic {
  inset: auto;
  left: 50%;
  top: 50%;
  width: 150vmax;
  height: 150vmax;
  margin: -75vmax 0 0 -75vmax;
  background: conic-gradient(from 0deg at 50% 50%,
    #fdf5e4 7.2deg, #fcdbc9 90.8deg, #fa9878 151.1deg, #f96e43 205.2deg,
    #fc784c 251.5deg, #fb8962 270deg, #fce1ba 324deg, #fdf5e4 360deg);
  will-change: transform;
  animation: atmos-turn 8s linear infinite;
}
.atmos__mask { background: radial-gradient(50% 50% at 50% 50%, var(--cream) 0.45%, rgba(252, 244, 235, 0) 99.4%); }
.atmos__fade { background: linear-gradient(180deg, rgba(252, 244, 235, 0) 0%, var(--cream) 100%); }
@keyframes atmos-turn { to { transform: rotate(360deg); } }

/* --- Плейсхолдер логотипа (Никита пришлёт новый знак) --- */

.logo-ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  min-width: max(15rem, 116px);
  height: max(4.4rem, 40px);
  padding: 0 1.8rem;
  border-radius: 99rem;
  border: 1px dashed var(--hair-strong);
  color: var(--ink-2);
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color 0.4s var(--ease-out), color 0.4s;
}
.logo-ph:hover { border-color: var(--coral); color: var(--ink); }
.logo-ph__dot { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--coral); }
/* На телефоне — круглый слот без подписи, чтобы шапка помещалась */
@media (max-width: 599px) {
  .logo-ph { min-width: 0; width: 44px; height: 44px; padding: 0; }
  .logo-ph__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* --- Шапка --- */

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header-h);
  padding: 0 var(--gutter);
  pointer-events: none;
  transition: transform 0.8s var(--ease-out);
}
@media (min-width: 1024px) { .header { padding: 0 3.2rem; } }
.header > * { pointer-events: auto; }
.header__menu { justify-self: start; }
.header__logo { justify-self: center; }
.header__cta { justify-self: end; }
.header.is-hidden { transform: translateY(-110%); }

.burger {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}
.burger__icon { position: relative; width: 1.6rem; height: 0.8rem; }
.burger__icon::before,
.burger__icon::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: currentColor;
  transition: transform 0.6s var(--ease-out);
}
.burger__icon::before { top: 0; }
.burger__icon::after { bottom: 0; }
@media (max-width: 1023px) { .burger__icon { width: 1.8rem; } }

/* --- Меню на весь экран --- */

.menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  grid-template-rows: var(--header-h) 1fr auto;
  padding: 0 var(--gutter) 3.2rem;
  background: rgba(252, 244, 235, 0.55);
  -webkit-backdrop-filter: blur(30px) saturate(1.2);
  backdrop-filter: blur(30px) saturate(1.2);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.7s var(--ease-out), visibility 0s 0.7s;
}
@media (min-width: 1024px) { .menu { padding: 0 3.2rem 3.2rem; } }
.menu.is-open { visibility: visible; opacity: 1; transition: opacity 0.7s var(--ease-out); }
.menu__top { display: flex; align-items: center; justify-content: space-between; }
.menu__nav { align-self: center; }
.menu__nav ol { display: grid; gap: 0.4rem; counter-reset: m; }
.menu__nav li { overflow: hidden; counter-increment: m; }
.menu__nav a {
  display: inline-flex;
  align-items: baseline;
  gap: 2rem;
  font-size: max(4.4rem, 36px);
  font-weight: 230;
  letter-spacing: -0.035em;
  line-height: 1.12;
  text-decoration: none;
  transform: translateY(110%);
  transition: transform 0.9s var(--ease-out), color 0.3s;
}
.menu__nav a::before {
  content: "0" counter(m);
  font-size: var(--fs-micro);
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--coral);
}
.menu__nav a:hover { color: var(--coral-deep); }
@media (min-width: 1024px) { .menu__nav a { font-size: 8rem; } }
.menu.is-open .menu__nav a { transform: none; }
.menu.is-open .menu__nav li:nth-child(2) a { transition-delay: 0.05s; }
.menu.is-open .menu__nav li:nth-child(3) a { transition-delay: 0.1s; }
.menu.is-open .menu__nav li:nth-child(4) a { transition-delay: 0.15s; }
.menu.is-open .menu__nav li:nth-child(5) a { transition-delay: 0.2s; }
.menu.is-open .menu__nav li:nth-child(6) a { transition-delay: 0.25s; }
.menu.is-open .menu__nav li:nth-child(7) a { transition-delay: 0.3s; }
.menu__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 3.2rem;
  font-size: var(--fs-small);
  color: var(--ink-2);
}

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

.footer {
  position: relative;
  padding: 12rem var(--gutter) 3.2rem;
}
@media (min-width: 1024px) { .footer { padding: 16rem 3.2rem 3.2rem; } }
.footer__grid {
  display: grid;
  gap: 1.2rem;
}
@media (min-width: 1024px) {
  .footer__grid { grid-template-columns: 1.15fr repeat(3, 1fr); gap: 1.6rem; align-items: stretch; }
}
.footer__logo {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  border: 1px dashed var(--hair-strong);
  color: var(--ink-3);
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
@media (min-width: 1024px) { .footer__logo { aspect-ratio: auto; min-height: 30rem; } }
.footer__plate {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 4rem;
  min-height: 16rem;
  padding: 2.4rem;
  border-radius: var(--radius);
  text-decoration: none;
  overflow: hidden;
  transition: background-color 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
}
@media (min-width: 1024px) { .footer__plate { min-height: 30rem; padding: 3.2rem; } }
.footer__plate:hover { background: var(--cream-hi); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9); }
.footer__plate-title { font-size: var(--fs-h3); font-weight: 280; letter-spacing: -0.02em; line-height: 1.1; }
.footer__plate-meta { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-small); color: var(--ink-2); }
.footer__plate-meta svg { width: 1.6em; height: 1.6em; transition: transform 0.6s var(--ease-out); }
.footer__plate:hover .footer__plate-meta svg { transform: translate(0.2em, -0.2em); color: var(--coral); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem 3.2rem;
  margin-top: 1.6rem;
  padding: 1.6rem 2.4rem;
  border-radius: var(--radius);
  font-size: var(--fs-micro);
  color: var(--ink-2);
}
.footer__bottom ul { display: flex; flex-wrap: wrap; gap: 0.8rem 2.4rem; }
.footer__bottom a { text-decoration: none; }
.footer__bottom a:hover { color: var(--coral-deep); }
.footer__note { width: 100%; font-size: var(--fs-micro); color: var(--ink-3); }

.to-top {
  display: inline-grid;
  place-items: center;
  width: max(4.4rem, 40px);
  height: max(4.4rem, 40px);
  border-radius: 50%;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.4s, color 0.4s;
}
.to-top:hover { background: var(--ink); color: var(--cream-hi); }
.to-top svg { width: 1.6rem; height: 1.6rem; min-width: 14px; min-height: 14px; }

/* --- Lenis --- */

html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* --- Меньше движения --- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
