/* ============================================
   ЗАЩИТНИК.БЕЛ — Editorial Military Design
   ============================================ */

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* Палитра — российская расцветка (бело-сине-красная), светлая */
  --paper: #fbfaf7; /* почти белый фон, едва тёплый */
  --paper-2: #f1efe9; /* контрастный фон для секций */
  --bone: #ffffff; /* чистый белый для карточек */
  --ink: #0a1e45; /* deep navy — основной тёмный */
  --ink-2: #15327a; /* navy поярче */
  --steel: #1e3a8a; /* синий для иконок и линий */
  --accent: #c8102e; /* российский красный — CTA, акценты */
  --accent-d: #a00d24; /* красный потемнее на hover */
  --national: #003eb3; /* синий национальный */
  --national-d: #002a85;
  --line: #dcd7cb; /* линии на светлом — тёплый серый */
  --line-soft: #e8e3d6; /* мягкие разделители */
  --line-dark: #1d2d55; /* линии на тёмном */
  --mist: #5c6b89; /* приглушённый текст */
  --green-msg: #25d366;
  --tg-msg: #229ed9;
  --max-msg: #4a63f3;

  /* Типографика */
  --font-display: "Oswald", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Roboto Mono", monospace;

  /* Радиусы — минимальные, editorial */
  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 8px;
  --r-xl: 14px;

  /* Тени — мягкие на светлом */
  --shadow-sm: 0 1px 2px rgba(10, 30, 69, 0.05);
  --shadow-md: 0 4px 14px rgba(10, 30, 69, 0.08);
  --shadow-hero: 0 24px 60px rgba(10, 30, 69, 0.18);

  /* Размеры */
  --container: 1200px;
  --header-h: 76px;
}

