/* Лендинг диакона Сергия Лопухова: два света — свеча и экран. Тёмные сцены для первого экрана, работ и связи, бумага богослужебной книги для рассказа и услуг. */

:root {
  --night: #0c0a08;
  --night-2: #16120e;
  --night-3: #221b15;
  --cream: #f2e8d6;
  --cream-dim: #b8ab96;
  --line-dark: rgba(242, 232, 214, .12);
  --gold: #e2b25c;
  --gold-soft: #f0cf8e;
  --cinnabar: #e25a3e;       /* киноварь на тёмном */
  --cinnabar-ink: #ad2f1b;   /* киноварь на бумаге */
  --paper: #f3ecdf;
  --paper-2: #eae0cd;
  --ink: #1b1510;
  --ink-2: #5a4d3e;
  --line-paper: rgba(27, 21, 16, .14);
  --glass: rgba(22, 18, 14, .55);

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: hidden; background: var(--night); color: var(--cream); font: 400 1.0625rem/1.65 var(--sans); font-feature-settings: "kern", "liga"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }

::selection { background: var(--gold); color: var(--night); }
.about ::selection, .services ::selection, .cs-task ::selection, .cs-report ::selection { background: var(--cinnabar-ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.about :focus-visible, .services :focus-visible, .cs-task :focus-visible, .cs-report :focus-visible { outline-color: var(--cinnabar-ink); }
html { scrollbar-color: #4a3d30 var(--night); }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--gold); color: var(--night); font-weight: 700; text-decoration: none; transform: translateY(-160%); transition: transform .3s var(--ease); }
.skip:focus { transform: none; }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

/* Film grain over the whole page, so flat darks feel like a photograph. */
body::after { position: fixed; inset: 0; z-index: 90; pointer-events: none; content: ""; opacity: .07; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- Navigation ---------- */
.nav { position: fixed; top: 0; right: 0; left: 0; z-index: 50; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 24px; padding: 16px var(--gutter); transition: background-color .4s var(--ease), padding .4s var(--ease), backdrop-filter .4s; }
.nav.is-solid { padding-top: 10px; padding-bottom: 10px; background: rgba(12, 10, 8, .78); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 1px 0 var(--line-dark); }
.nav__logo { display: inline-flex; align-items: center; justify-self: start; gap: 10px; font: italic 500 1.5rem/1 var(--serif); letter-spacing: .01em; text-decoration: none; }
.nav__logo svg { width: 28px; height: 28px; fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--ease); }
.nav__logo .nav__cross { fill: var(--cinnabar); stroke: none; }
.nav__logo .nav__br { transition: transform .5s var(--ease); }
.nav__logo:hover .nav__br--l { transform: translateX(-1.5px); }
.nav__logo:hover .nav__br--r { transform: translateX(1.5px); }
/* Section links sit in a glass capsule; a gold pill slides to the hovered or the current section. */
.nav__links { position: relative; display: flex; gap: 2px; padding: 5px; border: 1px solid var(--line-dark); border-radius: 999px; background: var(--glass); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: inset 0 1px 0 rgba(242, 232, 214, .06), 0 14px 34px -20px rgba(0, 0, 0, .9); }
.nav__links a { position: relative; z-index: 1; display: inline-flex; align-items: center; padding: 9px 18px; border-radius: 999px; color: var(--cream-dim); font-size: .92rem; font-weight: 500; text-decoration: none; transition: color .3s; }
.nav__links a:hover, .nav__links a.is-active { color: var(--cream); }
.nav__pill { position: absolute; top: 5px; bottom: 5px; left: 0; width: var(--w, 0); border-radius: 999px; background: linear-gradient(180deg, rgba(226, 178, 92, .18), rgba(226, 178, 92, .06)); box-shadow: inset 0 0 0 1px rgba(226, 178, 92, .34), 0 8px 20px -10px rgba(226, 178, 92, .5); opacity: 0; transform: translateX(var(--x, 0)); transition: transform .55s var(--ease), width .55s var(--ease), opacity .3s; }
.nav__links.has-pill .nav__pill { opacity: 1; }
.nav__end { display: flex; align-items: center; justify-self: end; gap: 10px; }
.nav__gh { display: inline-flex; align-items: center; height: 44px; padding: 0 11px; border: 1px solid var(--line-dark); border-radius: 999px; background: var(--glass); color: var(--cream); font: 400 .8rem/1 var(--mono); text-decoration: none; transition: border-color .3s, color .3s; }
.nav__gh svg { flex: none; width: 20px; height: 20px; fill: currentColor; transition: transform .5s var(--ease); }
.nav__gh-label { display: inline-block; max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; transition: max-width .6s var(--ease), margin .6s var(--ease), opacity .3s; }
.nav__gh-label span { color: var(--cream-dim); }
.nav__gh:hover, .nav__gh:focus-visible { border-color: rgba(226, 178, 92, .5); color: var(--gold-soft); }
.nav__gh:hover svg { transform: rotate(-8deg) scale(1.06); }
.nav__cta { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px 0 20px; overflow: hidden; border: 1px solid rgba(226, 178, 92, .5); border-radius: 999px; color: var(--gold-soft); font-size: .9rem; font-weight: 600; text-decoration: none; isolation: isolate; transition: color .4s var(--ease), border-color .4s; }
.nav__cta::before { position: absolute; inset: 0; z-index: -1; content: ""; border-radius: inherit; background: var(--gold); transform: translateY(101%); transition: transform .45s var(--ease); }
.nav__cta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .45s var(--ease); }
.nav__cta:hover { border-color: var(--gold); color: var(--night); }
.nav__cta:hover::before { transform: none; }
.nav__cta:hover svg { transform: translateX(3px); }
.nav__burger { position: relative; display: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-dark); border-radius: 50%; background: var(--glass); color: var(--cream); cursor: pointer; }
.nav__burger i { position: absolute; right: 13px; left: 13px; height: 1.5px; border-radius: 2px; background: currentColor; transition: transform .45s var(--ease); }
.nav__burger i:first-of-type { top: 18px; }
.nav__burger i:last-of-type { top: 24px; }
.nav__burger[aria-expanded="true"] i:first-of-type { transform: translateY(3px) rotate(45deg); }
.nav__burger[aria-expanded="true"] i:last-of-type { transform: translateY(-3px) rotate(-45deg); }

/* Phone menu: a full-screen night page with large serif links. */
.sheet { position: fixed; inset: 0; z-index: 45; display: none; flex-direction: column; justify-content: space-between; gap: 40px; padding: 108px var(--gutter) calc(32px + env(safe-area-inset-bottom)); overflow-y: auto; background: radial-gradient(120% 60% at 100% 0%, rgba(226, 178, 92, .12), transparent 60%), var(--night); opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility 0s .4s; }
.sheet.is-open { opacity: 1; visibility: visible; transition: opacity .4s var(--ease); }
.sheet__links a { display: flex; padding: 14px 0; border-bottom: 1px solid var(--line-dark); color: var(--cream); font: italic 400 clamp(2.4rem, 11vw, 3.6rem)/1.05 var(--serif); text-decoration: none; opacity: 0; transform: translateY(24px); transition: opacity .5s var(--ease), transform .7s var(--ease), color .3s; }
.sheet__links a:hover { color: var(--gold-soft); }
.sheet.is-open .sheet__links a { opacity: 1; transform: none; }
.sheet.is-open .sheet__links a:nth-child(2) { transition-delay: .06s; }
.sheet.is-open .sheet__links a:nth-child(3) { transition-delay: .12s; }
.sheet.is-open .sheet__links a:nth-child(4) { transition-delay: .18s; }
.sheet__foot { display: flex; flex-direction: column; gap: 10px; font: 400 .85rem/1.4 var(--mono); }
.sheet__foot a { color: var(--gold-soft); text-decoration: none; }
.is-locked, .is-locked body { overflow: hidden; }

/* ---------- Hero ---------- */
.hero { --s: calc(var(--split) * 1%); position: relative; display: grid; grid-template-rows: 1fr auto; min-height: 100svh; padding: 110px var(--gutter) 48px; overflow: hidden; isolation: isolate; }
.hero__glow { position: absolute; top: 10%; z-index: -1; width: 70vw; height: 90%; border-radius: 50%; filter: blur(60px); pointer-events: none; transition: opacity .2s linear; }
.hero__glow--screen { left: -20vw; background: radial-gradient(closest-side, rgba(110, 150, 220, .26), transparent); opacity: calc(.35 + var(--split) / 100); }
.hero__glow--candle { right: -20vw; background: radial-gradient(closest-side, rgba(226, 150, 60, .3), transparent); opacity: calc(.35 + (100 - var(--split)) / 100); animation: flicker 5s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.03) translateX(-6px); } 55% { transform: scale(.98); } 75% { transform: scale(1.02) translateX(4px); } }

