/* =========================================================================
   ХОГА ГРУПП — общая таблица стилей
   Спокойная светлая тема: тёплый ivory + глубокая бирюза + латунь.
   Один шрифт (Inter) на весь сайт — ровный ритм, без разнобоя.

   ВАЖНО: шрифт подключён локально через @font-face. Никаких обращений к
   fonts.googleapis.com, CDN и прочим внешним хостам на странице нет —
   именно из-за них сайт когда-то открывался из России по 19 секунд.
   ========================================================================= */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root{
  --sand:       #F4F2ED;
  --sand-soft:  #FAF9F5;
  --white:      #FFFFFF;
  --ink:        #16211F;
  --ink-soft:   #5E6866;
  --ink-faint:  #949C99;
  --line:       #E4E0D8;
  --deep:       #0F3B38;
  --deep-soft:  #1C5A55;
  --brass:      #B08A4F;
  --radius:     18px;
  --radius-sm:  12px;
  --max:        1180px;
  --shadow:     0 20px 60px -30px rgba(15,59,56,.22);
  --shadow-sm:  0 8px 24px -12px rgba(15,59,56,.16);
}

*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }
body{
  background:var(--sand);
  color:var(--ink);
  font-family:'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size:16px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  overflow-x:hidden;
  overflow-x:clip;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ list-style:none; }
button{ font-family:inherit; cursor:pointer; }
::selection{ background:var(--deep); color:var(--white); }

h1,h2,h3,h4{ font-weight:600; letter-spacing:-0.02em; color:var(--ink); line-height:1.2; }
p{ color:var(--ink-soft); }

.wrap{ max-width:var(--max); margin:0 auto; padding:0 32px; }

a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible{
  outline:2px solid var(--deep);
  outline-offset:3px;
  border-radius:4px;
}

.skip-link{ position:absolute; left:-9999px; top:0; z-index:900; background:var(--deep); color:var(--white); padding:12px 20px; }
.skip-link:focus{ left:0; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *{ animation:none !important; transition:none !important; }
  .reveal{ opacity:1 !important; transform:none !important; }
}

/* ---------- Шапка ---------- */
header{
  position:sticky; top:0; z-index:200;
  background:rgba(244,242,237,.82);
  backdrop-filter:blur(16px) saturate(140%);
  -webkit-backdrop-filter:blur(16px) saturate(140%);
  border-bottom:1px solid var(--line);
  transition:box-shadow .3s ease;
}
header.scrolled{ box-shadow:0 10px 30px -24px rgba(15,59,56,.45); }
.nav{
  display:flex; align-items:center; justify-content:space-between;
  gap:20px; padding:14px 32px; max-width:var(--max); margin:0 auto;
}
.brand{ display:flex; align-items:center; flex-shrink:0; }
.brand img{ height:42px; width:auto; }

nav.links{ display:flex; gap:32px; align-items:center; }
nav.links a{
  font-size:14.5px; color:var(--ink-soft); position:relative;
  padding:4px 0; white-space:nowrap; transition:color .2s ease;
}
nav.links a:hover, nav.links a.active{ color:var(--ink); }
nav.links a::after{
  content:''; position:absolute; bottom:-2px; left:0; width:0; height:1.5px;
  background:var(--deep); transition:width .3s ease;
}
nav.links a:hover::after, nav.links a.active::after{ width:100%; }

.nav-right{ display:flex; align-items:center; gap:18px; }
.nav-phone{ font-size:14.5px; font-weight:600; color:var(--ink); white-space:nowrap; }
.nav-phone:hover{ color:var(--deep); }

.cta-btn{
  background:var(--deep); color:var(--white); padding:10px 20px;
  border-radius:30px; font-size:13.5px; font-weight:500;
  border:1px solid var(--deep); white-space:nowrap; transition:opacity .25s ease;
}
.cta-btn:hover{ opacity:.8; color:var(--white); }

.menu-toggle{ display:none; background:none; border:none; padding:6px; flex-shrink:0; }
.menu-toggle span{ display:block; width:20px; height:1.5px; background:var(--ink); margin:5px 0; }

