/* Общая основа трёх вариантов первого экрана. Цвета из бренда: /root/projects/brand/brand-tokens.css */

@font-face { font-family: 'Rubik'; font-weight: 400 900; font-display: swap; src: url('../fonts/Rubik-400_900-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Rubik'; font-weight: 400 900; font-display: swap; src: url('../fonts/Rubik-400_900-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'Inter'; font-weight: 400 600; font-display: swap; src: url('../fonts/Inter-400_600-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-weight: 400 600; font-display: swap; src: url('../fonts/Inter-400_600-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }

:root {
  --bg: #513C2C; --bg-deep: #45301F; --surface: #634A38;
  --text: #FFF7DE; --text-2: #E7D8C4; --muted: #B4B2BF;
  --accent: #40BCD8; --accent-ink: #0C3D48; --accent-text: #5FD0E8; --accent-hover: #7FDCEE;
  --rose: #D6A2AD; --rose-text: #E4B9C2;
  --night: #140D08;
  --font-display: 'Rubik', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --gutter: max(20px, 4vw);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scrollbar-color: var(--surface) var(--night); }
body {
  background: var(--night); color: var(--text);
  font: 400 17px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased; font-kerning: normal; text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; }
:focus-visible { outline: 1.5px solid var(--accent-text); outline-offset: 6px; border-radius: 4px; }
img { display: block; max-width: none; }

/* первый экран: всегда ровно в окно, координаты внутри в процентах кадра */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  height: 100svh; min-height: 560px;
  container-type: size;
  background: var(--night);
}
.hero > * { position: absolute; }

/* верхняя полоса: меню справа */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  display: flex; justify-content: flex-end; align-items: center;
  padding: 26px var(--gutter);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.mark {
  font: 700 15px/1 var(--font-display); letter-spacing: .32em;
  color: var(--text); text-decoration: none; opacity: .9;
}
.menu {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 10px 0; border: 0; background: none; cursor: pointer;
  font: 500 13px/1 var(--font-display); letter-spacing: .24em; text-transform: uppercase;
  color: var(--text);
}
.menu i { display: grid; gap: 6px; width: 26px; }
.menu i::before, .menu i::after { content: ''; height: 1.5px; background: currentColor; transition: transform .4s var(--ease-out); }
.menu i::after { width: 62%; justify-self: end; }
.menu:hover i::after { transform: scaleX(1.6); transform-origin: right; }

/* роли как титры в кино */
.credits {
  margin: 0;
  font: 500 13px/1.6 var(--font-display); letter-spacing: .34em; text-transform: uppercase;
  color: var(--text-2);
}

/* главное действие: текст, тонкая линия и кольцо со стрелкой */
.cta {
  display: inline-flex; align-items: center; gap: 22px;
  text-decoration: none; color: var(--text);
}
.cta__text {
  position: relative; padding: 10px 0;
  font: 500 14px/1.3 var(--font-display); letter-spacing: .2em; text-transform: uppercase;
}
.cta__text::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: var(--accent); transform-origin: left; transition: transform .6s var(--ease-out);
}
.cta__ring {
  flex: none; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--accent);
  color: var(--accent-text);
  transition: background .4s var(--ease-out), color .4s, transform .6s var(--ease-out);
}
.cta__ring svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .6s var(--ease-out); }
.cta:hover .cta__ring { background: var(--accent); color: var(--accent-ink); transform: scale(1.06); }
.cta:hover .cta__ring svg { transform: translateX(3px); }
.cta:hover .cta__text::after { transform: scaleX(.35); }

/* зерно плёнки */
.grain {
  inset: 0; pointer-events: none; z-index: 20;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 .95  0 0 0 0 .86  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 240px; opacity: .09; mix-blend-mode: overlay;
}

@media (max-width: 760px) {
  .topbar { padding: 20px var(--gutter); }
  .menu span { display: none; }
  .cta { gap: 16px; }
  .cta__ring { width: 52px; height: 52px; }
  .cta__text { font-size: 13px; letter-spacing: .16em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; }
}