.hero__stage { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: clamp(56px, 6.5vw, 104px); width: 100%; max-width: 1400px; margin: 0 auto; }
.hero__side { display: grid; gap: 18px; transition: opacity .3s linear, filter .3s linear; }
.hero__side--dev { justify-items: end; text-align: right; opacity: calc(.35 + var(--split) / 80); }
.hero__side--deacon { justify-items: start; opacity: calc(.35 + (100 - var(--split)) / 80); }
.hero__name { font-size: clamp(2.6rem, 5.4vw, 5.6rem); line-height: .95; }
.hero__name--dev { color: #e9eef8; font-family: var(--sans); font-weight: 700; letter-spacing: -.045em; }
.hero__name--deacon { color: var(--cream); font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.02em; }
.rubric { color: var(--cinnabar); }
.hero__role { max-width: 22ch; font-size: .95rem; line-height: 1.5; }
.hero__role--dev { max-width: none; color: var(--cream-dim); letter-spacing: .01em; }
.hero__role--deacon { max-width: none; color: var(--gold-soft); font-family: var(--serif); font-size: 1.2rem; font-style: italic; }

/* Portrait: the dev photo underneath, the deacon photo clipped from the split to the right edge. */
.portrait { position: relative; width: clamp(280px, 34vw, 540px); aspect-ratio: 1; touch-action: pan-y; }
/* The ring stays still and quiet so the split border is the only thing that moves. */
.portrait__ring { position: absolute; inset: -9%; width: 118%; max-width: none; height: 118%; pointer-events: none; }
.portrait__ring text { fill: var(--cream-dim); font: 500 12px var(--sans); letter-spacing: .2em; text-transform: uppercase; opacity: .32; }
.portrait__frame { position: absolute; inset: 0; overflow: hidden; border-radius: 50%; background: #000; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(242, 232, 214, .08); cursor: ew-resize; clip-path: circle(50% at 50% 50%); }
.portrait__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.portrait__img--dev { transform: scale(1.02); }
.portrait__img--deacon { clip-path: inset(0 0 0 var(--s)); }
.portrait__line { position: absolute; top: 0; bottom: 0; left: var(--s); width: 2px; margin-left: -1px; background: linear-gradient(transparent, var(--cream) 18%, var(--cream) 82%, transparent); box-shadow: 0 0 18px rgba(242, 232, 214, .6); pointer-events: none; }
.portrait__knob { position: absolute; top: 50%; left: 50%; display: grid; width: 52px; height: 52px; place-items: center; border-radius: 50%; background: var(--cream); color: var(--night); box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .8); transform: translate(-50%, -50%); transition: transform .3s var(--ease); }
.portrait__knob svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.portrait.is-dragging .portrait__knob { transform: translate(-50%, -50%) scale(.88); }
.portrait__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; pointer-events: none; }
.portrait__range:focus-visible + .portrait__hint { color: var(--gold); }
.portrait:has(.portrait__range:focus-visible) .portrait__knob { box-shadow: 0 0 0 3px var(--night), 0 0 0 5px var(--gold); }
.portrait__hint { position: absolute; bottom: -18%; left: 50%; color: var(--cream-dim); font: 500 .72rem/1 var(--sans); letter-spacing: .28em; text-transform: uppercase; white-space: nowrap; transform: translateX(-50%); transition: opacity .6s, color .3s; }
.portrait.is-touched .portrait__hint { opacity: 0; }

.hero__foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; width: 100%; max-width: 1400px; margin: clamp(80px, 11vh, 120px) auto 0; padding-top: 28px; border-top: 1px solid var(--line-dark); }
.hero__lead { max-width: 58ch; color: var(--cream-dim); font-size: clamp(1rem, 1.3vw, 1.15rem); text-wrap: pretty; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 999px; font-weight: 600; text-decoration: none; transition: background-color .3s, color .3s, border-color .3s, transform .3s var(--ease); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn--gold { background: var(--gold); color: var(--night); box-shadow: 0 14px 30px -14px rgba(226, 178, 92, .7); }
.btn--gold:hover { background: var(--gold-soft); }
.btn--ghost { border: 1px solid var(--line-dark); color: var(--cream); }
.btn--ghost:hover { border-color: var(--cream-dim); }

/* Intro: the portrait opens from a thin line, the split slides into place, the names come out of the dark. */
.js .hero .portrait__frame { animation: open 1.4s var(--ease) .15s both; }
.js .hero .portrait__ring { animation: ringin 1.6s var(--ease) .5s both; }
.js .hero__side { animation: rise 1.2s var(--ease) both; }
.js .hero__side--dev { animation-delay: .7s; }
.js .hero__side--deacon { animation-delay: .85s; }
.js .hero__foot { animation: rise 1.2s var(--ease) 1.05s both; }
@keyframes open { from { clip-path: circle(0 at 50% 50%); } to { clip-path: circle(50% at 50% 50%); } }
@keyframes ringin { from { opacity: 0; transform: rotate(-40deg) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; filter: blur(8px); transform: translateY(24px); } to { filter: none; transform: none; } }

/* ---------- Facts: a still line of trust under the hero ---------- */
.facts { padding: clamp(22px, 2.6vw, 30px) 0; border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); background: var(--night-2); }
.facts__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.facts__list li { display: flex; align-items: center; justify-content: center; padding: 4px clamp(20px, 3vw, 44px); color: var(--cream); font: italic 400 clamp(1.1rem, 1.5vw, 1.35rem)/1.3 var(--serif); text-align: center; text-wrap: balance; }
.facts__list li + li { border-left: 1px solid var(--line-dark); }