/* Закрытая панель именно `display:none`, а не сдвинутая за экран: сдвинутая
   добавляет странице лишнюю ширину, и в браузерах без `overflow-x: clip`
   внизу появляется горизонтальная полоса прокрутки. Выезд сохраняем
   анимацией при открытии. */
.mobile-panel{
  display:none;
  position:fixed; inset:0; z-index:300; background:var(--sand);
  padding:24px 28px; overflow-y:auto;
}
.mobile-panel.open{ display:block; animation:panel-in .38s cubic-bezier(.16,1,.3,1); }
@keyframes panel-in{ from{ transform:translateX(100%); } to{ transform:none; } }
.mobile-panel .close-row{ display:flex; justify-content:flex-end; margin-bottom:30px; }
.mobile-panel .close-btn{ background:none; border:none; font-size:28px; color:var(--ink); line-height:1; }
.mobile-panel nav{ display:flex; flex-direction:column; gap:26px; margin-bottom:34px; }
.mobile-panel nav a{ font-size:24px; font-weight:500; color:var(--ink); }

@media (max-width:960px){
  nav.links{ display:none; }
  .nav-phone{ display:none; }
  .menu-toggle{ display:block; }
}
@media (max-width:520px){
  .nav-right .cta-btn{ display:none; }
  .nav{ padding:12px 20px; }
  .brand img{ height:34px; }
}

/* ---------- Кнопки ---------- */
.btn-solid{
  display:inline-block; background:var(--deep); color:var(--white);
  padding:14px 30px; border-radius:30px; font-size:14.5px; font-weight:500;
  border:1px solid var(--deep);
  transition:opacity .25s ease, transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s ease;
}
.btn-solid:hover{ opacity:.85; color:var(--white); transform:translateY(-2px); box-shadow:0 16px 32px -16px rgba(15,59,56,.55); }
.btn-solid:active{ transform:translateY(0); }
.btn-outline{
  display:inline-block; border:1px solid var(--ink); color:var(--ink);
  padding:13px 29px; border-radius:30px; font-size:14.5px; font-weight:500;
  background:transparent; transition:all .25s ease;
}
.btn-outline:hover{ background:var(--ink); color:var(--white); transform:translateY(-2px); }

/* ---------- Hero ---------- */
.hero{ position:relative; z-index:0; padding:96px 0 80px; }
.hero::before, .hero::after{
  content:''; position:absolute; z-index:-1; border-radius:50%;
  filter:blur(70px); pointer-events:none;
}
.hero::before{ width:460px; height:460px; background:radial-gradient(circle, rgba(15,59,56,.10), transparent 70%); top:-150px; right:-120px; }
.hero::after{ width:320px; height:320px; background:radial-gradient(circle, rgba(176,138,79,.16), transparent 70%); bottom:-120px; left:-90px; }
.hero-grid{ display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr); gap:60px; align-items:center; }

.eyebrow{
  display:inline-flex; align-items:center; gap:10px;
  font-size:12px; color:var(--deep-soft); letter-spacing:2px;
  text-transform:uppercase; font-weight:600; margin-bottom:22px;
}
.eyebrow::before{ content:''; width:26px; height:1px; background:var(--brass); flex:none; }

.hero h1{ font-size:48px; line-height:1.14; margin-bottom:26px; font-weight:700; }
.hero p.lead{ font-size:18px; color:var(--ink-soft); max-width:540px; margin-bottom:36px; }
.hero-ctas{ display:flex; gap:16px; flex-wrap:wrap; }

