:root {
  --navy: #0e2a4a;
  --navy-2: #16365c;
  --red: #c8102e;
  --red-dark: #9d0c24;
  --blue: #1d4e89;
  --paper: #f3f5f8;
  --white: #ffffff;
  --ink: #122033;
  --muted: #5c6b7a;
  --line: #e2e8ef;
  --sans: "Golos Text", "Segoe UI", sans-serif;
  --display: "Unbounded", "Golos Text", sans-serif;
  --header: 4.5rem;
  --container: min(1120px, calc(100% - 2rem));
  --radius: 14px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
}

img { max-width: 100%; display: block; }

a { color: var(--blue); }
a:hover { color: var(--red); }

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.75rem; }
h2 { font-family: var(--display); font-weight: 500; font-size: clamp(1.6rem, 3vw, 2.15rem); letter-spacing: -0.03em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--red); color: white; padding: 0.6rem 1rem; border-radius: 8px;
}
.skip-link:focus { top: 0.5rem; color: white; }

.container { width: var(--container); margin-inline: auto; }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.tricolor { display: grid; grid-template-columns: 1fr 1fr 1fr; height: 6px; }
.tricolor span:nth-child(1) { background: #fff; box-shadow: inset 0 -1px 0 #e6e6e6; }
.tricolor span:nth-child(2) { background: var(--blue); }
.tricolor span:nth-child(3) { background: var(--red); }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: var(--header);
  display: flex; align-items: center; gap: 1rem;
}
.logo { display: flex; align-items: center; gap: 0.7rem; color: var(--ink); text-decoration: none; }
.logo-mark {
  width: 3.25rem; height: 3.25rem; object-fit: contain; display: block;
  background: transparent;
}
.logo-text {
  font-size: 0.72rem; line-height: 1.2; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted); font-weight: 600;
}
.nav { margin-left: auto; }
.nav-toggle { list-style: none; }
.nav-toggle::-webkit-details-marker { display: none; }
.nav-list { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.nav-list a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.nav-list a:hover { color: var(--red); }
.header-phone {
  display: none; font-weight: 700; text-decoration: none; color: var(--navy);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.55rem 0.9rem;
  min-height: 44px; align-items: center;
}
.header-phone:hover { border-color: var(--navy); color: var(--navy); }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; padding: 10px;
  background: none; border: 0; cursor: pointer; min-width: 44px; min-height: 44px;
}
.nav-toggle-bar { width: 22px; height: 2px; background: var(--ink); }

@media (min-width: 960px) { .header-phone { display: inline-flex; } }
@media (max-width: 959px) {
  .nav-toggle { display: flex; justify-content: center; cursor: pointer; }
  .nav { position: static; }
  .nav-list { display: none; }
  .nav[open] .nav-list {
    display: flex; position: absolute; left: 0; right: 0; top: calc(var(--header) + 6px);
    flex-direction: column; gap: 0; padding: 0.5rem 1rem 1rem;
    background: white; border-bottom: 1px solid var(--line);
  }
  .nav-list a { display: block; padding: 0.85rem 0; border-top: 1px solid var(--line); }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.75rem 1.25rem;
  font: 700 1rem/1 var(--sans); text-decoration: none; cursor: pointer;
  border-radius: 999px; border: 0;
  transition: transform 160ms ease-out, background-color 160ms ease-out, color 160ms ease-out;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--red); color: white; }
.btn-primary:hover { background: var(--red-dark); color: white; }
.btn-ghost { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--navy); }
.btn-ghost:hover { background: var(--navy); color: white; }
.btn-block { width: 100%; }