/* ---------- Section heads ---------- */
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 24px 64px; margin-bottom: clamp(56px, 8vw, 104px); }
.h2 { font: 400 clamp(3rem, 7vw, 6rem)/.92 var(--serif); letter-spacing: -.03em; text-wrap: balance; }
.h2 em { color: var(--cinnabar-ink); font-style: italic; }
.section-head__text { max-width: 44ch; color: var(--cream-dim); text-wrap: pretty; }
.section-head--paper .section-head__text { color: var(--ink-2); }

/* ---------- Works ---------- */
.works { padding: clamp(96px, 12vw, 168px) 0 clamp(64px, 8vw, 120px); background: var(--night); }
.case { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: center; gap: clamp(40px, 6vw, 96px); }
.case + .case { margin-top: clamp(96px, 12vw, 180px); }
.case--flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); }
.case--flip .case__media { order: 2; }
.case__media { position: relative; padding-bottom: 8%; }

.browser { overflow: hidden; border-radius: 14px; background: var(--night-3); box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .95), 0 0 0 1px rgba(242, 232, 214, .1); transition: transform .8s var(--ease); }
.browser__bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-bottom: 1px solid rgba(242, 232, 214, .07); }
.browser__bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(242, 232, 214, .16); }
.browser__bar span { margin: 0 auto; padding: 4px 22px; border-radius: 999px; background: rgba(242, 232, 214, .06); color: var(--cream-dim); font: 400 .72rem/1.4 var(--mono); transform: translateX(-17px); }
.browser__screen { position: relative; overflow: hidden; aspect-ratio: 16 / 10; container-type: inline-size; background: #fff; }
.browser__screen img { position: absolute; top: 0; left: 0; width: 100%; height: auto; transition: transform 7s cubic-bezier(.45, 0, .25, 1); }

.phone { position: absolute; right: -3%; bottom: 0; width: 26%; padding: 7px; border-radius: 30px; background: #0a0806; box-shadow: 0 40px 70px -24px rgba(0, 0, 0, .95), 0 0 0 1px rgba(242, 232, 214, .16); transition: transform .8s var(--ease); }
.case--flip .phone { right: auto; left: -3%; }
.phone::before { position: absolute; top: 13px; left: 50%; z-index: 2; width: 30%; height: 9px; border-radius: 99px; content: ""; background: #0a0806; transform: translateX(-50%); }
.phone__screen { position: relative; overflow: hidden; aspect-ratio: 9 / 19.5; border-radius: 23px; container-type: inline-size; background: #fff; }
.phone__screen img { position: absolute; top: 0; left: 0; width: 100%; height: auto; transition: transform 6s cubic-bezier(.45, 0, .25, 1); }

/* Screens scroll through the page: image height minus visible height, in container widths. */
.case__media:hover .browser__screen img, .case.is-playing .browser__screen img { transform: translateY(-187.5cqw); }
.case__media:hover .phone__screen img, .case.is-playing .phone__screen img { transform: translateY(-219cqw); }
.case__media:hover .browser { transform: translateY(-6px); }
.case__media:hover .phone { transform: translateY(-14px) rotate(-1.5deg); }
.case--flip .case__media:hover .phone { transform: translateY(-14px) rotate(1.5deg); }

.case__title { font: 400 clamp(2.4rem, 4.4vw, 3.8rem)/1 var(--serif); letter-spacing: -.02em; text-wrap: balance; }
.case__tags { margin-top: 14px; color: var(--gold); font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.case__text { max-width: 46ch; margin-top: 22px; color: var(--cream-dim); text-wrap: pretty; }
.case__list { display: grid; gap: 10px; margin-top: 24px; }
.case__list li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 12px; font-size: .95rem; line-height: 1.5; }
.case__list li::before { width: 6px; height: 6px; margin-top: .6em; content: ""; background: var(--cinnabar); transform: rotate(45deg); }
.case__link { display: inline-flex; align-items: center; gap: 8px; margin-top: 30px; padding-bottom: 4px; border-bottom: 1px solid rgba(226, 178, 92, .45); color: var(--gold-soft); font: 400 .92rem/1.2 var(--mono); text-decoration: none; transition: border-color .3s, gap .3s var(--ease); }
.case__link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.case__link:hover { gap: 12px; border-color: var(--gold); }
.case__links { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 30px; }
.case__links .case__link { margin-top: 0; }
.case__more { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border: 1px solid rgba(226, 178, 92, .55); border-radius: 999px; color: var(--gold-soft); font-size: .92rem; font-weight: 600; text-decoration: none; transition: border-color .3s, background-color .3s, gap .35s var(--ease); }
.case__more svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.case__more:hover { gap: 14px; border-color: var(--gold); background: rgba(226, 178, 92, .08); }
.case__film { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 20px 6px 6px; border: 1px solid var(--line-dark); border-radius: 999px; color: var(--cream); font-size: .92rem; font-weight: 600; text-decoration: none; transition: border-color .3s, background-color .3s; }
.case__film i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--gold); box-shadow: 0 10px 24px -10px rgba(226, 178, 92, .8); transition: transform .35s var(--ease), background-color .3s; }
.case__film svg { width: 16px; height: 16px; margin-left: 2px; fill: var(--night); }
.case__film span { color: var(--cream-dim); font: 400 .8rem/1 var(--mono); }
.case__film:hover { border-color: rgba(226, 178, 92, .45); background: rgba(226, 178, 92, .06); }
.case__film:hover i { background: var(--gold-soft); transform: scale(1.08); }

/* Case film: a native modal dialog; the video is fetched only once it opens. */
.film { width: min(1120px, calc(100vw - var(--gutter) * 2), calc((100dvh - 150px) * 16 / 9)); max-width: none; max-height: none; margin: auto; padding: 0; overflow: visible; border: 0; background: transparent; color: var(--cream); }
.film::backdrop { background: rgba(12, 10, 8, .88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.film[open] { animation: film-in .5s var(--ease); }
.film__frame { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px; background: var(--night-2); box-shadow: 0 0 0 1px var(--line-dark), 0 40px 120px -30px rgba(0, 0, 0, .9); }
.film video { display: block; width: 100%; height: 100%; }
.film form { position: absolute; right: 0; bottom: calc(100% + 12px); }
.film__close, .brief .film__close { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-dark); border-radius: 50%; background: var(--glass); color: var(--cream); cursor: pointer; transition: border-color .3s, transform .35s var(--ease); }
.film__close:hover { border-color: var(--gold); transform: rotate(90deg); }
.film__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* Brief: the questionnaire dialog; api/send.php stores the lead and forwards it to Telegram. */
.brief { width: min(680px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: clamp(28px, 5vw, 48px); overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line-dark); border-radius: 22px; background: radial-gradient(120% 70% at 100% 0%, rgba(226, 178, 92, .12), transparent 60%), var(--night-2); color: var(--cream); box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .9); }
.brief::backdrop { background: rgba(12, 10, 8, .8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.brief[open] { animation: film-in .5s var(--ease); }
.brief__form { display: grid; gap: 24px; }
.brief__form[hidden] { display: none; }
.brief__kicker { color: var(--gold); font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.brief__title { margin-top: 12px; padding-right: 48px; font: 400 clamp(2.2rem, 5vw, 3.2rem)/1 var(--serif); letter-spacing: -.02em; }
.brief__title em { color: var(--gold); font-style: italic; }
.brief__lead { max-width: 46ch; margin-top: 14px; color: var(--cream-dim); font-size: .95rem; text-wrap: pretty; }
.brief__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 8px; }
.field > span, .chips legend { color: var(--cream-dim); font-size: .82rem; font-weight: 600; }
.field i { color: rgba(184, 171, 150, .6); font-style: normal; font-weight: 400; }
.field input, .field textarea { width: 100%; min-height: 50px; padding: 12px 16px; border: 1px solid var(--line-dark); border-radius: 14px; background: rgba(242, 232, 214, .04); color: var(--cream); font: inherit; font-size: 1rem; transition: border-color .3s, background-color .3s, box-shadow .3s; }
.field textarea { min-height: 96px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: rgba(184, 171, 150, .45); }
.field input:focus, .field textarea:focus { border-color: var(--gold); outline: none; background: rgba(242, 232, 214, .07); box-shadow: 0 0 0 3px rgba(226, 178, 92, .16); }
.field input:user-invalid { border-color: var(--cinnabar); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.chips legend { margin-bottom: 10px; padding: 0; }
.chips label { position: relative; }
.chips input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.chips span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line-dark); border-radius: 999px; font-size: .9rem; transition: border-color .3s, background-color .3s, color .3s; }
.chips label:hover span { border-color: var(--cream-dim); }
.chips input:checked + span { border-color: var(--gold); background: rgba(226, 178, 92, .14); color: var(--gold-soft); }
.chips input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.consent { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: start; gap: 12px; color: var(--cream); font-size: .92rem; line-height: 1.45; cursor: pointer; }
.consent input { display: grid; place-items: center; width: 22px; height: 22px; margin: 0; border: 1px solid rgba(242, 232, 214, .32); border-radius: 6px; background: transparent; cursor: pointer; appearance: none; -webkit-appearance: none; transition: background-color .2s, border-color .2s; }
.consent input::after { width: 11px; height: 6px; content: ""; border-bottom: 2px solid var(--night); border-left: 2px solid var(--night); transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform .2s var(--ease); }
.consent input:checked { border-color: var(--gold); background: var(--gold); }
.consent input:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
.consent input:user-invalid { border-color: var(--cinnabar); }
.consent a, .brief__note a, .brief__status a { color: var(--gold-soft); }
.brief__note { margin-top: -12px; padding-left: 34px; color: rgba(184, 171, 150, .8); font-size: .82rem; }
.brief__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.brief__submit { border: 0; cursor: pointer; }
.brief__submit[disabled] { cursor: progress; opacity: .6; }
.brief__status { color: var(--cream-dim); font-size: .88rem; }
.brief__status.is-error { color: var(--cinnabar); }
.brief__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.brief__x { position: absolute; top: 16px; right: 16px; }
.brief__done { display: grid; justify-items: center; gap: 4px; padding: 28px 0 8px; text-align: center; }
.brief__done[hidden] { display: none; }
.brief__done .btn { margin-top: 24px; cursor: pointer; background: none; }
.brief__check { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 18px 40px -16px rgba(226, 178, 92, .8); }
.brief__check svg { width: 30px; height: 30px; fill: none; stroke: var(--night); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.brief__done .brief__title { padding-right: 0; }

@keyframes film-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }

/* ---------- About: paper ---------- */
.about, .services { background: var(--paper); color: var(--ink); }
.about { position: relative; padding: clamp(96px, 12vw, 168px) 0 clamp(72px, 9vw, 128px); }
.about__title { max-width: 16ch; margin-bottom: clamp(56px, 7vw, 96px); }
.about__pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; gap: clamp(24px, 3vw, 40px); }

.folio { position: relative; padding: clamp(28px, 4vw, 56px); border: 1px solid var(--line-paper); border-radius: 4px; background: #f8f2e6; box-shadow: 0 30px 60px -40px rgba(60, 40, 20, .45); }
.folio::before { position: absolute; inset: 8px; border: 1px solid rgba(173, 47, 27, .28); border-radius: 2px; content: ""; pointer-events: none; }
.folio__rubric { color: var(--cinnabar-ink); font: italic 500 1.05rem/1.2 var(--serif); letter-spacing: .06em; }
.folio__text { margin-top: 18px; font: 400 clamp(1.2rem, 1.6vw, 1.42rem)/1.5 var(--serif); text-wrap: pretty; hyphens: auto; }
.folio__text + .folio__text { color: var(--ink-2); }
.initial { float: left; margin: .06em .08em -.05em 0; color: var(--cinnabar-ink); font: 500 4.6em/.82 var(--serif); }
.folio__orn { width: 120px; margin: 28px auto 0; fill: var(--cinnabar-ink); stroke: var(--cinnabar-ink); stroke-width: 1; }

/* Spec: the dark pair to the paper folio, a calm typographic sheet of what the work stands on. */
.spec { position: relative; display: flex; flex-direction: column; padding: clamp(28px, 4vw, 56px); border-radius: 4px; background: var(--ink); color: var(--cream); box-shadow: 0 40px 80px -40px rgba(27, 21, 16, .7); }
.spec::before { position: absolute; inset: 8px; border: 1px solid rgba(226, 178, 92, .22); border-radius: 2px; content: ""; pointer-events: none; }
.spec ::selection { background: var(--gold); color: var(--night); }
.spec__rubric { color: var(--gold); font: italic 500 1.05rem/1.2 var(--serif); letter-spacing: .06em; }
.spec__list { flex: 1; margin: 6px 0 0; }
.spec__item { display: grid; gap: 8px; padding: clamp(18px, 2.2vw, 26px) 0; }
.spec__item + .spec__item { border-top: 1px solid var(--line-dark); }
.spec__title { font: 400 clamp(1.4rem, 2vw, 1.75rem)/1.15 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.spec dd { margin: 0; }
.spec__tools { color: var(--gold); font-size: .76rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.spec__text { max-width: 48ch; color: var(--cream-dim); font-size: .95rem; line-height: 1.55; text-wrap: pretty; }
.spec__note { margin-top: 8px; padding-top: 22px; border-top: 1px solid rgba(226, 178, 92, .3); color: var(--cream); font: italic 400 clamp(1.1rem, 1.4vw, 1.25rem)/1.4 var(--serif); text-wrap: pretty; }
.spec__note span { color: var(--gold); }

.reasons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); margin-top: clamp(64px, 8vw, 112px); }
.reason { padding-top: 22px; border-top: 1px solid var(--ink); }
.reason__title { margin-bottom: 12px; font: 500 clamp(1.5rem, 2.1vw, 1.9rem)/1.1 var(--serif); letter-spacing: -.01em; }
.reason p { color: var(--ink-2); font-size: .98rem; text-wrap: pretty; }

/* ---------- Services ---------- */
.services { padding: clamp(40px, 6vw, 80px) 0 clamp(96px, 12vw, 160px); border-top: 1px solid var(--line-paper); }
.svc { border-top: 1px solid var(--ink); counter-reset: svc; }
.svc__row { position: relative; display: grid; grid-template-columns: 90px minmax(0, 1.1fr) minmax(0, 1fr); align-items: baseline; gap: 12px 40px; padding: 28px 12px; border-bottom: 1px solid var(--line-paper); isolation: isolate; }
.svc__row::before { position: absolute; inset: 0; z-index: -1; content: ""; background: var(--paper-2); transform: scaleY(0); transform-origin: bottom; transition: transform .5s var(--ease); }
.svc__row:hover::before { transform: scaleY(1); }
.svc__num { color: var(--cinnabar-ink); font: 400 3.2rem/1 "Ponomar Numerals", var(--serif); transition: transform .5s var(--ease); transform-origin: left center; }
.svc__row:hover .svc__num { transform: scale(1.15) translateX(4px); }
.svc__title { font: 400 clamp(1.6rem, 2.8vw, 2.4rem)/1.1 var(--serif); letter-spacing: -.015em; transition: transform .5s var(--ease); }
.svc__row:hover .svc__title { transform: translateX(8px); }
.svc__text { max-width: 44ch; color: var(--ink-2); font-size: .98rem; text-wrap: pretty; }

/* Prices: three honest reference points on one dark sheet, with subgrid rows so values line up. */
.prices { position: relative; margin-top: clamp(64px, 8vw, 104px); padding: clamp(32px, 5vw, 64px); overflow: hidden; border-radius: 28px; background: var(--ink); color: var(--cream); box-shadow: 0 40px 80px -40px rgba(27, 21, 16, .7); }
.prices::after { position: absolute; top: -40%; right: -10%; width: 60%; height: 180%; content: ""; background: radial-gradient(closest-side, rgba(226, 150, 60, .18), transparent); pointer-events: none; }
.prices ::selection { background: var(--gold); color: var(--night); }
.prices > * { position: relative; z-index: 1; }
.prices__title { font: 400 clamp(1.9rem, 3vw, 2.6rem)/1.05 var(--serif); letter-spacing: -.015em; }
.prices__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: clamp(28px, 3.5vw, 44px); }
.price { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 14px; align-content: start; padding: 0 clamp(20px, 3vw, 40px); }
.price:nth-child(odd) { padding-left: 0; }
.price:nth-child(even) { padding-right: 0; border-left: 1px solid var(--line-dark); }
.price:nth-child(-n+2) { padding-bottom: clamp(28px, 3.5vw, 40px); }
.price:nth-child(n+3) { padding-top: clamp(28px, 3.5vw, 40px); border-top: 1px solid var(--line-dark); }
.price__name { margin: 0; color: var(--gold-soft); font: italic 400 clamp(1.3rem, 1.7vw, 1.55rem)/1.2 var(--serif); text-wrap: balance; }
.price__value { align-self: end; font: 400 clamp(2.4rem, 3.6vw, 3.3rem)/1 var(--serif); letter-spacing: -.02em; font-variant-numeric: lining-nums; }
.price__from { color: var(--gold); font-style: italic; font-size: .5em; letter-spacing: 0; vertical-align: .35em; }
.price__unit { color: var(--gold-soft); font-style: italic; font-size: .45em; letter-spacing: 0; }
.price__text { max-width: 40ch; color: var(--cream-dim); font-size: .95rem; line-height: 1.55; text-wrap: pretty; }
.prices__note { margin-top: clamp(28px, 3.5vw, 44px); padding-top: 22px; border-top: 1px solid var(--line-dark); color: var(--cream-dim); font: italic 400 clamp(1.1rem, 1.4vw, 1.25rem)/1.4 var(--serif); text-wrap: pretty; }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: clamp(56px, 7vw, 88px); }
.step { position: relative; padding-top: 44px; }
.step::before { position: absolute; top: 15px; right: -24px; left: 40px; height: 1px; content: ""; background: var(--line-paper); }
.step:last-child::before { display: none; }
.step__n { position: absolute; top: 0; left: 0; display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--cinnabar-ink); border-radius: 50%; color: var(--cinnabar-ink); font: 500 .85rem/1 var(--mono); }
.step h3 { font: 500 1.5rem/1.1 var(--serif); }
.step p { margin-top: 8px; color: var(--ink-2); font-size: .95rem; text-wrap: pretty; }

