/* ============================================================
   LEGAL FAMILY OFFICE — Design System
   Navy + warm cream + subtle gold details
   ============================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Brand */
  --navy: #1e3a5f;
  --navy-deep: #14283f;
  --navy-light: #2a4a73;
  --navy-soft: #3a5a83;

  --gold: #b8952a;
  --gold-light: #c9a84c;
  --gold-soft: rgba(184, 149, 42, 0.18);

  /* Neutrals */
  --bg: #fafaf7;
  --bg-cream: #f4f0e8;
  --bg-cream-deep: #ece6d8;
  --bg-elevated: #ffffff;
  --bg-dark: #14283f;

  --text-primary: #14202e;
  --text-secondary: #4f5d70;
  --text-muted: #8893a3;
  --text-on-dark: #f6f3ec;
  --text-on-dark-muted: rgba(246,243,236,0.72);

  --border: rgba(20, 32, 46, 0.10);
  --border-strong: rgba(20, 32, 46, 0.20);
  --border-navy: rgba(30, 58, 95, 0.25);
  --border-gold: rgba(184, 149, 42, 0.32);

  /* Density (tweakable) */
  --density: 1;
  --section-pad-y: calc(72px * var(--density));
  --section-pad-y-sm: calc(48px * var(--density));
  --gap-card: calc(40px * var(--density));

  /* Card style (tweakable) */
  --card-bg: var(--bg-elevated);
  --card-border: 1px solid var(--border);
  --card-shadow: 0 1px 2px rgba(20,32,46,0.04);

  /* Container */
  --maxw: 1340px;
  --pad-x: 40px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; font-size: 16px; }
html, body { overflow-x: hidden; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern', 'liga', 'ss01';
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--navy-soft); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--navy); }

::selection { background: var(--navy); color: #fff; }

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.005em;
  color: var(--text-primary);
}

h1 em, h2 em, h3 em, .cormorant {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--navy);
}

a { color: inherit; text-decoration: none; }

img, svg { display: block; max-width: 100%; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad-x); }

/* =============== NAV =============== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  padding: 24px 0;
  transition: padding .4s var(--ease), background .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
  background: transparent;
  border-bottom: 1px solid transparent;
}
.nav.scrolled, .nav.solid {
  padding: 14px 0;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 30px rgba(20,32,46,0.04);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--pad-x);
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
}
.nav-brand {
  display: flex; align-items: center; gap: 14px;
  color: var(--navy); flex-shrink: 0;
}
.nav-brand-mark {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
  color: var(--navy);
  flex-shrink: 0;
}
.nav-brand-mark svg { width: 100%; height: 100%; display: block; }
.nav-brand-mark::before, .nav-brand-mark::after {
  content: ''; position: absolute;
  width: 7px; height: 7px;
  border: 1px solid var(--gold);
}
.nav-brand-mark::before { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.nav-brand-mark::after { bottom: -2px; right: -2px; border-left: none; border-top: none; }

.nav-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.nav-brand-name { font-family: 'Playfair Display', serif; font-size: 15px; font-weight: 500; letter-spacing: 2.5px; text-transform: uppercase; color: var(--navy); }
.nav-brand-sub { font-size: 9.5px; letter-spacing: 3px; text-transform: uppercase; color: var(--text-muted); margin-top: 3px; }

.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  color: var(--text-secondary);
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  font-weight: 500; position: relative;
  padding: 6px 0;
  transition: color .3s var(--ease);
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--navy);
  transition: right .5s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--navy); }
.nav-links a:hover::after, .nav-links a.active::after { right: 0; }

.nav-right { display: flex; align-items: center; gap: 24px; flex-shrink: 0; }
.nav-phone {
  color: var(--text-primary);
  font-size: 14px; font-weight: 500; letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color .3s var(--ease);
}
.nav-phone svg { width: 14px; height: 14px; color: var(--gold); }
.nav-phone:hover { color: var(--navy); }
.nav-lang {
  display: inline-flex; align-items: center; gap: 4px;
  background: transparent; border: 1px solid var(--border-strong);
  padding: 7px 12px;
  font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  font-weight: 600; color: var(--text-secondary);
  cursor: pointer;
  transition: all .3s var(--ease);
}
.nav-lang:hover { border-color: var(--navy); color: var(--navy); }
.nav-lang .lang-active { color: var(--navy); }
.nav-lang .lang-sep { opacity: .3; }

.burger {
  display: none;
  width: 38px; height: 38px;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
  background: transparent; border: 1px solid var(--border-strong);
  cursor: pointer;
}
.burger span { display: block; width: 18px; height: 1.5px; background: var(--navy); transition: all .3s var(--ease); }
.burger.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 150;
  background: var(--bg-cream);
  display: flex; flex-direction: column;
  padding: 110px 32px 32px;
  opacity: 0; visibility: hidden; transform: translateY(-12px);
  transition: all .45s var(--ease);
  overflow-y: auto;
}
.mobile-menu.active { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--border); }
.mobile-menu li { border-bottom: 1px solid var(--border); }
.mobile-menu a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 4px;
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  color: var(--text-primary);
}
.mobile-menu a::after { content: '→'; font-family: 'Inter'; font-size: 18px; color: var(--gold); opacity: .6; }
.mobile-menu-foot { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.mobile-menu-foot a { font-size: 16px; padding: 4px 0; }
.mobile-menu-foot a::after { display: none; }

/* =============== BUTTONS =============== */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 18px 36px;
  font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase;
  font-weight: 600;
  cursor: pointer; border: none;
  transition: all .4s var(--ease);
  position: relative; overflow: hidden;
  white-space: nowrap;
}
.btn-primary {
  background: var(--navy); color: #fff;
}
.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: var(--navy-deep);
  transform: translateY(101%);
  transition: transform .5s var(--ease);
}
.btn-primary > * { position: relative; z-index: 1; }
.btn-primary:hover::before { transform: translateY(0); }
.btn-primary:hover { box-shadow: 0 12px 40px rgba(30,58,95,0.30); transform: translateY(-2px); }