.hero { padding: 2.5rem 0 3.5rem; background:
  radial-gradient(900px 420px at 100% -10%, rgba(29, 78, 137, 0.08), transparent 60%),
  linear-gradient(180deg, #f7f9fb, #fff 70%);
}
.hero-grid { display: grid; gap: 1.5rem; align-items: end; }
@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    grid-template-areas: "copy figure" "slip figure";
    gap: 1.25rem 2rem;
    align-items: center;
  }
  .hero-copy { grid-area: copy; }
  .hero-figure { grid-area: figure; }
  .payslip { grid-area: slip; }
}
.hero-figure { margin: 0; }
.hero-figure img {
  width: 100%;
  height: min(620px, 72vh);
  object-fit: cover;
  object-position: center 18%;
  border-radius: 18px;
  display: block;
}
.gallery { padding-top: 0; }
.gallery-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  grid-auto-rows: 200px;
  gap: 0.65rem;
}
.gallery-grid figure { margin: 0; min-height: 0; }
.gallery-grid figure:first-child { grid-row: span 2; }
.gallery-grid img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 14px; display: block;
}
@media (max-width: 720px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; }
  .gallery-grid figure:first-child { grid-column: 1 / -1; grid-row: auto; height: 240px; }
}
.eyebrow {
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.02em;
  color: var(--blue); margin-bottom: 1.25rem; max-width: 36rem;
}
.hero-kicker {
  margin: 0; font-size: 0.95rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.hero-sum {
  display: block; font-family: var(--display); font-weight: 700;
  font-size: clamp(2.35rem, 5.6vw, 4.15rem); letter-spacing: -0.045em;
  color: var(--red); line-height: 0.95;
}
.hero h1 { margin: 0.2rem 0 1rem; }
.hero-lead { max-width: 38rem; font-size: 1.15rem; color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.25rem 0; }
.hero-note { color: var(--muted); font-size: 0.95rem; max-width: 36rem; }

.payslip {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1rem;
  box-shadow: 0 18px 40px rgba(14, 42, 74, 0.08);
}
.payslip-title {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem;
}
.payslip dl { margin: 0; }
.payslip dl > div {
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
  padding: 0.85rem 0; border-top: 1px solid var(--line);
}
.payslip dt { color: var(--muted); }
.payslip dd { margin: 0; font-family: var(--display); font-weight: 500; font-size: 1.15rem; letter-spacing: -0.03em; }
.payslip-total dd { color: var(--red); font-size: 1.35rem; }
.payslip-foot { margin: 0.75rem 0 0; font-size: 0.85rem; color: var(--muted); }

.year-chart { padding-top: 1rem; }
.month-bars, .rank-chart ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0.45rem;
  align-items: end;
}
.month-bars { grid-template-columns: repeat(12, 1fr); min-height: 180px; }
.month-bars li, .rank-chart li {
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem; min-width: 0;
}
.month-bars span, .rank-chart span {
  font-size: 0.68rem; font-weight: 700; color: var(--muted);
}
.month-bars i, .rank-chart i {
  display: block; width: 100%; border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--navy-2), var(--navy));
}
.month-bars i { height: 120px; }
.month-bars li:last-child i { background: linear-gradient(180deg, #e23b52, var(--red)); }
.month-bars b, .rank-chart b {
  font-weight: 600; font-size: 0.68rem; color: var(--muted); font-style: normal;
}
.year-sum {
  margin: 1rem 0 2.5rem;
  font-family: var(--display); font-weight: 700; letter-spacing: -0.03em;
  font-size: clamp(1.4rem, 3vw, 2rem); color: var(--red);
}
.rank-chart h3 { font-family: var(--display); font-weight: 500; margin-bottom: 1rem; }
.rank-chart ul {
  grid-template-columns: repeat(8, 1fr);
  height: 240px;
}
.rank-chart li { height: 100%; justify-content: flex-end; }
.rank-chart i { height: var(--h); }
.rank-chart li:last-child i { background: linear-gradient(180deg, #e23b52, var(--red)); }
.rank-chart b { text-align: center; line-height: 1.2; }
.chart-note { color: var(--muted); font-size: 0.9rem; margin-top: 0.75rem; }
@media (max-width: 720px) {
  .month-bars { grid-template-columns: repeat(6, 1fr); min-height: 0; }
  .month-bars i { height: 72px; }
  .rank-chart ul { grid-template-columns: repeat(4, 1fr); height: auto; gap: 0.8rem 0.4rem; }
  .rank-chart li { height: 160px; }
}

.section { padding: 4rem 0; }
.section--paper { background: var(--paper); }
.section--navy { background: var(--navy); color: white; }
.section-header { max-width: 40rem; margin-bottom: 2rem; }
.section-header p, .muted { color: var(--muted); }
.section-header--light p { color: rgba(255, 255, 255, 0.78); }
.section--navy a { color: white; }

.money-grid { display: grid; gap: 1rem; }
@media (min-width: 800px) { .money-grid { grid-template-columns: repeat(3, 1fr); } }
.money-card {
  background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.25rem 0.5rem;
}
.section:not(.section--paper) .money-card:not(.money-card--accent) { background: var(--paper); border-color: transparent; }
.money-card--accent { background: var(--navy); color: white; }
.money-card--accent .money-label,
.money-card--accent .money-period,
.money-card--accent li { color: rgba(255, 255, 255, 0.78); }
.money-label { margin: 0 0 0.8rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue); }
.money-figure { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(1.7rem, 3vw, 2rem); letter-spacing: -0.04em; }
.money-card--accent .money-figure { color: white; }
.money-period { margin: 0.2rem 0 0.8rem; color: var(--muted); font-weight: 600; }
.money-card ul, .aside-note ul, .family-grid ul { margin: 0 0 1rem; padding-left: 1.1rem; }
.money-card li, .aside-note li, .family-grid li { margin: 0.4rem 0; }

.split { display: grid; gap: 2rem; }
@media (min-width: 860px) { .split { grid-template-columns: 1.1fr 0.9fr; align-items: start; } }

.data-table { width: 100%; border-collapse: collapse; background: white; border-radius: 12px; overflow: hidden; }
.data-table th, .data-table td { text-align: left; padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.data-table td:last-child, .data-table th:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; }
.data-table--wide td:last-child { white-space: normal; font-weight: 500; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.table-scroll .data-table { border-radius: 0; }
.data-table--wide td:nth-child(2) { white-space: nowrap; font-weight: 700; color: var(--red); }

.plain-list { list-style: disc; }

.family-grid { display: grid; gap: 1rem; }
@media (min-width: 800px) { .family-grid { grid-template-columns: 1.1fr 1fr 1fr; } }
.family-grid article {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius); padding: 1.25rem;
}
.family-grid h3 { font-family: var(--display); font-weight: 500; }
.figure-list { list-style: none; padding: 0; }
.figure-list li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.55rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.figure-list strong { font-family: var(--display); font-weight: 500; font-size: 0.95rem; white-space: nowrap; }
.family-grid p { color: rgba(255, 255, 255, 0.78); font-size: 0.95rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(5, 1fr); } }
.steps li {
  background: var(--paper); border-radius: var(--radius); padding: 1rem 1rem 0.4rem;
  counter-increment: step;
}
.steps { counter-reset: step; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center; width: 2rem; height: 2rem; margin-bottom: 0.7rem;
  border-radius: 50%; background: var(--navy); color: white; font-weight: 700; font-size: 0.9rem;
}
.steps p { color: var(--muted); font-size: 0.95rem; }

.apply-grid { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 860px) { .apply-grid { grid-template-columns: 0.85fr 1.15fr; } }
.apply-phone { font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2rem); letter-spacing: -0.03em; margin: 0.5rem 0 1rem; }
.apply-phone a { color: var(--red); text-decoration: none; }
.apply-form {
  background: white; border-radius: var(--radius); padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(14, 42, 74, 0.06);
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem 1rem;
}
.form-row { display: flex; flex-direction: column; gap: 0.35rem; grid-column: 1 / -1; }
.form-row--half { grid-column: auto; }
@media (max-width: 640px) {
  .apply-form { grid-template-columns: 1fr; }
  .form-row--half { grid-column: 1 / -1; }
}
.form-row label, .checkbox-label { font-size: 0.9rem; font-weight: 600; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; min-height: 48px; padding: 0.65rem 0.8rem;
  font: 1rem/1.4 var(--sans); color: var(--ink);
  background: var(--paper); border: 1px solid transparent; border-radius: 10px;
}
.form-row textarea { min-height: 6rem; resize: vertical; }
.checkbox-label { display: flex; gap: 0.65rem; align-items: flex-start; grid-column: 1 / -1; font-weight: 500; color: var(--muted); }
.checkbox-label input { margin-top: 0.25rem; width: 1.1rem; height: 1.1rem; }
.form-status { grid-column: 1 / -1; min-height: 1.25rem; margin: 0; font-size: 0.95rem; }
.form-status.is-success { color: #0f7a3a; }
.form-status.is-error { color: var(--red); }
.apply-form .btn { grid-column: 1 / -1; }

.faq-wrap { max-width: 46rem; }
.faq details { border-top: 1px solid var(--line); padding: 0.35rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; padding: 0.85rem 0; min-height: 44px; }
.faq p { color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); padding: 1.5rem 0 5rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; color: var(--muted); font-size: 0.92rem; }
.footer-inner a { font-weight: 700; text-decoration: none; }

.fab-phone {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 40;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; background: var(--red); color: white;
  box-shadow: 0 10px 24px rgba(200, 16, 46, 0.35); text-decoration: none;
  transition: transform 160ms ease-out, background-color 160ms ease-out;
}
.fab-phone:hover { background: var(--red-dark); color: white; }
.fab-phone:active { transform: scale(0.98); }
@media (max-width: 959px) {
  .payslip dl > div { flex-direction: column; align-items: flex-start; gap: 0.15rem; }
  .payslip dd { font-size: 1.35rem; }
}
@media (min-width: 960px) { .fab-phone { display: none; } .site-footer { padding-bottom: 1.5rem; } }