/* ---------- Contact ---------- */
.contact { position: relative; overflow: hidden; padding: clamp(112px, 14vw, 200px) 0 0; background: var(--night); isolation: isolate; }
.contact__glow { --x: 70%; --y: 30%; position: absolute; inset: 0; z-index: -1; background: radial-gradient(600px circle at var(--x) var(--y), rgba(226, 160, 70, .18), transparent 60%); pointer-events: none; transition: background .1s; }
.contact__inner { text-align: center; }
.contact__title { font: 400 clamp(2.8rem, 6.4vw, 6rem)/.98 var(--serif); letter-spacing: -.03em; text-wrap: balance; }
.contact__title em { color: var(--gold); }
.contact__text { max-width: 48ch; margin: 28px auto 0; color: var(--cream-dim); text-wrap: pretty; }
.contact__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 44px; }
.reach { display: inline-flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 26px; border: 1px solid var(--line-dark); border-radius: 999px; color: var(--cream); font-weight: 600; text-decoration: none; transition: background-color .3s, color .3s, border-color .3s, transform .4s var(--ease); }
.reach svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.reach:hover { border-color: var(--cream-dim); transform: translateY(-2px); }
.reach--main { border-color: var(--gold); background: var(--gold); color: var(--night); box-shadow: 0 18px 40px -16px rgba(226, 178, 92, .7); }
.reach--main:hover { border-color: var(--gold-soft); background: var(--gold-soft); }
.reach span { font-variant-numeric: lining-nums tabular-nums; }
.contact__handles { margin-top: 22px; color: var(--cream-dim); font-size: .9rem; }
.contact__handles a { color: var(--gold-soft); font-family: var(--mono); text-decoration: none; border-bottom: 1px solid rgba(226, 178, 92, .4); }
.contact__handles a:hover { border-color: var(--gold); }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; margin-top: clamp(96px, 11vw, 150px); padding-top: 26px; padding-bottom: 32px; border-top: 1px solid var(--line-dark); color: var(--cream-dim); font-size: .88rem; }
.footer__verse { font: italic 400 1.15rem/1.3 var(--serif); color: var(--cream); }
.footer__copy a { color: inherit; text-underline-offset: 3px; text-decoration-color: rgba(184, 171, 150, .4); }
.footer__copy a:hover { color: var(--gold-soft); }
.footer__verse span { margin-left: 8px; color: var(--cinnabar); font: 500 .75rem var(--sans); letter-spacing: .12em; text-transform: uppercase; }

