/* ============================================================
   KUS OPTIMA — Никита Кусюмов
   Швейцарская сетка, монохром, вордмарк как главный элемент.
   Шрифты: Onest (дисплей) / Golos Text (текст) / JetBrains Mono (служебное)
   ============================================================ */

:root {
  --bg:          #FCFCFC;
  --surface:     #F2F2F1;
  --surface-2:   #FFFFFF;
  --ink:         #0B0B0C;
  --ink-soft:    #56585B;
  --ink-faint:   #6A6D71;
  --line:        #D2D3D4;
  --line-soft:   #E4E5E5;
  --accent:      #0B0B0C;
  --accent-hi:   #333537;
  --accent-wash: #F2F2F1;
  --on-accent:   #FCFCFC;
  --ok:          #1F5C43;
  --todo-bg:     #F6E27A;
  --todo-ink:    #3D3208;

  --maxw: 1240px;
  --rail: 160px;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.375rem;
  --step-3: 1.75rem;
  --step-4: clamp(2rem, 4vw, 2.75rem);
  --step-5: clamp(2.4rem, 6vw, 4rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #0B0B0C;
    --surface:     #151617;
    --surface-2:   #1D1E20;
    --ink:         #F2F2F1;
    --ink-soft:    #9EA1A5;
    --ink-faint:   #8E9195;
    --line:        #2A2C2E;
    --line-soft:   #1F2123;
    --accent:      #F2F2F1;
    --accent-hi:   #C9CACB;
    --accent-wash: #1D1E20;
    --on-accent:   #0B0B0C;
    --ok:          #6FBF98;
    --todo-bg:     #4A3D07;
    --todo-ink:    #F6E27A;
  }
}

:root[data-theme="dark"] {
  --bg:          #0B0B0C;
  --surface:     #151617;
  --surface-2:   #1D1E20;
  --ink:         #F2F2F1;
  --ink-soft:    #9EA1A5;
  --ink-faint:   #8E9195;
  --line:        #2A2C2E;
  --line-soft:   #1F2123;
  --accent:      #F2F2F1;
  --accent-hi:   #C9CACB;
  --accent-wash: #1D1E20;
  --on-accent:   #0B0B0C;
  --ok:          #6FBF98;
  --todo-bg:     #4A3D07;
  --todo-ink:    #F6E27A;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 112.5%; }
@media (min-width: 1000px) { html { font-size: 118.75%; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--step-0);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: Onest, "Golos Text", -apple-system, sans-serif;
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.018em;
  text-wrap: balance;
  margin: 0;
}
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

a { color: inherit; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .74rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
}

/* заглушка: то, что Никите нужно заменить своими данными */
.todo {
  background: var(--todo-bg);
  color: var(--todo-ink);
  padding: 0 .3em;
  border-radius: 2px;
  font-style: normal;
  box-decoration-break: clone;
}

/* ---------- каркас ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.band { border-top: 1px solid var(--line); }
.band:first-of-type { border-top: 0; }

.section {
  scroll-margin-top: 72px;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: 0 40px;
  padding-block: 72px;
}
.section > .rail { padding-top: .35rem; }
.section > .rail .mono { position: sticky; top: 24px; display: block; }
.section-body { display: flex; flex-direction: column; gap: 28px; }
.measure { max-width: 62ch; }

@media (max-width: 820px) {
  .section { grid-template-columns: 1fr; gap: 18px; padding-block: 52px; }
  .section > .rail .mono { position: static; }
}

/* ---------- шапка ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 24px;
}
.brand {
  font-family: Onest, sans-serif; font-weight: 700; font-size: 1.02rem;
  letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  text-transform: uppercase; line-height: 1.15;
  display: flex; flex-direction: column; gap: 1px;
}
.brand span {
  font-family: "JetBrains Mono", monospace; font-size: .62rem;
  letter-spacing: .11em; color: var(--ink-faint); font-weight: 400;
  text-transform: uppercase;
}

/* Вордмарк: главный визуальный элемент первого экрана */
.wordmark {
  font-family: Onest, sans-serif;
  font-weight: 800;
  font-size: clamp(2.4rem, 13.6vw, 12.5rem);
  white-space: nowrap;
  line-height: .84;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  margin: 0;
  display: block;
  width: 100%;
}
.wordmark-rule {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  border-top: 1px solid var(--ink);
  padding-top: 12px; margin-top: 6px;
}
.topnav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.topnav a:not(.btn) {
  text-decoration: none; color: var(--ink-soft); font-size: .93rem;
  transition: color .15s ease;
}
.topnav a:not(.btn):hover { color: var(--ink); }
@media (max-width: 720px) { .topnav .hide-sm { display: none; } }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 500;
  font-size: .76rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 1.05em 1.5em; min-height: 48px; border-radius: 0; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hi); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-soft); background: var(--surface); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- герой ---------- */
