/* Salvatrice del Mondo — стили. Белый фон, золото, светлое небо. */
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

:root {
  --bg: #ffffff;
  --bg2: #fcfaf6;
  --ink: #2a2014;
  --text: #33281a;
  --muted: #5c4e3a;
  --gold: #b8892c;
  --gold-l: #e7c977;
  --gold-d: #6a4a0f;
  --gold-line: rgba(184, 137, 44, .26);
  --f-title: "Cinzel", "Forum", "Times New Roman", serif;
  --f-deco: "Cinzel Decorative", "Cinzel", "Forum", serif;
  --f-body: "Cormorant Garamond", "Georgia", serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --hdr: 72px;
  --gold-grad: linear-gradient(100deg, #5a3d0a 0%, #94691c 17%, #6a4a0f 34%, #a97b26 50%, #5f420c 66%, #8f6519 83%, #5a3d0a 100%);
  --shadow: 0 30px 60px -34px rgba(110, 80, 25, .38);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--hdr); -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--f-body); font-size: clamp(19px, 1.3vw, 22px); line-height: 1.7; font-weight: 600;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: rgba(214, 170, 76, .3); color: var(--ink); }

.gold-text {
  background: var(--gold-grad); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.hero .gold-text, .sec-t { animation: shine 10s linear infinite; }
@keyframes shine { to { background-position: 166.667% 0; } }
.center { text-align: center; }
.muted { color: var(--muted); }
.ic { display: block; }

.orn { display: block; width: min(320px, 72vw); height: 24px; color: var(--gold); margin: 0 auto 18px; overflow: visible; }

/* ===================== прелоадер ===================== */
.loader {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, #fffdf7, #ffffff 60%);
  transition: opacity .9s var(--ease), visibility .9s;
}
.loader.done { opacity: 0; visibility: hidden; }
/* страховка: даже если скрипты не запустились, заставка уходит сама через 6 секунд */
.loader { animation: loaderOut .8s ease 6s forwards; }
@keyframes loaderOut { to { opacity: 0; visibility: hidden; } }
.loader-in { position: relative; width: 150px; height: 150px; display: grid; place-items: center; }
.loader-logo { height: 92px; width: auto; animation: lpulse 1.6s ease-in-out infinite; filter: drop-shadow(0 4px 14px rgba(184, 137, 44, .4)); }
.loader-in .ic { width: 54px; height: 54px; animation: lpulse 1.6s ease-in-out infinite; filter: drop-shadow(0 4px 14px rgba(184, 137, 44, .45)); }
.loader-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.loader-ring circle { fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-dasharray: 340; stroke-dashoffset: 340; stroke-linecap: round; animation: lring 1.8s var(--ease) infinite; }
@keyframes lring { 0% { stroke-dashoffset: 340; } 60% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -340; } }
@keyframes lpulse { 50% { transform: scale(1.08); } }
.no-js .loader { display: none; }

