/* ==========================================================================
   РЕЛЬСЫ-РЕЛЬСЫ / ШПАЛЫ-ШПАЛЫ — digital brand layer
   Версия 1.1 · 2026-11-02
   Токены и компоненты перенесены из «Брендбук Рельсы.pdf».
   Значения цветов — из брендбука, стр. 08, без пересчёта.

   Утверждённая цифровая пара (решение владельца, 02.11.2026):
   Oswald Bold 700 + Montserrat Medium 500.
   Не использовать Oswald 400, Montserrat 400 и Montserrat 700.
   Третий шрифт, включая моноширинный, запрещён.
   ========================================================================== */

/* ---------- Шрифты (SIL OFL) ---------- */

@font-face {
  font-family: "Oswald";
  src: url("../fonts/Oswald-Variable.ttf") format("truetype-variations");
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/Montserrat-Variable.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Токены ---------- */

:root {
  /* Палитра брендбука */
  --rr-lagoon: #1a667d;
  --rr-mist: #c0d5d6;
  --rr-oat: #a58d67;
  --rr-linen: #f2efea;
  --rr-walnut: #573722;
  --rr-white: #ffffff;

  /* Семантика поверхностей */
  --rr-bg: var(--rr-linen);
  --rr-surface: var(--rr-white);
  --rr-surface-quiet: var(--rr-mist);
  --rr-surface-warm: var(--rr-oat);
  --rr-surface-deep: var(--rr-lagoon);
  --rr-surface-dark: var(--rr-walnut);

  /* Текст */
  --rr-text: var(--rr-walnut);
  --rr-text-muted: rgba(87, 55, 34, 0.78);
  --rr-text-faint: rgba(87, 55, 34, 0.75);
  --rr-text-on-dark: var(--rr-linen);
  --rr-text-on-dark-muted: rgba(242, 239, 234, 0.86);

  /* Линии и тени — только на основе Walnut */
  --rr-border: rgba(87, 55, 34, 0.16);
  --rr-border-strong: rgba(87, 55, 34, 0.45);
  /* Граница поля: ≥3:1 к белому (3,43:1) и Linen (3,23:1) */
  --rr-border-field: rgba(87, 55, 34, 0.6);
  /* Граница интерактивных компонентов: ≥3:1 и на Mist (3,41:1) */
  --rr-border-interactive: rgba(87, 55, 34, 0.68);
  --rr-shadow-1: 0 1px 2px rgba(87, 55, 34, 0.06);
  --rr-shadow-2: 0 18px 40px rgba(87, 55, 34, 0.1);
  --rr-shadow-3: 0 28px 64px rgba(87, 55, 34, 0.14);

  /* Типографика */
  --rr-font-display: "Oswald", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --rr-font-body: "Montserrat", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;

  --rr-text-display: clamp(2.5rem, 6vw, 5rem);
  --rr-text-h1: clamp(2.125rem, 4.6vw, 3.5rem);
  --rr-text-h2: clamp(1.75rem, 3.2vw, 2.75rem);
  --rr-text-h3: clamp(1.25rem, 1.8vw, 1.625rem);
  --rr-text-lead: clamp(1.0625rem, 1.5vw, 1.3125rem);
  --rr-text-body: 1.0625rem;
  --rr-text-small: 0.875rem;
  --rr-text-eyebrow: 0.75rem;
  --rr-text-price: clamp(2rem, 3.6vw, 3.25rem);

  /* Сетка */
  --rr-max: 1200px;
  --rr-gutter: clamp(20px, 5vw, 64px);
  --rr-section: clamp(64px, 9vw, 128px);
  --rr-gap: clamp(16px, 2.4vw, 32px);
  --rr-radius-sm: 8px;
  --rr-radius-md: 12px;
  --rr-radius-lg: 20px;   /* 5 мм в печати */
  --rr-radius-pill: 999px;

  /* Движение */
  --rr-dur-1: 160ms;
  --rr-dur-2: 280ms;
  --rr-dur-3: 520ms;
  --rr-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- База ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: calc(104px + 1rem);
}

@media (min-width: 1024px) {
  [id] {
    scroll-margin-top: calc(116px + 1rem);
  }
}

body {
  margin: 0;
  background: var(--rr-bg);
  color: var(--rr-text);
  font-family: var(--rr-font-body);
  font-size: var(--rr-text-body);
  line-height: 1.65;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--rr-font-display);
  font-weight: 700;
  line-height: 1.06;
  color: var(--rr-text);
  text-wrap: balance;
}