.btn-outline {
  background: transparent; color: var(--text-primary);
  border: 1px solid var(--border-strong);
}
.btn-outline:hover { border-color: var(--navy); color: var(--navy); background: rgba(30,58,95,0.04); }

.btn-gold {
  background: transparent; color: var(--gold);
  border: 1px solid var(--gold);
}
.btn-gold:hover { background: var(--gold); color: #fff; }

.btn-arrow { display: inline-block; transition: transform .3s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(4px); }

.btn-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--navy);
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  font-weight: 600;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--navy);
  transition: all .3s var(--ease);
}
.btn-link:hover { color: var(--gold); border-color: var(--gold); }
.btn-link:hover .btn-arrow { transform: translateX(4px); }

/* =============== SECTIONS =============== */
.section { padding: var(--section-pad-y) 0; position: relative; }
.section-sm { padding: var(--section-pad-y-sm) 0; }
.section-cream { background: var(--bg-cream); }
.section-dark { background: var(--bg-dark); color: var(--text-on-dark); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
.section-dark h2 em, .section-dark .cormorant { color: var(--gold-light); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 11px; letter-spacing: 4px; text-transform: uppercase;
  font-weight: 600; color: var(--gold);
  margin-bottom: 24px;
}
.eyebrow::before {
  content: ''; width: 36px; height: 1px; background: var(--gold);
}
.eyebrow.centered { justify-content: center; }
.eyebrow.no-line::before { display: none; }

.section-title {
  font-size: clamp(2rem, 4vw, 3.4rem);
  margin-bottom: 24px;
  max-width: 22ch;
  text-wrap: balance;
}
.section-title.large { font-size: clamp(2.4rem, 5vw, 4.2rem); }
.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 60ch;
  margin-bottom: 40px;
  text-wrap: pretty;
}

.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 40px; margin-bottom: 36px;
  flex-wrap: wrap;
}
.section-head .desc { max-width: 36ch; color: var(--text-secondary); }

/* =============== CARDS =============== */
.card {
  background: var(--card-bg);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: calc(36px * var(--density));
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s var(--ease);
  position: relative;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(20,32,46,0.10);
  border-color: var(--border-navy);
}

/* Card-style variants set by Tweaks data attribute on <body> */
body[data-card-style="flat"] {
  --card-bg: transparent;
  --card-border: 1px solid var(--border);
  --card-shadow: none;
}
body[data-card-style="elevated"] {
  --card-bg: var(--bg-elevated);
  --card-border: 1px solid transparent;
  --card-shadow: 0 8px 30px rgba(20,32,46,0.06);
}
body[data-card-style="bordered"] {
  --card-bg: transparent;
  --card-border: 1px solid var(--border-strong);
  --card-shadow: none;
}

