/* =============================================================================
   MetaCards — premium light celestial rebuild
   Design tokens §4 · Typography §5 · Fan mechanic §9 / Appendix A
   ========================================================================== */

:root {
  /* — Color tokens (§4) — */
  --starlight: #F1F4FB;   /* page background — luminous pale blue-white */
  --porcelain: #FBFCFE;   /* raised surfaces / card face base */
  --ink:       #16233F;   /* headings / primary text — midnight */
  --slate:     #3A4A6B;   /* secondary text */
  --line:      #8FA6CE;   /* silver-blue ornament linework, hairlines — ТОЛЬКО графика */
  --muted:     #5A6E93;   /* приглушённый текст: 4.67:1 на --starlight, проходит AA */
  --cosmos:    #243E73;   /* deep accent (buttons, active) */
  --iris:      #BFE3F5;   /* luminous cyan glow (focus rings, highlights) */
  --gold:      #C7B27A;   /* single warm restraint accent — divider star */
  --cover-bg:  #0C1730;   /* card cover cosmic base behind eye art */

  /* — Type — */
  --f-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --f-body:    "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* — Кривые (одни на весь проект; собственных cubic-bezier не заводим) — */
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);    /* вход/выход */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);   /* движение по экрану */
  --press:       100ms;                              /* отклик на нажатие */

  /* — Rhythm — */
  --section-y: clamp(5rem, 10vw, 9rem);
  --container: 1160px;
  --gutter:    clamp(1.25rem, 5vw, 3rem);

  /* — Shadows (soft, cool, low-opacity) — */
  --shadow-card: 0 20px 60px -20px rgba(22, 35, 63, .18);
  --shadow-soft: 0 10px 34px -18px rgba(22, 35, 63, .22);
}

/* — Reset / base — */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--starlight);
  color: var(--slate);
  font-family: var(--f-body);
  font-size: clamp(1.06rem, 1.1vw, 1.125rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: rgba(191, 227, 245, .55); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--iris);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* — Layout — */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); position: relative; }
section[id] { scroll-margin-top: 88px; }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }

/* — Typography (§5) — */
h1, h2, h3 { font-family: var(--f-display); color: var(--ink); font-weight: 400; margin: 0; }
/* Трекинг задаётся под кегль: крупный текст стягиваем, мелкий — слегка разряжаем. */
h1 { font-size: clamp(2.9rem, 5.8vw, 4.7rem); line-height: 1.02; letter-spacing: -.025em; text-wrap: balance; }
h2 { font-size: clamp(2.4rem, 4.8vw, 3.5rem); line-height: 1.06; letter-spacing: -.02em;  text-wrap: balance; }
h3 { font-size: 1.6rem;                        line-height: 1.2;  letter-spacing: -.01em; font-weight: 500; }
p  { margin: 0 0 1.1em; letter-spacing: 0; }
/* заголовки обнулены по margin — задаём воздух до следующего блока явно */
h1 + p, h2 + p, h3 + p,
h2 + .prose, h2 + .lead { margin-top: 1.15rem; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--f-body);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 1.1rem;
}
.lead { color: var(--slate); font-size: clamp(1.06rem, 1.35vw, 1.18rem); line-height: 1.62; letter-spacing: .004em; }

/* — Star divider (line · star · line) — */
.divider { display: flex; align-items: center; justify-content: center; gap: 1rem; padding-block: clamp(1.8rem, 4vw, 3.2rem); }
.divider::before, .divider::after { content: ""; height: 1px; width: min(30vw, 220px); background: linear-gradient(90deg, transparent, var(--line)); opacity: .6; }
.divider::after { background: linear-gradient(90deg, var(--line), transparent); }
.divider svg { width: 20px; height: 20px; color: var(--gold); opacity: .9; }

