/*
  Лендинг — швейцарский ч/б, белый фон, паттерн как вставки 50/50.
  Hero: bgbaner2.jpg (50%) + белый блок с текстом (50%).
  Блок: 50% паттерн / 50% белый + лого в центре.
*/

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --text: #0a0a0a;
  --text-muted: #525252;
  --border: #e5e5e5;
  --border-strong: #a3a3a3;
  --font-head: "Cormorant Garamond", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;
  /* шире контейнер и чуть меньше боковые отступы */
  --wrap: min(1280px, 95vw);
  --space: clamp(1.25rem, 3vw, 2.5rem);
  --sec-gap: clamp(2rem, 6vw, 4rem);
  --pattern: url('images/bg_patternlight.webp');
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.2s ease;
}

.header.scrolled {
  box-shadow: 0 2px 12px rgba(28, 25, 23, 0.06);
}

.header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo img {
  display: block;
  height: 36px;
  width: auto;
}

.lang-switch {
  display: flex;
  gap: 0;
}

.lang-btn {
  padding: 0.35rem 0.6rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
}

.lang-btn:first-child {  }
.lang-btn:last-child {  margin-left: -1px; }
.lang-btn.active,
.lang-btn[aria-pressed="true"] {
  color: var(--text);
  background: var(--bg);
  border-color: var(--text);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
}

.nav a:hover { color: var(--text-muted); }

.btn-acc {
  padding: 0.5rem 1rem;
  background: var(--text);
  color: var(--bg) !important;
  
  font-weight: 600;
}

.btn-acc:hover {
  background: var(--text-muted);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--border);
  
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

@media (max-width: 900px) {
  .nav { display: none; }
  .nav.open { display: flex; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); padding: 1rem; border-bottom: 1px solid var(--border); flex-direction: column; }
  .menu-toggle { display: flex; }
  .lang-switch { margin-left: auto; }
}

/* --- Hero 50% изображение / 50% белый блок --- */
.hero-split {
  margin-top: 70px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 85vh;
  min-height: 85dvh;
}

.hero-sub {
  min-height: 60vh;
  min-height: 60dvh;
}

.hero-visual {
  position: relative;
  background-image: url('images/bgbaner2.jpg');
  background-size: cover;
  background-position: center;
}

.hero-visual--alt {
  background-image: url('images/onemorehero.jpg');
}

.hero-visual--why {
  background-image: url('images/hero3greyscale.jpg');
}

.hero-visual--faq {
  background-image: url('images/hero4greyscale.jpg');
}

.hero-visual--docs {
  background-image: url('images/hero3greyscale.jpg');
}

.hero-visual--services {
  background-image: url('images/hero4greyscale.jpg');
}

.hero-visual--contacts {
  background-image: none;
}

/* Ч/б маска для цветных изображений через псевдо-слой */
.hero-visual--contacts::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('images/img-contact-bw.jpg') center / cover no-repeat;
  filter: grayscale(1) contrast(1.15) brightness(0.92);
  transform: scale(1.02);
}

.hero-visual--contacts::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.45), rgba(0,0,0,0.1));
  pointer-events: none;
}

.hero-content {
  position: relative;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space);
}

/* Иконка на фоне по центру правой колонки; анимация появления при скролле */
.hero-content::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("images/logonotext.webp") no-repeat center;
  background-size: 260px auto;
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}

.hero-content.logo-bg-visible::before {
  opacity: 0.08;
  transform: scale(1);
}

.hero-content-inner {
  position: relative;
  z-index: 1;
  max-width: 30rem;
  text-align: left;
}

.hero-label {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
  color: var(--text);
  margin-bottom: 1rem;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.hero-cta { margin-top: 1rem; }

/* Кнопки ч/б */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--text);
  border: 2px solid var(--text);
  border-radius: 0;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.btn:hover {
  background: transparent;
  color: var(--text);
}

.btn-inv {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
}

.btn-inv:hover {
  background: var(--text);
  color: var(--bg);
}

/* Макет 50/50 (используется в brand-block-mockup.html для сборки композиций) */
.brand-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 40vh;
}