/* ---------- Case page: Домодедовское благочиние ---------- */
/* Night hero and comparisons, paper task and report: the same two lights as the landing. */
.cs-hero { position: relative; padding: clamp(112px, 13vw, 160px) 0 clamp(64px, 8vw, 104px); overflow: hidden; background: var(--night); isolation: isolate; }
.cs-hero__glow { position: absolute; top: -10%; right: -18vw; z-index: -1; width: 70vw; height: 90%; border-radius: 50%; background: radial-gradient(closest-side, rgba(226, 150, 60, .22), transparent); filter: blur(60px); pointer-events: none; }
.cs-back { display: inline-flex; align-items: center; gap: 10px; color: var(--cream-dim); font-size: .92rem; text-decoration: none; transition: color .3s, gap .35s var(--ease); }
.cs-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cs-back:hover { gap: 14px; color: var(--gold-soft); }
.cs-hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: clamp(40px, 5vw, 80px); margin-top: clamp(36px, 5vw, 64px); }
.cs-hero__title { margin-top: 18px; font: 400 clamp(2.8rem, 5.6vw, 5.4rem)/.95 var(--serif); letter-spacing: -.03em; text-wrap: balance; }
.cs-hero__title em { display: block; margin-top: .18em; color: var(--gold); font-size: .56em; letter-spacing: -.01em; }
.cs-hero__lead { max-width: 52ch; margin-top: 26px; color: var(--cream-dim); font-size: clamp(1rem, 1.25vw, 1.12rem); text-wrap: pretty; }
.cs-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn .btn__play { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.btn__time { padding-left: 10px; border-left: 1px solid rgba(12, 10, 8, .25); font-variant-numeric: lining-nums tabular-nums; }
.cs-hero__live { margin-top: 26px; }
.cs-hero__shot .browser { box-shadow: 0 60px 120px -40px rgba(0, 0, 0, .95), 0 0 0 1px rgba(242, 232, 214, .12); }

.cs-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(56px, 7vw, 96px); border-top: 1px solid var(--line-dark); }
.cs-stat { padding: 28px clamp(16px, 2vw, 32px) 0; }
.cs-stat:first-child { padding-left: 0; }
.cs-stat + .cs-stat { border-left: 1px solid var(--line-dark); }
.cs-stat__value { font: 400 clamp(2.6rem, 4.4vw, 4rem)/1 var(--serif); letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: lining-nums; }
.cs-stat__value i { color: var(--gold); font-size: .5em; letter-spacing: 0; vertical-align: .35em; }
.cs-stat__label { margin-top: 14px; color: var(--gold); font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.cs-stat__text { margin-top: 8px; color: var(--cream-dim); font-size: .92rem; line-height: 1.5; text-wrap: pretty; }

.cs-task { padding: clamp(96px, 12vw, 160px) 0; background: var(--paper); color: var(--ink); }
.cs-task__title { max-width: 20ch; margin-bottom: clamp(48px, 6vw, 80px); }
.cs-pair__lead { margin-top: 16px; font: 400 clamp(1.3rem, 1.8vw, 1.6rem)/1.3 var(--serif); text-wrap: balance; }
.cs-list { display: grid; gap: 12px; margin-top: 24px; }
.cs-list li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 12px; color: var(--ink-2); font-size: .98rem; line-height: 1.55; text-wrap: pretty; }
.cs-list li::before { width: 6px; height: 6px; margin-top: .62em; content: ""; background: var(--cinnabar-ink); transform: rotate(45deg); }
.cs-list--dark li { color: var(--cream-dim); }
.cs-list--dark li::before { background: var(--gold); }