/* =============== UTILITIES =============== */
.grid { display: grid; gap: var(--gap-card); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.gap-sm { gap: 12px; }
.gap-md { gap: 20px; }
.gap-lg { gap: 40px; }
.mb-sm { margin-bottom: 12px; }
.mb-md { margin-bottom: 24px; }
.mb-lg { margin-bottom: 48px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-gold { color: var(--gold); }
.text-navy { color: var(--navy); }

.divider { height: 1px; background: var(--border); width: 100%; }
.divider-gold { height: 1px; background: var(--gold); width: 60px; }

/* =============== HERO =============== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 130px 0 160px;
  overflow: hidden;
  background: var(--bg);
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse at 80% 30%, rgba(184,149,42,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 70%, rgba(30,58,95,0.08) 0%, transparent 50%),
    linear-gradient(135deg, var(--bg) 0%, var(--bg-cream) 100%);
}
.hero-canvas {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  opacity: 0.5;
  pointer-events: none;
}
body[data-hero-3d="false"] .hero-canvas { display: none; }

.hero-grid {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 64px;
  align-items: center;
  width: 100%;
}
.hero-content { max-width: 640px; }
.hero h1 {
  font-size: clamp(2.2rem, 4.6vw, 4rem);
  margin: 12px 0 28px;
  font-weight: 500;
  line-height: 1.08;
  text-wrap: balance;
}
.hero h1 em { color: var(--navy); font-weight: 400; }
.hero-desc {
  font-size: clamp(1rem, 1.15vw, 1.12rem);
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 56ch;
  margin-bottom: 32px;
}
.hero-kpi {
  display: grid; grid-template-columns: repeat(3, auto);
  gap: 24px 40px;
  margin: 0 0 36px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.hero-kpi > div { display: flex; flex-direction: column; gap: 4px; }
.hero-kpi strong {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--navy);
  line-height: 1.1;
}
.hero-kpi span {
  font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-muted); font-weight: 500;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* Hero visual (columns illustration + badges) */
.hero-visual {
  position: relative;
  aspect-ratio: 2/3;
  max-width: 480px;
  margin-left: auto;
  width: 100%;
}
.hero-columns,
.hero-scales {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
}

/* ---- Themis — photographic hero with motion design ---- */
.themis-stage {
  position: absolute; inset: 0;
  overflow: hidden;
}
/* Container aspect — close to source image 840×1070 so nothing crops */
.hero-visual { aspect-ratio: 84/107; }

/* Soft golden halo behind the statue — breathes slowly */
.themis-halo {
  position: absolute;
  left: 6%; top: 8%;
  width: 88%; height: 70%;
  background:
    radial-gradient(closest-side,
      rgba(184,149,42,0.40) 0%,
      rgba(184,149,42,0.18) 38%,
      rgba(184,149,42,0.06) 62%,
      transparent 80%);
  filter: blur(10px);
  z-index: 1;
  animation: themis-halo 9s ease-in-out infinite;
  will-change: opacity, transform;
}
@keyframes themis-halo {
  0%, 100% { opacity: .75; transform: scale(1);     }
  50%      { opacity: 1;   transform: scale(1.04);  }
}

/* SVG ring (sealing circle that draws in on load + a subtle navy ring) */
.themis-ring {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
  z-index: 2;
  pointer-events: none;
}
.themis-ring-seal {
  animation: themis-draw 3s cubic-bezier(.7,.0,.2,1) .4s forwards;
}
@keyframes themis-draw { to { stroke-dashoffset: 0; } }

/* Main image — Ken Burns + entrance */
.themis-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0;
  transform: scale(1.02);
  z-index: 3;
  animation:
    themis-in 1.6s cubic-bezier(.16,.84,.32,1) .25s forwards,
    themis-kenburns 24s ease-in-out 2.3s infinite alternate;
  will-change: opacity, transform;
}
@keyframes themis-in {
  to { opacity: 1; transform: scale(1.0); }
}
@keyframes themis-kenburns {
  0%   { transform: scale(1.00) translate3d(0, 0, 0); }
  100% { transform: scale(1.06) translate3d(-1%, -1.4%, 0); }
}

/* Diagonal gold shimmer pass — runs every ~14s */
.themis-shimmer {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 4;
  background: linear-gradient(
    115deg,
    transparent 38%,
    rgba(255,225,160,0.00) 45%,
    rgba(255,225,160,0.28) 50%,
    rgba(255,225,160,0.00) 55%,
    transparent 62%);
  mix-blend-mode: screen;
  transform: translateX(-110%);
  animation: themis-shimmer 14s cubic-bezier(.5,.0,.5,1) 3.8s infinite;
}
@keyframes themis-shimmer {
  0%        { transform: translateX(-110%); }
  16%       { transform: translateX( 110%); }
  17%, 100% { transform: translateX( 110%); }
}

/* Soft vignette */
.themis-vignette {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 5;
  background: radial-gradient(
    ellipse at center,
    transparent 55%,
    rgba(20,32,46,0.06) 80%,
    rgba(20,32,46,0.16) 100%);
}

/* Drifting gold motes */
.themis-mote {
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184,149,42,0.95), rgba(184,149,42,0) 70%);
  z-index: 6;
  pointer-events: none;
  animation: themis-drift 11s ease-in-out infinite;
  will-change: transform, opacity;
}
.themis-mote-1 { top: 26%; left: 16%; }
.themis-mote-2 { top: 60%; left: 72%; animation-duration: 13s; animation-delay: -3s; }
.themis-mote-3 { top: 18%; left: 58%; animation-duration: 15s; animation-delay: -6s; width: 3px; height: 3px; }
.themis-mote-4 { top: 76%; left: 30%; animation-duration: 12s; animation-delay: -8s; width: 3px; height: 3px; }
.themis-mote-5 { top: 44%; left: 84%; animation-duration: 14s; animation-delay: -10s; width: 4px; height: 4px; }
@keyframes themis-drift {
  0%, 100% { transform: translate(0, 0)       scale(1);    opacity: .35; }
  50%      { transform: translate(8px, -14px) scale(1.2);  opacity: 1;   }
}

