/* =========================================================
   АРТ Проект — design tokens & base styles
   Editorial warm-minimal system, light + dark variants.
   Fonts: Fraunces (display) / Manrope (body) / Space Mono (labels)
========================================================= */

/* Fonts are now loaded via <link rel="preconnect"> + <link href> in <head>
   (faster than @import, avoids an extra render-blocking round trip). */

:root{
  /* ---- Light theme (default) ---- */
  --bg: oklch(97% 0.012 75);
  --bg-2: oklch(94.5% 0.014 70);
  --surface: oklch(99% 0.004 80);
  --surface-2: oklch(100% 0 0);
  --text: oklch(23% 0.02 55);
  --text-muted: oklch(46% 0.02 55);
  --border: oklch(88% 0.012 70);
  --accent: oklch(56% 0.16 40);
  --accent-strong: oklch(46% 0.16 38);
  --accent-soft: oklch(90% 0.05 45);
  --accent-2: oklch(62% 0.08 150);
  --shadow: 0 1px 2px oklch(30% 0.02 60 / 0.06), 0 8px 24px oklch(30% 0.02 60 / 0.08);
  --overlay: oklch(20% 0.02 60 / 0.55);

  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Manrope', 'Segoe UI', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --font-hero: 'Instrument Serif', 'Fraunces', 'Georgia', serif;

  --container: 1240px;
  --radius-s: 6px;
  --radius-m: 14px;
  --radius-l: 28px;
  --gap: clamp(1.25rem, 2vw, 2.5rem);

  color-scheme: light;
}

:root[data-theme="dark"]{
  --bg: oklch(19% 0.014 55);
  --bg-2: oklch(23% 0.016 55);
  --surface: oklch(24% 0.016 55);
  --surface-2: oklch(27% 0.018 55);
  --text: oklch(94% 0.01 80);
  --text-muted: oklch(70% 0.015 75);
  --border: oklch(34% 0.02 55);
  --accent: oklch(72% 0.15 42);
  --accent-strong: oklch(80% 0.15 44);
  --accent-soft: oklch(32% 0.06 45);
  --accent-2: oklch(72% 0.09 150);
  --shadow: 0 1px 2px oklch(0% 0 0 / 0.3), 0 12px 32px oklch(0% 0 0 / 0.45);
  --overlay: oklch(10% 0.01 55 / 0.65);
  color-scheme: dark;
}

/* ---- Invert palette: always the opposite of the active theme,
   used by .section-invert to create alternating light/dark bands
   regardless of whether the site is in light or dark mode ---- */
:root{
  --inv-bg: oklch(19% 0.014 55);
  --inv-bg-2: oklch(23% 0.016 55);
  --inv-surface: oklch(24% 0.016 55);
  --inv-surface-2: oklch(27% 0.018 55);
  --inv-text: oklch(94% 0.01 80);
  --inv-text-muted: oklch(70% 0.015 75);
  --inv-border: oklch(34% 0.02 55);
  --inv-accent: oklch(72% 0.15 42);
  --inv-accent-strong: oklch(80% 0.15 44);
  --inv-accent-soft: oklch(32% 0.06 45);
}
:root[data-theme="dark"]{
  --inv-bg: oklch(97% 0.012 75);
  --inv-bg-2: oklch(94.5% 0.014 70);
  --inv-surface: oklch(99% 0.004 80);
  --inv-surface-2: oklch(100% 0 0);
  --inv-text: oklch(23% 0.02 55);
  --inv-text-muted: oklch(46% 0.02 55);
  --inv-border: oklch(88% 0.012 70);
  --inv-accent: oklch(56% 0.16 40);
  --inv-accent-strong: oklch(46% 0.16 38);
  --inv-accent-soft: oklch(90% 0.05 45);
}
.section-invert{
  --bg: var(--inv-bg);
  --bg-2: var(--inv-bg-2);
  --surface: var(--inv-surface);
  --surface-2: var(--inv-surface-2);
  --text: var(--inv-text);
  --text-muted: var(--inv-text-muted);
  --border: var(--inv-border);
  --accent: var(--inv-accent);
  --accent-strong: var(--inv-accent-strong);
  --accent-soft: var(--inv-accent-soft);
  /* та же мягкая акцентная подсветка, что и в hero — вместо плоской заливки,
     чтобы все инвертированные (тёмные/светлые) секции сайта были в едином стиле */
  background:
    radial-gradient(90% 70% at 12% 0%, var(--accent-soft), transparent 55%),
    var(--bg);
  color: var(--text);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; overflow-x: hidden; max-width:100%; }
body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .35s ease, color .35s ease;
  overflow-x: hidden;
  max-width:100%;
}
img{ max-width:100%; display:block; }
a{ color: inherit; text-decoration:none; }
ul{ list-style:none; margin:0; padding:0; }
button{ font-family:inherit; cursor:pointer; }
input, select, textarea{ font-family:inherit; font-size:1rem; }