.cs-film { margin: clamp(64px, 8vw, 104px) 0 0; scroll-margin-top: 90px; }
.cs-film__frame { overflow: hidden; aspect-ratio: 16 / 9; border-radius: 14px; background: var(--night); box-shadow: 0 50px 100px -40px rgba(27, 21, 16, .7), 0 0 0 1px var(--line-paper); }
.cs-film video { display: block; width: 100%; height: 100%; }
.cs-film__caption { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); align-items: start; gap: 18px 48px; margin-top: 26px; }
.cs-film__note { font: italic 400 1.25rem/1.35 var(--serif); text-wrap: pretty; }
.cs-chapters { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-chapters a { display: inline-flex; align-items: baseline; gap: 8px; padding: 7px 14px; border: 1px solid var(--line-paper); border-radius: 999px; color: var(--ink); font-size: .86rem; text-decoration: none; transition: border-color .3s, background-color .3s, color .3s; }
.cs-chapters span { color: var(--cinnabar-ink); font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }
.cs-chapters a:hover { border-color: var(--cinnabar-ink); }
.cs-chapters a.is-current { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.cs-chapters a.is-current span { color: var(--gold); }

.cs-compare { padding: clamp(96px, 12vw, 168px) 0; background: var(--night); }
.cs-compare .h2 em { color: var(--gold); }
.cs-index { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-bottom: clamp(56px, 7vw, 96px); }
.cs-index a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 18px 4px 12px; border: 1px solid var(--line-dark); border-radius: 999px; color: var(--cream); font-size: .9rem; text-decoration: none; transition: border-color .3s, background-color .3s; }
.cs-index span { color: var(--cinnabar); font: 400 1.35rem/1 "Ponomar Numerals", var(--serif); }
.cs-index a:hover { border-color: rgba(226, 178, 92, .45); background: rgba(226, 178, 92, .06); }
.cs-ba { padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line-dark); scroll-margin-top: 80px; }
.cs-ba + .cs-ba { margin-top: clamp(80px, 10vw, 140px); }
.cs-ba__head { display: grid; grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; gap: 12px clamp(24px, 4vw, 56px); margin-bottom: clamp(28px, 3.5vw, 44px); }
.cs-ba__num { color: var(--cinnabar); font: 400 3.2rem/1 "Ponomar Numerals", var(--serif); }
.cs-ba__title { font: 400 clamp(1.9rem, 3.2vw, 2.8rem)/1.05 var(--serif); letter-spacing: -.02em; text-wrap: balance; }
.cs-ba__text { font-size: 1.02rem; text-wrap: pretty; }
.cs-ba__why { margin-top: 18px; padding-left: 18px; border-left: 1px solid rgba(226, 178, 92, .4); color: var(--cream-dim); font-size: .94rem; text-wrap: pretty; }
.cs-ba__why b { display: block; margin-bottom: 4px; color: var(--gold); font: italic 500 1.05rem/1.2 var(--serif); }
.cs-ba__tabs { display: flex; flex-wrap: wrap; gap: 4px; width: fit-content; max-width: 100%; margin-bottom: 18px; padding: 4px; border: 1px solid var(--line-dark); border-radius: 26px; background: var(--night-2); }
.cs-ba__tabs button { min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: none; color: var(--cream-dim); font-size: .88rem; font-weight: 600; cursor: pointer; transition: background-color .3s, color .3s; }
.cs-ba__tabs button:hover { color: var(--cream); }
.cs-ba__tabs button[aria-pressed="true"] { background: var(--gold); color: var(--night); }