/* — Buttons (§4) — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--f-body); font-weight: 600; font-size: 1rem;
  padding: .95rem 1.9rem; border-radius: 999px;
  transition: transform .3s var(--ease-out), box-shadow .3s ease, background-color .3s ease, color .3s ease, opacity .3s ease;
  will-change: transform;
}

.btn--primary { background: var(--cosmos); color: #fff; box-shadow: var(--shadow-soft); }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -16px rgba(36, 62, 115, .5); }
}
.btn--ghost { color: var(--cosmos); border: 1px solid rgba(143, 166, 206, .55); background: rgba(251, 252, 254, .6); }
@media (hover: hover) and (pointer: fine) {
  .btn--ghost:hover { border-color: var(--cosmos); transform: translateY(-2px); }
}
/* Отклик живёт на нажатии, а не на отпускании — иначе читается как лаг.
   Стоит ПОСЛЕ hover-правил и с той же специфичностью, иначе :hover перебивает.
   Важно: .btn никогда не должен сам быть .reveal — правило .reveal.is-in
   { transform: none } той же специфичности перетирает и hover, и press.
   Поэтому появление вешаем на обёртку .hero__cta. */
.btn--primary:active,
.btn--ghost:active { transform: scale(.97); transition-duration: var(--press); }
.hero__cta { display: inline-flex; }

/* =============================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; align-items: center;
  height: 72px;
  transition: background-color .35s ease, backdrop-filter .35s ease;
}
/* Плавающая панель не режет контент линией — под ней растушёванный край. */
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 26px;
  background: linear-gradient(rgba(241, 244, 251, .62), rgba(241, 244, 251, 0));
  opacity: 0; transition: opacity .35s ease; pointer-events: none;
}
.site-header.is-scrolled::after { opacity: 1; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.site-header.is-scrolled {
  background: rgba(241, 244, 251, .78);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
}
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--f-display); font-size: 1.34rem; color: var(--ink); font-weight: 600; letter-spacing: .012em; }
.brand svg { width: 26px; height: 26px; color: var(--cosmos); }
/* Заполненная кнопка в шапке с бликом.
   Блик — CSS-анимация (идёт вне основного потока, не спотыкается о загрузку),
   двигаем только transform. Цикл 7s: сам проход занимает ~1.2s, остальное — пауза. */
.header-cta {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 44px; padding: .62rem 1.35rem;
  border-radius: 999px;
  background: var(--cosmos); color: #fff;
  font-weight: 600; font-size: .92rem; letter-spacing: .01em;
  box-shadow: 0 10px 26px -14px rgba(36, 62, 115, .6);
  transition: transform .3s var(--ease-out), box-shadow .3s ease;
}
.header-cta > span { position: relative; z-index: 1; }
.header-cta::after {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: 0; width: 38%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: translateX(-140%) skewX(-18deg);
  animation: ctaShine 7s var(--ease-out) 1.2s infinite;
  pointer-events: none;
}
@keyframes ctaShine {
  0%, 82% { transform: translateX(-140%) skewX(-18deg); }
  100%    { transform: translateX(400%)  skewX(-18deg); }
}
@media (hover: hover) and (pointer: fine) {
  .header-cta:hover { transform: translateY(-1px); box-shadow: 0 14px 32px -14px rgba(36, 62, 115, .7); }
}
.header-cta:active { transform: scale(.97); transition-duration: var(--press); }

/* =============================================================================
   Hero
   ========================================================================== */
.hero { position: relative; padding-top: clamp(8rem, 16vh, 12rem); padding-bottom: var(--section-y); }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hero__title { margin: .4rem 0 1.3rem; }
.hero__sub { max-width: 34ch; margin-bottom: 2.2rem; }
.hero__art { display: flex; justify-content: center; align-items: center; }

/* the resting eye card that floats */
.hero__card {
  width: clamp(190px, 22vw, 280px);
  aspect-ratio: 482 / 974;
  border-radius: 16px;
  border: 4px solid #fff;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  animation: floatBob 6.5s ease-in-out infinite;
}
.hero__card img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes floatBob { 0%,100% { transform: translateY(-8px); } 50% { transform: translateY(10px); } }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__sub { margin-inline: auto; }
  .hero__art { order: -1; transition-delay: 0ms; }   /* карта встаёт первой — она и должна вести каскад */
  .hero__card { width: clamp(170px, 46vw, 230px); }
}

/* =============================================================================
   Essence / prose two-column
   ========================================================================== */