.brand-pattern {
  background-image: var(--pattern);
  background-size: 1920px 1080px;
  background-position: var(--pattern-x, 100%) center;
  background-repeat: no-repeat;
  transition: background-position 0.15s ease-out;
}

.brand-white {
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space);
  min-height: 280px;
}

.brand-logo-wrap {
  text-align: center;
  max-width: 100%;
}

/* только символ (altarr), без текста логотипа — чтобы не лезло на фон */
.brand-logo {
  width: 140px;
  height: 140px;
  object-fit: contain;
  display: block;
}

@media (max-width: 768px) {
  .hero-split {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-visual { min-height: 45vh; }
  .hero-content { padding: 3rem var(--space); }
  .hero-content-inner { text-align: center; }
  .brand-block { grid-template-columns: 1fr; min-height: auto; }
  .brand-pattern { min-height: 25vh; }
  .brand-white { min-height: 20vh; }
}

/* --- Ticker (ч/б) --- */
.ticker-bar {
  background: var(--text);
  color: var(--bg);
  padding: 0.75rem 0;
  overflow: hidden;
}

.ticker-track {
  display: flex;
  gap: 2.5rem;
  animation: ticker 35s linear infinite;
  width: max-content;
  padding-left: 2rem;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

.ticker-item b { font-weight: 700; margin-right: 0.35rem; }
.ticker-item em { font-style: normal; margin-left: 0.35rem; }
.ticker-item .up { color: #d4d4d4; }
.ticker-item .down { color: #a3a3a3; }

/* --- Trust strip --- */
.trust-strip {
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}

.trust-item {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.trust-icon {
  color: var(--text);
  margin-right: 0.5rem;
  font-size: 0.6em;
  vertical-align: middle;
}

@media (max-width: 640px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- Sections --- */
.sec {
  padding: var(--sec-gap) 0;
  position: relative;
}

.sec-alt {
  background: var(--bg-alt);
}

/* Секция 50% паттерн / 50% контент */
.sec-half-pattern {
  display: grid;
  grid-template-columns: 0.5fr 1fr;
  padding: 0;
  min-height: 0;
}

/* Одна картинка паттерна 1920×1080 во весь размер; с правого края едет влево при скролле, запас кончился — стоит (JS: --pattern-x) */
.sec-pattern-side {
  background-image: var(--pattern);
  background-size: 1920px 1080px;
  background-position: var(--pattern-x, 100%) center;
  background-repeat: no-repeat;
  min-height: 400px;
  transition: background-position 0.15s ease-out;
}

.sec-content-side {
  background: var(--bg);
  padding: var(--sec-gap) 0;
  display: flex;
  align-items: center;
}

.sec-half-pattern .wrap {
  width: 100%;
}

.sec-num {
  display: block;
  font-family: var(--font-head);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.sec-title {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.sec-lead {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 40em;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.sec-cta { margin-top: 1.5rem; }

/* --- Cards --- */
.card-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.card-row.three {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 1.75rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 4px 20px rgba(28, 25, 23, 0.06);
}

/* Иконка как фон (за текстом), серого цвета, по центру */
.card-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #737373;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

.card-icon svg {
  width: 72px;
  height: 72px;
}

.card-dark .card-icon {
  color: #a3a3a3;
}

.card h3 {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.card-link {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: underline;
}

.card-link:hover { text-decoration: none; }

.card-dark {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.card-dark h3 { color: var(--bg); }
.card-dark p { color: rgba(255, 255, 255, 0.85); }
.card-dark .card-link { color: var(--bg); }

@media (max-width: 768px) {
  .card-row { grid-template-columns: 1fr; }
  .card-row.three { grid-template-columns: 1fr; }
  .sec-half-pattern { grid-template-columns: 1fr; }
  .sec-pattern-side { min-height: 220px; }
  .sec-content-side { padding: 2rem 0; }
}

/* --- Docs --- */
.spoiler-wrap { margin-top: 1rem; }

.spoiler-btn {
  width: 100%;
  padding: 1rem 1.25rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 0;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s, border-color 0.2s;
}

.spoiler-btn:hover {
  background: var(--bg-alt);
  border-color: var(--text);
}

.spoiler-btn[aria-expanded="true"] {
  border-radius: 0;
  border-bottom-color: transparent;
}

.spoiler-panel {
  border: 1px solid var(--border-strong);
  border-top: none;
  border-radius: 0;
  padding: 1.25rem;
  background: var(--bg);
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.doc-link {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.doc-link:hover {
  border-color: var(--text);
  color: var(--text);
}

/* --- About --- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr;
  gap: 3rem;
  align-items: start;
}

.about-visual {
  position: sticky;
  top: 6rem;
  overflow: hidden;
}

.about-visual img {
  width: 115%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.about-content .sec-title { margin-bottom: 1.25rem; }

.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.tab {
  padding: 0.6rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--text); }

.tab-panel {
  display: none;
}

.tab-panel.active { display: block; }

.tab-panel p {
  margin-bottom: 1rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.tab-panel p:last-child { margin-bottom: 0; }

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-visual { position: static; max-width: 240px; }
}

/* --- FAQ --- */
.faq-list { margin-top: 1rem; }

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: color 0.2s;
}

.faq-q:hover { color: var(--text-muted); }

.faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text);
  transition: transform 0.2s;
}

.faq-q[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }

.faq-a {
  padding-bottom: 1.25rem;
}

.faq-a p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
  padding-right: 2rem;
}

/* --- Contact form (50/50: паттерн слева, форма справа + лого на фоне под формой) --- */
.contacts-sec .sec-content-side {
  position: relative;
}

/* Фоновое лого в контактах: анимация появления при скролле */
.contacts-sec .sec-content-side::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("images/logonotext.webp") no-repeat center;
  background-size: 260px auto;
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}

.contacts-sec .sec-content-side.logo-bg-visible::before {
  opacity: 0.08;
  transform: scale(1);
}

.contacts-sec .sec-content-side .wrap {
  position: relative;
  z-index: 1;
}

.contacts-sec .sec-lead {
  max-width: 34em;
}

.contact-form {
  margin-top: 1.5rem;
  max-width: 640px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1.75rem;
}

.contact-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.contact-form .field-full {
  grid-column: 1 / -1;
}

.contact-form label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.contact-form input,
.contact-form textarea {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0;
  border: 1px solid var(--border);
  background: var(--bg);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--text);
}

.contact-form textarea {
  resize: vertical;
}

.contacts-cta {
  margin-top: 2.5rem;
  max-width: 36em;
}

.contacts-cta-title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.contacts-cta-text {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
  .contact-form {
    grid-template-columns: 1fr;
  }
}

/* --- CTA --- */
.cta-sec {
  text-align: center;
  background: var(--bg-alt);
}

.cta-sec .sec-title { margin-bottom: 0.5rem; }
.cta-sec .sec-lead { margin-left: auto; margin-right: auto; }
.cta-phone {
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.cta-phone a { color: var(--text); font-weight: 600; text-decoration: underline; }
.cta-phone a:hover { text-decoration: none; }

/* --- Footer --- */
.footer {
  background: var(--text);
  color: var(--bg);
  padding: var(--sec-gap) 0 2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem 3rem;
  margin-bottom: 2.5rem;
  align-items: start;
}

.footer-inner > * {
  min-width: 0;
}

.footer-brand .logo img { filter: brightness(0) invert(1); margin-bottom: 1rem; }
.footer-brand p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.5rem;
}

.footer-addr { margin-top: 0.75rem; }
.footer-brand a { color: var(--bg); text-decoration: none; }
.footer-brand a:hover { text-decoration: underline; }

.footer-links h3,
.footer-contacts h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--bg);
  margin-bottom: 1rem;
}

.footer-links ul { list-style: none; }
.footer-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.9375rem;
  display: block;
  padding: 0.25rem 0;
}

.footer-links a:hover { color: var(--bg); }

.footer-contacts p {
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

.footer-contacts p:last-child { margin-bottom: 0; }

.footer-contacts a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.footer-contacts a:hover { color: var(--bg); }

.footer-phone a { font-weight: 600; }

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom a { color: rgba(255, 255, 255, 0.9); text-decoration: none; }
.footer-bottom a:hover { color: var(--bg); }

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}