/* ---------- BASE ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
html,
body {
  overflow-x: hidden;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}
body.menu-open,
body.modal-open {
  overflow: hidden;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
}
button {
  font-family: inherit;
  cursor: pointer;
}
section[id] {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

/* ---------- TEXTURE BACKGROUND ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(
    circle at 1px 1px,
    rgba(10, 30, 69, 0.045) 1px,
    transparent 0
  );
  background-size: 22px 22px;
}

/* ---------- TYPOGRAPHY ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.display-xl {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.92;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}
.display-lg {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.display-md {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.05;
  text-transform: uppercase;
}
.eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--national);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--national);
  display: inline-block;
}
.eyebrow-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--mist);
}
.lead {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  max-width: 62ch;
}
.muted {
  color: var(--mist);
}

/* ---------- LAYOUT ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 max(20px, env(safe-area-inset-left)) 0
    max(20px, env(safe-area-inset-right));
  position: relative;
  z-index: 1;
}
main {
  padding: 0;
}
.section {
  padding-top: 80px;
  padding-bottom: 80px;
}
.section-tight {
  padding-top: 56px;
  padding-bottom: 56px;
}
@media (max-width: 768px) {
  .section {
    padding-top: 56px;
    padding-bottom: 56px;
  }
}

/* Section header pattern */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding-bottom: 28px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--line-soft);
}
.section-head h2 {
  margin: 12px 0 0;
  max-width: 22ch;
}
@media (max-width: 768px) {
  .section-head {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* ---------- HEADER ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  background: rgba(245, 241, 232, 0.9);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-h);
}
.logo-mark {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1;
}
.logo-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-transform: uppercase;
  display: flex;
  align-items: center;
}
.logo-title .dot {
  color: var(--national);
  margin-left: 1px;
}
.logo-subtitle {
  margin-top: 6px;
  font-size: 9px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--mist);
}
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.desktop-nav a {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--r-sm);
  transition:
    color 0.18s,
    background 0.18s;
  position: relative;
}
.desktop-nav a:hover {
  color: var(--national);
}
.desktop-nav a.cta {
  background: var(--ink);
  color: var(--paper);
  padding: 11px 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-left: 8px;
  text-transform: uppercase;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.desktop-nav a.cta:hover {
  background: var(--accent);
  color: var(--paper);
}

@media (max-width: 1023px) {
  .desktop-nav {
    display: none;
  }
}

#menuToggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink);
  background: transparent;
  border-radius: var(--r-sm);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
}
#menuToggle .menu-toggle-line {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  transition:
    transform 0.22s,
    opacity 0.22s;
}
#menuToggle.is-open .menu-toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
#menuToggle.is-open .menu-toggle-line:nth-child(2) {
  opacity: 0;
}
#menuToggle.is-open .menu-toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1023px) {
  #menuToggle {
    display: flex;
  }
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--paper);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 16px 20px 20px;
}
.mobile-menu.open {
  display: block;
}
.mobile-menu .menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--line-soft);
}
.mobile-menu .menu-link:last-of-type {
  border-bottom: 0;
}
.mobile-menu .menu-link span:last-child {
  color: var(--accent);
}
.mobile-menu .messenger-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  align-items: center;
}
.mobile-menu .menu-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  padding: 16px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 13px;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../../bg.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.42;
  z-index: -2;
  filter: contrast(1.05) saturate(0.9) brightness(0.85);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(10, 30, 69, 0.3) 0%,
      rgba(10, 30, 69, 0.7) 60%,
      var(--ink) 100%
    ),
    linear-gradient(
      90deg,
      rgba(10, 30, 69, 0.78) 0%,
      rgba(21, 50, 122, 0.25) 100%
    );
  z-index: -1;
}
/* Декоративная красная полоса слева у hero */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(10, 30, 69, 0.3) 0%,
      rgba(10, 30, 69, 0.7) 60%,
      var(--ink) 100%
    ),
    linear-gradient(
      90deg,
      rgba(10, 30, 69, 0.82) 0%,
      rgba(21, 50, 122, 0.3) 100%
    );
  z-index: -1;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 60px;
  align-items: end;
  padding: 60px 0 50px;
  min-height: calc(100vh - var(--header-h));
}
@media (max-width: 1023px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 60px 0 40px;
    min-height: auto;
  }
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(251, 250, 247, 0.7);
  margin-bottom: 32px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(251, 250, 247, 0.2);
}
.hero-meta .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
.hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 6.5vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  margin: 0 0 26px;
  color: var(--paper);
}
.hero h1 .accent {
  color: var(--accent);
  display: block;
}
.hero p.lead {
  color: rgba(251, 250, 247, 0.85);
  font-size: clamp(16px, 1.6vw, 19px);
  max-width: 56ch;
  margin: 0 0 36px;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

/* Hero side panel */
.hero-side {
  border-left: 1px solid rgba(251, 250, 247, 0.18);
  padding-left: 40px;
}
@media (max-width: 1023px) {
  .hero-side {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid rgba(251, 250, 247, 0.18);
    padding-top: 40px;
  }
}
.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.hero-stat {
  padding: 22px 0;
  border-bottom: 1px solid rgba(251, 250, 247, 0.14);
}
.hero-stat:last-child {
  border-bottom: 0;
}
.hero-stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--national);
  margin-bottom: 8px;
}
.hero-stat-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--paper);
  text-transform: uppercase;
}
.hero-stat-note {
  margin-top: 6px;
  font-size: 13px;
  color: rgba(251, 250, 247, 0.6);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  border-radius: var(--r-sm);
  transition:
    transform 0.18s,
    background 0.18s,
    color 0.18s,
    box-shadow 0.18s;
  min-height: 52px;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--accent);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--accent-d);
  transform: translateY(-1px);
}
.btn-light {
  background: var(--paper);
  color: var(--ink);
}
.btn-light:hover {
  background: var(--accent);
  color: var(--paper);
}
.btn-ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(251, 250, 247, 0.4);
}
.btn-ghost:hover {
  background: rgba(251, 250, 247, 0.08);
  border-color: var(--paper);
}
.btn-dark {
  background: var(--ink);
  color: var(--paper);
}
.btn-dark:hover {
  background: var(--steel);
}
.btn-wa {
  background: #7360f2;
  color: #fff;
}
.btn-wa:hover {
  background: #5a4bc7;
}
.btn-block {
  width: 100%;
}

/* ---------- MESSENGER ICONS ---------- */
.messenger-row {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}
.messenger-icon-btn {
  height: 52px;
  width: 52px;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  font-size: 22px;
  transition:
    transform 0.18s,
    box-shadow 0.18s;
}
.messenger-icon-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.bg-green {
  background: #7360f2;
}
.bg-vk {
  background: #0077ff;
}
.bg-tg {
  background: var(--tg-msg);
}
.bg-maxc {
  background: var(--max-msg);
}

/* ---------- REQUIREMENTS GRID ---------- */
.req-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line-soft);
  background: var(--bone);
}
.req-cell {
  padding: 32px 28px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.req-cell:nth-child(4n) {
  border-right: 0;
}
.req-cell:nth-child(n + 5) {
  border-bottom: 0;
}
.req-cell.dark {
  background: var(--ink);
  color: var(--paper);
}
.req-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--national);
  margin-bottom: 24px;
}
.req-cell.dark .req-num {
  color: var(--national);
}
.req-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1;
  margin-bottom: 18px;
  color: var(--ink);
  text-transform: uppercase;
}
.req-cell.dark .req-value {
  color: var(--paper);
}
.req-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 8px;
}
.req-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--mist);
  margin: 0;
}
.req-cell.dark .req-text {
  color: rgba(251, 250, 247, 0.75);
}