.two-col { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.two-col .prose p + p { margin-top: 1.1em; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; gap: 1.5rem; } }

/* =============================================================================
   DECK / draw stage — the signature (§9 / Appendix A)
   ========================================================================== */
.deck-section { text-align: center; overflow: hidden; }
.deck-head { max-width: 40ch; margin: 0 auto clamp(2rem, 4.5vw, 3.2rem); }

.deck-stage {
  position: relative;
  height: 520px;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1600px;
}

/* one card in the fan — aspect matches the real art (482×974 ≈ 1:2.02) */
.card {
  --i: 0;
  position: absolute;
  width: 116px;
  aspect-ratio: 482 / 974;
  border-radius: 11px;
  border: 4px solid #fff;
  box-shadow: 0 2px 10px rgba(22, 35, 63, .10);
  transform-origin: 50% 50%;
  transform: translateX(calc(var(--i) * 1vw)) rotate(calc(var(--i) * 0.7deg));
  transition: transform .6s cubic-bezier(.22,.61,.36,1), box-shadow .6s ease;
  transform-style: preserve-3d;
  cursor: pointer;
  will-change: transform;
}
/* load spread — replicate startAnimation reversed (Appendix A) */
.deck-stage.is-ready .card { animation: fanSpread 1.6s ease-in-out reverse; }

@keyframes fanSpread {
  0%   { transform: translateX(calc(var(--i) * 1vw))         rotate(calc(var(--i) * 0.7deg)) rotateY(0deg) scale(1); }
  30%  { transform: translateX(calc(var(--i) * 1vw - 180px)) rotate(calc(var(--i) * 0deg))   rotateY(0deg) scale(1); }
  100% { transform: translateX(0) rotate(0deg) rotateY(180deg) scale(1.5); }
}

/* hover lift (pointer:fine only) */
@media (hover: hover) and (pointer: fine) {
  .deck-stage:not(.has-active) .card:hover {
    transform: translateX(calc(var(--i) * 1vw - 30px)) rotate(calc(var(--i) * 0.7deg));
    box-shadow: 0 16px 34px -12px rgba(22, 35, 63, .3);
    z-index: 40;
  }
}

/* 1st click — flip to center, scale 1.5 */
.card.is-active {
  transform: translateX(0) rotate(0deg) rotateY(180deg) scale(1.5);
  transform-origin: 50% 1%;
  z-index: 100;
  animation: none;
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), opacity .5s var(--ease-out);
  box-shadow: var(--shadow-card);
}
.deck-stage.has-active .card:not(.is-active) { opacity: .45; filter: saturate(.7); pointer-events: none; }

/* iris glow bloom behind the active card */
.deck-stage.has-active::before {
  content: ""; position: absolute; left: 50%; top: 46%;
  width: 340px; height: 340px; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(191, 227, 245, .55), rgba(191, 227, 245, 0) 68%);
  filter: blur(6px); opacity: 0; pointer-events: none;
  animation: glowBloom .9s ease forwards .25s;
}
@keyframes glowBloom { to { opacity: 1; } }

/* 2-й клик — карта крупно. Она переезжает в .zoom-layer над скримом,
   поэтому здесь обычное центрирование флексом, без fixed-костылей. */
.zoom-layer {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: max(3vh, 1rem) 1rem;
  perspective: 1600px;                 /* нужна для 3D-переворота лица карты */
  opacity: 0; pointer-events: none;
  transition: opacity .32s var(--ease-out);
}
.zoom-layer.is-on { opacity: 1; pointer-events: auto; }
.card.is-zoom {
  position: relative; left: auto; top: auto;
  height: min(88vh, 900px); width: auto; aspect-ratio: 482 / 974;
  transform: rotateY(180deg) scale(.94);
  transform-origin: center;
  transition: transform .42s var(--ease-out), box-shadow .42s ease;
  box-shadow: 0 40px 120px -30px rgba(12, 23, 48, .5);
  cursor: zoom-out;
}
.zoom-layer.is-on .card.is-zoom { transform: rotateY(180deg) scale(1); }

