/* about.dom.gd — один экран. Грамматика брендовой страницы dom.gd/auth (снята 04.09.2026 с прод-кода
   .dom-auth-* в apps/web/app/styles.css): системный гротеск, заголовок обычного веса с трекингом -.055em,
   кикер капсом 850/.12em, пилюли 999, оранжевый #ff8811, тёплые чернила #21160d. */

:root {
  --orange: #ff8811;
  --orange-deep: #d96600;
  --orange-hover: #ed7600;
  --ink: #21160d;
  --muted: #765f4b;
  --small: #8c6c54;
  --line: #ead8c9;
  --soft: #fff1e2;
  --active: #ffead4;
  --ground: #fcfcfc;     /* тон фона видео: 252/252/252 */
  --e-display: cubic-bezier(.16, 1, .3, 1);
  --e-body: cubic-bezier(.25, .46, .45, .94);
  --e-ui: cubic-bezier(.4, 0, .2, 1);
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { min-height: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100%;
  background: var(--ground); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
img, video, svg { display: block; max-width: 100%; }
h1, p { margin: 0; }
::selection { background: var(--orange); color: #fff; }
:focus-visible { outline: 3px solid rgba(255,136,17,.42); outline-offset: 3px; }
[hidden] { display: none !important; }

/* ---------- видео ---------- */
.stage { position: fixed; inset: 0; z-index: 0; background: var(--ground); overflow: hidden; }
.stage video, .stage img.poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 18% 50%; }
.stage video { opacity: 0; transform: scale(1.035); transition: opacity 1.2s var(--e-body), transform 2.6s var(--e-display); }
.stage.is-playing video { opacity: 1; transform: none; }
.stage img.poster { transition: opacity .8s var(--e-body); }
.stage.is-playing img.poster { opacity: 0; }
.stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(252,252,252,.92) 0%, rgba(252,252,252,.72) 34%, rgba(252,252,252,0) 60%);
}

/* ---------- страница ---------- */
.page {
  position: relative; z-index: 1;
  min-height: 100svh; min-height: 100vh;
  display: flex; flex-direction: column;
  padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1.25rem, 5vw, 5rem);
}
.topbar { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .8rem; min-height: 46px; font-size: 1.05rem; font-weight: 850; letter-spacing: .08em; color: var(--ink); }
.brand img { width: 44px; height: 44px; border-radius: 14px; transition: transform .4s var(--e-display); }
.brand:hover img { transform: rotate(-6deg) scale(1.04); }