@media (max-width: 1023px) {
  .req-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .req-cell:nth-child(4n) {
    border-right: 1px solid var(--line-soft);
  }
  .req-cell:nth-child(2n) {
    border-right: 0;
  }
  .req-cell:nth-child(n + 5) {
    border-bottom: 1px solid var(--line-soft);
  }
  .req-cell:nth-child(n + 3) {
    border-bottom: 0;
  }
}
@media (max-width: 600px) {
  .req-grid {
    grid-template-columns: 1fr;
  }
  .req-cell {
    border-right: 0 !important;
    border-bottom: 1px solid var(--line-soft) !important;
  }
  .req-cell:last-child {
    border-bottom: 0 !important;
  }
}

/* ---------- BENEFITS ---------- */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
}
.benefit {
  padding: 36px 32px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--bone);
  position: relative;
  transition: background 0.25s;
}
.benefit:hover {
  background: var(--paper-2);
}
.benefit.dark {
  background: var(--ink);
  color: var(--paper);
}
.benefit.dark:hover {
  background: var(--ink-2);
}
.benefit-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--national);
  margin-bottom: 20px;
}
.benefit-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-soft);
  margin-bottom: 24px;
  font-size: 20px;
  color: var(--ink);
}
.benefit.dark .benefit-icon {
  border-color: rgba(251, 250, 247, 0.25);
  color: var(--national);
}
.benefit h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  line-height: 1.1;
  margin: 0 0 12px;
}
.benefit p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--mist);
  margin: 0;
}
.benefit.dark p {
  color: rgba(251, 250, 247, 0.75);
}

@media (max-width: 1023px) {
  .benefits-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .benefits-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- DOCUMENTS SECTION ---------- */
.docs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 60px;
  align-items: start;
}
@media (max-width: 1023px) {
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}
.docs-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 32px;
  border-top: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
}
.doc-item {
  padding: 24px 22px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--bone);
}
.doc-item-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.doc-item-head i {
  color: var(--national);
  width: 18px;
}
.doc-item p {
  margin: 0;
  font-size: 14px;
  color: var(--mist);
  line-height: 1.55;
}

.docs-aside {
  background: var(--ink);
  color: var(--paper);
  padding: 36px 32px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
.docs-aside h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  margin: 0 0 28px;
  text-transform: uppercase;
}
.steps-mini {
  display: flex;
  flex-direction: column;
}
.step-mini {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(251, 250, 247, 0.12);
  align-items: start;
}
.step-mini:last-of-type {
  border-bottom: 0;
}
.step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--national);
  padding-top: 2px;
}
.step-mini-text {
  font-size: 14px;
  line-height: 1.55;
}

/* ---------- WHO + IMAGE BLOCK ---------- */
.who-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--line-soft);
  background: var(--bone);
}
@media (max-width: 1023px) {
  .who-layout {
    grid-template-columns: 1fr;
  }
}
.who-text {
  padding: 48px 40px;
}
.who-list {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line-soft);
}
.who-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px;
  line-height: 1.55;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
}
.who-item:last-child {
  border-bottom: 0;
}
.who-item::before {
  content: "✓";
  color: var(--national);
  font-weight: 700;
  font-size: 14px;
}
.who-image {
  position: relative;
  background: var(--steel);
  min-height: 360px;
  overflow: hidden;
}
.who-image picture {
  display: contents;
}
.who-image img {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: bottom;
}
.who-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 100%,
    rgba(176, 141, 87, 0.25) 0%,
    transparent 60%
  );
}
.who-image::after {
  content: "OFFICIAL";
  position: absolute;
  top: 24px;
  right: 24px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: rgba(251, 250, 247, 0.6);
  border: 1px solid rgba(251, 250, 247, 0.4);
  padding: 6px 10px;
}

/* ---------- STEPS ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
}
.step-card {
  padding: 32px 28px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--bone);
  position: relative;
}
.step-card.final {
  background: var(--ink);
  color: var(--paper);
}
.step-card-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
  color: var(--national);
  margin-bottom: 18px;
}
.step-card.final .step-card-num {
  color: var(--national);
}
.step-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  text-transform: uppercase;
  margin: 0 0 8px;
  letter-spacing: 0.01em;
}
.step-card p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--mist);
  margin: 0;
}
.step-card.final p {
  color: rgba(251, 250, 247, 0.75);
}

@media (max-width: 1023px) {
  .steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .steps-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- PAYMENTS ---------- */
.payments-hero {
  background: var(--ink);
  color: var(--paper);
  padding: 56px 48px;
  position: relative;
  overflow: hidden;
}
.payments-hero::before {
  content: "₽";
  position: absolute;
  right: -40px;
  top: -60px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 480px;
  line-height: 0.8;
  color: rgba(176, 141, 87, 0.06);
  z-index: 0;
  pointer-events: none;
}
.payments-hero-inner {
  position: relative;
  z-index: 1;
}
.payments-hero h2 {
  color: var(--paper);
  margin: 12px 0 28px;
  max-width: 22ch;
}
.payments-hero p {
  color: rgba(251, 250, 247, 0.8);
  max-width: 60ch;
  font-size: 17px;
  line-height: 1.65;
}