/* Скрим размывает всё, что под ним. Материал «набирает силу»: блюр и
   затемнение приходят вместе, а не просто выцветают. */
.zoom-scrim {
  position: fixed; inset: 0; z-index: 190;
  background: rgba(241, 244, 251, .58);
  backdrop-filter: blur(0px) saturate(105%); -webkit-backdrop-filter: blur(0px) saturate(105%);
  opacity: 0; pointer-events: none;
  transition: opacity .32s var(--ease-out), backdrop-filter .42s var(--ease-out);
  cursor: zoom-out;
}
.zoom-scrim.is-on {
  opacity: 1; pointer-events: auto;
  backdrop-filter: blur(16px) saturate(125%); -webkit-backdrop-filter: blur(16px) saturate(125%);
}

/* reset button */
.deck-action { margin-top: clamp(2.5rem, 6vw, 4rem); min-height: 3.5rem; }
.deck-action .btn { transform: translateY(28px); opacity: 0; pointer-events: none; transition: transform .6s ease, opacity .6s ease; }
.deck-action.is-shown .btn { transform: translateY(0); opacity: 1; pointer-events: auto; transition-delay: .2s; }

/* =============================================================================
   Oracle card faces (§10) — cover (front) + quote (back)
   ========================================================================== */
.card__inner { position: absolute; inset: 0; transform-style: preserve-3d; }
.card__face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 7px; overflow: hidden; }

/* cover (front) — real eye art (frame/star/mandala baked in) */
.card__cover { background: var(--cover-bg); }
.card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* quote face (back) — real light art as background; only text overlaid */
.card__quote {
  transform: rotateY(180deg);
  background: #EAF0FB url('/assets/img/face.png') center / cover no-repeat;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; color: var(--ink);
  padding: 17% 14%;
}
/* content revealed with delay after flip */
.card.is-active .card__quote-inner,
.card.is-zoom .card__quote-inner { opacity: 1; transition-delay: .55s; }
.card__quote-inner { opacity: 0; transition: opacity .5s ease; width: 100%; }

.card__mark { font-family: var(--f-display); color: var(--line); line-height: .6; }
.card__mark--open { font-size: 2.4em; margin-bottom: .1em; }
.card__mark--close { font-size: 2.4em; margin-top: .2em; }
.card__text { font-family: var(--f-display); color: var(--ink); font-size: clamp(.62rem, 1.1vw, .8rem); line-height: 1.35; text-wrap: balance; margin: 0 0 .5em; }
.card__src-div { display: flex; align-items: center; justify-content: center; gap: .5em; margin: .6em 0; }
.card__src-div::before, .card__src-div::after { content: ""; height: 1px; width: 24%; background: var(--line); opacity: .6; }
.card__src-div svg { width: 9px; height: 9px; color: var(--gold); }
.card__src { font-family: var(--f-display); font-style: italic; color: var(--slate); font-size: clamp(.5rem, .8vw, .62rem); line-height: 1.4; }

/* 1.5× teaser: quote only (no source), sized to fit without clipping */
.card.is-active .card__quote     { padding: 9% 9%; }
.card.is-active .card__text      { font-size: clamp(.72rem, 1.05vw, .86rem); line-height: 1.3; }
.card.is-active .card__mark--open,
.card.is-active .card__mark--close { font-size: 1.7em; }
.card.is-active .card__src-div,
.card.is-active .card__src       { display: none; }

/* fullscreen: full read — quote + source, large type */
.card.is-zoom .card__quote       { padding: 14% 12%; }
.card.is-zoom .card__text        { font-size: clamp(1.3rem, 2.4vw, 1.9rem); }
.card.is-zoom .card__src         { font-size: clamp(.85rem, 1.2vw, 1rem); }
.card.is-zoom .card__src-div,
.card.is-zoom .card__src         { display: block; }
.card.is-zoom .card__src-div     { display: flex; }

/* =============================================================================
   Method / Cascade steps
   ========================================================================== */