h1 {
  font-size: var(--rr-text-h1);
}

h2 {
  font-size: var(--rr-text-h2);
}

h3 {
  font-size: var(--rr-text-h3);
  font-weight: 700;
  line-height: 1.18;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--rr-lagoon);
  outline-offset: 3px;
}

/* Цвет кольца — по поверхности: Lagoon на светлом не виден на Walnut/Lagoon */
.rr-panel--walnut :focus-visible,
.rr-panel--lagoon :focus-visible,
.rr-card--dark :focus-visible {
  outline-color: var(--rr-linen);
}

.rr-panel--oat :focus-visible {
  outline-color: var(--rr-walnut);
}

/* Карта 2ГИС: iframe входит в Tab-порядок, но его собственное кольцо
   обрезается overflow контейнера — показываем фокус на рамке карты.
   Фокус внутри кросс-доменного iframe не даёт :focus-within в Chrome,
   поэтому скрипт в index.html дополнительно ставит .is-map-focused. */
.map-frame:focus-within,
.map-frame.is-map-focused {
  outline-width: 3px;
  outline-style: solid;
  outline-color: var(--rr-lagoon);
  outline-offset: 3px;
}

::selection {
  background: var(--rr-mist);
  color: var(--rr-walnut);
}

/* ---------- Раскладка ---------- */

.rr-container {
  width: 100%;
  max-width: var(--rr-max);
  margin-inline: auto;
  padding-inline: var(--rr-gutter);
}

.rr-section {
  padding-block: var(--rr-section);
}

.rr-section--tight {
  padding-block: clamp(40px, 6vw, 80px);
}

.rr-stack > * + * {
  margin-top: 1rem;
}

/* Ряд действий: кнопки переносятся по строке с одним шагом сетки */
.rr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Служебные отступы композиции — только значения шкалы 4 px */
.rr-mt-05 {
  margin-top: 0.5rem;
}

.rr-mt-1 {
  margin-top: 1rem;
}

.rr-mt-125 {
  margin-top: 1.25rem;
}

.rr-mt-15 {
  margin-top: 1.5rem;
}

.rr-mt-2 {
  margin-top: 2rem;
}

.rr-grid {
  display: grid;
  gap: var(--rr-gap);
}

.rr-grid--2 {
  grid-template-columns: 1fr;
}

.rr-grid--3 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .rr-grid--2,
  .rr-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .rr-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* На планшете 2+1 оставляет пустое поле на цветной полосе.
   Для трёх карточек на Oat — одна колонка с ограничением ширины. */
@media (min-width: 640px) and (max-width: 1023.98px) {
  .rr-grid--tablet-single {
    grid-template-columns: 1fr;
  }

  .rr-grid--tablet-single > * {
    width: 100%;
    max-width: 560px;
    margin-inline: auto;
  }
}

/* ---------- Типографика ---------- */

.rr-eyebrow {
  display: block;
  font-family: var(--rr-font-body);
  font-size: var(--rr-text-eyebrow);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--rr-lagoon);
  margin-bottom: 0.75rem;
}

.rr-eyebrow--oat {
  color: var(--rr-oat);
}

.rr-display {
  font-family: var(--rr-font-display);
  font-size: var(--rr-text-display);
  font-weight: 700;
  line-height: 0.98;
  text-transform: uppercase;
}

.rr-lead {
  font-size: var(--rr-text-lead);
  line-height: 1.6;
  color: var(--rr-text-muted);
  max-width: 60ch;
}

.rr-muted {
  color: var(--rr-text-muted);
}