/* ===================== шапка ===================== */
.hdr {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--hdr);
  display: flex; align-items: center; gap: 18px; padding: 0 clamp(16px, 3vw, 40px);
}
/* фон шапки — отдельным слоем: backdrop-filter на самой шапке «запирает» полноэкранное мобильное меню внутри неё */
.hdr::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .5s;
  background: rgba(255, 255, 255, .84); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 1px 0 rgba(184, 137, 44, .22), 0 10px 40px -20px rgba(110, 80, 25, .3);
}
.hdr.scrolled::before { opacity: 1; }
.menu-open .hdr::before { opacity: 0; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; margin-right: auto; min-width: 0; }
.brand .ic { width: 38px; height: 38px; filter: drop-shadow(0 2px 8px rgba(184, 137, 44, .4)); transition: transform .6s var(--ease); }
.brand:hover .ic { transform: rotate(-8deg) scale(1.08); }
.brand-logo { height: 54px; width: auto; flex: none; filter: drop-shadow(0 2px 6px rgba(184, 137, 44, .3)); transition: transform .6s var(--ease); }
.brand:hover .brand-logo { transform: scale(1.06); }
@media (max-width: 560px) { .brand-logo { height: 48px; } }
.brand-t b { display: block; font-family: var(--f-deco); font-weight: 700; font-size: 15px; letter-spacing: .04em; color: var(--ink); white-space: nowrap; }
.brand-t small { display: block; font-family: var(--f-title); font-size: 9.5px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold); }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  position: relative; text-decoration: none; font-family: var(--f-title); font-size: 12.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: #3a2d1a; padding: 10px 12px; transition: color .3s;
}
.nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 1px; background: var(--gold); transform: scaleX(0); transition: transform .4s var(--ease); }
.nav a:hover, .nav a.act { color: var(--gold-d); }
.nav a:hover::after, .nav a.act::after { transform: scaleX(1); }
.nav a.nav-cta { margin-left: 8px; border: 1px solid rgba(184, 137, 44, .65); border-radius: 999px; padding: 9px 18px; color: var(--gold-d); background: rgba(255, 255, 255, .6); }
.nav a.nav-cta::after { display: none; }
.nav a.nav-cta:hover { background: linear-gradient(135deg, #f3dc98, #c99a35); color: #2a1d06; box-shadow: 0 8px 24px -8px rgba(184, 137, 44, .6); }
.langs { display: flex; gap: 2px; padding: 3px; border: 1px solid rgba(184, 137, 44, .38); border-radius: 999px; background: rgba(255, 255, 255, .7); }
.langs a { text-decoration: none; font-family: var(--f-title); font-size: 11px; font-weight: 600; letter-spacing: .12em; padding: 5px 9px; border-radius: 999px; color: #7a6b56; transition: background .3s, color .3s; }
.langs a.on { background: linear-gradient(135deg, #f3dc98, #c99a35); color: #2a1d06; }
.langs a:not(.on):hover { color: var(--gold-d); }
.burger { display: none; width: 44px; height: 44px; border: 1px solid rgba(184, 137, 44, .45); border-radius: 50%; background: rgba(255, 255, 255, .75); cursor: pointer; position: relative; z-index: 120; }
.burger span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--gold-d); transition: transform .45s var(--ease), opacity .3s; }
.burger span:nth-child(1) { top: 15px; } .burger span:nth-child(2) { top: 21px; } .burger span:nth-child(3) { top: 27px; }
.menu-open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1120px) {
  .burger { display: block; }
  .nav {
    position: fixed; inset: 0; z-index: 110; flex-direction: column; justify-content: center; gap: 6px;
    background: radial-gradient(circle at 50% 30%, #fffaf0, #ffffff 70%);
    opacity: 0; visibility: hidden; transition: opacity .5s var(--ease), visibility .5s;
  }
  .nav a { font-size: 19px; letter-spacing: .2em; padding: 12px 18px; opacity: 0; transform: translateY(18px); transition: opacity .5s var(--ease), transform .6s var(--ease), color .3s; }
  .nav a.nav-cta { margin: 14px 0 0; padding: 13px 30px; }
  .menu-open .nav { opacity: 1; visibility: visible; }
  .menu-open .nav a { opacity: 1; transform: none; }
  .menu-open .nav a:nth-child(2) { transition-delay: .05s; } .menu-open .nav a:nth-child(3) { transition-delay: .1s; }
  .menu-open .nav a:nth-child(4) { transition-delay: .15s; } .menu-open .nav a:nth-child(5) { transition-delay: .2s; }
  .menu-open .nav a:nth-child(6) { transition-delay: .25s; } .menu-open .nav a:nth-child(7) { transition-delay: .3s; }
  .menu-open { overflow: hidden; }
  .langs { position: relative; z-index: 120; }
}
@media (max-width: 560px) {
  :root { --hdr: 64px; }
  .hdr { gap: 10px; }
  .brand-t { display: none; }
  .langs a { padding: 5px 7px; font-size: 10.5px; }
}

/* ===================== HERO ===================== */
.hero {
  --hx: 0; --hy: 0; --hs: 0;
  position: relative; height: 100vh; height: 100svh; min-height: 620px; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(ellipse 50% 48% at 50% 42%, #fffdf6 0%, rgba(255, 246, 222, .9) 45%, transparent 75%),
    radial-gradient(ellipse 90% 70% at 50% 40%, #fbf1da 0%, #fdf8ee 55%, #ffffff 100%);
}
.hero::after { /* нижний переход в страницу */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 9%; z-index: 6; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .85) 70%, #fff);
}
.sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.hero-rays {
  position: absolute; left: 50%; top: 42%; width: 170vmax; height: 170vmax; z-index: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(214, 170, 76, .13) 0deg 2.4deg, rgba(255, 255, 255, 0) 2.4deg 8deg);
  -webkit-mask-image: radial-gradient(circle, #000 6%, rgba(0,0,0,.55) 22%, transparent 46%);
  mask-image: radial-gradient(circle, #000 6%, rgba(0,0,0,.55) 22%, transparent 46%);
  transform: translate(-50%, -50%); animation: rays 180s linear infinite; opacity: 0; transition: opacity 2.5s;
}
@keyframes rays { to { transform: translate(-50%, -50%) rotate(360deg); } }
.clouds { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.clouds span {
  position: absolute; border-radius: 50%; filter: blur(10px);
  background: radial-gradient(closest-side, rgba(255, 255, 255, .95), rgba(255, 255, 255, .55) 55%, rgba(255, 255, 255, 0));
  animation: drift var(--t, 70s) ease-in-out infinite alternate;
}
.clouds span:nth-child(1) { left: -8%; top: 58%; width: 46vw; height: 22vw; --t: 80s; }
.clouds span:nth-child(2) { right: -10%; top: 54%; width: 50vw; height: 24vw; --t: 95s; animation-direction: alternate-reverse; }
.clouds span:nth-child(3) { left: 8%; top: 8%; width: 30vw; height: 12vw; --t: 70s; opacity: .8; }
.clouds span:nth-child(4) { right: 6%; top: 12%; width: 28vw; height: 11vw; --t: 85s; opacity: .75; animation-direction: alternate-reverse; }
@keyframes drift { to { transform: translateX(6vw); } }
.planet {
  --pd: min(80vh, 60vw);
  position: absolute; left: 50%; top: 42%; width: var(--pd); height: var(--pd); z-index: 2;
  transform: translate(calc(-50% + var(--hx) * -16px), calc(-50% + var(--hy) * -12px + var(--hs) * 200px)) scale(calc(1 + var(--hs) * .14));
  will-change: transform;
}
.planet-halo {
  position: absolute; inset: -30%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, .95) 30%, rgba(255, 228, 160, .45) 44%, rgba(255, 236, 190, .18) 54%, transparent 66%);
  animation: halo 7s ease-in-out infinite;
}
@keyframes halo { 50% { opacity: .75; transform: scale(1.04); } }
#planetCanvas { position: absolute; left: 50%; top: 50%; width: 132%; height: 132%; transform: translate(-50%, -50%); }
.planet.no-gl #planetCanvas { display: none; }
.planet.no-gl::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 62% 35%, #bfe2ff, #3f86d6 30%, #1a4f99 62%, #0b2f66 100%);
  box-shadow: 0 0 80px rgba(255, 220, 150, .6);
}
.planet-flare {
  position: absolute; right: 2%; top: 3%; width: 46%; height: 46%; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle, #fff 0, rgba(255, 248, 228, .95) 6%, rgba(255, 220, 150, .5) 18%, rgba(255, 200, 110, .14) 36%, transparent 60%);
  animation: flare 6s ease-in-out infinite;
}
.planet-flare::after { content: none; }
@keyframes flare { 50% { opacity: .8; transform: scale(.94); } }

.doves { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.doves-front { z-index: 7; }
.dove { position: absolute; left: 0; top: 0; max-width: none; opacity: 0; will-change: transform, opacity; filter: drop-shadow(0 12px 16px rgba(120, 90, 40, .22)); }
.dove-fly-layer { position: fixed; inset: 0; z-index: 900; pointer-events: none; overflow: hidden; }

.hero-portrait {
  position: absolute; left: 50%; bottom: 0; z-index: 4;
  height: min(90vh, 960px, 50vw); aspect-ratio: 1348 / 1010;
  transform: translate(calc(-50% + var(--hx) * 8px), calc(var(--hs) * 90px));
  will-change: transform;
  /* дымка идёт по контуру (фильтр на родителе — после маски, поэтому не обрезается краем картинки) */
  filter: drop-shadow(0 0 28px rgba(255, 226, 170, .55)) drop-shadow(0 0 70px rgba(255, 236, 200, .45));
}
.hero-portrait img {
  width: 100%; height: 100%; object-fit: contain; object-position: bottom;
  -webkit-mask-image: linear-gradient(180deg, #000 90%, transparent 100%), linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 90%, transparent 100%), linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  filter: none;
}
.hc { position: absolute; top: calc(var(--hdr) + 14px); width: clamp(70px, 9vw, 150px); height: clamp(70px, 9vw, 150px); color: var(--gold); opacity: .7; z-index: 5; pointer-events: none; }
.hc-tl { left: clamp(10px, 2vw, 30px); }
.hc-tr { right: clamp(10px, 2vw, 30px); transform: scaleX(-1); }

.hero-side {
  position: absolute; top: 24%; width: 25vw; z-index: 5; text-align: center;
  isolation: isolate;
  transform: translate(calc(var(--hx) * var(--par, 0) * 1px), calc(var(--hs) * -80px));
}
.hero-side::before { content: ""; position: absolute; inset: -18% -14%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .92), rgba(255, 255, 255, .7) 55%, rgba(255, 255, 255, 0)); }
.hero-left { left: 3.5vw; --par: -10; }
.hero-right { right: 3.5vw; --par: 10; }
.hs-big { margin: 0 0 14px; font-family: var(--f-title); font-weight: 700; font-size: clamp(30px, 3.7vw, 66px); line-height: 1.08; letter-spacing: .01em; }
.hs-latin { font-family: var(--f-title); font-weight: 700; letter-spacing: .02em; }
.hs-mid { margin: 4px 0 0; font-family: var(--f-title); font-weight: 700; font-size: clamp(18px, 2.2vw, 38px); line-height: 1.15; letter-spacing: .03em; text-transform: uppercase; }
.hero-side .orn { width: 88%; }

.hero-banner {
  position: absolute; left: 50%; bottom: clamp(8px, 2.5vh, 30px); z-index: 8; width: min(760px, 56vw);
  transform: translateX(-50%); text-align: center;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hb-wrap { position: relative; animation: hbfloat 7s ease-in-out infinite; }
@keyframes hbfloat { 50% { transform: translateY(-5px); } }
.hb-img { width: 100%; height: auto; animation: hbglow 5s ease-in-out infinite; }
@keyframes hbglow {
  0%, 100% { filter: drop-shadow(0 18px 30px rgba(80, 55, 15, .35)) drop-shadow(0 0 0 rgba(255, 210, 120, 0)); }
  50% { filter: drop-shadow(0 18px 30px rgba(80, 55, 15, .35)) drop-shadow(0 0 18px rgba(255, 210, 120, .55)); }
}
/* блик бежит только по самой рамке: маска = та же картинка */
.hb-shine {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  -webkit-mask: url(../img/name-banner.webp) center / 100% 100% no-repeat; mask: url(../img/name-banner.webp) center / 100% 100% no-repeat;
  background: linear-gradient(105deg, transparent 0%, transparent 40%, rgba(255, 248, 220, .85) 50%, transparent 60%, transparent 100%);
  background-size: 300% 100%; background-position: 150% 0; animation: hbshine 6s ease-in-out infinite 2.5s;
}
@keyframes hbshine { 0% { background-position: 150% 0; } 45%, 100% { background-position: -50% 0; } }
.spark { position: absolute; width: calc(26px * var(--s, 1)); height: calc(26px * var(--s, 1)); margin: calc(-13px * var(--s, 1)) 0 0 calc(-13px * var(--s, 1)); pointer-events: none;
  background:
    radial-gradient(circle, #fff 0 8%, rgba(255, 236, 180, .9) 14%, transparent 34%),
    linear-gradient(90deg, transparent 46%, rgba(255, 250, 230, .95) 50%, transparent 54%),
    linear-gradient(0deg, transparent 46%, rgba(255, 250, 230, .95) 50%, transparent 54%);
  -webkit-mask: radial-gradient(circle, #000 25%, transparent 70%); mask: radial-gradient(circle, #000 25%, transparent 70%);
  opacity: 0; transform: scale(.2) rotate(0deg); animation: twinkle 3.6s ease-in-out infinite var(--d, 0s); }
@keyframes twinkle { 0%, 55%, 100% { opacity: 0; transform: scale(.2) rotate(0deg); } 70% { opacity: 1; transform: scale(1) rotate(45deg); } 85% { opacity: 0; transform: scale(.4) rotate(90deg); } }
.hb-crown { display: block; width: clamp(40px, 4.4vw, 60px); height: clamp(40px, 4.4vw, 60px); margin: 0 auto -6px; position: relative; z-index: 2; filter: drop-shadow(0 4px 12px rgba(184, 137, 44, .5)); animation: crown 5s ease-in-out infinite; }
@keyframes crown { 50% { transform: translateY(-4px); filter: drop-shadow(0 6px 18px rgba(214, 170, 76, .75)); } }
.hb-plate {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: clamp(10px, 1.4vw, 16px) clamp(14px, 3vw, 34px); border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(252, 246, 232, .96));
  border: 1px solid rgba(184, 137, 44, .6);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .7), 0 0 0 5px rgba(184, 137, 44, .32), 0 26px 60px -22px rgba(110, 80, 25, .5);
  overflow: hidden;
}
.hb-plate::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 30%; left: -40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .9), transparent);
  animation: sweep 7s ease-in-out infinite 2s;
}
@keyframes sweep { 0% { left: -40%; } 40%, 100% { left: 120%; } }
.hb-scroll { width: clamp(50px, 8vw, 110px); height: 14px; color: var(--gold); flex: none; }
.hb-scroll.l { transform: scaleX(-1); }
.hb-name { margin: 0; font-family: var(--f-title); font-weight: 700; font-size: clamp(15px, 1.6vw, 26px); letter-spacing: .03em; line-height: 1.25; white-space: nowrap; }
.hb-sub { display: inline-block; margin: 10px 0 0; padding: 5px 18px; border-radius: 999px; background: rgba(255, 255, 255, .94); font-family: var(--f-title); font-weight: 700; font-size: clamp(11px, 1vw, 13px); color: var(--ink) !important; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.scroll-hint { position: absolute; right: clamp(16px, 3vw, 40px); bottom: clamp(26px, 6vh, 60px); z-index: 9; display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-title); font-size: 10px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); writing-mode: vertical-rl; }
.scroll-hint i { width: 1px; height: 56px; background: linear-gradient(var(--gold), transparent); position: relative; overflow: hidden; }
.scroll-hint i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--gold-d); animation: drip 2.2s ease-in-out infinite; }
@keyframes drip { to { top: 110%; } }