/* Before / after: the old page sits on top, clipped to the left of the border. */
.ba { --pos: 50%; margin: 0; }
.ba__view { position: relative; overflow: hidden; border-radius: 14px; background: var(--night-3); box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .95), 0 0 0 1px rgba(242, 232, 214, .1); cursor: ew-resize; user-select: none; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.ba__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; pointer-events: none; -webkit-user-drag: none; }
.ba__img--before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: linear-gradient(transparent, var(--cream) 12%, var(--cream) 88%, transparent); box-shadow: 0 0 18px rgba(242, 232, 214, .6); pointer-events: none; }
.ba__knob { position: absolute; top: 50%; left: 50%; display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; background: var(--cream); color: var(--night); box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .8); transform: translate(-50%, -50%); }
.ba__knob svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ba__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.ba__range:focus-visible ~ .ba__handle .ba__knob { box-shadow: 0 0 0 3px var(--night), 0 0 0 5px var(--gold); }
.ba__tag { position: absolute; top: 14px; z-index: 1; padding: 5px 12px; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; pointer-events: none; transition: opacity .3s; }
.ba__tag--before { left: 14px; background: rgba(12, 10, 8, .74); color: var(--cream); }
.ba__tag--after { right: 14px; background: var(--gold); color: var(--night); }
.ba__caption { margin-top: 14px; color: var(--cream-dim); font-size: .9rem; text-wrap: pretty; }

/* Phones: the whole mobile page scrolls inside the screen, the border stays on top. */
.cs-ba__phones { display: grid; grid-template-columns: repeat(2, minmax(0, 320px)); justify-content: center; gap: clamp(32px, 7vw, 112px); }
.ba__phone { padding: 9px; border-radius: 42px; background: var(--night); box-shadow: 0 50px 90px -30px rgba(0, 0, 0, .95), 0 0 0 1px rgba(242, 232, 214, .16); }
.ba--phone .ba__view { aspect-ratio: 9 / 19.5; border-radius: 33px; background: var(--paper); box-shadow: none; }
.ba__scroll { position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; touch-action: pan-y; }
.ba__scroll::-webkit-scrollbar { display: none; }
.ba__scroll:focus-visible { outline-offset: -4px; }
.ba__page { position: relative; width: 100%; }
.ba--phone .ba__tag { top: auto; bottom: 16px; }
.ba--phone .ba__caption { text-align: center; }

.cs-report { padding: clamp(72px, 9vw, 120px) 0; background: var(--paper); color: var(--ink); }
.report { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.report__toggle { display: grid; grid-template-columns: minmax(0, 1fr) auto 48px; align-items: center; gap: 12px 32px; padding: clamp(24px, 3vw, 36px) 0; cursor: pointer; list-style: none; }
.report__toggle::-webkit-details-marker, .report__item summary::-webkit-details-marker { display: none; }
.report__kicker { display: block; color: var(--cinnabar-ink); font: italic 500 1.05rem/1.2 var(--serif); letter-spacing: .06em; }
.report__title { display: block; margin-top: 6px; font: 400 clamp(1.9rem, 3.6vw, 3rem)/1.05 var(--serif); letter-spacing: -.02em; text-wrap: balance; }
.report__meta { color: var(--ink-2); font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.report__plus { position: relative; width: 48px; height: 48px; border: 1px solid var(--line-paper); border-radius: 50%; transition: border-color .3s, background-color .3s; }
.report__plus::before, .report__plus::after { position: absolute; top: 50%; left: 50%; width: 16px; height: 1.5px; margin: -.75px 0 0 -8px; content: ""; background: var(--ink); transition: transform .4s var(--ease); }
.report__plus::after { transform: rotate(90deg); }
.report[open] .report__plus::after { transform: rotate(0); }
.report__toggle:hover .report__plus { border-color: var(--cinnabar-ink); background: var(--paper-2); }
.report__inner { padding-bottom: clamp(32px, 4vw, 56px); }
.report__intro { max-width: 62ch; color: var(--ink-2); text-wrap: pretty; }
.report__intro a { color: var(--cinnabar-ink); text-underline-offset: 3px; }
.report__list { margin-top: 28px; border-top: 1px solid var(--line-paper); }
.report__item { border-bottom: 1px solid var(--line-paper); }
.report__item summary { display: grid; grid-template-columns: 56px minmax(0, 1fr) 24px; align-items: baseline; gap: 16px; padding: 18px 4px; cursor: pointer; list-style: none; }
.report__item summary::after { color: var(--cinnabar-ink); content: "+"; font: 300 1.7rem/1 var(--serif); text-align: center; transition: transform .4s var(--ease); }
.report__item[open] summary::after { transform: rotate(45deg); }
.report__num { color: var(--cinnabar-ink); font: italic 400 1.4rem/1 var(--serif); font-variant-numeric: lining-nums; }
.report__name { font: 400 clamp(1.3rem, 1.8vw, 1.6rem)/1.2 var(--serif); transition: color .3s; }
.report__item summary:hover .report__name { color: var(--cinnabar-ink); }
.report__body { max-width: calc(74ch + 76px); padding: 0 4px 30px 76px; color: var(--ink-2); font-size: .98rem; text-wrap: pretty; }
.report__body ul { display: grid; gap: 10px; margin-top: 14px; }
.report__body p + ul, .report__body p + p { margin-top: 12px; }
.report__body li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 12px; line-height: 1.55; }
.report__body li::before { width: 6px; height: 6px; margin-top: .62em; content: ""; background: var(--cinnabar-ink); transform: rotate(45deg); }
.report__body b { color: var(--ink); font-weight: 600; }
.report__why { margin-top: 20px; padding: 16px 20px; border-radius: 4px; background: var(--paper-2); }
.report__why b { margin-right: 6px; color: var(--cinnabar-ink); font: italic 500 1.08rem var(--serif); }

.cs-cta__title { max-width: 20ch; margin-inline: auto; font-size: clamp(2.4rem, 5vw, 4.6rem); }

@media (max-width: 1080px) {
  .cs-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .cs-hero__shot { max-width: 720px; }
  .cs-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
  .cs-stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .cs-ba__head { grid-template-columns: 56px minmax(0, 1fr); }
  .cs-ba__body { grid-column: 2; }
}
@media (max-width: 820px) {
  .cs-film__caption { grid-template-columns: minmax(0, 1fr); }
  .cs-ba__head { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .cs-ba__num { font-size: 2.6rem; }
  .cs-ba__body { grid-column: auto; margin-top: 6px; }
  .report__body { padding-left: 4px; }
}
@media (max-width: 520px) {
  .cs-hero__actions .btn { width: 100%; justify-content: center; }
  .cs-stats { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .cs-stat, .cs-stat:first-child, .cs-stat:nth-child(3) { padding: 22px 0; border-left: 0; }
  .cs-stat + .cs-stat { border-top: 1px solid var(--line-dark); }
  .cs-ba__phones { grid-template-columns: minmax(0, 300px); }
  .ba__knob { width: 42px; height: 42px; }
  .ba__tag { top: 10px; padding: 4px 10px; font-size: .64rem; }
  .ba__tag--before { left: 10px; }
  .ba__tag--after { right: 10px; }
  .report__toggle { grid-template-columns: minmax(0, 1fr) 44px; }
  .report__meta { grid-row: 2; }
  .report__plus { width: 44px; height: 44px; }
  .report__item summary { grid-template-columns: 40px minmax(0, 1fr) 20px; gap: 10px; }
  .report__why { padding: 14px 16px; }
}

/* ---------- Reveal on scroll ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(36px); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js .case[data-reveal] .phone { opacity: 0; transform: translateY(60px); transition: opacity 1s var(--ease) .25s, transform 1.4s var(--ease) .25s; }
.js .case[data-reveal].is-in .phone { opacity: 1; transform: none; }
.js .case[data-reveal].is-in .case__media:hover .phone { transform: translateY(-14px) rotate(-1.5deg); }
.js .case--flip[data-reveal].is-in .case__media:hover .phone { transform: translateY(-14px) rotate(1.5deg); }

/* ---------- Responsive ---------- */
/* ---------- Text pages: privacy, consent, 404 ---------- */
.page__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line-dark); }
.page__back { color: var(--gold-soft); font: 400 .85rem/1.2 var(--mono); text-decoration: none; }
.page__back:hover { color: var(--gold); }
.doc { max-width: 760px; padding-top: clamp(48px, 8vw, 96px); }
.doc h1 { font: 400 clamp(2.4rem, 5.5vw, 4rem)/1 var(--serif); letter-spacing: -.02em; text-wrap: balance; }
.doc__meta { margin-top: 18px; color: var(--cream-dim); font: 400 .85rem/1.4 var(--mono); }
.doc h2 { margin-top: 44px; color: var(--gold-soft); font: 400 1.7rem/1.15 var(--serif); }
.doc p, .doc li { color: var(--cream-dim); }
.doc p { margin-top: 14px; }
.doc ul { display: grid; gap: 8px; margin-top: 14px; }
.doc li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 12px; }
.doc li::before { width: 6px; height: 6px; margin-top: .65em; content: ""; background: var(--cinnabar); transform: rotate(45deg); }
.doc a { color: var(--gold-soft); }
.doc strong { color: var(--cream); font-weight: 600; }
.lost { display: grid; place-content: center; justify-items: center; min-height: 72vh; padding-top: 48px; text-align: center; }
.lost__code { color: var(--gold); font: italic 300 clamp(7rem, 24vw, 15rem)/.85 var(--serif); letter-spacing: -.04em; }
.lost__title { margin-top: 18px; font: 400 clamp(2rem, 4.4vw, 3rem)/1.05 var(--serif); }
.lost p { max-width: 42ch; margin-top: 16px; color: var(--cream-dim); }
.lost .btn { margin-top: 32px; }

