html,
body {

  overflow-x: hidden;
  max-width: 100vw;

}

html {

  -webkit-overflow-scrolling: touch;

}

button,
[role="button"] {

  min-height: 44px;
  min-width: 44px;

}

/* ── BODY ──────────────────────────────── */
body {
  background-color: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
}

/* Единый плавный фон страницы — градиент + зерно */
main {
  background-color: var(--color-surface);
  background-image: var(--page-noise), var(--page-gradient);
  background-repeat: repeat, no-repeat;
  background-size: auto, 100% 100%;
}

/* ── КОНТЕЙНЕР И СЕКЦИИ ────────────────── */
.container {

  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding-inline: var(--layout-container-padding, clamp(16px, 4vw, 40px));

}

.section {

  padding-block: var(--layout-section-y);

}

.section--compact {

  padding-block: var(--layout-section-y-compact);

}

.section--spacious {

  padding-block: var(--layout-section-y-spacious);

}

.section-padding {

  padding-block: var(--layout-section-y);
  padding-inline: clamp(16px, 4vw, 24px);

}

/* ── ЗАГОЛОВКИ ─────────────────────────── */
h1 {
 font-family: var(--font-heading); font-size: clamp(48px, 6vw, 96px); font-weight: 900; line-height: 1.0; letter-spacing: -0.03em; 
}

h2 {
 font-family: var(--font-heading); font-size: clamp(36px, 4.5vw, 72px); font-weight: 800; line-height: 1.05; letter-spacing: -0.025em; 
}

h3 {
 font-family: var(--font-heading); font-size: clamp(24px, 2.5vw, 36px); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; 
}

h4 {
font-family: var(--font-heading);  font-weight: 700; line-height: 1.3;
}

/* ── УТИЛИТЫ ТЕКСТА ─────────────────────── */
.text-accent {
 color: var(--color-text-accent);
}

.text-coral {
 color: var(--color-coral); 
}

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

.text-center {
 text-align: center; 
}

.text-inverted {
 color: var(--color-text-inverse); 
}

/* ── FLUID ТИПОГРАФИКА (только мобильные) ─ */
@media (max-width: 767px) {

  .text-hero  { font-size: clamp(36px, 10vw, 96px); }
  .text-h1    { font-size: clamp(28px, 7vw, 64px); }
  .text-h2    { font-size: clamp(22px, 5.5vw, 48px); }
  .text-h3    { font-size: clamp(17px, 4vw, 28px); }
  .text-body  { font-size: clamp(14px, 3.5vw, 17px); }
  .text-sm    { font-size: clamp(12px, 3vw, 14px); }
  .text-label { font-size: clamp(10px, 2.5vw, 12px); }

}

/* ── КНОПКИ ────────────────────────────── */
.btn {
display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  transition: all var(--transition-spring);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: none;
}

/* Основная — тёмная */
.btn-primary {

  background: var(--color-surface-inverse);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-sm);

}

.btn-primary:hover {

  background: #2A2520;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);

}

.btn-primary:active {
 transform: translateY(0); 
}

/* Золотая */
.btn-gold {

  background: var(--color-gold);
  color: var(--color-surface-inverse);
  box-shadow: var(--shadow-gold);

}

.btn-gold:hover {

  background: #C49840;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 40px rgba(212, 168, 83, 0.4);

}

/* Outlined */
.btn-outline {

  background: transparent;
  border: 1.5px solid var(--color-border-strong);
  color: var(--color-text);

}

.btn-outline:hover {

  border-color: var(--color-text);
  background: var(--color-surface-inverse);
  color: var(--color-text-inverse);
  transform: translateY(-2px);

}

/* Ghost */
.btn-ghost {

  background: transparent;
  color: var(--color-text-muted);
  padding: 14px 20px;

}

.btn-ghost:hover {

  color: var(--color-text);
  background: var(--color-surface-muted);

}

/* На тёмном фоне */
.btn-outline-light {

  background: transparent;
  border: 1.5px solid rgba(248,245,240,0.3);
  color: var(--color-text-inverse);

}

.btn-outline-light:hover {

  background: rgba(248,245,240,0.1);
  border-color: rgba(248,245,240,0.6);

}

/* ── ЛЕЙБЛ СЕКЦИИ ─────────────────────── */
/* Замена старому .label */
.section-label {
display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.section-label::before {

  content: '';
  width: 20px;
  height: 1.5px;
  background: var(--color-gold);
  border-radius: 2px;
  flex-shrink: 0;

}

/* ── ЗАГОЛОВОК СЕКЦИИ ─────────────────── */
.section-header {

  margin-bottom: var(--layout-header-gap);

}

.section-header.centered {

  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;

}

.section-header.centered .section-label {
  justify-content: center;
}

.section-header h2 {
  margin: 0;
}

.section-header p {
color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 560px;
  margin-top: 16px;
}

.section-header.centered p {

  margin-left: auto;
  margin-right: auto;

}

/* ── ЗАГОЛОВОК СЕКЦИИ (icon + title + desc, как calc steps) ── */
.section-step-header {

  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: var(--layout-header-gap);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);

}