.container{
  width:100%;
  max-width: var(--container);
  margin:0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

section{ padding: clamp(3.5rem,7vw,7rem) 0; }
.section-tight{ padding: clamp(2rem,4vw,3.5rem) 0; }

h1,h2,h3,h4{
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  margin: 0 0 .6em;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}
h1{ font-size: clamp(2.6rem, 6vw, 5rem); font-weight:400; }
h2{ font-size: clamp(1.9rem, 4vw, 3rem); }
h3{ font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
p{ margin:0 0 1em; color: var(--text-muted); max-width: 62ch; }
.lede{ font-size: clamp(1.05rem, 1.6vw, 1.3rem); }

.eyebrow{
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .74rem;
  color: var(--accent);
  display:flex; align-items:center; gap:.6em;
  margin-bottom: 1em;
}
.eyebrow::before{
  content:"";
  width: 28px; height: 1px; background: var(--accent);
}
.eyebrow-count{
  margin-left:.6em; opacity:.5; letter-spacing:.1em;
}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:.5em;
  padding: .95em 1.7em;
  border-radius: 999px;
  font-weight:600;
  font-size: .95rem;
  border: 1px solid transparent;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:active{ transform: scale(.97); }
.btn-primary{ background: var(--accent); color: oklch(99% 0 0); }
.btn-primary:hover{ background: var(--accent-strong); }
.btn-ghost{ background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover{ border-color: var(--accent); color: var(--accent); }
.btn-block{ width:100%; max-width:100%; box-sizing:border-box; }
.btn-sm{ padding:.6em 1.2em; font-size:.85rem; }
.btn svg{ width:19px; height:19px; flex-shrink:0; }
.btn{ min-width:0; max-width:100%; overflow-wrap:break-word; text-align:center; white-space:normal; }

/* ---------- header ---------- */
.site-header{
  position: sticky; top:0; z-index: 60;
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container{
  display:flex; align-items:center; justify-content:space-between;
  height: 84px;
}
.logo{
  font-family: var(--font-display); font-size: 1.4rem; letter-spacing: .01em;
}
.logo span{ color: var(--accent); }
.nav-desktop{ display:flex; gap: 2.2rem; align-items:center; }
.nav-desktop a{
  font-size:.95rem; color: var(--text-muted); font-weight:500;
  position:relative; padding: .3em 0;
}
.nav-desktop a:hover, .nav-desktop a.active{ color: var(--text); }
.nav-desktop a.active::after{
  content:""; position:absolute; left:0; right:0; bottom:-4px; height:2px; background: var(--accent);
}
.header-actions{ display:flex; align-items:center; gap: .9rem; }

.theme-toggle{
  width: 46px; height: 46px; border-radius: 50%;
  border:1px solid var(--border); background: var(--surface);
  display:flex; align-items:center; justify-content:center;
  position:relative;
}
.theme-toggle svg{ width:20px; height:20px; stroke: var(--text); }
.theme-toggle .icon-moon{ display:none; }
:root[data-theme="dark"] .theme-toggle .icon-sun{ display:none; }
:root[data-theme="dark"] .theme-toggle .icon-moon{ display:block; }

.burger{
  display:none;
  width:46px; height:46px; border-radius:50%;
  border:1px solid var(--border); background:var(--surface);
  flex-direction:column; align-items:center; justify-content:center; gap:5px;
}
.burger span{ width:18px; height:2px; background: var(--text); transition: transform .25s ease, opacity .25s ease; }
.burger.open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2){ opacity:0; }
.burger.open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

.nav-mobile{
  display:none; flex-direction:column; gap: 0;
  position: fixed; inset: 84px 0 0 0; background: var(--bg);
  padding: 1rem clamp(1.25rem,4vw,2.5rem) 2rem;
  overflow-y:auto; z-index:55;
  transform: translateY(-8px); opacity:0; pointer-events:none;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-mobile.open{ transform: translateY(0); opacity:1; pointer-events:auto; }
.nav-mobile a{
  display:block; padding: 1.05rem 0; font-family: var(--font-display); font-size:1.6rem;
  border-bottom: 1px solid var(--border);
}
.nav-mobile .btn{ margin-top: 1.5rem; }

/* ---------- hero ---------- */
.hero{ padding-top: clamp(3rem,8vw,6rem); padding-bottom: clamp(3rem,6vw,5rem); }
.hero-grid{
  display:grid; grid-template-columns: 1.15fr .85fr; gap: var(--gap); align-items:end;
}
.hero h1{ margin-bottom:.4em; }
.hero-visual{
  aspect-ratio: 4/5; border-radius: var(--radius-l);
  background:
    radial-gradient(120% 100% at 20% 15%, var(--accent-soft), transparent 60%),
    linear-gradient(155deg, var(--surface-2), var(--bg-2));
  border: 1px solid var(--border);
  position:relative; overflow:hidden;
  display:flex; align-items:flex-end; padding: 1.6rem;
}
.hero-visual .tag{
  font-family: var(--font-mono); font-size:.72rem; letter-spacing:.08em;
  background: var(--surface); border:1px solid var(--border);
  padding:.5em .9em; border-radius: 999px; color: var(--text-muted);
}
.hero-stats{ display:flex; gap: clamp(1.5rem,3vw,3rem); margin-top: 2.4rem; flex-wrap:wrap; }
.hero-stats .num{ font-family: var(--font-display); font-size: clamp(1.8rem,3vw,2.6rem); color: var(--accent); }
.hero-stats .lbl{ font-size:.85rem; color: var(--text-muted); max-width:16ch; }
.hero-cta{ display:flex; gap:1rem; flex-wrap:wrap; margin-top: 2rem; }

/* ---------- full-bleed photo hero ---------- */
.hero-photo{
  position:relative; height:100vh; min-height:600px; max-height:940px;
  display:flex; align-items:flex-end; overflow:hidden;
  background: linear-gradient(155deg, var(--surface-2), var(--bg-2));
}
.hero-photo-media{ position:absolute; inset:0; }
.hero-photo-media img{ width:100%; height:100%; object-fit:cover; object-position:center 38%; display:block; }
.hero-photo-scrim{
  position:absolute; inset:0;
  background: linear-gradient(180deg, oklch(15% 0.02 55 / .1) 0%, oklch(15% 0.02 55 / .18) 42%, oklch(12% 0.02 55 / .78) 100%);
}
.hero-photo.hero-photo--fallback .hero-photo-media img{ display:none; }
.hero-photo.hero-photo--fallback .hero-photo-scrim{
  background:
    radial-gradient(120% 100% at 20% 15%, var(--accent-soft), transparent 60%),
    linear-gradient(180deg, transparent 0%, oklch(20% 0.02 55 / .55) 100%);
}
.hero-photo-content{ position:relative; z-index:2; padding-bottom: clamp(3.2rem,7vw,5.5rem); color:#fff; }
.hero-photo-content .eyebrow-light{ color:#fff; opacity:.9; }
.hero-photo-content .eyebrow-light::before{ background:#fff; opacity:.7; }
.hero-photo-content h1{ color:#fff; max-width:34ch; font-family: var(--font-hero); font-weight:400; font-size: clamp(2.2rem, 5.6vw, 4.6rem); line-height:1.08; letter-spacing:0; overflow-wrap: break-word; }
.hero-photo-content .lede{ color: oklch(98% 0 0 / .88); max-width:46ch; }
.btn-ghost-light{ border-color: oklch(100% 0 0 / .55); color:#fff; }
.btn-ghost-light:hover{ border-color:#fff; color:#fff; background: oklch(100% 0 0 / .12); }
.hero-photo-scroll{
  position:absolute; left:50%; bottom:1.6rem; transform:translateX(-50%); z-index:2;
  display:flex; flex-direction:column; align-items:center; gap:.5em;
  color:#fff; opacity:.75; font-family: var(--font-mono); font-size:.7rem; letter-spacing:.14em; text-transform:uppercase;
  animation: ap-scroll-cue 2.2s ease-in-out infinite;
}
@keyframes ap-scroll-cue{
  0%, 100%{ transform: translate(-50%, 0); }
  50%{ transform: translate(-50%, 6px); }
}
.hero-stats-strip{ border-bottom:1px solid var(--border); background: var(--surface); }
.hero-stats-strip .hero-stats{ margin-top:0; padding: 1.7rem 0; }
@media (max-width: 720px){
  .hero-photo{ height:82vh; min-height:520px; }
  .hero-photo-content h1{ max-width:none; }
}
@media (max-width: 400px){
  .hero-photo-content h1{ font-size: clamp(2rem, 9vw, 2.6rem); }
}
@media (prefers-reduced-motion: reduce){
  .hero-photo-scroll{ animation:none; }
}

/* ---------- scroll-reveal ---------- */
[data-reveal]{
  opacity:0; transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
}
[data-reveal].is-visible{ opacity:1; transform:none; }
.hero-photo-content [data-reveal]{ transition-delay: calc(var(--reveal-i, 0) * 90ms); }
.hero-photo-content .eyebrow{ --reveal-i:0; }
.hero-photo-content h1{ --reveal-i:1; }
.hero-photo-content .lede{ --reveal-i:2; }
.hero-photo-content .hero-cta{ --reveal-i:3; }
.grid-3 .card[data-reveal]:nth-child(1){ transition-delay:.05s; }
.grid-3 .card[data-reveal]:nth-child(2){ transition-delay:.12s; }
.grid-3 .card[data-reveal]:nth-child(3){ transition-delay:.19s; }
.grid-3 .card[data-reveal]:nth-child(4){ transition-delay:.26s; }
.grid-3 .card[data-reveal]:nth-child(5){ transition-delay:.33s; }
.grid-3 .card[data-reveal]:nth-child(6){ transition-delay:.4s; }
.process-item[data-reveal]:nth-child(1){ transition-delay:.04s; }
.process-item[data-reveal]:nth-child(2){ transition-delay:.1s; }
.process-item[data-reveal]:nth-child(3){ transition-delay:.16s; }
.process-item[data-reveal]:nth-child(4){ transition-delay:.22s; }
.process-item[data-reveal]:nth-child(5){ transition-delay:.28s; }
.process-item[data-reveal]:nth-child(6){ transition-delay:.34s; }
.portfolio-grid .p-card[data-reveal]:nth-child(1){ transition-delay:.05s; }
.portfolio-grid .p-card[data-reveal]:nth-child(2){ transition-delay:.14s; }
.portfolio-grid .p-card[data-reveal]:nth-child(3){ transition-delay:.23s; }
.reviews .review[data-reveal]:nth-child(1){ transition-delay:.05s; }
.reviews .review[data-reveal]:nth-child(2){ transition-delay:.14s; }
.reviews .review[data-reveal]:nth-child(3){ transition-delay:.23s; }
@media (prefers-reduced-motion: reduce){
  [data-reveal]{ opacity:1; transform:none; transition:none; }
}

/* ---------- lead magnet banner ---------- */
.leadband{
  border-top:1px solid var(--border); border-bottom:1px solid var(--border);
  background:
    radial-gradient(90% 160% at 85% 50%, var(--accent-soft), transparent 60%),
    var(--surface);
}

/* ---------- reviews band: same soft accent-glow language as the hero ---------- */
.reviews-band{
  background:
    radial-gradient(120% 90% at 50% -15%, var(--accent-soft), transparent 55%),
    var(--bg);
}
.leadband .container{
  display:flex; align-items:center; justify-content:space-between; gap:2rem; flex-wrap:wrap;
  padding-top: 2.4rem; padding-bottom: 2.4rem;
}
.leadband-copy{ max-width: 46ch; }
.leadband-copy .eyebrow{ margin-bottom:.5em; }
.leadband-copy p{ margin-bottom:0; }

/* ---------- feature / advantage grid ---------- */
.grid-3{ display:grid; grid-template-columns: repeat(3,1fr); gap: var(--gap); }
.grid-2{ display:grid; grid-template-columns: repeat(2,1fr); gap: var(--gap); }
.card{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-m);
  padding: clamp(1.5rem,2.5vw,2.2rem);
}
.card .num{
  font-family: var(--font-mono); font-size: .8rem; color: var(--accent);
  display:block; margin-bottom: 1em;
}
.card h3{ margin-bottom:.5em; }
.card p{ margin-bottom:0; max-width: none; }

/* ---------- process rail (signature element) ---------- */
.process-rail{ position:relative; }
.process-item{
  display:grid; grid-template-columns: 120px 1fr; gap: var(--gap);
  padding: 2.2rem 0; border-top:1px solid var(--border);
  align-items:start;
}
.process-item:last-child{ border-bottom:1px solid var(--border); }
.process-item .step-num{
  font-family: var(--font-display); font-size: 3.6rem; line-height:1; color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
}
:root[data-theme="dark"] .process-item .step-num{ -webkit-text-stroke: 1.5px var(--accent); }
.process-item h3{ margin-bottom:.4em; }
.process-item .meta{ font-family: var(--font-mono); font-size:.75rem; color: var(--text-muted); margin-top:.8em; display:block; }

/* ---------- portfolio grid ---------- */
.filters{ display:flex; gap:.7rem; flex-wrap:wrap; margin-bottom: 2.4rem; }
.filter-btn{
  padding:.55em 1.2em; border-radius:999px; border:1px solid var(--border);
  background: transparent; color: var(--text-muted); font-size:.88rem; font-weight:600;
}
.filter-btn.active{ background: var(--text); color: var(--bg); border-color: var(--text); }
.portfolio-grid{ display:grid; grid-template-columns: repeat(3,1fr); gap: var(--gap); }
.p-card{
  border-radius: var(--radius-m); overflow:hidden; border:1px solid var(--border); background: var(--surface);
}
.p-card .thumb{
  aspect-ratio: 4/3;
  background: linear-gradient(145deg, var(--bg-2), var(--surface-2));
  position:relative;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden;
}
.p-card .thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.thumb-icon{ width:46%; height:46%; color: var(--text-muted); opacity:.8; }
.thumb-icon .accent-shape{ fill: var(--accent-soft); stroke:none; }
.thumb-icon .line{ stroke: currentColor; fill:none; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.hero-illustration{ width:100%; height:100%; color: var(--text-muted); }
.hero-illustration .line{ stroke: currentColor; fill:none; stroke-width:1.4; stroke-linecap:round; stroke-linejoin:round; }
.hero-illustration .accent-shape{ fill: var(--accent-soft); stroke:none; }
.hero-illustration .accent-line{ stroke: var(--accent); fill:none; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.p-card .thumb::after{
  content: attr(data-style);
  position:absolute; left:1rem; bottom:1rem;
  font-family: var(--font-mono); font-size:.7rem; letter-spacing:.06em;
  background: var(--surface); border:1px solid var(--border);
  padding:.4em .8em; border-radius:999px; color: var(--text-muted);
}
.p-card .info{ padding: 1.3rem 1.4rem 1.5rem; }
.p-card .info .row{ display:flex; justify-content:space-between; font-family: var(--font-mono); font-size:.72rem; color: var(--text-muted); margin-top:.6em; }
.p-card[data-cat]{ display:block; }
.p-card.hidden{ display:none; }

/* ---------- reviews ---------- */
.reviews{ display:grid; grid-template-columns: repeat(3,1fr); gap: var(--gap); }
.review{ background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-m); padding: 1.8rem; }
.review p{ font-style:italic; color: var(--text); max-width:none; }
.review .who{ font-family: var(--font-mono); font-size:.75rem; color: var(--text-muted); margin-top: 1rem; }

/* ---------- calculator ---------- */
.calc-wrap{
  display:grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); gap: var(--gap); align-items:start;
}
.calc-card{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-l);
  padding: clamp(1.6rem,3vw,2.6rem);
}
.calc-step{ display:none; }
.calc-step.active{ display:block; }
.calc-progress{ display:flex; gap:.4rem; margin-bottom:2rem; }
.calc-progress i{ height:3px; flex:1; background: var(--border); border-radius:99px; }
.calc-progress i.done{ background: var(--accent); }
.option-grid{ display:grid; grid-template-columns: repeat(2,1fr); gap:.8rem; margin: 1.4rem 0 2rem; }
.option{
  border:1px solid var(--border); border-radius: var(--radius-s); padding: 1em 1.1em;
  background: var(--bg); font-weight:600; font-size:.92rem; text-align:left;
}
.option.selected{ border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.field{ margin-bottom:1.4rem; }
.field label{ display:block; font-size:.85rem; color: var(--text-muted); margin-bottom:.5em; }
.field input, .field select{
  width:100%; padding:.9em 1em; border-radius: var(--radius-s); border:1px solid var(--border);
  background: var(--bg); color: var(--text);
}
.field input.input-error{ border-color: oklch(55% 0.18 25); }
.calc-nav{ display:flex; justify-content:space-between; margin-top:1.5rem; gap:1rem; }

.calc-result{
  position: sticky; top: 104px; min-width:0; box-sizing:border-box;
  background: var(--text); color: var(--bg);
  border-radius: var(--radius-l); padding: clamp(1.6rem,3vw,2.4rem);
}
.calc-result .btn-ghost{ color: inherit; border-color: color-mix(in oklab, currentColor 35%, transparent); }
.calc-result .btn-ghost:hover{ color: var(--accent); border-color: var(--accent); }
:root[data-theme="dark"] .calc-result{ background: var(--surface-2); color: var(--text); border:1px solid var(--border); }
.calc-result .eyebrow{ color: var(--accent-strong); }
.calc-result .price{ font-family: var(--font-display); font-size: clamp(2.2rem,4vw,3.2rem); margin: .2em 0; }
.calc-result .price small{ font-size: .4em; opacity:.6; font-family: var(--font-body); }
.calc-breakdown{ margin: 1.4rem 0; border-top: 1px solid color-mix(in oklab, currentColor 20%, transparent); padding-top: 1rem; }
.calc-breakdown .row{ display:flex; justify-content:space-between; font-size:.88rem; padding:.5em 0; opacity:.85; }
@keyframes ap-pulse{ 0%{ box-shadow: 0 0 0 0 var(--accent); } 60%{ box-shadow: 0 0 0 10px transparent; } 100%{ box-shadow: 0 0 0 0 transparent; } }
.calc-result.pulse{ animation: ap-pulse .7s ease; }
.calc-result.pulse .price{ color: var(--accent); transition: color .15s ease; }

/* ---------- pricing factors ---------- */
.factors-grid{ display:grid; grid-template-columns: repeat(3,1fr); gap: 1.2rem; }
.factor{ display:flex; gap:1rem; align-items:flex-start; }
.factor .dot{ width:8px; height:8px; border-radius:50%; background: var(--accent); margin-top:.5em; flex-shrink:0; }

/* ---------- footer ---------- */
.site-footer{ border-top:1px solid var(--border); padding: 3.5rem 0 2rem; background: var(--bg-2); }
.footer-grid{ display:grid; grid-template-columns: 1.3fr repeat(3,1fr); gap: var(--gap); margin-bottom: 2.5rem; }
.footer-grid h4{ font-family: var(--font-mono); text-transform:uppercase; letter-spacing:.08em; font-size:.75rem; color: var(--text-muted); margin-bottom:1em; }
.footer-grid a{ display:block; color: var(--text-muted); font-size:.92rem; padding: .35em 0; }
.footer-grid a:hover{ color: var(--accent); }
.footer-bottom{ display:flex; justify-content:space-between; padding-top:2rem; border-top:1px solid var(--border); font-size:.8rem; color: var(--text-muted); flex-wrap:wrap; gap:1rem; }

/* ---------- legal: consent checkbox ---------- */
.consent-field{ display:flex; gap:.7rem; align-items:flex-start; margin: 1rem 0 1.2rem; }
.consent-field input[type="checkbox"]{
  width:18px; height:18px; margin-top:.15rem; flex-shrink:0; accent-color: var(--accent);
}
.consent-field label{ font-size:.8rem; color: var(--text-muted); line-height:1.5; }
.consent-field a{ color: var(--accent); text-decoration: underline; }

/* ---------- legal: footer bar ---------- */
.footer-legal{
  display:flex; gap: 1.4rem; flex-wrap:wrap; margin-top: 1rem;
}
.footer-legal a{ font-size:.78rem; color: var(--text-muted); }
.footer-legal a:hover{ color: var(--accent); }
.footer-requisites{ font-size:.76rem; color: var(--text-muted); margin-top:.6rem; line-height:1.6; }

/* ---------- legal document pages ---------- */
.legal-doc{ max-width: 74ch; }
.legal-doc h2{ font-size: 1.3rem; margin-top: 2em; }
.legal-doc p, .legal-doc li{ color: var(--text-muted); }
.legal-doc ol, .legal-doc ul{ padding-left: 1.3rem; margin: 0 0 1.2rem; }
.legal-doc li{ margin-bottom:.5em; }
.legal-note{
  background: var(--accent-soft); border:1px solid var(--accent); border-radius: var(--radius-m);
  padding: 1.2rem 1.4rem; font-size:.9rem; margin-bottom: 2rem;
}
.legal-note strong{ color: var(--accent-strong); }

/* ---------- cookie banner ---------- */
.cookie-banner{
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 90;
  max-width: 620px; margin: 0 auto;
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-m);
  box-shadow: var(--shadow); padding: 1.3rem 1.4rem;
  transform: translateY(140%); transition: transform .35s ease;
}
.cookie-banner.show{ transform: translateY(0); }
.cookie-banner p{ font-size:.85rem; margin-bottom: 1rem; max-width:none; }
.cookie-banner a{ color: var(--accent); text-decoration:underline; }
.cookie-actions{ display:flex; gap:.7rem; flex-wrap:wrap; }
.cookie-settings{ display:none; margin-top:1rem; border-top:1px solid var(--border); padding-top:1rem; }
.cookie-settings.open{ display:block; }
.cookie-cat{ display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; padding:.6rem 0; font-size:.85rem; }
.cookie-cat input{ margin-top:.2rem; flex-shrink:0; }
.cookie-cat input[disabled]{ opacity:.5; }
.cookie-cat small{ display:block; font-size:.76rem; opacity:.65; font-weight:400; margin-top:.2em; }

/* ---------- Telegram CTA card (replaces lead-form) ---------- */
.tg-cta{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-l);
  padding: clamp(1.8rem,4vw,2.6rem); max-width: 560px; width:100%; min-width:0; box-sizing:border-box;
}
.tg-cta-head{ display:flex; align-items:flex-start; gap:1rem; margin-bottom:1.3rem; min-width:0; }
.tg-cta-head > div{ min-width:0; }
.tg-cta-icon{
  width:52px; height:52px; border-radius:50%; flex-shrink:0;
  background: linear-gradient(145deg, var(--accent-soft), var(--accent));
  display:flex; align-items:center; justify-content:center; color: oklch(99% 0 0);
}
.tg-cta-icon svg{ width:26px; height:26px; }
.tg-cta h3{ margin-bottom:.3rem; overflow-wrap:break-word; }
.tg-cta-head p{ max-width:none; opacity:.8; font-size:.95rem; overflow-wrap:break-word; }
.tg-cta-list{ list-style:none; padding:0; margin: 0 0 1.5rem; display:grid; gap:.7rem; min-width:0; }
.tg-cta-list li{
  display:flex; align-items:flex-start; gap:.7em; font-size:.92rem; color: var(--text); opacity:.9;
  min-width:0; overflow-wrap:break-word;
}
.tg-cta-list li::before{
  content:"✓"; flex-shrink:0; width:22px; height:22px; border-radius:50%;
  background: var(--accent-soft); color: var(--accent-strong); font-size:.7rem; font-weight:700;
  display:flex; align-items:center; justify-content:center; margin-top:.1em;
}
.tg-cta-note{ font-size:.78rem; opacity:.6; margin-top:1rem; margin-bottom:0; max-width:none; }

/* ---------- Telegram floating button ---------- */
.tg-float{
  position:fixed; right: clamp(1.1rem,3vw,2rem); bottom: clamp(1.1rem,3vw,2rem); z-index:90;
  width:58px; height:58px; border-radius:50%; background: var(--accent); color: oklch(99% 0 0);
  display:flex; align-items:center; justify-content:center; border:none; cursor:pointer;
  box-shadow: var(--shadow); animation: tg-breathe 3.2s ease-in-out infinite;
  transition: transform .2s ease, background .2s ease;
}
.tg-float:hover{ background: var(--accent-strong); transform: scale(1.06); }
.tg-float svg{ width:26px; height:26px; }
@keyframes tg-breathe{
  0%, 100%{ box-shadow: 0 0 0 0 oklch(56% 0.16 40 / .35), var(--shadow); }
  50%{ box-shadow: 0 0 0 10px oklch(56% 0.16 40 / 0), var(--shadow); }
}
.tg-tooltip{
  position:fixed; right: clamp(1.1rem,3vw,2rem); bottom: calc(clamp(1.1rem,3vw,2rem) + 72px); z-index:91;
  max-width:250px; background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-m);
  padding: .9rem 1rem; box-shadow: var(--shadow); font-size:.85rem; line-height:1.4;
  opacity:0; transform: translateY(8px); pointer-events:none; transition: opacity .3s ease, transform .3s ease;
}
.tg-tooltip.open{ opacity:1; transform: translateY(0); pointer-events:auto; }
.tg-tooltip strong{ display:block; margin-bottom:.2em; }
.tg-tooltip-close{
  position:absolute; top:.4rem; right:.5rem; width:22px; height:22px; border-radius:50%;
  border:none; background:transparent; color: var(--text-muted); font-size:.8rem; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}
@media (max-width: 640px){
  .tg-tooltip{ max-width: calc(100vw - 2.2rem - 58px); }
}

/* ---------- Telegram confirm overlay (portfolio cards) ---------- */
.tg-confirm-overlay{
  position:fixed; inset:0; background: var(--overlay); backdrop-filter: blur(3px);
  display:flex; align-items:center; justify-content:center; padding:1.5rem; z-index:110;
  opacity:0; pointer-events:none; transition: opacity .25s ease;
}
.tg-confirm-overlay.open{ opacity:1; pointer-events:auto; }
.tg-confirm{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-l);
  max-width: 420px; width:100%; box-sizing:border-box; padding: clamp(1.6rem,4vw,2.2rem);
  text-align:center; transform: translateY(10px); transition: transform .25s ease;
}
.tg-confirm-overlay.open .tg-confirm{ transform: translateY(0); }
.tg-confirm-icon{
  width:52px; height:52px; border-radius:50%; margin:0 auto 1rem;
  background: linear-gradient(145deg, var(--accent-soft), var(--accent));
  display:flex; align-items:center; justify-content:center; color: oklch(99% 0 0);
}
.tg-confirm-icon svg{ width:24px; height:24px; }
.tg-confirm h3{ margin-bottom:.5rem; overflow-wrap:break-word; }
.tg-confirm p{ opacity:.8; font-size:.92rem; margin-bottom:1.4rem; max-width:none; overflow-wrap:break-word; }
.tg-confirm-actions{ display:flex; gap:.7rem; min-width:0; }
.tg-confirm-actions .btn{ flex:1; min-width:0; }

/* ---------- page hero (inner pages) ---------- */
.page-hero{ padding: clamp(2.5rem,6vw,4.5rem) 0 clamp(2rem,4vw,3rem); border-bottom:1px solid var(--border); }
.page-hero h1{ font-family: var(--font-hero); font-weight:400; letter-spacing:0; }
.breadcrumb{ font-family: var(--font-mono); font-size:.75rem; color: var(--text-muted); margin-bottom:1.2rem; }
.breadcrumb a:hover{ color: var(--accent); }

/* ---------- services ---------- */
.service-row{
  display:grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--gap);
  padding: 2.2rem 0; border-top:1px solid var(--border); align-items:center;
}
.service-row:last-child{ border-bottom:1px solid var(--border); }
.service-row .price{ font-family: var(--font-display); font-size:1.4rem; }
.service-row .price small{ font-family: var(--font-body); font-size:.7rem; color: var(--text-muted); display:block; }

/* ---------- team ---------- */
.team-grid{ display:grid; grid-template-columns: repeat(4,1fr); gap: 1.2rem; }
.team-card{ background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-m); padding:1.4rem; }
.team-card .avatar{
  width:52px; height:52px; border-radius:50%; margin-bottom:1rem;
  background: linear-gradient(145deg, var(--accent-soft), var(--accent));
  overflow:hidden;
}
.team-card .avatar img{
  width:100%; height:100%; object-fit:cover; border-radius:50%; display:block;
  filter: grayscale(100%) contrast(1.05);
}
.team-card .role{ font-family: var(--font-mono); font-size:.72rem; color: var(--accent); text-transform:uppercase; letter-spacing:.06em; }
@media (min-width: 981px){
  .team-grid .team-card:nth-child(5){ grid-column: 2; }
  .team-grid .team-card:nth-child(6){ grid-column: 3; }
}

/* ---------- contacts ---------- */
.contact-grid{ display:grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: var(--gap); }
.map-block{
  aspect-ratio: 1/1; border-radius: var(--radius-l); border:1px solid var(--border);
  background:
    repeating-linear-gradient(0deg, transparent, transparent 39px, var(--border) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, var(--border) 40px),
    var(--surface);
  display:flex; align-items:center; justify-content:center; color: var(--text-muted); font-family: var(--font-mono); font-size:.8rem;
}
.contact-list .item{ display:flex; gap:1rem; padding: 1.1rem 0; border-top:1px solid var(--border); }
.contact-list .item:last-child{ border-bottom:1px solid var(--border); }
.contact-list .item .lbl{ width: 140px; flex-shrink:0; color: var(--text-muted); font-size:.85rem; }

/* ---------- responsive ---------- */
@media (max-width: 980px){
  .hero-grid, .calc-wrap, .grid-2, .contact-grid{ grid-template-columns: 1fr; }
  .grid-3, .reviews, .portfolio-grid{ grid-template-columns: repeat(2,1fr); }
  .factors-grid, .team-grid{ grid-template-columns: repeat(2,1fr); }
  .service-row{ grid-template-columns: 1fr; gap:.6rem; }
  .calc-result{ position:static; }
}
@media (max-width: 720px){
  .nav-desktop{ display:none; }
  .burger{ display:flex; }
  .nav-mobile{ display:flex; }
  .grid-3, .reviews, .portfolio-grid, .factors-grid, .team-grid{ grid-template-columns: 1fr; }
  .hero-stats{ gap:1.6rem; }
  .process-item{ grid-template-columns: 64px 1fr; }
  .process-item .step-num{ font-size:2.2rem; }
  .footer-grid{ grid-template-columns: repeat(2,1fr); }
  section{ padding: 3rem 0; }
}

/* ---------- accessibility: focus states ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, .p-card:focus-visible{
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px;
}
.theme-toggle:focus-visible, .burger:focus-visible{ outline-offset: 3px; }

/* ---------- portfolio card hover / clickable state ---------- */
.p-card{ transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; cursor:pointer; }
.p-card:hover, .p-card:focus-visible{ transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--accent); }
.p-card .thumb-icon, .p-card .thumb img{ transition: transform .3s ease; }
.p-card:hover .thumb-icon, .p-card:hover .thumb img{ transform: scale(1.05); }
.p-card .info .outcome{
  margin-top:.6em; font-size:.78rem; color: var(--accent); font-weight:600;
}
.p-card .info .cta-hint{
  margin-top:.8em; font-size:.78rem; color: var(--text-muted);
  display:flex; align-items:center; gap:.4em;
}

/* ---------- team avatar initials ---------- */
.team-card .avatar{
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-display); font-size:1.1rem; color: oklch(99% 0 0);
}

/* ---------- map iframe ---------- */
.map-frame{ width:100%; height:100%; border:0; border-radius: var(--radius-l); }

/* ---------- footer social row ---------- */
.social-row{ display:flex; gap:.7rem; margin-top:1.2rem; }
.social-row a{
  width:38px; height:38px; border-radius:50%; border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center; color: var(--text-muted);
}
.social-row a:hover{ color: var(--accent); border-color: var(--accent); }
.social-row svg{ width:17px; height:17px; stroke: currentColor; fill:none; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }

/* ---------- pricing comparison table ---------- */
.pricing-table{ width:100%; border-collapse:collapse; margin-top:1rem; }
.pricing-table th, .pricing-table td{
  padding: 1em 1.1em; border-bottom:1px solid var(--border); text-align:left; font-size:.92rem;
}
.pricing-table thead th{
  font-family: var(--font-mono); text-transform:uppercase; letter-spacing:.05em; font-size:.72rem;
  color: var(--text-muted); border-bottom:2px solid var(--border);
}
.pricing-table tbody th{ font-weight:600; color: var(--text); }
.pricing-table td{ color: var(--text-muted); }
.pricing-table tr td:first-child, .pricing-table tr th:first-child{ padding-left:0; }
.pricing-table-wrap{ overflow-x:auto; }

/* ---------- FAQ accordion (custom button, no <details> quirks) ---------- */
.faq-wrap{ max-width: 760px; }
.faq-item{ border-top:1px solid var(--border); }
.faq-item:last-child{ border-bottom:1px solid var(--border); }
.faq-q{
  width:100%; display:flex; justify-content:space-between; align-items:center; gap:1.2rem;
  background:none; border:none; padding:1.5rem 0; text-align:left;
  font-family: var(--font-display); font-size:1.15rem; font-weight:500; line-height:1.35; color: var(--text);
}
.faq-q span:first-child{ max-width: 56ch; }
.faq-plus{ position:relative; width:20px; height:20px; flex-shrink:0; }
.faq-plus::before, .faq-plus::after{
  content:""; position:absolute; background: var(--accent); border-radius:2px; transition: transform .2s ease, opacity .2s ease;
}
.faq-plus::before{ left:0; top:50%; width:100%; height:2px; transform:translateY(-50%); }
.faq-plus::after{ top:0; left:50%; width:2px; height:100%; transform:translateX(-50%); }
.faq-item.open .faq-plus::after{ transform: translateX(-50%) rotate(90deg); opacity:0; }
.faq-answer{
  display:grid; grid-template-rows: 0fr; overflow:hidden; transition: grid-template-rows .25s ease;
}
.faq-answer > p{ min-height:0; overflow:hidden; margin: 0 0 1.4rem; max-width: 62ch; }
.faq-item.open .faq-answer{ grid-template-rows: 1fr; }

/* ---------- mini testimonial (reused on inner pages) ---------- */
.mini-review{
  display:flex; gap:1.2rem; align-items:flex-start; background: var(--surface);
  border:1px solid var(--border); border-radius: var(--radius-m); padding: 1.4rem 1.6rem;
  max-width: 640px;
}
.mini-review .quote-mark{ font-family: var(--font-display); font-size:2.6rem; line-height:.6; color: var(--accent); flex-shrink:0; }
.mini-review p{ font-style:italic; color: var(--text); margin-bottom:.5em; max-width:none; }
.mini-review .who{ font-family: var(--font-mono); font-size:.75rem; color: var(--text-muted); }

/* ---------- referral teaser ---------- */
.referral-note{
  border:1px dashed var(--border); border-radius: var(--radius-m); padding: 1.1rem 1.3rem;
  font-size:.85rem; color: var(--text-muted); margin-top: 1.4rem;
}
.referral-note strong{ color: var(--text); }

/* ---------- print: calculator result only ---------- */
@media print{
  body.print-calc-result .site-header,
  body.print-calc-result .site-footer,
  body.print-calc-result .cookie-banner,
  body.print-calc-result .tg-float,
  body.print-calc-result .tg-tooltip,
  body.print-calc-result .page-hero,
  body.print-calc-result .calc-card,
  body.print-calc-result [data-print-hide],
  body.print-calc-result [data-print-result],
  body.print-calc-result main .section-tight.section-invert{
    display:none !important;
  }
  body.print-calc-result .calc-result{
    position:static; background:#fff !important; color:#000 !important; border:1px solid #ccc;
    box-shadow:none;
  }
  body.print-calc-result .calc-result .eyebrow{ color:#000 !important; }
}