.payments-headline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 48px;
  border-top: 1px solid rgba(251, 250, 247, 0.18);
}
.payments-headline-cell {
  padding: 32px 0;
  border-right: 1px solid rgba(251, 250, 247, 0.18);
  padding-right: 32px;
}
.payments-headline-cell:last-child {
  border-right: 0;
  padding-right: 0;
  padding-left: 32px;
}
.payments-headline-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--national);
  margin-bottom: 12px;
}
.payments-headline-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--paper);
  margin-bottom: 12px;
}
.payments-headline-note {
  font-size: 14px;
  color: rgba(251, 250, 247, 0.7);
  line-height: 1.55;
}

@media (max-width: 768px) {
  .payments-hero {
    padding: 40px 24px;
  }
  .payments-headline {
    grid-template-columns: 1fr;
  }
  .payments-headline-cell {
    border-right: 0;
    border-bottom: 1px solid rgba(251, 250, 247, 0.18);
    padding-left: 0;
    padding-right: 0;
  }
  .payments-headline-cell:last-child {
    border-bottom: 0;
    padding-left: 0;
  }
}

/* Payments tabs section */
.payments-tabs-wrap {
  margin-top: 32px;
  padding: 40px 0;
  border-top: 1px solid var(--line-soft);
}
.payments-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line-soft);
  scrollbar-width: none;
}
.payments-tabs::-webkit-scrollbar {
  display: none;
}
.payments-tab-btn {
  flex: 0 0 auto;
  padding: 16px 22px;
  background: transparent;
  border: 0;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mist);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition:
    color 0.18s,
    border-color 0.18s;
  white-space: nowrap;
}
.payments-tab-btn:hover {
  color: var(--ink);
}
.payments-tab-btn.active {
  color: var(--ink);
  border-bottom-color: var(--national);
}
.payments-panel {
  display: none;
  padding-top: 28px;
}
.payments-panel.active {
  display: block;
}
.payment-rows {
  display: flex;
  flex-direction: column;
}
.payment-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-soft);
}
.payment-row:last-child {
  border-bottom: 0;
}
.payment-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--national);
}
.payment-name {
  font-size: 16px;
  line-height: 1.4;
  font-weight: 500;
}
.payment-sum {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(20px, 2.5vw, 28px);
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
  letter-spacing: -0.01em;
}
@media (max-width: 600px) {
  .payment-row {
    grid-template-columns: 40px 1fr;
    gap: 12px;
    padding: 18px 0;
  }
  .payment-sum {
    grid-column: 2;
    padding-top: 8px;
    font-size: 22px;
  }
}

/* ---------- FAQ ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line-soft);
}
.faq-item {
  border-bottom: 1px solid var(--line-soft);
}
.faq-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 28px 0;
  background: transparent;
  border: 0;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(18px, 2vw, 24px);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--ink);
  cursor: pointer;
  transition: color 0.18s;
}
.faq-toggle:hover {
  color: var(--national);
}
.faq-toggle .plus {
  flex: 0 0 32px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  color: var(--national);
  line-height: 1;
  transition: transform 0.25s ease;
}
.faq-item.open .plus {
  transform: rotate(45deg);
}
.faq-body {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.35s ease,
    padding 0.35s ease;
}
.faq-item.open .faq-body {
  max-height: 500px;
  padding-bottom: 28px;
}
.faq-body p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  max-width: 70ch;
  margin: 0;
}

/* ---------- FINAL CTA ---------- */
.final-cta {
  background: var(--ink);
  color: var(--paper);
  padding: 80px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 60px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.final-cta::before {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(176, 141, 87, 0.2);
  border-radius: 50%;
}
.final-cta::after {
  content: "";
  position: absolute;
  right: 40px;
  top: 40px;
  width: 200px;
  height: 200px;
  border: 1px solid rgba(176, 141, 87, 0.12);
  border-radius: 50%;
}
.final-cta h2 {
  color: var(--paper);
  margin: 12px 0 20px;
  max-width: 22ch;
}
.final-cta p {
  color: rgba(251, 250, 247, 0.78);
  max-width: 56ch;
  font-size: 17px;
  line-height: 1.65;
}
.final-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 1;
}
@media (max-width: 1023px) {
  .final-cta {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 56px 28px;
  }
}