.rr-small {
  font-size: var(--rr-text-small);
  line-height: 1.5;
  color: var(--rr-text-muted);
}

.rr-link {
  color: var(--rr-lagoon);
  text-decoration: underline;
  text-decoration-color: rgba(26, 102, 125, 0.4);
  transition: text-decoration-color var(--rr-dur-1) var(--rr-ease);
}

.rr-link:hover {
  text-decoration-color: currentColor;
}

/* «Рельс» — производный разделитель на основе линии из логотипа */
.rr-rail {
  height: 2px;
  border: 0;
  background: var(--rr-walnut);
  position: relative;
  margin: 0;
}

.rr-rail::after {
  content: "";
  position: absolute;
  inset: -5px 0 auto;
  height: 1px;
  background: repeating-linear-gradient(
    to right,
    var(--rr-walnut) 0 2px,
    transparent 2px 14px
  );
  opacity: 0.45;
}

/* ---------- Кнопки ---------- */

.rr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  appearance: none;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: var(--rr-radius-md);
  font-family: var(--rr-font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--rr-dur-1) var(--rr-ease),
    border-color var(--rr-dur-1) var(--rr-ease),
    color var(--rr-dur-1) var(--rr-ease),
    transform var(--rr-dur-1) var(--rr-ease);
}

.rr-btn:active {
  transform: translateY(1px);
}

.rr-btn--primary {
  background: var(--rr-walnut);
  color: var(--rr-linen);
}

.rr-btn--primary:hover {
  background-image: linear-gradient(rgba(242, 239, 234, 0.1), rgba(242, 239, 234, 0.1));
}

.rr-btn--secondary {
  background: var(--rr-lagoon);
  color: var(--rr-linen);
}

.rr-btn--secondary:hover {
  background-image: linear-gradient(rgba(87, 55, 34, 0.18), rgba(87, 55, 34, 0.18));
}

.rr-btn--ghost {
  background: transparent;
  border-color: var(--rr-border-interactive);
  color: var(--rr-walnut);
}

.rr-btn--ghost:hover {
  border-color: var(--rr-walnut);
  background: rgba(87, 55, 34, 0.04);
}

.rr-btn--on-dark {
  background: var(--rr-linen);
  color: var(--rr-walnut);
}

.rr-btn--on-dark:hover {
  background: #ffffff;
}

/* Второстепенная кнопка на Walnut/Lagoon: Linen-текст и мягкая рамка */
.rr-btn--outline-on-dark {
  border-color: var(--rr-linen);
  color: var(--rr-linen);
}

.rr-btn--block {
  width: 100%;
}

/* ---------- Карточки ---------- */

.rr-card {
  display: flex;
  text-decoration: none;
  flex-direction: column;
  background: var(--rr-surface);
  border: 1px solid var(--rr-border);
  border-radius: var(--rr-radius-lg);
  padding: clamp(20px, 3vw, 32px);
  transition:
    box-shadow var(--rr-dur-2) var(--rr-ease),
    border-color var(--rr-dur-2) var(--rr-ease),
    transform var(--rr-dur-2) var(--rr-ease);
}

.rr-card--plain {
  border: 0;
  box-shadow: var(--rr-shadow-1);
}

.rr-card--mist {
  background: var(--rr-mist);
  border-color: transparent;
  /* На Mist Walnut .78 даёт 4,26:1 — поднимаем до 5,32:1 */
  --rr-text-muted: rgba(87, 55, 34, 0.88);
  --rr-text-faint: rgba(87, 55, 34, 0.88);
}

.rr-card--dark {
  background: var(--rr-walnut);
  border-color: transparent;
  color: var(--rr-text-on-dark);
}

.rr-card--dark h3,
.rr-card--dark h2 {
  color: var(--rr-text-on-dark);
}

.rr-card--link:hover {
  box-shadow: var(--rr-shadow-2);
  border-color: var(--rr-border-interactive);
  transform: translateY(-2px);
}

/* ---------- Цены ---------- */