.hero { padding-block: 44px 56px; display: grid; gap: 26px; }
.hero h1 { font-size: var(--step-4); font-weight: 700; max-width: 24ch; }
.hero .lede { font-size: var(--step-2); color: var(--ink-soft); max-width: 54ch; line-height: 1.45; }
.hero-note { font-size: .9rem; color: var(--ink-faint); }

.proof {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0; border-top: 1px solid var(--line); margin-top: 8px;
}
.proof div { padding: 18px 20px 18px 0; border-right: 1px solid var(--line-soft); }
.proof div:last-child { border-right: 0; }
.proof dt { font-size: .88rem; color: var(--ink-soft); margin-bottom: 4px; }
.proof dd {
  margin: 0; font-family: Onest, sans-serif; font-weight: 600; font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 620px) {
  .proof div { border-right: 0; border-bottom: 1px solid var(--line-soft); padding-right: 0; }
  .proof div:last-child { border-bottom: 0; }
}

/* ---------- две аудитории ---------- */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; }
.split-col h3 { font-size: var(--step-2); margin-bottom: 6px; }
.split-col > .mono { display: block; margin-bottom: 14px; }
.tick { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.tick li { position: relative; padding-left: 22px; color: var(--ink-soft); max-width: 66ch; }
.tick li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 9px; height: 1px; background: var(--accent);
}

/* ---------- услуги ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card {
  background: var(--surface); padding: 26px 24px 24px;
  display: flex; flex-direction: column; gap: 12px;
  text-decoration: none; transition: background .15s ease;
}
a.card:hover { background: var(--ink); color: var(--on-accent); }
a.card:hover .card-meta { border-color: color-mix(in srgb, var(--on-accent) 35%, transparent); }
a.card:hover p, a.card:hover .card-meta, a.card:hover .card-meta b, a.card:hover .card-go, a.card:hover .mono { color: var(--on-accent); }
.card h3 { font-size: var(--step-2); }
.card p { color: var(--ink-soft); font-size: .96rem; flex: 1; }
.card-meta {
  display: flex; flex-direction: column; gap: 5px;
  padding-top: 14px; border-top: 1px solid var(--line-soft);
  font-size: .88rem; color: var(--ink-soft);
}
.card-meta b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.card-go { font-family: Onest, sans-serif; font-size: .92rem; color: var(--accent); font-weight: 500; }

/* ---------- этапы работы (реальная последовательность) ---------- */
.steps { list-style: none; display: flex; flex-direction: column; }
.steps li {
  display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 20px;
  padding: 20px 0; border-top: 1px solid var(--line-soft);
}
.steps li:first-child { border-top: 0; padding-top: 0; }
.steps .num {
  font-family: "JetBrains Mono", monospace; font-size: .85rem;
  color: var(--accent); padding-top: .18em; font-variant-numeric: tabular-nums;
}
.steps h4 { font-size: var(--step-1); margin-bottom: 5px; }
.steps p { color: var(--ink-soft); font-size: .96rem; max-width: 66ch; }