.section-step-header--centered {

  flex-direction: column;
  align-items: center;
  text-align: center;

}

.section-step-header__icon {

  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-gold-dim-soft);
  border: 1px solid var(--color-border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold-dark);
  flex-shrink: 0;

}

.section-step-header__icon svg,
.section-step-header__icon i {

  width: 28px;
  height: 28px;

}

.section-step-header__body {

  min-width: 0;
  flex: 1;

}

.section-step-header--centered .section-step-header__body {

  width: 100%;

}

.section-step-header__body .section-label {

  margin-bottom: 8px;

}

.section-step-header__desc {

  color: var(--color-text-muted);
  line-height: 1.6;
  margin-top: 8px;
  max-width: 560px;

}

.section-step-header--centered .section-step-header__desc {

  margin-left: auto;
  margin-right: auto;

}

/* ── ЗАГОЛОВКИ КОНТЕНТНЫХ СТРАНИЦ (SEO, legal, privacy) ── */
.page-title {
  font-family: var(--font-heading);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.section-subtitle {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.5vw, 32px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 32px 0 12px;
}

.seo-landing__content > .section-subtitle:first-child,
.privacy-page__content > .section-subtitle:first-child {
  margin-top: 0;
}

.seo-landing__faq > .section-subtitle,
.seo-landing__related > .section-subtitle {
  margin-top: 0;
}

/* ── КАРТОЧКА ──────────────────────────── */
.card {

  background: var(--color-surface-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-base);

}

.card:hover {

  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--color-border-strong);

}

/* ── ТЁМНАЯ СЕКЦИЯ (инверт) ──────────── */
.section-dark {

  background: var(--color-surface-inverse);
  color: var(--color-text-inverse);

}

.section-dark .section-label {

  color: rgba(248,245,240,0.5);

}

.section-dark h2,
.section-dark h3 {

  color: var(--color-text-inverse);

}

.section-dark p {

  color: rgba(248,245,240,0.65);

}

/* ── СКРОЛЛБАР ─────────────────────────── */
::-webkit-scrollbar {
 width: 6px; 
}

::-webkit-scrollbar-track {
 background: var(--color-surface-muted); 
}

::-webkit-scrollbar-thumb {

  background: var(--color-border-strong);
  border-radius: 3px;

}

::-webkit-scrollbar-thumb:hover {
 background: var(--color-gold); 
}

/* ── ВЫДЕЛЕНИЕ ТЕКСТА ─────────────────── */
::selection {

  background: var(--color-gold-dim);
  color: var(--color-text);

}

/* ── ACCESSIBILITY ─────────────────────── */
.sr-only {

  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;

}

/* Пропустить к содержимому — виден только при фокусе с клавиатуры */
.skip-link {

  position: absolute;
  top: -60px;
  left: 12px;
  z-index: var(--z-toast);
  padding: 12px 20px;
  background: var(--color-surface-inverse);
  color: var(--color-text-inverse);
  font-family: var(--font-heading);
  font-weight: 700;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  transition: top var(--transition-base);

}

.skip-link:focus {

  top: calc(12px + var(--safe-top));
  outline: none;

}

/* Единый видимый фокус для клавиатурной навигации */
:focus-visible {

  outline: 3px solid var(--color-gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);

}

/* main получает focus() при переходе по skip-link — рамка не нужна */
main:focus,
main:focus-visible {
  outline: none;
}

/* Ссылка «Настройки cookie» в футере — как остальные правовые ссылки */
.footer__cookie-settings {

  min-height: 0;
  min-width: 0;
  padding: 0;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;

}

/* ── TAG / CHIP ────────────────────────── */
.tag {
display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

.tag-gold {

  background: var(--color-gold-dim);
  border-color: var(--color-border-accent);
  color: #9A7530;

}

/* ── SCROLL REVEAL (замена AOS) ─────────── */
/* Контент виден по умолчанию — скрываем только после инициализации JS */
[data-reveal] {

  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);

}

html.js-reveal-ready [data-reveal]:not(.is-revealed) {

  opacity: 0;
  transform: translateY(20px);

}

html.js-reveal-ready [data-reveal="left"]:not(.is-revealed) {

  transform: translateX(-24px);

}

[data-reveal].is-revealed {

  opacity: 1;
  transform: none;

}

/* Магнитные кнопки — transform управляется JS */
.btn--magnetic:hover,
.btn--magnetic:active {

  transform: none;

}

@media (prefers-reduced-motion: reduce) {

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

}

/* ── КАСТОМНЫЙ КУРСОР ──────────────────── */
.cursor-dot,
.cursor-ring {

  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s, width 0.3s, height 0.3s;

}

.cursor-dot {

  width: 6px;
  height: 6px;
  background: var(--color-text);
  transition: transform 0.1s ease-out;

}