/* ---------- CONTACT FORM ---------- */
.form-section {
  background: var(--bone);
  border: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 0;
}
@media (max-width: 1023px) {
  .form-section {
    grid-template-columns: 1fr;
  }
}
.form-pane {
  padding: 56px 48px;
  border-right: 1px solid var(--line-soft);
}
.form-aside {
  background: var(--ink);
  color: var(--paper);
  padding: 56px 48px;
  position: relative;
  overflow: hidden;
}
.form-aside picture {
  position: absolute;
  bottom: 0;
  right: -20px;
  width: 90%;
  pointer-events: none;
  user-select: none;
}
.form-aside picture img {
  width: 100%;
  height: auto;
  opacity: 0.92;
}
.form-aside .label-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  z-index: 1;
}
.form-aside h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  margin: 12px 0 0;
  color: var(--paper);
  text-transform: uppercase;
  max-width: 14ch;
  line-height: 1.05;
}
.form-aside .messenger-row {
  margin-top: 8px;
}
.form-aside .phone-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid rgba(251, 250, 247, 0.3);
  padding-bottom: 8px;
  width: max-content;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.form-aside .phone-link:hover {
  color: var(--national);
  border-color: var(--national);
}
@media (max-width: 1023px) {
  .form-pane,
  .form-aside {
    padding: 40px 28px;
  }
  .form-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .form-aside img,
  .form-aside picture {
    display: none;
  }
}

#contactForm {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.field {
  position: relative;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  outline: none;
  padding: 8px 0 4px;
}
.field textarea {
  resize: none;
  min-height: 64px;
}
.field label.float {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 4px;
}
.field:focus-within label.float {
  color: var(--national);
}
.field:focus-within {
  border-bottom-color: var(--national);
}
.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 24px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--mist);
}
.consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--national);
  margin-top: 1px;
  flex-shrink: 0;
}
.form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}
@media (max-width: 600px) {
  .form-actions {
    grid-template-columns: 1fr;
  }
}

#contactForm.is-sending button[type="submit"] {
  opacity: 0.6;
  pointer-events: none;
}
#contactForm.is-sending button[type="submit"] span::after {
  content: "...";
  display: inline-block;
  animation: dots 1.2s infinite;
  margin-left: 4px;
}
@keyframes dots {
  0%,
  20% {
    content: ".";
  }
  40% {
    content: "..";
  }
  60%,
  100% {
    content: "...";
  }
}

/* ---------- THANKS OVERLAY ---------- */
#thanksOverlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(11, 18, 32, 0.75);
  backdrop-filter: blur(8px);
}
#thanksOverlay.is-open {
  display: flex;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.thanks-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--bone);
  border: 1px solid var(--line-soft);
  padding: 48px 40px 40px;
  text-align: center;
  animation: cardPop 0.45s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
@keyframes cardPop {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.thanks-card .corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--national);
  border-style: solid;
}
.thanks-card .corner.tl {
  top: 12px;
  left: 12px;
  border-width: 1px 0 0 1px;
}
.thanks-card .corner.tr {
  top: 12px;
  right: 12px;
  border-width: 1px 1px 0 0;
}
.thanks-card .corner.bl {
  bottom: 12px;
  left: 12px;
  border-width: 0 0 1px 1px;
}
.thanks-card .corner.br {
  bottom: 12px;
  right: 12px;
  border-width: 0 1px 1px 0;
}
.thanks-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--mist);
  cursor: pointer;
  font-size: 20px;
  transition: color 0.18s;
}
.thanks-close:hover {
  color: var(--ink);
}
.success-check {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.success-check svg {
  width: 80px;
  height: 80px;
  display: block;
}
.check-circle {
  fill: none;
  stroke: var(--national);
  stroke-width: 4;
  stroke-dasharray: 226;
  stroke-dashoffset: 226;
  animation: drawCircle 0.6s ease-out 0.15s forwards;
}
.check-mark {
  fill: none;
  stroke: var(--national);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: drawCheck 0.35s ease-out 0.65s forwards;
}
@keyframes drawCircle {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes drawCheck {
  to {
    stroke-dashoffset: 0;
  }
}
.thanks-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--national);
  margin-bottom: 12px;
}
.thanks-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 36px);
  text-transform: uppercase;
  line-height: 1;
  margin: 0 0 16px;
}
.thanks-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--mist);
  margin: 0 0 32px;
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- FOOTER ---------- */
.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 48px 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--mist);
  text-align: center;
}
.site-footer .muted-link {
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--line-soft);
}
.site-footer .muted-link:hover {
  color: var(--ink);
}