.rr-price {
  font-family: var(--rr-font-display);
  font-size: var(--rr-text-price);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--rr-walnut);
}

.rr-price--walnut {
  color: var(--rr-walnut);
}

.rr-price--small {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}

.rr-card--dark .rr-price,
.rr-panel--walnut .rr-price,
.rr-panel--lagoon .rr-price {
  color: var(--rr-text-on-dark);
}

.rr-price__old {
  font-family: var(--rr-font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--rr-text-faint);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}

.rr-price__unit {
  font-family: var(--rr-font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--rr-text-muted);
}

.rr-price__row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

/* ---------- Бейджи ---------- */

.rr-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  background: var(--rr-walnut);
  color: var(--rr-linen);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.1;
}

/* Walnut на Oat — 3,34:1: для 12 px меняем фон на Linen, Oat остаётся рамкой */
.rr-badge--oat {
  background: var(--rr-linen);
  border: 1px solid var(--rr-oat);
  color: var(--rr-walnut);
}

.rr-badge--lagoon {
  background: var(--rr-lagoon);
  color: var(--rr-linen);
}

.rr-badge--outline {
  background: transparent;
  border: 1px solid var(--rr-border-strong);
  color: var(--rr-text-muted);
}

/* ---------- Панели ---------- */

.rr-panel {
  position: relative;
  overflow: hidden;
}

.rr-panel--mist {
  background: var(--rr-mist);
  /* На Mist приглушённый Walnut .78 даёт 4,26:1 — усиливаем до 5,3:1 */
  --rr-text-muted: rgba(87, 55, 34, 0.88);
  --rr-text-faint: rgba(87, 55, 34, 0.88);
}

/* Lagoon на Mist — 4,23:1, для мелкого текста недостаточно */
.rr-panel--mist .rr-eyebrow {
  color: var(--rr-walnut);
}

.rr-panel--mist .rr-link {
  color: var(--rr-walnut);
  text-decoration-color: rgba(26, 102, 125, 0.55);
}

.rr-panel--oat {
  background: var(--rr-oat);
}

.rr-panel--lagoon {
  background: var(--rr-lagoon);
  color: var(--rr-text-on-dark);
}

.rr-panel--walnut {
  background: var(--rr-walnut);
  color: var(--rr-text-on-dark);
}

.rr-panel--lagoon h1,
.rr-panel--lagoon h2,
.rr-panel--lagoon h3,
.rr-panel--walnut h1,
.rr-panel--walnut h2,
.rr-panel--walnut h3 {
  color: var(--rr-text-on-dark);
}

/* На тёмном приглушённый Walnut невидим — переключаем производные на Linen */
.rr-panel--lagoon,
.rr-panel--walnut,
.rr-card--dark {
  --rr-text-muted: rgba(242, 239, 234, 0.86);
  --rr-text-faint: rgba(242, 239, 234, 0.86);
}

.rr-panel--lagoon .rr-eyebrow,
.rr-panel--walnut .rr-eyebrow {
  color: var(--rr-mist);
}

.rr-panel--lagoon .rr-lead,
.rr-panel--walnut .rr-lead,
.rr-panel--lagoon .rr-muted,
.rr-panel--walnut .rr-muted {
  color: var(--rr-text-on-dark-muted);
}

.rr-pattern {
  position: absolute;
  inset: 0;
  background-repeat: repeat;
  background-size: 320px auto;
  opacity: 0.06;
  pointer-events: none;
}

.rr-pattern--monogram {
  background-image: url("./pattern/web/pattern-monogram.svg");
}

.rr-pattern--stripe {
  background-image: url("./pattern/web/pattern-stripe.svg");
  background-size: 180px auto;
}

/* ---------- Ссылки-стрелки ---------- */

.rr-arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--rr-walnut);
  text-decoration: none;
}

.rr-arrow-link::after {
  content: "→";
  transition: transform var(--rr-dur-1) var(--rr-ease);
}

.rr-arrow-link:hover::after {
  transform: translateX(3px);
}

/* ---------- Формы ---------- */