.cursor-ring {

  width: 36px;
  height: 36px;
  border: 1.5px solid var(--color-text);
  opacity: 0.3;
  transition: width 0.4s var(--ease-spring),
              height 0.4s var(--ease-spring),
              opacity 0.3s,
              background 0.3s;

}

.cursor-ring.is-hovering {

  width: 56px;
  height: 56px;
  background: var(--color-gold-dim);
  border-color: var(--color-gold);
  opacity: 1;

}

.cursor-ring.is-clicking {

  width: 24px;
  height: 24px;

}

@media (hover: hover) {

  body.has-custom-cursor,
  body.has-custom-cursor * {
    cursor: none;
  }

}

/* Скрыть на тачскринах */
@media (hover: none) {

  .cursor-dot,
  .cursor-ring {
    display: none;
  }

}

/* Toast: копирование текста для Telegram */
.tg-copy-toast {

  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) scale(0.92) translateY(10px);
  transform-origin: bottom center;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: max-content;
  max-width: min(360px, calc(100vw - 24px));
  padding: 14px 18px;
  background: var(--color-surface-inverse);
  color: var(--color-text-inverse);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-toast);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-out),
              transform var(--duration-slow) var(--ease-spring);

}

.tg-copy-toast--measuring {

  opacity: 0;
  pointer-events: none;

}

.tg-copy-toast--anchored {

  left: auto;
  bottom: auto;
  transform: scale(0.88) translateY(8px);
  transform-origin: bottom var(--tg-arrow-left, 50%);

}

.tg-copy-toast--anchored.tg-copy-toast--below {

  transform: scale(0.88) translateY(-8px);
  transform-origin: top var(--tg-arrow-left, 50%);

}

.tg-copy-toast--anchored::after {

  content: '';
  position: absolute;
  left: var(--tg-arrow-left, 50%);
  bottom: -6px;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--color-surface-inverse);

}

.tg-copy-toast--anchored.tg-copy-toast--below::after {

  bottom: auto;
  top: -6px;
  border-top-color: transparent;
  border-bottom-color: var(--color-surface-inverse);

}

.tg-copy-toast--visible {

  opacity: 1;
  transform: translateX(-50%) scale(1) translateY(0);

}

.tg-copy-toast--anchored.tg-copy-toast--visible {

  transform: scale(1) translateY(0);

}

.tg-copy-toast--anchored.tg-copy-toast--below.tg-copy-toast--visible {

  transform: scale(1) translateY(0);

}

.tg-copy-toast--calc {

  border: 1px solid color-mix(in srgb, var(--color-gold) 35%, transparent);
  box-shadow: var(--shadow-lg), 0 0 0 1px color-mix(in srgb, var(--color-gold) 12%, transparent);

}

.tg-copy-toast--calc .tg-copy-toast__icon {

  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-gold) 18%, transparent);

}

.tg-copy-toast__icon {

  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold-light);
  margin-top: 1px;

}

.tg-copy-toast__text {

  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;

}

.tg-copy-toast__title {
font-family: var(--font-heading);
  
  font-weight: 700;
  line-height: 1.35;
}

.tg-copy-toast__hint {
line-height: 1.45;
  color: rgba(245, 240, 232, 0.75);
}

@media (prefers-reduced-motion: reduce) {

  .tg-copy-toast {
    transition: none;
  }

  .tg-copy-toast--visible,
  .tg-copy-toast--anchored.tg-copy-toast--visible {
    transform: translateX(-50%) scale(1) translateY(0);
  }

  .tg-copy-toast--anchored.tg-copy-toast--visible {
    transform: scale(1) translateY(0);
  }

}



/* Tablet + desktop typography */
@media (min-width: 768px) and (max-width: 1199px) {
  /* ── BODY ──────────────────────────────── */
body { font-size: 16px; }
  h4 { font-size: 18px; }
  /* ── КНОПКИ ────────────────────────────── */
.btn { font-size: 13px; }
  /* ── ЛЕЙБЛ СЕКЦИИ ─────────────────────── */
/* Замена старому .label */
.section-label { font-size: 12px; }
  .section-header p { font-size: 18px; }
  /* ── TAG / CHIP ────────────────────────── */
.tag { font-size: 11px; }
  .tg-copy-toast__title { font-size: 14px; }
  .tg-copy-toast__hint { font-size: 12px; }
}

@media (min-width: 1200px) {
  /* ── BODY ──────────────────────────────── */
body { font-size: 16px; }
  h4 { font-size: 18px; }
  /* ── КНОПКИ ────────────────────────────── */
.btn { font-size: 13px; }
  /* ── ЛЕЙБЛ СЕКЦИИ ─────────────────────── */
/* Замена старому .label */
.section-label { font-size: 12px; }
  .section-header p { font-size: 18px; }
  /* ── TAG / CHIP ────────────────────────── */
.tag { font-size: 11px; }
  .tg-copy-toast__title { font-size: 14px; }
  .tg-copy-toast__hint { font-size: 12px; }
}