/* ---------- MOBILE STICKY CTA ---------- */
.mobile-bottom-cta {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  padding: 10px max(12px, env(safe-area-inset-right))
    calc(10px + env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
  background: rgba(245, 241, 232, 0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-soft);
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mobile-bottom-cta a {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: var(--r-sm);
}
.mobile-bottom-cta .primary {
  background: var(--accent);
  color: var(--paper);
}
.mobile-bottom-cta .secondary {
  background: var(--green-msg);
  color: #fff;
}
@media (max-width: 639px) {
  .mobile-bottom-cta {
    display: grid;
  }
  body {
    padding-bottom: 84px;
  }
}

/* ---------- REVEAL ANIMATION ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.reveal.show {
  opacity: 1;
  transform: none;
}

/* ---------- UTILITIES ---------- */
.text-center {
  text-align: center;
}
.flex {
  display: flex;
}
.gap-3 {
  gap: 12px;
}
.gap-4 {
  gap: 16px;
}
.mt-4 {
  margin-top: 16px;
}
.mt-6 {
  margin-top: 24px;
}
.mt-8 {
  margin-top: 32px;
}
.hidden {
  display: none;
}

/* ---------- RESPONSIVE FINE-TUNE ---------- */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 44px;
  }
  .hero-grid {
    padding: 48px 0 32px;
  }
  .form-pane,
  .form-aside {
    padding: 32px 20px;
  }
  .who-text {
    padding: 32px 24px;
  }
  .docs-aside {
    padding: 28px 24px;
  }
  .payments-hero {
    padding: 32px 20px;
  }
  .final-cta {
    padding: 48px 24px;
  }
}

/* OPENCLAW responsive wide screens: не растягиваем hero на всю высоту TV/4K */
@media (min-width: 1600px) {
  :root {
    --container: 1320px;
  }
  .hero-grid {
    min-height: min(calc(100vh - var(--header-h)), 980px);
  }
  .hero h1 {
    font-size: clamp(88px, 5vw, 112px);
  }
  .hero p.lead {
    font-size: 21px;
  }
}
@media (min-width: 2400px) {
  :root {
    --container: 1440px;
  }
  .hero-grid {
    min-height: 1040px;
  }
}

/* OPENCLAW responsive mobile: компактнее sticky CTA на самых узких экранах */
@media (max-width: 360px) {
  .mobile-bottom-cta {
    gap: 8px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .mobile-bottom-cta a {
    min-height: 48px;
    font-size: 12px;
    letter-spacing: 0.03em;
  }
}

/* OPENCLAW legal compliance styles */
.consent a {
  color: var(--national);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  margin-top: 14px;
}
.footer-legal-links a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-soft);
}
.footer-legal-links a:hover {
  color: var(--national);
}
.footer-legal-note {
  margin: 12px auto 0;
  max-width: 760px;
  font-size: 12px;
  color: var(--mist);
}
.legal-page {
  padding-top: 72px;
  padding-bottom: 72px;
  max-width: 920px;
}
.legal-page h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.95;
  text-transform: uppercase;
  margin: 12px 0 12px;
  color: var(--ink);
}
.legal-page h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  text-transform: uppercase;
  margin: 36px 0 12px;
  color: var(--ink);
}
.legal-page p,
.legal-page li {
  font-size: 17px;
  line-height: 1.7;
  color: var(--mist);
}
.legal-page a {
  color: var(--national);
}
.legal-updated {
  color: var(--national) !important;
  font-weight: 700;
}
.cookie-notice {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  background: rgba(11, 18, 32, 0.96);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}
.cookie-notice__text {
  font-size: 14px;
  line-height: 1.5;
}
.cookie-notice a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-notice__btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
@media (max-width: 639px) {
  .cookie-notice {
    grid-template-columns: 1fr;
    bottom: 86px;
    left: 12px;
    right: 12px;
    padding: 14px;
  }
  .cookie-notice__btn {
    width: 100%;
  }
}

/* OPENCLAW hero Cyrillic descenders: больше воздуха между строками заголовка */
.hero h1 {
  line-height: 0.98;
}
@media (max-width: 480px) {
  .hero h1 {
    line-height: 1;
  }
}