.rr-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rr-field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--rr-text);
}

.rr-input {
  min-height: 48px;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--rr-white);
  /* 3,43:1 к белому и 3,23:1 к Linen: граница различима без подсказки */
  border: 1px solid var(--rr-border-field);
  border-radius: var(--rr-radius-md);
  font-size: 1rem;
  color: var(--rr-text);
  transition: border-color var(--rr-dur-1) var(--rr-ease);
}

.rr-input::placeholder {
  color: var(--rr-text-faint);
}

.rr-input:hover {
  border-color: var(--rr-border-field);
}

.rr-input:focus {
  border-color: var(--rr-lagoon);
}

.rr-input:focus-visible {
  outline: 3px solid var(--rr-lagoon);
  outline-offset: 3px;
}

.rr-field__error {
  display: flex;
  gap: 0.4rem;
  margin: 0;
  color: var(--rr-walnut);
  font-size: 0.875rem;
  line-height: 1.4;
}

.rr-field__error::before {
  content: "!";
  flex: 0 0 auto;
  width: 1.15em;
  height: 1.15em;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.75em;
  line-height: 1.05em;
  text-align: center;
}

/* ---------- Согласие на аналитику ---------- */

.rr-consent {
  position: fixed;
  left: max(1rem, env(safe-area-inset-left));
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 90;
  width: auto;
  max-width: 720px;
  max-height: calc(100vh - 2rem);
  margin-inline: auto;
  padding: clamp(20px, 3vw, 28px);
  overflow: auto;
  background: var(--rr-white);
  color: var(--rr-text);
  border: 1px solid var(--rr-border-interactive);
  border-radius: var(--rr-radius-lg);
  box-shadow: var(--rr-shadow-3);
}

.rr-consent[hidden] {
  display: none;
}

.rr-consent--static {
  position: static;
  max-width: 720px;
  margin: 0;
}

.rr-consent__title {
  margin: 0 0 0.5rem;
  font-family: var(--rr-font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.625rem);
  font-weight: 700;
  line-height: 1.1;
}

.rr-consent__text {
  max-width: 62ch;
  margin: 0;
  color: var(--rr-text-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.rr-consent__status {
  margin: 0.75rem 0 0;
  color: var(--rr-walnut);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.45;
}

.rr-consent__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.rr-consent__actions .rr-btn {
  width: 100%;
}

.rr-consent__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.25rem;
  margin-top: 0.75rem;
}

.rr-consent__link {
  min-height: 48px;
  padding: 0.5rem 0;
  appearance: none;
  background: none;
  border: 0;
  color: var(--rr-lagoon);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.22em;
  cursor: pointer;
}

@media (max-width: 519px) {
  .rr-consent__actions {
    grid-template-columns: 1fr;
  }
}

main[tabindex="-1"]:focus {
  outline: none;
}

/* ---------- Шапка ---------- */

.rr-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(242, 239, 234, 0.94);
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid var(--rr-border);
}

/* X_digital = 16 px: высота шапки гарантирует поле сверху и снизу */
.rr-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 104px;
}

@media (min-width: 1024px) {
  .rr-header__inner {
    min-height: 116px;
  }
}

.rr-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.rr-logo img {
  width: clamp(180px, 17vw, 204px);
  height: auto;
  /* Официальные пропорции логотипа 554,44 × 206,41 (брендбук), не натуральные 300 × 112 браузера */
  aspect-ratio: 554.44 / 206.41;
}

.rr-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.rr-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.6vw, 1.5rem);
}

.rr-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-block: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--rr-text);
  text-decoration: none;
}

.rr-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--rr-lagoon);
  transition: right var(--rr-dur-2) var(--rr-ease);
}

.rr-nav__link:hover::after,
.rr-nav__link[aria-current="page"]::after {
  right: 0;
}

.rr-header__cta {
  display: none;
}

.rr-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--rr-border-interactive);
  border-radius: var(--rr-radius-sm);
  cursor: pointer;
}

.rr-burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--rr-walnut);
  position: relative;
}