/* Переключатель языка — как .dom-auth-language, только на светлом */
.lang { position: relative; }
.lang-trigger {
  display: flex; align-items: center; gap: .65rem; min-height: 46px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255,255,255,.72); padding: .65rem .9rem;
  color: var(--ink); font-size: .82rem; font-weight: 800; cursor: pointer;
  box-shadow: inset 0 1px rgba(255,255,255,.7), 0 6px 20px rgba(89,38,0,.06);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: background-color .18s var(--e-ui), border-color .18s var(--e-ui);
}
.lang-trigger:hover, .lang-trigger[aria-expanded="true"] { background: #fff; border-color: #dcc3ad; }
.lang-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lang-chevron { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--e-ui); }
.lang-trigger[aria-expanded="true"] .lang-chevron { transform: rotate(180deg); }
.lang-popover {
  position: absolute; top: calc(100% + .7rem); right: 0; z-index: 5;
  width: min(22rem, calc(100vw - 2rem)); overflow: hidden;
  border: 1px solid var(--line); border-radius: 18px; background: #fff; color: var(--ink);
  box-shadow: 0 24px 70px rgba(89,38,0,.24);
  transform-origin: top right;
}
.js .lang-popover:not([hidden]) { animation: pop .18s var(--e-display); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.lang-search { display: flex; align-items: center; gap: .6rem; margin: .8rem; border: 1px solid var(--line); border-radius: 12px; background: #fffaf5; padding: 0 .75rem; }
.lang-search-icon { width: 17px; height: 17px; color: var(--small); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.lang-search input { width: 100%; min-height: 42px; border: 0; background: transparent; color: var(--ink); outline: none; }
.lang-search input::placeholder { color: var(--small); }
.lang-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.lang-list { max-height: min(420px, 58vh); overflow: auto; padding: 0 .55rem .65rem; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.lang-list button {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 1rem;
  border: 0; border-radius: 12px; background: transparent; padding: .72rem .75rem;
  color: var(--ink); text-align: left; cursor: pointer;
}
.lang-list button:hover { background: var(--soft); }
.lang-list button.active { background: var(--active); }
.lang-list button span { display: grid; gap: .15rem; }
.lang-list strong { font-size: .88rem; }
.lang-list small { color: var(--small); font-size: .74rem; }
.lang-list .empty { padding: .8rem .75rem 1rem; color: var(--small); font-size: .84rem; }
.lang-check { width: 17px; height: 17px; color: var(--orange-deep); fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- копия первого экрана (= .dom-auth-story-copy) ---------- */
.hero { position: relative; z-index: 2; flex: 1; display: flex; align-items: center; padding: 2.5rem 0 3rem; }
.hero-copy { max-width: 42rem; }
.kicker { margin: 0 0 .9rem; font-size: .75rem; line-height: 1.2; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; color: var(--orange-deep); }
h1 {
  max-width: 38rem; font-size: clamp(2.6rem, 5vw, 5.4rem); line-height: .98; letter-spacing: -.055em;
  font-weight: 400; color: var(--ink); text-wrap: balance;
}
.lead { margin: 1.5rem 0 0; max-width: 34rem; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.25rem); line-height: 1.65; text-wrap: pretty; }
.principles { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.6rem; }
.principles span {
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.72);
  padding: .65rem .9rem; color: var(--ink); font-size: .78rem; font-weight: 700;
  box-shadow: inset 0 1px rgba(255,255,255,.8); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.btn-primary, .btn-secondary {
  display: inline-flex; min-height: 3.5rem; align-items: center; justify-content: center;
  border-radius: 999px; padding: .9rem 1.6rem; font-weight: 850; font-size: 1rem; white-space: nowrap;
  transition: background-color .18s var(--e-ui), box-shadow .18s var(--e-ui), transform .35s var(--e-display), border-color .18s var(--e-ui);
}
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 14px 30px rgba(255,136,17,.26); }
.btn-primary:hover { background: var(--orange-hover); box-shadow: 0 16px 34px rgba(255,136,17,.34); transform: translateY(-1px); }
.btn-secondary { background: rgba(255,255,255,.8); color: var(--ink); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.btn-secondary:hover { background: #fff; border-color: #dcc3ad; transform: translateY(-1px); }

/* ---------- интро ---------- */
.js .kicker, .js h1, .js .lead, .js .principles span, .js .actions > *, .js .topbar > * {
  opacity: 0; transform: translateY(14px);
  transition: opacity .7s var(--e-body), transform .9s var(--e-display);
}
.js .kicker { transition-delay: .15s; }
.js h1 { transition-delay: .25s; }
.js .lead { transition-delay: .42s; }
.js .principles span:nth-child(1) { transition-delay: .55s; }
.js .principles span:nth-child(2) { transition-delay: .62s; }
.js .principles span:nth-child(3) { transition-delay: .69s; }
.js .actions > :nth-child(1) { transition-delay: .78s; }
.js .actions > :nth-child(2) { transition-delay: .86s; }
.js .topbar > * { transform: none; transition-delay: .9s; }
.js.is-ready .kicker, .js.is-ready h1, .js.is-ready .lead, .js.is-ready .principles span, .js.is-ready .actions > *, .js.is-ready .topbar > * { opacity: 1; transform: none; }

/* ---------- узкие экраны ---------- */
@media (max-width: 900px) {
  .hero-copy { max-width: 36rem; }
  h1 { font-size: clamp(2.4rem, 8vw, 4.4rem); }
}
@media (max-width: 767px) {
  .stage video, .stage img.poster { object-position: 50% 12%; }
  .stage::after { background: linear-gradient(180deg, rgba(252,252,252,0) 30%, rgba(252,252,252,.82) 50%, rgba(252,252,252,.97) 64%, #fcfcfc 100%); }
  .page { padding: 1.1rem 1.25rem 2rem; }
  .hero { align-items: flex-end; padding: 6rem 0 0; }
  .brand span { display: none; }
  .brand img { width: 40px; height: 40px; border-radius: 13px; }
  h1 { font-size: clamp(2.4rem, 12vw, 3.6rem); }
  .lead { font-size: 1rem; margin-top: 1rem; }
  .principles { display: none; }
  .actions { margin-top: 1.4rem; }
  .actions > * { flex: 1 1 100%; }
}
@media (max-width: 480px) {
  .lang-current { display: none; }
  .lang-chevron { display: none; }
  .lang-trigger { width: 46px; justify-content: center; padding: 0; }
  .lang-popover { width: min(21rem, calc(100vw - 2.2rem)); }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .js .kicker, .js h1, .js .lead, .js .principles span, .js .actions > *, .js .topbar > * { transition: none; opacity: 1; transform: none; }
  .stage video { transition: none; transform: none; }
  .js .lang-popover:not([hidden]) { animation: none; }
  .btn-primary, .btn-secondary, .brand img { transition: none; }
}