/* OPENCLAW dark background label contrast: мелкие подписи на синем фоне должны читаться */
.hero-meta,
.hero-stat-label,
.payments-headline-label,
.form-aside .label-stack,
.final-cta .eyebrow,
.payments-hero .eyebrow {
  color: #f8d98a !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
.hero-meta i,
.hero-stat-label i,
.payments-headline-label i {
  color: #f8d98a !important;
}
.hero-stat-note,
.payments-headline-note,
.payments-hero p,
.final-cta p {
  color: rgba(255, 255, 255, 0.9) !important;
}
.hero-meta {
  border-bottom-color: rgba(255, 255, 255, 0.28);
}
.hero-stat {
  border-bottom-color: rgba(255, 255, 255, 0.22);
}
.payments-headline,
.payments-headline-cell {
  border-color: rgba(255, 255, 255, 0.24);
}

/* OPENCLAW dark card label contrast: карточки Требования/Сопровождение/Документы */
.req-cell.dark .req-num,
.benefit.dark .benefit-num,
.benefit.dark .benefit-icon,
.docs-aside .eyebrow,
.who-text .eyebrow {
  color: #f8d98a !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
.benefit.dark .benefit-icon {
  border-color: rgba(248, 217, 138, 0.45) !important;
}
.req-cell.dark .req-text,
.benefit.dark p,
.docs-aside p,
.who-text p {
  color: rgba(255, 255, 255, 0.9) !important;
}
.req-cell.dark,
.benefit.dark {
  border-color: rgba(255, 255, 255, 0.18) !important;
}

/* OPENCLAW who block contrast fix: светлый блок не должен наследовать золотой стиль тёмных карточек */
.who-text .eyebrow {
  color: var(--national) !important;
  text-shadow: none !important;
}
.who-text .eyebrow::before {
  background: var(--national) !important;
}
.who-text p {
  color: var(--ink) !important;
  text-shadow: none !important;
}
.who-item::before {
  color: var(--national) !important;
}

/* OPENCLAW UX/UI pass 2026-05-18: mobile readability, no horizontal clipping */
.logo-mark,
.hero h1,
.landing h1,
.journal-hero h1,
.journal-head h2,
.journal-card h3,
.content-card h2,
.faq-mini summary,
.cta-box h2 {
  overflow-wrap: break-word;
  word-break: normal;
}
#menuToggle {
  flex: 0 0 44px;
}
.logo-mark {
  min-width: 0;
}

@media (max-width: 640px) {
  .header-inner {
    gap: 12px !important;
    padding-left: 20px !important;
    padding-right: 14px !important;
  }
  .logo-title {
    font-size: 21px !important;
  }
  .logo-subtitle {
    font-size: 8px !important;
    letter-spacing: 0.22em !important;
  }

  .hero-grid {
    padding-top: 48px !important;
  }
  .hero-meta {
    gap: 9px 12px !important;
    margin-bottom: 26px !important;
    font-size: 10px !important;
    letter-spacing: 0.09em !important;
    line-height: 1.45 !important;
  }
  .hero-meta-item {
    min-width: 0 !important;
    white-space: normal !important;
  }
  .hero h1 {
    font-size: clamp(34px, 10.2vw, 42px) !important;
    line-height: 1.04 !important;
    letter-spacing: -0.012em !important;
  }
  .hero p.lead {
    font-size: 16px !important;
    line-height: 1.62 !important;
  }
  .hero-cta {
    gap: 12px !important;
  }
  .hero-cta .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  .landing {
    padding-top: 86px !important;
    padding-bottom: 44px !important;
  }
  .landing h1 {
    font-size: clamp(32px, 10vw, 38px) !important;
    line-height: 1.06 !important;
    letter-spacing: -0.01em !important;
  }
  .landing .lead {
    font-size: 16px !important;
    line-height: 1.62 !important;
  }

  .journal-section {
    padding: 54px 0 62px !important;
  }
  .journal-head h2 {
    font-size: clamp(30px, 9vw, 38px) !important;
    line-height: 1.04 !important;
  }
  .journal-head p {
    font-size: 15.5px !important;
    line-height: 1.6 !important;
  }
  .journal-card {
    border-radius: 18px !important;
  }
  .journal-card__body {
    padding: 18px !important;
  }
  .journal-card h3 {
    font-size: 20px !important;
    line-height: 1.18 !important;
  }

  .journal-hero {
    padding-top: 82px !important;
    padding-bottom: 30px !important;
  }
  .journal-back {
    margin-bottom: 16px !important;
  }
  .journal-hero__meta {
    font-size: 11px !important;
    letter-spacing: 0.07em !important;
    line-height: 1.45 !important;
  }
  .journal-hero h1 {
    font-size: clamp(30px, 9.4vw, 38px) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.01em !important;
    max-width: 100% !important;
  }
  .journal-hero__image {
    border-radius: 20px !important;
  }
  .journal-content-section {
    padding-top: 30px !important;
  }
  .journal-content h2 {
    font-size: 25px !important;
    line-height: 1.18 !important;
  }
  .journal-content h3 {
    font-size: 21px !important;
    line-height: 1.22 !important;
  }
  .journal-content p,
  .journal-content li {
    font-size: 16px !important;
    line-height: 1.72 !important;
  }
  .journal-cta-box {
    border-radius: 20px !important;
    padding: 22px !important;
  }

  .content-card p,
  .faq-mini p,
  .cta-box p {
    font-size: 16px !important;
    line-height: 1.68 !important;
  }
  .content-card,
  .faq-mini details,
  .cta-box {
    padding: 20px !important;
    border-radius: 18px !important;
  }

  .mobile-bottom-cta {
    gap: 6px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  .mobile-bottom-cta a {
    min-width: 0 !important;
    font-size: 11.5px !important;
    letter-spacing: 0.035em !important;
    gap: 6px !important;
    white-space: nowrap !important;
  }

  .cookie-notice {
    bottom: 76px !important;
    left: 10px !important;
    right: 10px !important;
    padding: 11px 12px !important;
    border-radius: 14px !important;
    gap: 9px !important;
  }
  .cookie-notice__text {
    font-size: 12.5px !important;
    line-height: 1.42 !important;
  }
  .cookie-notice__btn {
    padding: 10px 14px !important;
    border-radius: 10px !important;
  }
}

@media (max-width: 370px) {
  .logo-title {
    font-size: 19px !important;
  }
  .logo-subtitle {
    letter-spacing: 0.16em !important;
  }
  .hero h1 {
    font-size: 34px !important;
  }
  .landing h1,
  .journal-hero h1 {
    font-size: 31px !important;
  }
  .mobile-bottom-cta a {
    font-size: 10.5px !important;
  }
}

/* OPENCLAW UX/UI pass 2: hard mobile viewport containment */
@media (max-width: 640px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  .site-header {
    overflow: hidden !important;
  }
  .header-inner {
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
  }
  .logo-mark {
    flex: 1 1 auto !important;
    max-width: calc(100vw - 92px) !important;
    overflow: hidden !important;
  }
  .logo-title,
  .logo-subtitle {
    max-width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
  #menuToggle {
    display: flex !important;
    margin-left: auto !important;
    position: relative !important;
    right: 0 !important;
  }

  .container {
    max-width: 100vw !important;
    overflow-x: clip !important;
  }
  .hero h1,
  .landing h1,
  .journal-hero h1,
  .journal-head h2 {
    max-width: calc(100vw - 40px) !important;
    width: 100% !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }
  .journal-hero h1 {
    font-size: clamp(28px, 8.4vw, 34px) !important;
    line-height: 1.1 !important;
  }
  .landing h1 {
    font-size: clamp(30px, 8.8vw, 36px) !important;
    line-height: 1.08 !important;
  }
  .hero h1 {
    font-size: clamp(32px, 9.3vw, 39px) !important;
    line-height: 1.06 !important;
  }
  .journal-hero__image {
    max-width: calc(100vw - 40px) !important;
  }
}

/* OPENCLAW UX/UI cookie notice compact mobile */
@media (max-width: 640px) {
  .cookie-notice {
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    bottom: 74px !important;
    padding: 9px 10px !important;
  }
  .cookie-notice__text {
    font-size: 11.5px !important;
    line-height: 1.35 !important;
  }
  .cookie-notice__btn {
    width: auto !important;
    min-width: 86px !important;
    padding: 10px 12px !important;
    font-size: 12px !important;
  }
}
@media (max-width: 360px) {
  .cookie-notice {
    grid-template-columns: 1fr !important;
  }
  .cookie-notice__btn {
    width: 100% !important;
  }
}

/* OPENCLAW fix 2026-05-18: mobile menu must not be clipped by header */
@media (max-width: 640px) {
  .site-header {
    overflow: visible !important;
  }
  .mobile-menu {
    max-height: calc(100vh - var(--header-h) - 86px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    z-index: 90 !important;
    box-shadow: 0 18px 40px rgba(10, 30, 69, 0.16) !important;
  }
  body.menu-open .site-header {
    z-index: 120 !important;
  }
}

/* OPENCLAW fix 2026-05-18: robust mobile menu open states */
@media (max-width: 1023px) {
  #mobileMenu.open,
  body.menu-open #mobileMenu,
  #menuToggle[aria-expanded="true"] + #mobileMenu {
    display: block !important;
  }
}

/* OPENCLAW fix 2026-05-18: iPhone SE mobile menu robust behavior */
@media (max-width: 1023px) {
  #menuToggle {
    position: relative !important;
    z-index: 300 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
  }
  #mobileMenu {
    z-index: 250 !important;
    pointer-events: auto !important;
  }
  #mobileMenu.open,
  body.menu-open #mobileMenu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

/* OPENCLAW fix 2026-05-18: iPhone SE tap target */
@media (max-width: 1023px) {
  #menuToggle .menu-toggle-line,
  #menuToggle span,
  #menuToggle i,
  #menuToggle svg {
    pointer-events: none !important;
  }
  #menuToggle {
    cursor: pointer !important;
  }
}

/* OPENCLAW UX fix 2026-05-18: text inside colored CTA/messenger buttons must stay white */
.btn-primary,
.btn-primary span,
.btn-primary i,
.btn-wa,
.btn-wa span,
.btn-wa i,
.mobile-bottom-cta .primary,
.mobile-bottom-cta .primary span,
.mobile-bottom-cta .primary i,
.mobile-bottom-cta .secondary,
.mobile-bottom-cta .secondary span,
.mobile-bottom-cta .secondary i,
.mobile-menu .menu-primary,
.mobile-menu .menu-primary span,
.mobile-menu .menu-primary i,
.messenger-icon-btn,
.messenger-icon-btn span,
.messenger-icon-btn i {
  color: #fff !important;
}