.rr-burger span::before,
.rr-burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--rr-walnut);
}

.rr-burger span::before {
  top: -6px;
}

.rr-burger span::after {
  top: 6px;
}

.rr-nav--mobile {
  display: none;
  border-top: 1px solid var(--rr-border);
  padding-block: 0.75rem 1.25rem;
}

.rr-nav--mobile.is-open {
  display: block;
}

.rr-nav--mobile .rr-nav__list {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.rr-nav--mobile .rr-nav__link {
  display: block;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--rr-border);
  font-size: 1rem;
}

.rr-nav--mobile .rr-btn {
  margin-top: 1rem;
}

@media (min-width: 1024px) {
  .rr-nav {
    display: flex;
  }

  .rr-burger,
  .rr-nav--mobile {
    display: none;
  }

  .rr-header__cta {
    display: inline-flex;
  }
}

@media (max-width: 1023px) {
  .rr-nav {
    display: none;
  }
}

/* Без JS бургер бесполезен: показываем мобильную навигацию сразу.
   Класс rr-js ставится синхронно в <head>, поэтому вспышки нет. */
@media (max-width: 1023px) {
  html:not(.rr-js) .rr-burger {
    display: none;
  }

  html:not(.rr-js) .rr-nav--mobile {
    display: block;
  }
}

/* ---------- Подарочный сертификат (стр. 19) ---------- */

/* Цифровая интерпретация: обложка и вкладыш — самостоятельные элементы.
   R5 ≈ 15 px, Ø24 ≈ 72 px при S = 340 / 113 = 3,009 px/мм.
   Видимая часть верхнего и нижнего выреза — 72 × 36 px, геометрия круглая. */

.rr-cert {
  display: grid;
  grid-template-columns: minmax(0, 340px);
  justify-content: center;
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
}

@media (min-width: 760px) {
  .rr-cert {
    grid-template-columns: repeat(2, minmax(0, 340px));
  }
}

.rr-cert__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
}