.hero-visual{ position:relative; display:flex; align-items:center; justify-content:center; }
.hero-card{
  width:100%; background:var(--white); border:1px solid var(--line);
  border-radius:var(--radius); padding:30px 32px; box-shadow:var(--shadow);
  animation:hero-float 7s ease-in-out infinite;
}
@keyframes hero-float{ 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-12px); } }
.hero-card .hc-title{
  font-size:11.5px; letter-spacing:1.6px; text-transform:uppercase;
  color:var(--ink-faint); font-weight:600; margin-bottom:18px;
}
.hero-card dl{ display:grid; gap:0; }
.hero-card .hc-row{
  display:flex; justify-content:space-between; align-items:baseline; gap:16px;
  padding:13px 0; border-bottom:1px solid var(--line); font-size:14.5px;
}
.hero-card .hc-row:last-child{ border-bottom:0; padding-bottom:0; }
.hero-card .hc-row dt{ color:var(--ink-soft); }
.hero-card .hc-row dd{ color:var(--ink); font-weight:600; text-align:right; }

@media (max-width:960px){
  .hero-grid{ grid-template-columns:minmax(0,1fr); gap:38px; }
  .hero h1{ font-size:36px; }
  .hero{ padding:48px 0 56px; }
  .hero p.lead{ font-size:16.5px; }
}
@media (max-width:520px){
  .hero-ctas .btn-solid, .hero-ctas .btn-outline{ width:100%; text-align:center; }
}

/* ---------- Полоса цифр ---------- */
.stats-bar{ border-top:1px solid var(--line); border-bottom:1px solid var(--line); background:var(--white); }
.stats-grid{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); text-align:center; }
.stat{ padding:36px 12px; border-left:1px solid var(--line); }
.stat:first-child{ border-left:none; }
.stat .num{ font-size:34px; font-weight:700; color:var(--deep); display:block; letter-spacing:-0.02em; line-height:1.1; }
.stat .label{ font-size:13px; color:var(--ink-soft); margin-top:8px; display:block; }
@media (max-width:760px){
  .stats-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  .stat:nth-child(3){ border-left:none; }
  .stat:nth-child(n+3){ border-top:1px solid var(--line); }
}

/* ---------- Секции ---------- */
section{ padding:100px 0; }
.section-head{ max-width:660px; margin-bottom:56px; }
.section-head h2{ font-size:36px; line-height:1.24; }
.section-head p{ margin-top:16px; font-size:16.5px; }
.section-head.center{ margin-left:auto; margin-right:auto; text-align:center; }
.section-head.center .eyebrow::before{ display:none; }
@media (max-width:760px){
  section{ padding:64px 0; }
  .section-head{ margin-bottom:36px; }
  .section-head h2{ font-size:27px; }
}