@media (prefers-reduced-motion: reduce) {
  .themis-img       { animation: none; opacity: 1; transform: none; }
  .themis-halo,
  .themis-shimmer,
  .themis-mote      { animation: none; }
  .themis-shimmer   { display: none; }
  .themis-ring-seal { animation: none; stroke-dashoffset: 0; }
  .themis-banner    { transform: none !important; opacity: 1 !important; }
  .themis-banner-rule { transform: scaleX(1) !important; }
}

/* ---- Themis overlay banners ---- */
.themis-banner {
  position: absolute;
  left: 0; right: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  pointer-events: none;
  opacity: 0;
  transition: transform 1.1s cubic-bezier(.2,.7,.2,1), opacity .9s ease-out;
}
.themis-banner-top    { top: 6%;    flex-direction: column;         transform: translateY(-160%); align-items: flex-end; padding-right: 28px; }
.themis-banner-bottom { bottom: 8%; flex-direction: column-reverse; transform: translateY( 160%); align-items: flex-end; padding-right: 28px; }

.themis-banner-rule {
  display: block;
  width: 64px; height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .9s cubic-bezier(.2,.7,.2,1) .6s;
}

.themis-banner-text {
  display: inline-block;
  white-space: nowrap;
  color: var(--navy);
  text-shadow: 0 0 22px rgba(250,250,247,.85), 0 0 8px rgba(250,250,247,.95);
}
.themis-banner-text--top {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 500;
  font-size: clamp(11px, 0.9vw, 13px);
  letter-spacing: 5px;
  text-transform: uppercase;
}
.themis-banner-text--bottom {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(15px, 1.3vw, 19px);
  text-shadow: 0 0 22px rgba(250,250,247,.9), 0 0 8px rgba(250,250,247,1);
}

.hero-visual.in .themis-banner       { opacity: 1; transition-delay: .25s; }
.hero-visual.in .themis-banner-top,
.hero-visual.in .themis-banner-bottom{ transform: translateY(0); }
.hero-visual.in .themis-banner-rule  { transform: scaleX(1); }

@media (max-width: 760px) {
  .themis-banner-top    { top: 10px; }
  .themis-banner-bottom { bottom: 10px; }
  .themis-banner-text--top { letter-spacing: 3.5px; }
}

.hero-badge {
  position: absolute;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 18px 22px;
  box-shadow: 0 18px 50px rgba(20,32,46,0.10);
  display: flex; flex-direction: column; gap: 4px;
  z-index: 3;
  max-width: 220px;
}
.hero-badge::before {
  content: ''; position: absolute;
  top: -1px; left: -1px;
  width: 8px; height: 8px;
  border-top: 1.5px solid var(--gold);
  border-left: 1.5px solid var(--gold);
}
.hero-badge::after {
  content: ''; position: absolute;
  bottom: -1px; right: -1px;
  width: 8px; height: 8px;
  border-bottom: 1.5px solid var(--gold);
  border-right: 1.5px solid var(--gold);
}
.hero-badge-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--navy);
  line-height: 1.1;
}
.hero-badge-label {
  font-size: 10.5px; letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--text-muted); font-weight: 500;
  line-height: 1.5;
}
.hero-badge-1 { top: 18%; left: -12%; }
.hero-badge-2 { bottom: 14%; right: -8%; }

/* Scroll hint */
.hero-scroll-hint {
  position: absolute; left: 50%; bottom: 24px;
  transform: translateX(-50%); z-index: 5;
  display: inline-flex; flex-direction: column; align-items: center; gap: 14px;
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .3s var(--ease);
}
.hero-scroll-hint:hover { color: var(--navy); }
.hero-scroll-hint::after {
  content: ''; width: 1px; height: 32px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollHint 2s var(--ease) infinite;
}
@keyframes scrollHint { 0%,100% { transform: scaleY(1); transform-origin: top; } 50% { transform: scaleY(.4); } }
@media (max-height: 800px) {
  .hero-scroll-hint { display: none; }
  .hero { padding-bottom: 80px; }
}

/* =============== STATS =============== */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-cream);
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
}
.stat-item {
  background: var(--bg-cream);
  padding: 56px 32px;
  text-align: center;
}
.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 500;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}
.stat-num em { color: var(--gold); font-style: normal; font-size: 0.7em; }
.stat-label {
  font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--text-secondary); font-weight: 500;
}

/* =============== SERVICE CARDS =============== */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); }
.service-grid .service-card { background: var(--bg-elevated); }
.service-card {
  padding: 48px 40px;
  background: var(--bg);
  display: flex; flex-direction: column; gap: 20px;
  position: relative;
  transition: background .4s var(--ease);
  cursor: pointer;
  min-height: 360px;
}
.service-card:hover { background: var(--bg-cream); }
.service-card .num {
  font-family: 'Playfair Display', serif;
  font-size: 13px; letter-spacing: 4px;
  color: var(--gold); font-weight: 500;
}
.service-card h3 {
  font-size: 1.55rem;
  line-height: 1.25;
}
.service-card p {
  color: var(--text-secondary);
  font-size: 15px; line-height: 1.7;
  flex: 1;
}
.service-card .more {
  font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--navy); font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
  border-bottom: 1px solid currentColor; padding-bottom: 4px; align-self: flex-start;
  transition: gap .3s var(--ease);
}
.service-card:hover .more { gap: 14px; color: var(--gold); }