.steps { max-width: 760px; margin-inline: auto; display: flex; flex-direction: column; }
.step { display: grid; grid-template-columns: auto 1fr; gap: clamp(1.2rem, 3vw, 2.2rem); padding-block: clamp(1.6rem, 3vw, 2.4rem); position: relative; }
.step + .step { border-top: 1px solid rgba(143, 166, 206, .3); }
.step__n { font-family: var(--f-display); font-size: clamp(1.8rem, 3vw, 2.6rem); color: var(--ink); line-height: 1; font-weight: 500; opacity: .9; }
.step__body h3 { margin-bottom: .4rem; }
.step__body p { color: var(--slate); margin: 0; }

/* =============================================================================
   What cards show — restrained feature grid
   ========================================================================== */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); }
.feature { padding-top: 1.5rem; border-top: 1px solid rgba(143, 166, 206, .35); }
.feature__glyph { width: 22px; height: 22px; color: var(--line); margin-bottom: 1rem; }
.feature h3 { font-size: 1.18rem; margin-bottom: .45rem; }
.feature p { color: var(--slate); font-size: .98rem; margin: 0; }

/* =============================================================================
   FAQ accordion
   ========================================================================== */
.faq { max-width: 780px; margin-inline: auto; }
.faq__item { border-top: 1px solid rgba(143, 166, 206, .3); }
.faq__item:last-child { border-bottom: 1px solid rgba(143, 166, 206, .3); }
.faq__q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; text-align: left; padding: 1.5rem 0; font-family: var(--f-display); font-size: clamp(1.1rem, 1.8vw, 1.35rem); color: var(--ink); }
.faq__icon { flex: none; width: 22px; height: 22px; color: var(--cosmos); transition: transform .35s ease; }
.faq__item.is-open .faq__icon { transform: rotate(45deg); }
.faq__a { overflow: hidden; height: 0; transition: height .4s cubic-bezier(.22,.61,.36,1); }
.faq__a-inner { padding: 0 0 1.6rem; color: var(--slate); max-width: 62ch; }

/* =============================================================================
   Contacts / Footer
   ========================================================================== */