/* ---------- Карточки ---------- */
.card-grid{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:22px; }
.card-grid.cols-2{ grid-template-columns:repeat(2, minmax(0,1fr)); }
.card{
  background:var(--white); border:1px solid var(--line); border-radius:var(--radius);
  padding:34px 30px; text-align:left; width:100%; font-family:inherit; color:inherit;
  transition:transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s ease, border-color .35s ease;
}
.card:hover{ transform:translateY(-6px); box-shadow:0 26px 54px -26px rgba(15,59,56,.28); border-color:var(--ink-faint); }
.card .icon-badge{
  width:48px; height:48px; border-radius:14px;
  background:linear-gradient(135deg, var(--deep), var(--deep-soft)); color:var(--white);
  display:flex; align-items:center; justify-content:center; margin-bottom:20px;
  font-size:17px; font-weight:600; transition:transform .4s cubic-bezier(.16,1,.3,1);
}
.card:hover .icon-badge{ transform:scale(1.08) rotate(-4deg); }
.card h3{ font-size:19px; margin-bottom:10px; }
.card p{ font-size:14.5px; }
.card .card-link{
  display:inline-block; margin-top:16px; font-size:13.5px; font-weight:600;
  color:var(--deep); border-bottom:1px solid var(--deep);
}
button.card{ cursor:pointer; }
@media (max-width:960px){ .card-grid, .card-grid.cols-2{ grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media (max-width:620px){ .card-grid, .card-grid.cols-2{ grid-template-columns:minmax(0,1fr); } }

/* ---------- Сетка «почему мы» ---------- */
.grid-2{
  display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:1px;
  background:var(--line); border:1px solid var(--line);
  border-radius:var(--radius); overflow:hidden;
}
.grid-2 .why-card{ background:var(--white); padding:40px 34px; transition:background .3s ease; }
.grid-2 .why-card:hover{ background:var(--sand-soft); }
.grid-2 .why-card .idx{ font-size:38px; font-weight:700; color:var(--line); line-height:1; }
.grid-2 .why-card h3{ margin:16px 0 10px; font-size:19px; }
.grid-2 .why-card p{ font-size:14.5px; }
@media (max-width:760px){ .grid-2{ grid-template-columns:minmax(0,1fr); } }

/* ---------- Список направлений ---------- */
.service-list{ display:grid; grid-template-columns:minmax(0,1fr); gap:18px; }
.service-item{
  display:grid; grid-template-columns:80px minmax(0,1fr); gap:26px;
  background:var(--white); border:1px solid var(--line); border-radius:var(--radius);
  padding:32px 34px; text-align:left; width:100%; font-family:inherit; color:inherit;
  transition:transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s ease;
}
button.service-item{ cursor:pointer; }
.service-item:hover{ transform:translateX(6px); box-shadow:var(--shadow-sm); }
.service-item .s-num{ font-size:14px; font-weight:700; color:var(--brass); }
.service-item .s-tag{
  display:inline-block; font-size:11px; letter-spacing:1.4px; text-transform:uppercase;
  color:var(--ink-faint); font-weight:600; margin-bottom:8px;
}
.service-item h3{ font-size:21px; margin-bottom:10px; }
.service-item p{ font-size:15px; }
.service-item .card-link{ display:inline-block; margin-top:14px; font-size:13.5px; font-weight:600; color:var(--deep); border-bottom:1px solid var(--deep); }
@media (max-width:640px){ .service-item{ grid-template-columns:minmax(0,1fr); gap:8px; padding:26px 22px; } }

/* ---------- Полоса шагов ---------- */
.process-strip{
  display:flex; overflow-x:auto; scrollbar-width:none;
  border-top:1px solid var(--line); border-bottom:1px solid var(--line); background:var(--white);
}
.process-strip::-webkit-scrollbar{ display:none; }
.p-step{ flex:1 0 240px; padding:36px 30px; border-left:1px solid var(--line); transition:background .3s ease; }
.p-step:hover{ background:var(--sand-soft); }
.p-step:first-child{ border-left:none; }
.p-step .num{ color:var(--brass); font-size:14px; font-weight:700; }
.p-step h3{ font-size:18px; margin:14px 0 10px; }
.p-step p{ font-size:14px; }

/* ---------- Ценности / отрасли ---------- */
.values-grid{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:20px; }
.value-item{
  background:var(--white); border:1px solid var(--line); border-radius:var(--radius);
  padding:32px 28px; transition:transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s ease;
}
.value-item:hover{ transform:translateY(-4px); box-shadow:var(--shadow-sm); }
.value-item .v-icon{ color:var(--deep); margin-bottom:16px; }
.value-item h4{ font-size:17px; margin-bottom:8px; }
.value-item p{ font-size:14px; }
@media (max-width:900px){ .values-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media (max-width:560px){ .values-grid{ grid-template-columns:minmax(0,1fr); } }

/* ---------- Партнёры ---------- */
.partner-wall{ display:grid; grid-template-columns:repeat(auto-fill, minmax(158px, 1fr)); gap:10px; }
.partner-wall span{
  display:inline-flex; align-items:center; justify-content:center;
  min-height:66px; padding:12px 16px; text-align:center;
  background:var(--white); border:1px solid var(--line); border-radius:var(--radius-sm);
  font-size:14px; color:var(--ink-soft);
  transition:border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.partner-wall span:hover{ border-color:var(--ink-faint); box-shadow:var(--shadow-sm); transform:translateY(-2px); }
.partner-wall span.has-logo img{ height:32px; width:auto; max-width:100%; object-fit:contain; }
.partner-note{
  font-size:11.5px; letter-spacing:1.6px; text-transform:uppercase;
  color:var(--ink-faint); font-weight:600; margin:36px 0 16px;
}
.cert-line{
  display:inline-flex; align-items:center; gap:10px; margin-top:30px;
  background:var(--white); border:1px solid var(--line); border-radius:30px;
  padding:12px 22px; font-size:14px; color:var(--ink);
}
.cert-line svg{ color:var(--deep); flex:none; }

/* ---------- Тёмная CTA-полоса ---------- */
.cta-band{ background:var(--deep); color:var(--white); padding:80px 0; position:relative; overflow:hidden; }
.cta-band::before{
  content:''; position:absolute; width:480px; height:480px; border-radius:50%;
  background:radial-gradient(circle, rgba(255,255,255,.07), transparent 70%);
  top:-220px; right:-160px; pointer-events:none;
}
.cta-band .wrap{ display:flex; align-items:center; justify-content:space-between; gap:40px; flex-wrap:wrap; position:relative; }
.cta-band h2{ color:var(--white); font-size:32px; max-width:580px; }
.cta-band p{ color:rgba(255,255,255,.72); margin-top:10px; max-width:560px; }
.cta-band .btn-solid{ background:var(--white); color:var(--deep); border-color:var(--white); }
.cta-band .btn-solid:hover{ opacity:.88; color:var(--deep); }
@media (max-width:760px){ .cta-band{ padding:56px 0; } .cta-band h2{ font-size:25px; } }

/* ---------- Внутренние страницы ---------- */
.page-hero{
  padding:64px 0 56px; border-bottom:1px solid var(--line);
  background:var(--white); position:relative; z-index:0; overflow:hidden;
}
.page-hero::before{
  content:''; position:absolute; z-index:-1; width:400px; height:400px; border-radius:50%;
  background:radial-gradient(circle, rgba(15,59,56,.07), transparent 70%);
  filter:blur(60px); top:-170px; right:-100px; pointer-events:none;
}
.page-hero h1{ font-size:44px; font-weight:700; }
.page-hero p{ font-size:17px; max-width:640px; margin-top:16px; }
@media (max-width:760px){ .page-hero{ padding:44px 0 40px; } .page-hero h1{ font-size:30px; } }

/* ---------- Текстовые блоки ---------- */
.prose-grid{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:60px; align-items:start; }
@media (max-width:900px){ .prose-grid{ grid-template-columns:minmax(0,1fr); gap:32px; } }
.prose p + p{ margin-top:16px; }
.check-list{ display:grid; gap:14px; margin-top:26px; }
.check-list li{ display:flex; gap:12px; align-items:flex-start; font-size:15px; color:var(--ink); }
.check-list svg{ flex:none; color:var(--deep); margin-top:3px; }

/* ---------- Новости ---------- */
.news-grid{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:22px; }
.news-card{
  background:var(--white); border:1px solid var(--line); border-radius:var(--radius);
  padding:30px 28px; display:flex; flex-direction:column; gap:10px;
  transition:transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s ease;
}
.news-card:hover{ transform:translateY(-5px); box-shadow:var(--shadow-sm); }
.news-date{ font-size:12px; letter-spacing:1.2px; text-transform:uppercase; color:var(--brass); font-weight:600; }
.news-card h3{ font-size:18px; line-height:1.35; }
.news-card p{ font-size:14.5px; }
@media (max-width:960px){ .news-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media (max-width:620px){ .news-grid{ grid-template-columns:minmax(0,1fr); } }

/* ---------- Форма ---------- */
.contact-grid{ display:grid; grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); gap:60px; align-items:start; }
@media (max-width:900px){ .contact-grid{ grid-template-columns:minmax(0,1fr); gap:40px; } }
.contact-info .item{ margin-bottom:28px; }
.contact-info .item .label{ font-size:11.5px; letter-spacing:1.5px; color:var(--ink-faint); text-transform:uppercase; font-weight:600; }
.contact-info .item .val{ font-size:17px; color:var(--ink); margin-top:6px; display:block; font-weight:500; }
.contact-info .item a.val:hover{ color:var(--deep); }

form{ display:flex; flex-direction:column; gap:18px; }
.form-row{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:18px; }
label{ font-size:13px; color:var(--ink-soft); margin-bottom:6px; display:block; }
input, select, textarea{
  background:var(--white); border:1px solid var(--line); padding:14px 16px;
  font-family:inherit; font-size:14.5px; color:var(--ink);
  border-radius:var(--radius-sm); width:100%;
  transition:border-color .2s ease, box-shadow .2s ease;
}
input:focus, select:focus, textarea:focus{
  outline:none; border-color:var(--deep); box-shadow:0 0 0 3px rgba(15,59,56,.10);
}
textarea{ resize:vertical; min-height:120px; }
.consent{ display:flex; gap:11px; align-items:flex-start; font-size:13.5px; color:var(--ink-soft); }
.consent input{ width:18px; height:18px; flex:none; margin-top:3px; accent-color:var(--deep); }
form .btn-solid{ align-self:flex-start; border:none; }
.form-status{ font-size:14px; font-weight:500; min-height:1.3em; }
.form-status.ok{ color:var(--deep); }
.form-status.err{ color:#B3402F; }
@media (max-width:640px){ .form-row{ grid-template-columns:minmax(0,1fr); } form .btn-solid{ width:100%; text-align:center; } }

/* ---------- Подвал ---------- */
footer{ background:var(--white); border-top:1px solid var(--line); padding:56px 0 26px; }
.foot-grid{ display:grid; grid-template-columns:1.5fr 1fr 1fr 1.2fr; gap:40px; margin-bottom:40px; }
footer .brand{ margin-bottom:14px; }
footer h4{ font-size:13px; letter-spacing:.6px; margin-bottom:16px; font-weight:600; }
footer .foot-links a{ display:block; color:var(--ink-soft); font-size:14px; margin-bottom:10px; }
footer .foot-links a:hover{ color:var(--ink); }
.foot-desc{ color:var(--ink-soft); font-size:14px; margin-top:14px; max-width:320px; }
.foot-bottom{
  border-top:1px solid var(--line); padding-top:22px;
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px;
  font-size:12.5px; color:var(--ink-faint);
}
@media (max-width:860px){ .foot-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); gap:30px; } }
@media (max-width:520px){ .foot-grid{ grid-template-columns:minmax(0,1fr); } }

/* ---------- Модальные окна ---------- */
.modal-overlay{
  display:none; position:fixed; inset:0; z-index:400;
  background:rgba(22,33,31,.55); backdrop-filter:blur(5px);
  padding:24px; overflow-y:auto;
}
.modal-overlay.open{ display:flex; align-items:center; justify-content:center; }
.modal{
  position:relative; width:min(100%, 660px); background:var(--sand-soft);
  border-radius:var(--radius); padding:38px;
  box-shadow:0 40px 90px -30px rgba(0,0,0,.5);
  animation:modal-in .28s cubic-bezier(.16,1,.3,1);
}
@keyframes modal-in{ from{ opacity:0; transform:translateY(16px) scale(.985); } to{ opacity:1; transform:none; } }
.modal-close{
  position:absolute; right:16px; top:16px; width:36px; height:36px;
  border:1px solid var(--line); background:var(--white); color:var(--ink-soft);
  border-radius:50%; font-size:17px; line-height:1;
}
.modal-close:hover{ color:var(--ink); border-color:var(--ink-faint); }
.modal h3{ font-size:25px; margin-bottom:14px; }
.modal p{ font-size:15px; }
.spec-table{ margin:24px 0; border-top:1px solid var(--line); }
.spec-table li{
  display:flex; justify-content:space-between; gap:16px; align-items:baseline;
  padding:12px 0; border-bottom:1px solid var(--line); font-size:14.5px; color:var(--ink-soft);
}
.spec-table b{ color:var(--ink); font-weight:600; text-align:right; }
.modal-note{
  background:var(--white); border:1px solid var(--line);
  border-radius:var(--radius-sm); padding:20px 22px; margin:22px 0;
}
.modal-note b{ display:block; margin-bottom:6px; color:var(--ink); }
.modal-note p{ font-size:14px; margin:0; }
.modal .btn-solid{ width:100%; text-align:center; }
@media (max-width:600px){ .modal{ padding:30px 22px; } .modal h3{ font-size:21px; } }

/* ---------- Плавающая кнопка игры ---------- */
.game-fab{
  position:fixed; right:26px; bottom:26px; z-index:350;
  display:inline-flex; align-items:center; gap:10px;
  padding:13px 22px; border:none; border-radius:30px;
  background:var(--deep); color:var(--white);
  box-shadow:0 14px 34px -12px rgba(15,59,56,.6);
  font-size:14px; font-weight:500;
  transition:transform .25s cubic-bezier(.16,1,.3,1), opacity .25s ease;
}
.game-fab:hover{ transform:translateY(-3px); opacity:.92; }
.game-fab::after{
  content:''; position:absolute; inset:0; border-radius:30px;
  background:var(--deep); z-index:-1; animation:fab-pulse 2.8s ease-out infinite;
}
@keyframes fab-pulse{ 0%{ transform:scale(1); opacity:.45; } 100%{ transform:scale(1.35); opacity:0; } }
.game-fab-ring, .game-fab-shine, .game-fab-badge{ display:none; }
@media (max-width:520px){
  .game-fab{ right:16px; bottom:16px; padding:12px 16px; }
  .game-fab-label{ display:none; }
}

/* ---------- Игра ---------- */
.game-modal-box{ max-width:720px; }
.game-intro{ font-size:14.5px; margin-bottom:20px; }
.game-hud{ display:flex; align-items:center; gap:22px; margin-bottom:16px; flex-wrap:wrap; }
.game-stat{ display:flex; align-items:baseline; gap:8px; font-size:15px; color:var(--ink); font-variant-numeric:tabular-nums; }
.game-stat-label{ font-size:11px; letter-spacing:1.3px; text-transform:uppercase; color:var(--ink-faint); font-weight:600; }
.game-hud .btn-outline{ margin-left:auto; padding:9px 18px; font-size:13px; }
.game-board-wrap{
  position:relative; background:var(--deep); border-radius:var(--radius); overflow:hidden;
}
.game-svg{ width:100%; height:auto; display:block; touch-action:none; -webkit-user-select:none; user-select:none; }
.game-wire-drag{ pointer-events:none; }
.game-rail{ fill:rgba(255,255,255,.09); stroke:rgba(255,255,255,.16); }
.game-terminal{ cursor:pointer; }
.game-terminal .game-hit{ cursor:pointer; }
.game-terminal:focus{ outline:none; }
.game-terminal:focus .game-dot{ stroke-width:4; }
.game-terminal.selected .game-dot{ filter:drop-shadow(0 0 6px rgba(255,255,255,.65)); }
.game-select-ring{ animation:ring-pulse 1.1s ease-in-out infinite; transition:opacity .15s; }
@keyframes ring-pulse{ 0%,100%{ opacity:.35; r:20; } 50%{ opacity:.8; r:23; } }
.game-terminal.done{ cursor:default; }
.game-terminal.done .game-select-ring{ display:none; }
.game-wire-done{ filter:drop-shadow(0 0 4px rgba(255,255,255,.28)); }
.game-wire-wrong{ animation:wire-shake .38s ease; }
@keyframes wire-shake{ 0%,100%{ opacity:1; } 50%{ opacity:.3; } }
.game-win{
  position:absolute; inset:0; display:grid; place-items:center;
  background:rgba(15,59,56,.93); border-radius:var(--radius);
}
.game-win[hidden]{ display:none; }
.game-win-card{ text-align:center; padding:26px; }
.game-win-card h3{ color:var(--white); font-size:20px; margin-bottom:10px; }
.game-win-card p{ color:rgba(255,255,255,.7); font-size:14px; margin-bottom:20px; }
.game-win-card .btn-solid{ background:var(--white); color:var(--deep); border-color:var(--white); width:auto; }

/* ---------- Появление при прокрутке ---------- */
.reveal{
  opacity:0; transform:translateY(24px);
  transition:opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
}
.reveal.in-view{ opacity:1; transform:none; }