@media (min-width: 1321px) {
  .nav__gh:hover .nav__gh-label, .nav__gh:focus-visible .nav__gh-label { max-width: 16em; margin: 0 4px 0 10px; opacity: 1; }
}
@media (max-width: 1080px) {
  .nav { display: flex; }
  .nav__links { display: none; }
  .nav__end { margin-left: auto; }
  .js .nav__burger { display: inline-block; }
  .sheet { display: flex; }
  .case, .case--flip { grid-template-columns: minmax(0, 1fr); }
  .case--flip .case__media { order: 0; }
  .case__media { margin-right: 6%; }
  .case--flip .case__media { margin-right: 0; margin-left: 6%; }
  .about__pair { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .hero { padding-top: 92px; }
  .hero__stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 16px; }
  .portrait { grid-column: 1 / -1; grid-row: 1; justify-self: center; width: min(78vw, 440px); }
  .portrait__hint { bottom: -19%; }
  .hero__side { gap: 10px; margin-top: 64px; }
  .hero__name { font-size: clamp(2rem, 9vw, 3rem); }
  .hero__role { font-size: .8rem; }
  .hero__role--deacon { font-size: 1.02rem; }
  .hero__foot { margin-top: 40px; }
  .section-head { grid-template-columns: minmax(0, 1fr); }
  .facts__list { grid-template-columns: minmax(0, 1fr); }
  .facts__list li { justify-content: flex-start; padding: 12px 0; text-align: left; }
  .facts__list li + li { border-top: 1px solid var(--line-dark); border-left: 0; }
  .reasons { grid-template-columns: minmax(0, 1fr); }
  .svc__row { grid-template-columns: 56px minmax(0, 1fr); gap: 6px 16px; padding: 24px 4px; }
  .svc__num { grid-row: span 2; font-size: 2.6rem; }
  .prices__list { grid-template-columns: minmax(0, 1fr); }
  .price, .price:nth-child(n) { grid-row: auto; grid-template-rows: none; padding: 24px 0; border-top: 0; border-left: 0; }
  .price:first-child { padding-top: 0; }
  .price:last-child { padding-bottom: 0; }
  .price + .price { border-top: 1px solid var(--line-dark); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
  .step::before { display: none; }
}
@media (max-width: 520px) {
  .nav { padding-top: 14px; padding-bottom: 14px; }
  .nav__gh { display: none; }
  .nav__cta { height: 40px; padding: 0 14px; font-size: .84rem; }
  .nav__cta svg { display: none; }
  .nav__burger { width: 40px; height: 40px; }
  .nav__burger i:first-of-type { top: 16px; }
  .nav__burger i:last-of-type { top: 22px; }
  .hero__actions, .hero__actions .btn { width: 100%; }
  .hero__actions .btn { justify-content: center; }
  .phone { width: 34%; right: -5%; border-radius: 22px; padding: 5px; }
  .case--flip .phone { left: -5%; }
  .phone__screen { border-radius: 17px; }
  .phone::before { top: 9px; height: 6px; }
  .browser__bar { height: 30px; }
  .browser__bar span { padding: 2px 12px; font-size: .64rem; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .reach { width: 100%; justify-content: center; padding: 0 18px; }
  .brief__grid { grid-template-columns: minmax(0, 1fr); }
  .brief__submit { width: 100%; justify-content: center; }
  .reach--main { order: -1; }
  .footer { flex-direction: column; }
}
@media (hover: none) {
  .case__media:hover .browser__screen img, .case__media:hover .phone__screen img { transform: none; }
  .case.is-playing .case__media .browser__screen img { transform: translateY(-187.5cqw); }
  .case.is-playing .case__media .phone__screen img { transform: translateY(-219cqw); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js [data-reveal], .js .case[data-reveal] .phone { opacity: 1; transform: none; }
}