/* =============== CASE CARDS =============== */
.case-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 36px;
  display: flex; flex-direction: column; gap: 16px;
  transition: all .4s var(--ease);
  position: relative;
}
.case-card:hover { border-color: var(--navy); transform: translateY(-4px); box-shadow: 0 20px 50px rgba(20,32,46,0.08); }
.case-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold); font-weight: 600;
  padding-bottom: 2px;
}
.case-card h3 {
  font-size: 1.3rem; line-height: 1.3;
}
.case-card .amount {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem; color: var(--navy); font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.case-card .amount-label {
  font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--text-muted); margin-top: -8px;
}
.case-card .result {
  background: rgba(30,58,95,0.04); border-left: 2px solid var(--gold);
  padding: 14px 18px; font-size: 14px; color: var(--text-primary);
  line-height: 1.55;
}
.case-card .result strong { color: var(--navy); font-weight: 600; }

/* =============== TEAM =============== */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.team-card {
  display: flex; flex-direction: column; gap: 20px;
}
.team-photo {
  aspect-ratio: 4/5;
  background: var(--bg-cream-deep);
  position: relative; overflow: hidden;
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.team-card:hover .team-photo img { transform: scale(1.04); }
.team-photo.placeholder {
  background:
    repeating-linear-gradient(135deg, var(--bg-cream) 0 14px, var(--bg-cream-deep) 14px 28px);
  display: grid; place-items: center;
}
.team-photo.placeholder span {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 11px; letter-spacing: 2px;
  color: var(--text-muted);
  background: var(--bg);
  padding: 8px 14px;
  text-transform: uppercase;
}
.team-name { font-family: 'Playfair Display', serif; font-size: 1.4rem; }
.team-role { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-top: -8px; }
.team-bio { color: var(--text-secondary); font-size: 14px; line-height: 1.65; }

/* =============== FAQ =============== */
.faq-list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 28px 4px;
  cursor: pointer;
  background: transparent; border: none; width: 100%; text-align: left;
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--text-primary);
  transition: color .3s var(--ease);
}
.faq-q:hover { color: var(--navy); }
.faq-toggle {
  width: 28px; height: 28px; flex-shrink: 0;
  display: grid; place-items: center;
  border: 1px solid var(--border-strong);
  font-size: 14px; color: var(--navy);
  transition: all .35s var(--ease);
}
.faq-item.open .faq-toggle { background: var(--navy); color: #fff; transform: rotate(45deg); }
.faq-a {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .4s var(--ease);
}
.faq-a > div { overflow: hidden; }
.faq-a > div > div { padding: 0 4px 28px; color: var(--text-secondary); font-size: 15px; line-height: 1.75; max-width: 80ch; }
.faq-item.open .faq-a { grid-template-rows: 1fr; }

/* =============== CTA STRIP =============== */
.cta-strip {
  background: var(--bg-dark); color: var(--text-on-dark);
  padding: var(--section-pad-y-sm) 0;
  position: relative; overflow: hidden;
}
.cta-strip::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 70% 30%, rgba(184,149,42,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 10% 80%, rgba(184,149,42,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.cta-strip > * { position: relative; }
.cta-strip h2 { color: #fff; font-size: clamp(2rem, 4vw, 3.2rem); }
.cta-strip h2 em { color: var(--gold-light); }
.cta-strip .btn-outline { color: var(--text-on-dark); border-color: rgba(255,255,255,0.25); }
.cta-strip .btn-outline:hover { background: rgba(255,255,255,0.08); border-color: #fff; color: #fff; }

/* 3-column layout: text · promises · actions */
.cta-strip-grid { display: grid; grid-template-columns: 1.35fr 1fr auto; gap: 56px; align-items: center; }
.cta-text { max-width: 56ch; }
.cta-promises { list-style: none; display: flex; flex-direction: column; gap: 14px; padding-left: 24px; border-left: 1px solid rgba(255,255,255,0.16); }
.cta-promises li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-on-dark-muted); font-size: 14px; line-height: 1.55; }
.cta-tick { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: inline-grid; place-items: center; background: rgba(184,149,42,0.12); color: var(--gold-light); margin-top: 1px; }
.cta-tick svg { width: 13px; height: 13px; }
.cta-actions { display: flex; flex-direction: column; gap: 12px; align-items: stretch; min-width: 240px; }
.cta-actions .btn { justify-content: center; }

@media (max-width: 1100px) {
  .cta-strip-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .cta-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .cta-actions .btn { min-width: 0; }
}
@media (max-width: 720px) {
  .cta-strip-grid { grid-template-columns: 1fr; gap: 32px; }
  .cta-promises { border-left: 0; padding-left: 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.16); }
}

/* =============== FOOTER =============== */
.footer { background: var(--bg-dark); color: var(--text-on-dark); padding: 80px 0 32px; }
.footer-top { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,0.10); }
.footer h4 { color: #fff; font-family: 'Inter', sans-serif; font-size: 12px; letter-spacing: 3px; text-transform: uppercase; font-weight: 600; margin-bottom: 22px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--text-on-dark-muted); font-size: 14px; transition: color .3s var(--ease); }
.footer-col a:hover { color: var(--gold-light); }
.footer-brand { color: #fff; font-family: 'Playfair Display', serif; font-size: 22px; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 18px; }
.footer-brand-sub { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--gold-light); margin-bottom: 24px; }
.footer-tagline { color: var(--text-on-dark-muted); font-size: 14px; line-height: 1.7; max-width: 32ch; }
.footer-contact a, .footer-contact span { color: var(--text-on-dark-muted); font-size: 14px; display: block; }
.footer-contact .phone { color: #fff; font-size: 18px; font-weight: 500; margin-bottom: 12px; }
.footer-bottom { padding-top: 32px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; font-size: 12px; color: var(--text-on-dark-muted); }
.footer-bottom a { color: var(--text-on-dark-muted); }
.footer-bottom a:hover { color: var(--gold-light); }
.footer-socials { display: flex; gap: 12px; }
.footer-socials a { width: 36px; height: 36px; border: 1px solid rgba(255,255,255,0.15); display: grid; place-items: center; transition: all .3s var(--ease); }
.footer-socials a:hover { border-color: var(--gold-light); background: rgba(184,149,42,0.10); }
.footer-socials svg { width: 16px; height: 16px; color: var(--text-on-dark-muted); }
.footer-socials a:hover svg { color: var(--gold-light); }

/* =============== PAGE HEADER (interior pages) =============== */
.page-head {
  position: relative;
  padding: 180px 0 80px;
  background: var(--bg-cream);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.page-head::before {
  content: ''; position: absolute; right: -200px; top: -100px;
  width: 600px; height: 600px;
  border: 1px solid var(--border-gold);
  border-radius: 50%;
  pointer-events: none;
}
.page-head::after {
  content: ''; position: absolute; right: -100px; top: -50px;
  width: 400px; height: 400px;
  border: 1px solid var(--border-gold);
  border-radius: 50%;
  pointer-events: none;
}
.breadcrumb { display: flex; gap: 12px; align-items: center; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 32px; }
.breadcrumb a { color: var(--text-secondary); transition: color .3s; }
.breadcrumb a:hover { color: var(--navy); }
.breadcrumb .sep { color: var(--gold); }
.page-head h1 {
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  max-width: 22ch;
  margin-bottom: 24px;
  position: relative;
}
.page-head .lede { font-size: 1.1rem; color: var(--text-secondary); max-width: 56ch; line-height: 1.75; position: relative; }

/* =============== FILTERS =============== */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.filter-chip {
  background: transparent; border: 1px solid var(--border-strong);
  padding: 10px 18px;
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  font-weight: 600; color: var(--text-secondary);
  cursor: pointer; transition: all .3s var(--ease);
  font-family: inherit;
}
.filter-chip:hover { border-color: var(--navy); color: var(--navy); }
.filter-chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.filter-chip .count { opacity: .6; margin-left: 6px; font-weight: 500; }

/* =============== FORM =============== */
.form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label {
  font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-muted); font-weight: 600;
}
.form-field label .req { color: var(--gold); margin-left: 4px; }
.form-field input, .form-field textarea, .form-field select {
  font-family: inherit; font-size: 15px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  transition: border-color .3s var(--ease), background .3s var(--ease);
  width: 100%;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none;
  border-color: var(--navy);
  background: #fff;
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field.error input, .form-field.error textarea { border-color: #c0392b; }
.form-error { font-size: 12px; color: #c0392b; margin-top: 4px; }
.form-success {
  background: rgba(46, 134, 90, 0.08);
  border: 1px solid rgba(46, 134, 90, 0.3);
  color: #1a5237; padding: 20px;
  display: flex; gap: 14px; align-items: flex-start;
}
.form-success svg { width: 22px; height: 22px; flex-shrink: 0; color: #2e865a; }
.form-checkbox { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: var(--text-secondary); cursor: pointer; line-height: 1.5; }
.form-checkbox input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; }
.form-checkbox a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }

/* =============== KNOWLEDGE / AI SNIPPET BLOCKS =============== */
.knowledge-block {
  background: var(--bg-cream);
  border-left: 3px solid var(--gold);
  padding: 24px 28px;
  margin: 24px 0;
  font-size: 15px;
  line-height: 1.75;
}
.knowledge-block .label {
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold); font-weight: 700; margin-bottom: 10px;
  font-family: 'Inter', sans-serif;
}
.ai-snippet { display: none; }  /* invisible to visitors, machine-readable */

/* =============== REVEAL ANIMATIONS =============== */
/* Default — visible (no-JS / failed-JS safe). The class .lfo-js is added
   to <html> by main.js BEFORE the IntersectionObserver wires up, so
   reveal elements only get the opacity:0 hidden state when JS is alive.
   If main.js fails to load, the page renders normally. */
.reveal {
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
html.lfo-js .reveal {
  opacity: 0; transform: translateY(20px);
}
html.lfo-js .reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  html.lfo-js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}

/* =============== TWEAKS PANEL =============== */
.tweaks-fab {
  position: fixed; bottom: 24px; right: 24px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--navy); color: #fff;
  display: none; align-items: center; justify-content: center;
  cursor: pointer; border: none;
  box-shadow: 0 8px 30px rgba(20,32,46,0.25);
  z-index: 300;
  transition: transform .3s var(--ease);
}
.tweaks-fab.visible { display: flex; }
.tweaks-fab:hover { transform: scale(1.08); }
.tweaks-fab svg { width: 22px; height: 22px; }

.tweaks-panel {
  position: fixed; bottom: 90px; right: 24px;
  width: 320px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  box-shadow: 0 30px 80px rgba(20,32,46,0.20);
  padding: 24px;
  z-index: 301;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all .3s var(--ease);
}
.tweaks-panel.open { opacity: 1; visibility: visible; transform: none; }
.tweaks-panel h4 { font-family: 'Inter', sans-serif; font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; font-weight: 600; }
.tweaks-panel .tweaks-section + .tweaks-section { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--border); }
.tweaks-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tweaks-options button {
  font-family: inherit; font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  padding: 10px 4px; background: transparent; border: 1px solid var(--border-strong);
  color: var(--text-secondary); cursor: pointer;
  transition: all .25s var(--ease);
  font-weight: 600;
}
.tweaks-options button:hover { border-color: var(--navy); color: var(--navy); }
.tweaks-options button.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.tweaks-options.two { grid-template-columns: repeat(2, 1fr); }
.tweaks-toggle {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--text-primary); font-weight: 500;
}
.tweaks-toggle input[type="checkbox"] { width: 36px; height: 20px; appearance: none; background: var(--border-strong); border-radius: 10px; position: relative; cursor: pointer; transition: background .3s; }
.tweaks-toggle input[type="checkbox"]::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: transform .3s var(--ease); }
.tweaks-toggle input[type="checkbox"]:checked { background: var(--navy); }
.tweaks-toggle input[type="checkbox"]:checked::after { transform: translateX(16px); }