/* ---------- кейс ---------- */
.case { border: 1px solid var(--line); background: var(--surface); }
.case-head { padding: 24px; border-bottom: 1px solid var(--line); }
.case-head h3 { font-size: var(--step-3); margin: 6px 0 8px; }
.case-head p { color: var(--ink-soft); max-width: 60ch; }
.case-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1px; background: var(--line); }
.case-cell { background: var(--surface); padding: 20px 24px; display: flex; flex-direction: column; gap: 8px; }
.case-cell p { color: var(--ink-soft); font-size: .94rem; }
.case-foot {
  border-top: 1px solid var(--line);
  padding: 20px 24px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 20px 28px;
  align-items: start;
}
.case-foot p { color: var(--ink-soft); font-size: .94rem; }
.case-foot .mono { display: block; margin-bottom: 5px; }

/* ---------- о себе ---------- */
.bio { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px; }
.bio p + p { margin-top: 14px; }
.bio p { color: var(--ink-soft); }
.facts { list-style: none; display: flex; flex-direction: column; }
.facts li { padding: 12px 0; border-top: 1px solid var(--line-soft); display: flex; gap: 14px; align-items: baseline; }
.facts li:first-child { border-top: 0; padding-top: 0; }
.facts .k { flex: 0 0 128px; }
.facts .v { color: var(--ink-soft); font-size: .95rem; }
@media (max-width: 820px) { .bio { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line-soft); }
.faq details { border-bottom: 1px solid var(--line-soft); }
.faq summary {
  cursor: pointer; padding: 16px 0; list-style: none;
  font-family: Onest, sans-serif; font-weight: 500; font-size: var(--step-1);
  display: flex; align-items: baseline; gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; margin-left: auto; color: var(--accent);
  font-family: "JetBrains Mono", monospace; font-size: 1.1rem;
}
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 0 18px; color: var(--ink-soft); max-width: 62ch; }
.faq details > div p + p { margin-top: 10px; }

/* ---------- контакт ---------- */
.contact-box {
  border: 1px solid var(--line); background: var(--surface);
  padding: 32px; display: flex; flex-direction: column; gap: 20px;
}
.contact-box h2 { font-size: var(--step-4); }
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.contact-list a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--accent); }
.contact-list a:hover { color: var(--accent); }
.ask { list-style: none; display: flex; flex-direction: column; gap: 8px; color: var(--ink-soft); font-size: .95rem; }
.ask li { padding-left: 22px; position: relative; }
.ask li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }

/* ---------- подвал ---------- */
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; }
.foot-in { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: baseline; font-size: .88rem; color: var(--ink-faint); }
.foot-in a { color: var(--ink-soft); text-decoration: none; }
.foot-in a:hover { color: var(--ink); }
.foot-in .sep { margin-left: auto; }

/* ---------- страницы услуг ---------- */
.page-head { padding-block: 56px 44px; display: grid; gap: 18px; }
.crumb { text-decoration: none; color: var(--ink-faint); font-size: .9rem; }
.crumb:hover { color: var(--ink); }
.page-head h1 { font-size: var(--step-4); max-width: 20ch; }
.page-head .lede { font-size: var(--step-1); color: var(--ink-soft); max-width: 60ch; }