.rr-cert__item figcaption {
  max-width: 34ch;
  color: var(--rr-linen);
  font-size: 0.75rem;
  line-height: 1.45;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.rr-cert__disclaimer {
  max-width: 62ch;
  margin: clamp(24px, 4vw, 40px) auto 0;
  color: rgba(242, 239, 234, 0.88);
  font-size: 0.75rem;
  line-height: 1.5;
  text-align: center;
}

.rr-cert-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 340 / 241; /* ≈ 1,41:1 — визуальная пропорция стр. 19 */
  padding: 6.5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--rr-lagoon);
  color: var(--rr-linen);
  border-radius: 15px; /* R5 */
  container-type: inline-size;
  filter: drop-shadow(0 18px 32px rgba(87, 55, 34, 0.45));
  -webkit-mask-image:
    radial-gradient(circle 36px at 50% 0, transparent 35.5px, #000 36px),
    radial-gradient(circle 36px at 50% 100%, transparent 35.5px, #000 36px);
  mask-image:
    radial-gradient(circle 36px at 50% 0, transparent 35.5px, #000 36px),
    radial-gradient(circle 36px at 50% 100%, transparent 35.5px, #000 36px);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.rr-cert-cover__mark {
  flex: 0 0 auto;
  width: 14cqw;
  max-width: 42px;
  height: auto;
}

.rr-cert-cover__title {
  margin: 0;
  max-width: 12ch;
  font-family: var(--rr-font-display);
  font-size: 26px;
  font-size: 9.2cqw;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: normal;
  text-align: center;
  text-transform: uppercase;
}

.rr-cert-cover__title span {
  display: block;
}

/* Фолбэк без mask-composite: полукруглые вырезы цветом панели.
   В рабочем браузере они скрыты, вырез настоящий — прозрачность. */
.rr-cert-cover__notch {
  display: none;
  position: absolute;
  left: 50%;
  width: 72px;
  height: 36px;
  background: var(--rr-walnut);
  transform: translateX(-50%);
}

.rr-cert-cover__notch--top {
  top: 0;
  border-radius: 0 0 36px 36px;
}

.rr-cert-cover__notch--bottom {
  bottom: 0;
  border-radius: 36px 36px 0 0;
}

@supports not (mask-composite: intersect) {
  .rr-cert-cover {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .rr-cert-cover__notch {
    display: block;
  }
}

.rr-cert-insert {
  width: 100%;
  aspect-ratio: 113 / 150; /* 113 × 150 мм */
  padding: 5.2%;
  display: flex;
  flex-direction: column;
  background: var(--rr-lagoon);
  color: var(--rr-linen);
  border-radius: 15px; /* R5 */
  container-type: inline-size;
  filter: drop-shadow(0 18px 32px rgba(87, 55, 34, 0.45));
}

.rr-cert-insert__mark {
  width: 10cqw;
  max-width: 31px;
  height: auto;
}

.rr-cert-insert__title {
  margin: 2.4cqw 0 0;
  font-family: var(--rr-font-display);
  font-size: 19px;
  font-size: 6.4cqw;
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: normal;
  text-align: center;
}

.rr-cert-insert__phrase {
  margin: 1.2cqw 0 0;
  font-size: 10px;
  font-size: max(10px, 3.1cqw);
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
}

.rr-cert-insert__number {
  margin: 3cqw 0 0;
  font-size: 11px;
  font-size: max(11px, 3.8cqw);
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.rr-cert-insert__number span {
  display: inline-block;
  min-width: 9ch;
  border-bottom: 1px solid rgba(242, 239, 234, 0.55);
}

.rr-cert-insert__lines {
  display: grid;
  gap: 7px;
  margin-top: 2.4cqw;
}

.rr-cert-insert__lines span {
  height: 1px;
  background: rgba(242, 239, 234, 0.55);
}

.rr-cert-insert__term {
  margin: 2.2cqw 0 0;
  font-size: 11px;
  font-size: max(11px, 3cqw);
  line-height: 1.4;
  text-align: center;
}

.rr-cert-insert__qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2cqw;
  margin-top: 2cqw;
}

.rr-cert-insert__qr {
  width: 22cqw;
  max-width: 68px;
  height: auto;
  padding: 1.2cqw;
  background: var(--rr-linen);
  border-radius: 2cqw;
}

.rr-cert-insert__qr-caption {
  margin: 0;
  font-size: 10px;
  font-size: max(10px, 2.6cqw);
  line-height: 1.25;
  text-align: center;
}

.rr-cert-insert__bottom {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.4cqw;
  margin-top: auto;
  padding-top: 1.8cqw;
}

.rr-cert-insert__contacts,
.rr-cert-insert__address {
  margin: 0;
  font-size: 10px;
  font-size: max(10px, 2.8cqw);
  line-height: 1.5;
  font-style: normal;
}

.rr-cert-insert__contacts {
  display: grid;
  gap: 0.8cqw;
  padding: 0;
  list-style: none;
}

.rr-cert-insert__notice {
  margin: 1.8cqw 0 0;
  padding: 1.8cqw 2.2cqw;
  background: var(--rr-linen);
  color: var(--rr-walnut);
  border-radius: 1.4cqw;
  font-size: 10px;
  font-size: max(10px, 2.9cqw);
  line-height: 1.25;
  text-align: center;
}

/* ---------- Служебное ---------- */

.rr-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.rr-skip {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--rr-walnut);
  color: var(--rr-linen);
  border-radius: var(--rr-radius-md);
  text-decoration: none;
  transition: top var(--rr-dur-1) var(--rr-ease);
}

.rr-skip:focus {
  top: 1rem;
}

/* ---------- Движение ---------- */

.rr-js .rr-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity var(--rr-dur-3) var(--rr-ease),
    transform var(--rr-dur-3) var(--rr-ease);
}

.rr-js .rr-reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .rr-js .rr-reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Печать ---------- */

@media print {
  .rr-header,
  .rr-nav,
  .rr-burger,
  .rr-skip {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.75em;
  }
}