/* =============== RESPONSIVE =============== */
@media (max-width: 1180px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { max-width: 420px; margin: 0 auto; }
  .hero-badge-1 { left: -4%; }
  .hero-badge-2 { right: -4%; }
  .hero-content { max-width: 720px; }
}
@media (max-width: 1024px) {
  :root { --pad-x: 28px; --section-pad-y: calc(56px * var(--density)); --section-pad-y-sm: calc(40px * var(--density)); }
  .nav-links { display: none; }
  .nav-lang { display: none; }
  .nav-phone span { display: none; }
  .burger { display: flex; }
  .grid-3, .grid-4, .service-grid, .team-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item { padding: 40px 24px; }
  .hero { padding: 120px 0 90px; min-height: auto; }
  .hero-kpi { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .hero-kpi strong { font-size: 1.2rem; }
  /* Collapse inline-styled grids on common layout patterns */
  .about-teaser,
  .about-grid,
  .faq-wrap,
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 48px !important;
  }
  .contact-grid > div[style*="sticky"],
  .faq-wrap > div[style*="sticky"] {
    position: static !important;
  }
  /* Service / case detail rows */
  section .container > article > div[style*="grid-template-columns:1fr 1.4fr"],
  section .container > div[style*="grid-template-columns:1fr 1.4fr"],
  section .container > div[style*="grid-template-columns:1.1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
  }
  /* CTA strip (legacy override removed — see .cta-strip-grid responsive rules) */
}
@media (max-width: 760px) {
  .hero-kpi { grid-template-columns: 1fr 1fr; }
  .hero-kpi strong { font-size: 1.15rem; }
  .hero-visual { display: none; }
  /* Contact map — give it more vertical breathing room on narrow viewports.
     Yandex map widget refuses to render below a certain threshold; the
     default 5/3 aspect ratio collapses to ~190px on phones. */
  .contact-map { aspect-ratio: 4/3 !important; min-height: 340px !important; }
}
/* Tablet — break the 1fr/1.4fr sticky two-col layouts (services/training/about)
   before they pinch the right column to unreadable widths. Mobile-only rules
   live in the 640px block below. */