.deliver { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 900px) { .deliver { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .deliver { grid-template-columns: 1fr; } }
.deliver li { background: var(--surface); padding: 18px 20px; }
.deliver .mono { display: block; margin-bottom: 6px; }
.deliver p { color: var(--ink-soft); font-size: .94rem; }

.terms { list-style: none; display: flex; flex-direction: column; }
.terms li { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 18px; padding: 13px 0; border-top: 1px solid var(--line-soft); }
.terms li:first-child { border-top: 0; padding-top: 0; }
.terms .v { color: var(--ink-soft); max-width: 62ch; }
@media (max-width: 620px) { .terms li { grid-template-columns: 1fr; gap: 3px; } }

.fit { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.fit h4 { font-size: var(--step-1); margin-bottom: 10px; }

/* ---------- дополнения ---------- */
.hero .lede p + p { margin-top: .7em; }
.hero-note { line-height: 1.5; }
.topnav .tel { color: var(--ink) !important; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }

.lead { color: var(--ink-soft); max-width: 62ch; }
.prose { display: flex; flex-direction: column; gap: 14px; color: var(--ink-soft); max-width: 66ch; }
.prose a, .lead a, figcaption a { color: var(--ink); text-underline-offset: 3px; }
.sub { font-size: var(--step-2); }

.note {
  border: 1px solid var(--line); border-left: 3px solid var(--ink);
  background: var(--surface); padding: 18px 22px; max-width: 66ch; color: var(--ink-soft);
}
.note b { color: var(--ink); font-weight: 600; }

.case-shots {
  border-top: 1px solid var(--line); padding: 24px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; align-items: start;
}
figure { margin: 0; }
figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
figcaption { margin-top: 10px; font-size: .88rem; color: var(--ink-soft); }

.prices { width: 100%; border-collapse: collapse; }
.prices th, .prices td { text-align: left; vertical-align: baseline; padding: 15px 18px 15px 0; border-top: 1px solid var(--line-soft); }
.prices thead th { border-top: 0; padding-top: 0; font-weight: 500; }
.prices tbody th { font-family: Onest, sans-serif; font-weight: 600; font-size: var(--step-1); }
.prices tbody th a { color: inherit; text-underline-offset: 4px; }
.prices .term { color: var(--ink-soft); white-space: nowrap; }
.prices td:last-child, .prices th:last-child { text-align: right; padding-right: 0; white-space: nowrap; }
.prices td:last-child { font-family: Onest, sans-serif; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 620px) {
  .prices thead { display: none; }
  .prices tr { display: block; padding: 14px 0; border-top: 1px solid var(--line-soft); }
  .prices tbody tr:first-child { border-top: 0; padding-top: 0; }
  .prices th, .prices td { display: block; padding: 0; border: 0; }
  .prices td:last-child { text-align: left; margin-top: 3px; }
}

.facts .v p + p { margin-top: 9px; }
.facts .v b { color: var(--ink); font-weight: 500; }
.contact-list li { line-height: 1.5; }
.contact-list .hours { display: block; color: var(--ink-soft); font-size: .9rem; margin-top: 2px; }
.num-list { list-style: none; counter-reset: n; display: flex; flex-direction: column; gap: 12px; color: var(--ink-soft); max-width: 66ch; }
.num-list li { counter-increment: n; position: relative; padding-left: 42px; }
.num-list li::before {
  content: counter(n, decimal-leading-zero); position: absolute; left: 0; top: .2em;
  font-family: "JetBrains Mono", monospace; font-size: .8rem; color: var(--ink);
}
.num-list b { color: var(--ink); font-weight: 600; }

@media (max-width: 720px) {
  .wrap, .topbar-in { padding-inline: 18px; }
  .brand span { display: none; }
  .btn-row .btn { flex: 1 1 100%; justify-content: center; }
}

/* ---------- график звонков ---------- */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px 48px; align-items: end; }
.hero-main { display: grid; gap: 26px; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: start; }
.hours-table { border-collapse: collapse; min-width: 300px; font-size: .95rem; }
.hours-table caption { text-align: left; padding-bottom: 10px; }
.hours-table th, .hours-table td { padding: 11px 0; border-top: 1px solid var(--line); text-align: left; font-weight: 400; }
.hours-table th { color: var(--ink-soft); padding-right: 28px; }
.hours-table tbody td { text-align: right; font-family: Onest, sans-serif; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hours-table tfoot td { color: var(--ink-faint); font-size: .86rem; border-bottom: 1px solid var(--line); }
@media (max-width: 900px) {
  .hero-grid, .contact-grid { grid-template-columns: 1fr; }
  .hours-table { width: 100%; min-width: 0; }
}

/* Страница политики */
.policy { max-width: 46rem; }
.policy h2 { font-size: var(--step-2, 1.35rem); margin: 2.2em 0 .6em; }
.policy h2:first-child { margin-top: 0; }
.policy ul { margin: 0 0 1em; padding-left: 1.2em; display: grid; gap: .4em; }
.policy a { color: inherit; }