/* вход героя после прелоадера */
.js .hero [data-in] { opacity: 0; transition: opacity 1.6s var(--ease), translate 1.6s var(--ease), scale 1.8s var(--ease); }
.js .hero .planet[data-in] { scale: .86; }
.js .hero .hero-portrait[data-in] { translate: 0 50px; }
.js .hero .hero-side[data-in], .js .hero .hero-banner[data-in] { translate: 0 26px; }
.js.ready .hero [data-in] { opacity: 1; translate: 0 0; scale: 1; transition-delay: var(--in, 0s); }
.js.ready .hero .hero-side[data-in] { opacity: calc(1 - var(--hs) * 1.6); }
.ready .hero-rays { opacity: 1; }

@media (max-width: 820px), (max-aspect-ratio: 4/5) {
  .hero { min-height: 640px; }
  .planet { --pd: min(104vw, 54svh); top: 52%; }
  .hero-rays { top: 52%; }
  .hero-portrait { bottom: 40px; width: 112vw; height: min(62svh, 124vw); aspect-ratio: auto; max-height: 680px; }
  .hero-portrait img { object-fit: cover; object-position: 50% 0; }
  .hc { display: none; }
  .hero-side { left: 0; right: 0; width: auto; padding: 0 18px; }
  .hero-left { top: calc(var(--hdr) + 14px); }
  .hero-left .hs-big { font-size: clamp(12px, 3.4vw, 17px); letter-spacing: .18em; text-transform: uppercase; margin: 0; white-space: nowrap; }
  .hero-left .orn { display: none; }
  .hero-right { top: calc(var(--hdr) + 44px); }
  .hero-right .hs-big { font-size: clamp(34px, 10.4vw, 58px); margin-bottom: 8px; }
  .hero-right .orn { width: min(240px, 60vw); margin-bottom: 8px; }
  .hs-mid { font-size: clamp(16px, 4.6vw, 24px); }
  .hero-banner { bottom: 10px; width: 98vw; }
  .hb-scroll { display: none; }
  .hb-plate { padding: 10px 14px; }
  .hb-name { font-size: clamp(14px, 4vw, 20px); white-space: normal; }
  .hb-sub { letter-spacing: .2em; font-size: 10px; }
  .scroll-hint { display: none; }
  .clouds span:nth-child(1) { width: 90vw; height: 40vw; top: 62%; }
  .clouds span:nth-child(2) { width: 90vw; height: 40vw; top: 58%; }
}
@media (max-height: 560px) and (min-width: 821px) {
  .hero-side { top: 20%; }
  .hb-sub { display: none; }
}