@media (max-width: 900px) {
  section .container > article > div[style*="grid-template-columns:1fr 1.4fr"],
  section .container > article > div[style*="grid-template-columns:1fr 1.2fr"],
  section .container > div[style*="grid-template-columns:1fr 1.4fr"],
  section .container > div[style*="grid-template-columns:1fr 1.2fr"],
  section .container > div[style*="grid-template-columns:1.25fr 1fr"],
  section .container > div[style*="grid-template-columns:1.1fr 1fr"],
  section .container > div[style*="grid-template-columns:1fr 2fr"] {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
  /* About-page timeline (140px / 1fr / 2fr) breaks badly at tablet too. */
  section [style*="grid-template-columns:140px 1fr 2fr"] {
    grid-template-columns: 120px 1fr !important;
    gap: 16px 32px !important;
  }
  section [style*="grid-template-columns:140px 1fr 2fr"] > *:nth-child(3) {
    grid-column: 1 / -1;
  }
  /* Drop sticky positioning so the left column doesn't overlap content. */
  section .container div[style*="position:sticky"] {
    position: static !important;
    top: auto !important;
  }
  /* Two-up "Что включает" lists shouldn't be 2-col on tablets — too cramped. */
  section ul[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 640px) {
  :root { --pad-x: 18px; --section-pad-y: calc(40px * var(--density)); --section-pad-y-sm: calc(32px * var(--density)); }
  .grid-2, .grid-3, .grid-4, .service-grid, .team-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .hero { padding: 110px 0 64px; min-height: auto; }
  .hero h1 { font-size: clamp(2rem, 8vw, 2.6rem); }
  .hero-desc { font-size: 1rem; margin-bottom: 24px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-scroll-hint { display: none; }
  .nav-brand-sub { display: none; }
  .nav-brand-name { font-size: 13px; letter-spacing: 2px; }
  .nav-brand-mark { width: 38px; height: 38px; }
  .footer-top { grid-template-columns: 1fr; }
  .page-head { padding: 130px 0 60px; }
  .tweaks-panel { width: calc(100vw - 32px); right: 16px; }
  .tweaks-fab { bottom: 16px; right: 16px; }
  .service-card, .case-card { padding: 32px 24px; min-height: auto; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-num { font-size: 2rem !important; }
  .section-title { font-size: clamp(1.6rem, 6vw, 2rem) !important; }
  .nav-inner { gap: 12px; }
  .nav-right { gap: 12px; }
  /* Collapse 2-col grids in services / cases / sub-lists */
  section .container > article > div[style*="grid-template-columns"],
  section .container > div[style*="grid-template-columns:1fr 2fr"],
  section .container > div[style*="grid-template-columns:1.3fr 1fr 2fr"],
  section ul[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  /* Force timeline rows */
  section [style*="grid-template-columns:140px 1fr 2fr"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 24px 0 !important;
  }
  /* Stop sticky inside small viewports */
  div[style*="position:sticky"] { position: static !important; }
  /* Filter bar — make horizontal scroll */
  .filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-left: calc(var(--pad-x) * -1);
    margin-right: calc(var(--pad-x) * -1);
    padding: 0 var(--pad-x) 8px;
    scrollbar-width: none;
  }
  .filter-bar::-webkit-scrollbar { display: none; }
  .filter-chip { flex-shrink: 0; }
  /* Service section padding */
  section .container > div[style*="position:sticky"] {
    position: static !important;
    top: auto !important;
    margin-bottom: 24px;
  }
  section .container > article[id] { padding: 48px 0 !important; }
  /* Inline blocks of two metrics on case cards */
  .case-card div[style*="display:flex;gap:32px"] { gap: 20px !important; }
  /* CTA strip stack — handled by .cta-strip-grid responsive rules */
}
@media (max-width: 420px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .filter-bar { gap: 6px; }
  .filter-chip { padding: 8px 12px; font-size: 10px; letter-spacing: 1px; }
  .btn { padding: 16px 22px; font-size: 11px; letter-spacing: 2px; }
  .hero-kpi { grid-template-columns: 1fr; gap: 12px; padding: 16px 0; }
  .hero-kpi > div { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 12px; }
  .hero-kpi strong { font-size: 1.15rem; }
  .nav-brand-text { display: none; }
  .nav-phone svg { width: 16px; height: 16px; }
}

/* =============== PRINT =============== */
@media print {
  .nav, .footer, .tweaks-fab, .tweaks-panel, .hero-scroll-hint, .cta-strip { display: none; }
  .hero { min-height: auto; padding: 40px 0; }
  body { background: #fff; color: #000; }
}

/* =============== WORDPRESS BLOCK EDITOR OVERRIDES =============== */
/* Внутри редактора Gutenberg / Site Editor нет хедера и футера темы,
   контент рендерится в ограниченной по высоте iframe. Фронтовые
   правила (fixed-навигация, hero min-height: 90vh, hero-scroll-hint)
   ломают превью «Десктоп» — страница кажется пустой или обрезанной.
   Отключаем их только внутри редакторской обёртки. */
.editor-styles-wrapper .nav,
.block-editor-iframe__body .nav,
.editor-styles-wrapper .footer,
.block-editor-iframe__body .footer,
.editor-styles-wrapper .mobile-menu,
.block-editor-iframe__body .mobile-menu,
.editor-styles-wrapper #cookieBanner,
.block-editor-iframe__body #cookieBanner,
.editor-styles-wrapper .hero-scroll-hint,
.block-editor-iframe__body .hero-scroll-hint {
  display: none !important;
}
.editor-styles-wrapper .hero,
.block-editor-iframe__body .hero {
  min-height: auto !important;
  padding: 32px 0 !important;
}
.editor-styles-wrapper .reveal,
.block-editor-iframe__body .reveal {
  opacity: 1 !important;
  transform: none !important;
}