.contacts__links { display: flex; flex-direction: column; gap: 1rem; margin-top: 2rem; }
.contact-link { display: inline-flex; align-items: baseline; gap: .8rem; font-size: 1.15rem; color: var(--ink); width: fit-content; }
.contact-link span.label { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.contact-link .val { position: relative; }
.contact-link .val::after { content: ""; position: absolute; left: 0; bottom: -3px; height: 1.5px; width: 0; background: var(--cosmos); transition: width .3s ease; }
@media (hover: hover) and (pointer: fine) {
  .contact-link:hover .val::after { width: 100%; }
}

.site-footer { border-top: 1px solid rgba(143, 166, 206, .3); padding-block: clamp(3rem, 6vw, 4.5rem); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: center; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.2rem 1.8rem; }
.footer-nav a { color: var(--slate); font-size: .95rem; }
@media (hover: hover) and (pointer: fine) {
  .footer-nav a:hover { color: var(--ink); }
}
.site-footer .copyright { color: var(--muted); font-size: .9rem; }

/* =============================================================================
   Starfield + scroll reveals
   ========================================================================== */
#starfield { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

/* Появление блоков. Без JS всё видно сразу — иначе страница осталась бы пустой. */
.reveal { opacity: 1; }
.js .reveal {
  opacity: 0;
  transform: translateY(22px) scale(.985);
  transition: opacity .82s var(--ease-out), transform .82s var(--ease-out);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* Заголовки проявляются по словам: текст будто собирается из пустоты.
   Разбивку делает JS, до неё элемент ведёт себя как обычный .reveal. */
.js .reveal[data-words].words-ready { opacity: 1; transform: none; transition: none; }
.words-ready .w { display: inline-block; }
.js .words-ready .w {
  opacity: 0;
  transform: translateY(.5em) scale(.97);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: calc(var(--i) * 45ms);
}
.js .words-ready.is-in .w { opacity: 1; transform: none; }
/* Заголовок первого экрана — второй в каскаде: его слова стартуют после
   надзаголовка. Собственный transition-delay у .words-ready снят, поэтому
   базу добавляем прямо словам. */
.js .hero__copy .words-ready .w { transition-delay: calc(60ms + var(--i) * 45ms); }

/* =============================================================================
   Responsive fan (§12)
   ========================================================================== */
@media (max-width: 768px) {
  .deck-stage { height: 400px; }
  /* tighter arc on phones (§12): narrower spread + smaller cards so it fits without scroll */
  .card { height: 168px; width: 108px; transform: translateX(calc(var(--i) * 1.15vw)) rotate(calc(var(--i) * 0.7deg)); }
  .card.is-active { transform: translateX(0) rotate(0) rotateY(180deg) scale(1.55); transform-origin: 50% 50%; }
  .card.is-active .card__text { font-size: clamp(.72rem, 2.9vw, .95rem); }
  @media (hover: hover) and (pointer: fine) {
    .deck-stage:not(.has-active) .card:hover { transform: translateX(calc(var(--i) * 1.15vw - 22px)) rotate(calc(var(--i) * 0.7deg)); }
  }
}
@media (max-width: 600px) {
  .card.is-zoom { width: min(86vw, 420px); height: auto; }
}

/* =============================================================================
   Reduced motion (§9/§11)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .hero__card { animation: none; }
  .header-cta::after { animation: none; opacity: 0; }
  .deck-stage.is-ready .card { animation: none; }
  .card { transition: opacity .3s ease; }
  .card.is-active, .card.is-zoom { transition: none; }
  .zoom-layer .card.is-zoom, .zoom-layer.is-on .card.is-zoom { transform: rotateY(180deg); }
  .deck-stage.has-active::before { animation: none; opacity: 1; }
  .card__quote-inner { transition: none; }
  .reveal, .words-ready .w { opacity: 1; transform: none; transition-property: opacity; transition-duration: .2s; transition-delay: 0ms; }
  .deck-action .btn { transition: opacity .2s ease; }
}

/* =============================================================================
   About — длинный текст «О проекте»
   ========================================================================== */
.about__prose {
  max-width: 36em;
  margin-inline: auto;
  font-size: clamp(1.04rem, 1.25vw, 1.13rem);
  line-height: 1.78;
  color: var(--slate);
  text-wrap: pretty;
}
.about__prose p { margin: 0 0 1.35em; }
.about__closing {
  margin: 2.1em 0 0;
  padding-top: 1.8em;
  border-top: 1px solid rgba(143, 166, 206, .35);
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.14rem, 1.5vw, 1.3rem);
  line-height: 1.62;
  color: var(--cosmos);
}

/* =============================================================================
   Touch targets — минимум 44px по вертикали для всех текстовых ссылок-навигации
   ========================================================================== */
.brand,
.header-cta,
.footer-nav a,
.contact-link {
  min-height: 44px;
}
.brand,
.header-cta,
.footer-nav a {
  display: inline-flex;
  align-items: center;
}
.footer-nav a { min-width: 44px; justify-content: center; }

/* =============================================================================
   Partners — тихая строка ссылок на другие проекты
   ========================================================================== */
.partners { text-align: center; }
.partners__title {
  font-family: var(--f-body);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 1.2rem;
}
.partners__links { display: flex; flex-wrap: wrap; gap: .4rem 2rem; justify-content: center; }
.partners__links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  color: var(--slate);
  font-size: 1rem;
  position: relative;
}
.partners__links a::after {
  content: "";
  position: absolute; left: 0; right: 100%; bottom: 10px;
  height: 1px; background: var(--cosmos);
  transition: right .35s cubic-bezier(.22, .61, .36, 1);
}
@media (hover: hover) and (pointer: fine) {
  .partners__links a:hover { color: var(--ink); }
  .partners__links a:hover::after { right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .partners__links a::after { transition: none; }
}

/* =============================================================================
   Атмосферные изображения (декоративные, aria-hidden)
   ========================================================================== */
.hero {
  isolation: isolate;
  overflow: clip;   /* .hero__amb намеренно вылезает на 4% за края под маску —
                       без обрезки это давало горизонтальный скролл на всех ширинах */
}
.hero .container { position: relative; z-index: 1; }
.hero__amb {
  position: absolute; inset: -12% -4% auto -4%; height: 124%;
  z-index: 0; pointer-events: none;
  background: url("/assets/img/amb-hero.webp") center 30% / cover no-repeat;
  opacity: .58;
  /* Радиальная маска задаёт форму, линейная гасит низ ДО линии обрезки —
     без неё overflow:clip оставлял видимый горизонтальный шов под первым экраном. */
  -webkit-mask-image: radial-gradient(118% 92% at 64% 32%, #000 0%, rgba(0,0,0,.68) 44%, transparent 78%),
                      linear-gradient(#000 62%, transparent 88%);
          mask-image: radial-gradient(118% 92% at 64% 32%, #000 0%, rgba(0,0,0,.68) 44%, transparent 78%),
                      linear-gradient(#000 62%, transparent 88%);
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
}
@media (max-width: 900px) {
  .hero__amb { background-image: url("/assets/img/amb-hero-900.webp"); opacity: .5; }
}

/* Каскад — круги на воде рядом с текстом метода */
.two-col--art { grid-template-columns: .82fr 1.18fr; align-items: center; }
.method__art { margin: 0; position: relative; }
.method__art img {
  display: block; width: 100%; height: auto;
  border-radius: 50%;
  box-shadow: 0 30px 70px -34px rgba(22, 35, 63, .45);
}
.method__art::after {
  content: ""; position: absolute; inset: -2.5%;
  border-radius: 50%; border: 1px solid rgba(143, 166, 206, .38);
  pointer-events: none;
}
@media (max-width: 760px) {
  /* объявлено ниже общего правила .two-col — иначе .82fr/1.18fr перебивает
     мобильную однколоночную раскладку и картинка сплющивается */
  .two-col--art { grid-template-columns: 1fr; gap: 2rem; }
  .method__art { max-width: 300px; margin-inline: auto; }
}

/* Мандала за заголовком «О проекте» */
.about { position: relative; isolation: isolate; }
.about .container { position: relative; z-index: 1; }
.about__mandala {
  position: absolute; z-index: 0; pointer-events: none;
  top: -15%; left: 50%; width: min(700px, 88vw); aspect-ratio: 1;
  transform: translateX(-50%);
  background: url("/assets/img/amb-about.webp") center / contain no-repeat;
  opacity: .38;
  /* гасим низ, чтобы текст лежал на чистом фоне, а не на рисунке */
  -webkit-mask-image: radial-gradient(closest-side, #000 40%, transparent 78%), linear-gradient(#000 46%, transparent 88%);
          mask-image: radial-gradient(closest-side, #000 40%, transparent 78%), linear-gradient(#000 46%, transparent 88%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}

/* =============================================================================
   Каскад появления: 60ms между элементами первого экрана
   ========================================================================== */
.hero__copy .reveal:nth-child(2) { transition-delay: 60ms; }
.hero__copy .reveal:nth-child(3) { transition-delay: 120ms; }
.hero__copy .reveal:nth-child(4) { transition-delay: 180ms; }
.hero__art { transition-delay: 140ms; }
.two-col .reveal:nth-child(2) { transition-delay: 50ms; }
.two-col .prose.reveal { transition-delay: 100ms; }

/* Параллакс карты за указателем — только мышь, только при разрешённой анимации.
   Отдельный слой: reveal двигает .hero__art, floatBob — .hero__card,
   параллакс — .hero__tilt между ними, чтобы transform ни у кого не перетирался. */
.hero__tilt { will-change: transform; }
@media (prefers-reduced-motion: reduce) {
  .hero__tilt { will-change: auto; transform: none !important; }
  .hero__copy .reveal, .hero__art, .two-col .reveal, .two-col .prose.reveal { transition-delay: 0ms; }
}

/* =============================================================================
   Материалы: уважаем системные настройки прозрачности и контраста
   ========================================================================== */
@media (prefers-reduced-transparency: reduce) {
  .site-header.is-scrolled {
    background: var(--starlight);
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .hero__amb, .about__mandala { opacity: .3; }
}
@media (prefers-contrast: more) {
  .site-header.is-scrolled { background: var(--starlight); border-bottom: 1px solid var(--cosmos); }
  .site-header::after { display: none; }
  .hero__amb, .about__mandala { opacity: .22; }
  .lead, .about__prose { color: var(--ink); }
}

/* Узкие экраны: шапка не должна слипаться. Уменьшаем кегль, но ничего
   не выбрасываем — «Вытянуть карту» нужна и после прокрутки. */
@media (max-width: 430px) {
  .brand { font-size: 1.14rem; gap: .45rem; }
  .brand svg { width: 22px; height: 22px; }
  .header-cta { font-size: .84rem; padding-inline: 1.05rem; }
  .site-header .container { gap: 1rem; }
}

/* =============================================================================
   Партнёры — логотип
   ========================================================================== */
.partners__logo {
  padding: .4rem .6rem;
  opacity: .78;
  filter: saturate(.85);
  transition: opacity .3s ease, filter .3s ease, transform .3s var(--ease-out);
}
.partners__logo img { display: block; height: clamp(38px, 5vw, 52px); width: auto; }
@media (hover: hover) and (pointer: fine) {
  .partners__logo:hover { opacity: 1; filter: none; transform: translateY(-2px); }
}
.partners__logo:active { transform: scale(.97); transition-duration: var(--press); }
.partners__logo::after { display: none; }   /* без подчёркивания под картинкой */

/* =============================================================================
   Страница /privacy
   ========================================================================== */
.legal-page { padding-top: clamp(7rem, 14vh, 10rem); }
.legal-page__head { max-width: 30em; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.legal-page__head h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
.legal-page__updated { margin-top: 1rem; font-size: .9rem; color: var(--muted); }
.legal-page__body { max-width: 38em; color: var(--slate); line-height: 1.75; text-wrap: pretty; }
.legal-page__body h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.7rem); line-height: 1.25; letter-spacing: -.01em;
  margin: 2.4em 0 .9em;
}
.legal-page__body h2:first-child { margin-top: 0; }
.legal-page__body p { margin: 0 0 1.1em; }
.legal-page__body ul { margin: 0 0 1.1em; padding-left: 1.2em; }
.legal-page__body li { margin-bottom: .5em; }
.legal-page__back { margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid rgba(143, 166, 206, .3); }
.legal-page__back a { display: inline-flex; align-items: center; min-height: 44px; color: var(--cosmos); font-weight: 600; }

/* =============================================================================
   Карта-изображение (загруженная или сгенерированная)
   ========================================================================== */
.card__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.card__quote.has-art { padding: 0; background-image: none; }
/* подпись читаема только на крупной карте — на маленькой текст поверх
   произвольной картинки превратился бы в кашу */
.card__quote.has-art .card__quote-inner { display: none; }
.card.is-zoom .card__quote.has-art .card__quote-inner {
  display: block; position: absolute; left: 0; right: 0; bottom: 0;
  padding: 16% 9% 7%; text-align: center;
  background: linear-gradient(to top, rgba(12, 23, 48, .82), rgba(12, 23, 48, 0));
}
.card__caption {
  margin: 0; font-family: var(--f-display); color: #F1F4FB;
  font-size: clamp(1rem, 1.8vw, 1.45rem); line-height: 1.35; text-wrap: pretty;
}
.card__caption-src {
  display: block; margin-top: .6em; font-style: italic;
  font-size: .68em; color: rgba(241, 244, 251, .78);
}

/* Ссылка «Вход» в подвале — тихая, но кликабельная */
.site-footer__enter {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 44px; padding: 0 .9rem;
  border-radius: 999px; border: 1px solid rgba(143, 166, 206, .45);
  color: var(--muted); font-size: .88rem; font-weight: 600;
  transition: color .25s ease, border-color .25s ease, background-color .25s ease;
}
@media (hover: hover) and (pointer: fine) {
  .site-footer__enter:hover { color: var(--ink); border-color: var(--cosmos); background: rgba(191, 227, 245, .3); }
}
.site-footer__enter:active { transform: scale(.97); transition-duration: var(--press); }

/* Выделение внутри текста — весом и цветом, без смены гарнитуры */
.prose b, .prose strong,
.about__prose b, .about__prose strong { font-weight: 600; color: var(--ink); }