/* ===================== лента ===================== */
.ribbon { position: relative; z-index: 2; overflow: hidden; padding: 16px 0; border-block: 1px solid var(--gold-line); background: linear-gradient(90deg, #fffdf8, #fbf3e1, #fffdf8); }
.ribbon-in { display: flex; align-items: center; gap: 34px; width: max-content; animation: marquee 52s linear infinite; }
.ribbon span { font-family: var(--f-title); font-weight: 600; font-size: 13px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold-d); white-space: nowrap; }
.ribbon svg { width: 18px; height: 16px; color: var(--gold); fill: currentColor; flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ===================== секции ===================== */
.sec { position: relative; padding: clamp(80px, 11vw, 150px) clamp(16px, 4vw, 40px); }
.sec > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.sec-alt { background: linear-gradient(180deg, #fff, var(--bg2) 22%, var(--bg2) 78%, #fff); }
.sec-h { text-align: center; margin-bottom: clamp(40px, 5.5vw, 70px); }
.sec-h.sub { margin-top: clamp(80px, 10vw, 130px); }
.sec-t { margin: 0 0 12px; font-family: var(--f-title); font-weight: 700; font-size: clamp(30px, 4.3vw, 56px); line-height: 1.12; letter-spacing: .015em;
  background: var(--gold-grad); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.sec-s { margin: 0; font-family: var(--f-title); font-weight: 700; font-size: clamp(12px, 1.05vw, 14px); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.h3 { margin: 0 0 18px; font-family: var(--f-title); font-weight: 600; font-size: clamp(22px, 2.3vw, 32px); line-height: 1.2; }

/* появление при прокрутке */
.js [data-r] { opacity: 0; transform: translateY(46px); filter: blur(6px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease), filter 1.1s var(--ease); }
.js [data-r="left"] { transform: translateX(-60px); }
.js [data-r="right"] { transform: translateX(60px); }
.js [data-r="zoom"] { transform: scale(.9); }
.js [data-r].on { opacity: 1; transform: none; filter: none; }

/* карточки */
.card {
  position: relative; border-radius: 20px; padding: clamp(24px, 3vw, 38px);
  background: linear-gradient(160deg, #ffffff, #fdf9f1);
  border: 1px solid rgba(184, 137, 44, .24);
  box-shadow: var(--shadow), inset 0 1px 0 #fff;
}
.card.glow { overflow: hidden; }
.card.glow::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .5s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(232, 196, 110, .2), transparent 45%);
}
.card.glow::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .5s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(200, 150, 50, .9), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.card.glow:hover::before, .card.glow:hover::after { opacity: 1; }
.js .card[data-r] { transition: opacity 1.1s var(--ease), transform .8s var(--ease), filter 1.1s var(--ease), border-color .4s, box-shadow .5s; }
.js .card.glow.on:hover { transform: translateY(-8px); border-color: rgba(184, 137, 44, .45); box-shadow: 0 40px 70px -32px rgba(110, 80, 25, .5), 0 0 40px -12px rgba(214, 170, 76, .35); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.chips.center { justify-content: center; }
.chips span { font-family: var(--f-title); font-weight: 600; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-d); padding: 8px 16px; border: 1px solid rgba(184, 137, 44, .42); border-radius: 999px; background: #fffaf0; }

/* миссия */
.mission { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.photo-frame { margin: 0; position: relative; padding: 9px; border-radius: 26px; background: conic-gradient(from var(--ang), #b8892c, #fff3c8, #c99a35, #fffaf0, #9c7424, #f3dc98, #b8892c); animation: angle 8s linear infinite; box-shadow: 0 40px 80px -36px rgba(110, 80, 25, .55); }
@keyframes angle { to { --ang: 360deg; } }
.pf-in { border-radius: 18px; overflow: hidden; position: relative; background: #f6efe1; }
.pf-in img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; transition: transform 1.4s var(--ease); }
.photo-frame:hover .pf-in img { transform: scale(1.05); }
.pf-in::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at var(--gx, 30%) var(--gy, 20%), rgba(255, 250, 235, .3), transparent 40%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.photo-frame:hover .pf-in::after { opacity: 1; }
.photo-frame figcaption { position: absolute; left: 50%; bottom: -18px; transform: translateX(-50%); white-space: nowrap; font-family: var(--f-deco); font-weight: 700; font-size: 15px; letter-spacing: .08em; color: #2a1d06; padding: 9px 26px; border-radius: 999px; background: linear-gradient(135deg, #fff3c8, #d6aa4c); box-shadow: 0 12px 30px -10px rgba(110, 80, 25, .5); }
.mission-text p { margin: 0 0 18px; }
.quote { position: relative; margin: 28px 0; padding: 22px 26px 22px 30px; font-style: italic; font-size: 1.18em; line-height: 1.6; color: var(--ink); border-left: 2px solid var(--gold); border-radius: 0 16px 16px 0; background: linear-gradient(90deg, rgba(232, 196, 110, .18), rgba(255, 255, 255, 0)); }
.q-ico { position: absolute; right: 18px; top: -16px; width: 44px; height: 36px; color: var(--gold); opacity: .3; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 26px); }
.pillars .card { text-align: center; }
.card-ico { width: 78px; height: 78px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-d); position: relative;
  background: radial-gradient(circle, #fff8e6, #fdf1d6 70%); border: 1px solid rgba(184, 137, 44, .5); box-shadow: 0 0 0 7px rgba(214, 170, 76, .08), 0 14px 30px -14px rgba(184, 137, 44, .6); transition: transform .8s var(--ease); }
.card-ico svg { width: 38px; height: 38px; }
.card:hover .card-ico { transform: rotateY(180deg); }
.card:hover .card-ico svg { transform: rotateY(180deg); }
.pillars h3, .proph h3 { margin: 0 0 12px; font-family: var(--f-title); font-weight: 700; font-size: 15px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-d); }
.pillars p, .proph p { margin: 0; color: var(--muted); font-size: .98em; }

/* история */
.history { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(36px, 5vw, 70px); align-items: start; }
.timeline { position: relative; padding-left: 46px; }
.timeline .h3 { margin-left: -46px; }
.tl-line { position: absolute; left: 11px; top: 70px; bottom: 10px; width: 2px; background: rgba(184, 137, 44, .16); border-radius: 2px; }
.tl-line i { position: absolute; inset: 0; transform-origin: top; transform: scaleY(var(--prog, 0)); background: linear-gradient(180deg, #f3dc98, #c99a35 50%, #8a6418); box-shadow: 0 0 10px rgba(214, 170, 76, .6); border-radius: 2px; }
.tl-item { position: relative; margin-bottom: 34px; }
.tl-dot { position: absolute; left: -43px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle, #fff8e0, #d6aa4c 60%, #8a6418); box-shadow: 0 0 0 4px rgba(214, 170, 76, .18), 0 0 14px rgba(214, 170, 76, .55); }
.tl-item.on .tl-dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--gold); animation: ping 2.4s ease-out infinite; }
@keyframes ping { from { transform: scale(.6); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
.tl-y { margin: 0 0 4px; font-family: var(--f-title); font-weight: 700; font-size: 14px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-d); }
.tl-t { margin: 0; color: var(--muted); }
.molay { overflow: hidden; }
.molay-q { position: absolute; right: 22px; top: 18px; width: 110px; height: 92px; color: var(--gold); opacity: .1; }
.molay-text { font-style: italic; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.45; color: var(--ink); margin: 0 0 14px; }
.molay-a { font-family: var(--f-title); font-weight: 700; letter-spacing: .2em; font-size: 13px; color: var(--gold-d); margin: 0 0 22px; }

/* пророчества */
.prophecies { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 24px); }
.proph { padding-top: 34px; }
.medal { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 20px; border-radius: 50%; font-family: var(--f-title); font-weight: 700; font-size: 17px; color: #2a1d06;
  background: radial-gradient(circle at 35% 30%, #fff8e0, #e2bd5c 45%, #a87c24); box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgba(184, 137, 44, .55), 0 12px 26px -10px rgba(110, 80, 25, .55); transition: transform .8s var(--ease); }
.proph:hover .medal { transform: rotate(360deg) scale(1.06); }
.proph p { font-style: italic; }

/* великий магистр */
.decl { max-width: 900px; text-align: center; padding: clamp(36px, 5vw, 64px) clamp(20px, 5vw, 70px); border-radius: 28px; border: 1px solid rgba(184, 137, 44, .28); position: relative; overflow: hidden;
  background: radial-gradient(ellipse at 50% 0%, rgba(240, 210, 140, .3), transparent 60%), #fff; box-shadow: 0 40px 90px -45px rgba(110, 80, 25, .5); }
.decl p { max-width: 680px; margin: 0 auto 16px; }
.decl .sec-s { margin-bottom: 26px; }
.decl-strong { color: var(--gold-d); font-weight: 700; }
.seal { position: relative; width: clamp(200px, 26vw, 280px); aspect-ratio: 1; margin: 0 auto 26px; display: grid; place-items: center; }
.seal-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 60s linear infinite; overflow: visible; }
.seal-ring text { font-family: var(--f-title); font-size: 15.5px; font-weight: 700; letter-spacing: 1px; fill: var(--gold); }
.seal .ic { width: 42%; height: 42%; animation: glowp 4s ease-in-out infinite; }
.seal-logo { width: 50%; height: auto; animation: glowp 4s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes glowp { 0%, 100% { filter: drop-shadow(0 4px 12px rgba(184, 137, 44, .35)); } 50% { filter: drop-shadow(0 4px 30px rgba(230, 185, 90, .8)); } }

/* регалии */
.gallery { --gg: clamp(14px, 1.8vw, 24px); display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gg); max-width: 1000px; }
.gallery .g-item { width: calc((100% - 2 * var(--gg)) / 3); }
.g-item { display: flex; flex-direction: column; text-decoration: none; border-radius: 18px; overflow: hidden; position: relative; cursor: zoom-in;
  background: #fff; border: 1px solid rgba(184, 137, 44, .24); box-shadow: var(--shadow); transition: transform .7s var(--ease), border-color .4s, box-shadow .5s; }
.g-item img { width: 100%; aspect-ratio: 4 / 5; object-fit: contain; padding: 7%; background: #fff; transition: transform 1.2s var(--ease); }
.g-item:not(.g-wide) img { mix-blend-mode: multiply; } /* белый фон картинок растворяется в карточке */
.gallery .g-wide { width: 100%; }
.g-wide img { aspect-ratio: 3 / 2; height: auto; object-fit: cover; padding: 0; }
.g-cap { display: block; padding: 14px 16px 16px; border-top: 1px solid rgba(184, 137, 44, .18); }
.g-cap b { display: block; font-family: var(--f-title); font-weight: 700; font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-d); }
.g-cap small { display: block; margin-top: 4px; font-style: italic; font-size: 15px; line-height: 1.4; color: var(--muted); }
.js .g-item[data-r] { transition: opacity 1.1s var(--ease), transform .8s var(--ease), filter 1.1s var(--ease), border-color .4s, box-shadow .5s; }
.g-item.on:hover { transform: translateY(-6px); border-color: rgba(184, 137, 44, .5); box-shadow: 0 34px 60px -28px rgba(110, 80, 25, .55); }
.g-item:hover img { transform: scale(1.05); }

.lightbox { position: fixed; inset: 0; z-index: 950; display: grid; place-items: center; padding: 70px 16px 30px; background: rgba(255, 255, 255, .95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transition: opacity .4s; }
.lightbox.open { opacity: 1; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; text-align: center; max-width: 100%; }
.lightbox img { max-width: min(92vw, 1100px); max-height: 78vh; width: auto; height: auto; margin: 0 auto; border-radius: 12px; box-shadow: 0 30px 80px -20px rgba(110, 80, 25, .45); transition: opacity .3s; }
.lightbox figcaption { margin-top: 16px; font-family: var(--f-title); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; font-size: 13px; color: var(--gold-d); }
.lightbox figcaption small { display: block; margin-top: 4px; font-family: var(--f-body); font-style: italic; text-transform: none; letter-spacing: 0; font-size: 16px; font-weight: 500; color: var(--muted); }
.lightbox button { position: absolute; width: 50px; height: 50px; border-radius: 50%; border: 1px solid rgba(184, 137, 44, .5); background: #fff; color: var(--gold-d); cursor: pointer; display: grid; place-items: center; box-shadow: 0 10px 24px -10px rgba(110, 80, 25, .4); transition: background .3s, transform .3s; }
.lightbox button:hover { background: #fdf3dc; transform: scale(1.06); }
.lightbox button svg { width: 22px; height: 22px; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; margin-top: -25px; }
.lb-next { right: 16px; top: 50%; margin-top: -25px; }
@media (max-width: 640px) { .lb-nav { top: auto !important; bottom: 18px; margin: 0 !important; } .lb-prev { left: calc(50% - 64px); } .lb-next { right: calc(50% - 64px); } }

/* священное послание */
.sec-fire { overflow: hidden; background: radial-gradient(ellipse 60% 55% at 28% 55%, rgba(250, 190, 110, .2), transparent 70%), linear-gradient(180deg, #fff, #fdf6ea 50%, #fff); }
.embers { position: absolute; inset: 0; max-width: none; pointer-events: none; }
.embers span { position: absolute; bottom: -10px; width: var(--s); height: var(--s); border-radius: 50%; background: #f2b84b; box-shadow: 0 0 6px 1px rgba(240, 160, 60, .6); opacity: 0;
  animation: ember var(--t) linear infinite var(--dl); animation-play-state: paused; }
.sec-fire.live .embers span { animation-play-state: running; }
@keyframes ember { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: .9; } 100% { transform: translate(var(--dx), -85vh); opacity: 0; } }
.sacred { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(36px, 5vw, 70px); align-items: center; position: relative; }
.scroll-frame { margin: 0; position: relative; }
.scroll-frame img { position: relative; width: 100%; height: auto; filter: drop-shadow(0 26px 40px rgba(110, 80, 25, .35)); }
.fire-glow { position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 190, 100, .6), rgba(240, 140, 60, .22) 45%, transparent 70%); filter: blur(30px); animation: flicker 3.2s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { opacity: .75; transform: scale(1); } 23% { opacity: 1; transform: scale(1.06); } 41% { opacity: .65; transform: scale(.97); } 67% { opacity: .95; transform: scale(1.03); } }
.sacred-text p { margin: 0 0 6px; font-size: 1.08em; line-height: 1.65; }
.sacred-text .line:nth-child(4), .sacred-text .line:nth-child(5) { color: var(--ink); font-style: italic; font-weight: 600; }
.sacred-text .glory { margin-top: 18px; font-family: var(--f-title); font-weight: 700; font-size: clamp(17px, 1.7vw, 22px); letter-spacing: .14em; text-transform: uppercase; }
.sacred-text .glory + .glory { margin-top: 4px; }
.js .sacred-text p { opacity: 0; transform: translateY(14px); filter: blur(5px); transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease); transition-delay: calc(var(--k) * 110ms); }
.js .sacred-text.on p { opacity: 1; transform: none; filter: none; }

/* паладин */
.paladin { display: grid; grid-template-columns: auto 1fr; gap: clamp(26px, 4vw, 54px); align-items: center; max-width: 980px; }
.pal-photo { position: relative; width: clamp(170px, 20vw, 240px); aspect-ratio: 1; border-radius: 50%; padding: 6px; background: conic-gradient(from var(--ang), #b8892c, #fff3c8, #c99a35, #fffaf0, #9c7424, #f3dc98, #b8892c); animation: angle 7s linear infinite; box-shadow: 0 20px 40px -18px rgba(110, 80, 25, .55); }
.pal-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 4px solid #fff; }
.pal-role { font-family: var(--f-title); font-weight: 700; font-size: 12.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-d); margin: -8px 0 16px; }
.pal-text p { margin: 0 0 14px; }
.pal-motto { font-style: italic; color: var(--ink); border-left: 2px solid var(--gold); padding-left: 16px; }

/* форма */
.form-card { max-width: 680px; }
.form-card .sec-s { text-align: center; margin: -8px 0 28px; letter-spacing: .2em; }
.fld { position: relative; margin-bottom: 16px; }
.fld input, .fld textarea {
  width: 100%; font: inherit; font-size: 18px; color: var(--ink); padding: 26px 18px 10px; border-radius: 14px; outline: none; resize: vertical;
  background: #fff; border: 1px solid rgba(184, 137, 44, .3); transition: border-color .3s, box-shadow .3s; -webkit-appearance: none;
}
.fld textarea { min-height: 150px; }
.fld label { position: absolute; left: 19px; top: 18px; font-family: var(--f-title); font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); pointer-events: none; transition: top .3s var(--ease), font-size .3s var(--ease), color .3s; }
.fld input:focus, .fld textarea:focus { border-color: rgba(184, 137, 44, .8); box-shadow: 0 0 0 4px rgba(214, 170, 76, .14); }
.fld input:focus + label, .fld textarea:focus + label, .fld input:not(:placeholder-shown) + label, .fld textarea:not(:placeholder-shown) + label { top: 8px; font-size: 10px; color: var(--gold); }
.fld.bad input { border-color: rgba(200, 70, 70, .8); animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.hp { position: absolute; left: -9999px; top: -9999px; }
.btn-gold {
  position: relative; overflow: hidden; width: 100%; margin-top: 6px; padding: 18px 26px; border: 0; border-radius: 999px; cursor: pointer;
  font-family: var(--f-title); font-weight: 700; font-size: 13px; letter-spacing: .26em; text-transform: uppercase; color: #2a1d06;
  background: linear-gradient(135deg, #fff3c4, #e2bd5c 40%, #c0923a 75%, #f3d98a); box-shadow: 0 14px 34px -14px rgba(184, 137, 44, .8);
  transition: transform .35s var(--ease), box-shadow .35s, filter .3s;
}
.btn-gold::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -50%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent); animation: sweep 4s ease-in-out infinite; }
.btn-gold:hover { transform: translateY(-3px); box-shadow: 0 22px 44px -14px rgba(184, 137, 44, .9); }
.btn-gold:disabled { filter: grayscale(.4) brightness(.9); cursor: wait; }
.toast { border-radius: 14px; padding: 14px 18px; margin: 0 0 18px; font-size: 17px; line-height: 1.5; animation: toast .6s var(--ease); }
.toast ul { margin: 6px 0 0; padding-left: 20px; }
.toast.ok { border: 1px solid rgba(70, 150, 95, .4); background: rgba(80, 170, 110, .09); color: #2d6a3e; }
.toast.bad { border: 1px solid rgba(200, 80, 80, .4); background: rgba(200, 80, 80, .07); color: #8f2f2f; }
@keyframes toast { from { opacity: 0; transform: translateY(-10px); } }
.direct { margin-top: 26px; padding-top: 20px; border-top: 1px solid rgba(184, 137, 44, .2); text-align: center; }
.direct p { margin: 0 0 6px; font-family: var(--f-title); font-weight: 600; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.direct a { color: var(--gold-d); text-decoration: none; border-bottom: 1px dashed rgba(184, 137, 44, .55); font-size: 17px; font-weight: 600; word-break: break-word; }
.direct a:hover { color: var(--ink); }

/* подвал */
.ftr { text-align: center; padding: 70px 20px 50px; border-top: 1px solid var(--gold-line); background: linear-gradient(180deg, #fff, #faf4e7); }
.ftr-logo { height: 88px; width: auto; margin: 0 auto 16px; filter: drop-shadow(0 4px 12px rgba(184, 137, 44, .35)); }
.ftr .ic { width: 52px; height: 52px; margin: 0 auto 14px; filter: drop-shadow(0 4px 12px rgba(184, 137, 44, .4)); }
.ftr-name { font-family: var(--f-deco); font-weight: 700; font-size: clamp(16px, 2vw, 22px); margin: 0 0 16px; }
.ftr-copy { margin: 0; font-family: var(--f-title); font-weight: 600; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }

.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 90; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-d);
  background: rgba(255, 255, 255, .9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 10px 26px -10px rgba(110, 80, 25, .45);
  opacity: 0; transform: translateY(20px) scale(.8); pointer-events: none; transition: opacity .5s, transform .5s var(--ease); }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.tt-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.tt-ring circle { fill: none; stroke: var(--gold); stroke-width: 2; stroke-dasharray: 132; stroke-dashoffset: var(--off, 132); stroke-linecap: round; }
.tt-ico { width: 22px; height: 22px; }

/* язык меняется плавно */
[data-i] { transition: opacity .25s ease; }
.lang-fade [data-i], .lang-fade .sacred-text { opacity: 0 !important; }

/* ===================== адаптив ===================== */
@media (max-width: 1000px) {
  .prophecies { grid-template-columns: 1fr 1fr; }
  .history { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .mission, .sacred { grid-template-columns: 1fr; }
  .photo-frame { max-width: 460px; margin: 0 auto 20px; }
  .scroll-frame { max-width: 520px; margin: 0 auto; }
  .pillars { grid-template-columns: 1fr; }
  .paladin { grid-template-columns: 1fr; text-align: center; }
  .pal-photo { margin: 0 auto; }
  .pal-motto { border-left: 0; padding-left: 0; }
  .gallery .g-item { width: calc((100% - var(--gg)) / 2); }
  .gallery .g-wide { width: 100%; }
}
@media (max-width: 640px) {
  .prophecies { grid-template-columns: 1fr; }
  .g-cap small { font-size: 13.5px; }
  .g-cap b { font-size: 11px; letter-spacing: .12em; }
  .ribbon span { font-size: 11px; }
  .js [data-r="left"], .js [data-r="right"] { transform: translateY(40px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; scroll-behavior: auto !important; }
  .js [data-r], .js .sacred-text p { opacity: 1; transform: none; filter: none; }
}

/* телефоны: без тяжёлых фильтров на больших движущихся слоях — экономим память (iPhone) */
@media (max-width: 820px), (pointer: coarse) {
  .hero-portrait { filter: none; will-change: auto; }
  .hb-img { animation: none; filter: drop-shadow(0 10px 18px rgba(80, 55, 15, .3)); }
  .dove { filter: none; }
  .planet { will-change: auto; }
  .hero-rays { animation-duration: 300s; }
  .clouds span { filter: none; animation: none; }
  .hero-side::before { background: radial-gradient(closest-side, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0)); }
}
