/* ========== Токены ========== */
:root {
  --bg: #EEF3F2;        /* пена */
  --surface: #FFFFFF;
  --ink: #10303B;       /* глубокое море */
  --muted: #4F6A72;
  --sea: #1B6F80;
  --sun: #D04527;       /* коралловый — кнопки и акценты */
  --sun-ink: #FFFFFF;
  --line: #CFDCDA;
  --paper: #FDFDFB;
  --paper-ink: #1A2A30;

  --f-display: "Unbounded", system-ui, sans-serif;
  --f-body: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --wrap: 1120px;
  --gutter: 20px;
  --r-sm: 8px;
  --r-md: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D232B;
    --surface: #133340;
    --ink: #E6F0EF;
    --muted: #9DB6BC;
    --sea: #6BBACA;
    --line: #24495A;
  }
}
:root[data-theme="dark"] {
  --bg: #0D232B; --surface: #133340; --ink: #E6F0EF; --muted: #9DB6BC; --sea: #6BBACA; --line: #24495A;
}

/* ========== База ========== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--f-body);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--sea); }
h1, h2 { font-family: var(--f-display); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.25rem); font-weight: 500; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); font-weight: 400; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--sun); color: var(--sun-ink); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* ========== Кнопки ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 2px solid transparent;
  font: 600 1rem/1 var(--f-body); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--sun); color: var(--sun-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--sun) 88%, #000); }
.btn-ghost { border-color: currentColor; color: var(--ink); background: transparent; }
.btn-ghost:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: .9375rem; }
.btn-block { width: 100%; }

/* ========== Шапка ========== */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-size: .9375rem; }
.nav a:hover { color: var(--sea); }
@media (max-width: 760px) {
  .nav { display: none; }
  .header-row > .btn { margin-left: auto; }
  .logo span { font-size: .9375rem; }
}

/* ========== Первый экран ========== */
.hero { position: relative; padding: clamp(56px, 10vw, 120px) 0 clamp(96px, 12vw, 150px); }
.hero-place { color: var(--sea); font-weight: 600; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.1rem, 6.4vw, 4.6rem); max-width: 15ch; }
.hero-lead { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); max-width: 56ch; margin: 28px 0 32px; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 16px 48px; margin: 56px 0 0; }
.hero-facts div { border-left: 3px solid var(--sun); padding-left: 14px; }
.hero-facts dt { font-family: var(--f-display); font-weight: 500; font-size: 1.25rem; }
.hero-facts dd { margin: 2px 0 0; color: var(--muted); font-size: .9375rem; }
.horizon { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 60px; }
.horizon path { fill: var(--surface); }

/* ========== Секции ========== */
section[id] { scroll-margin-top: 72px; }
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-lead { color: var(--muted); max-width: 62ch; margin: 14px 0 36px; }
.calc-section { background: var(--surface); }

/* ========== Калькулятор ========== */
.calc { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }

.calc-form fieldset { border: 0; padding: 0; margin: 0 0 28px; min-width: 0; }
.calc-form legend { font-weight: 600; font-size: 1.0625rem; margin-bottom: 12px; padding: 0; }

.choice { display: flex; gap: 14px; padding: 16px 18px; border: 2px solid var(--line); border-radius: var(--r-md); cursor: pointer; margin-bottom: 10px; transition: border-color .15s ease, background-color .15s ease; }
.choice:has(input:checked) { border-color: var(--sea); background: color-mix(in srgb, var(--sea) 7%, transparent); }
.choice input, .check input { accent-color: var(--sea); width: 20px; height: 20px; margin: 3px 0 0; flex: none; }
.choice-body { display: flex; flex-direction: column; gap: 4px; }
.choice-title { font-weight: 600; }
.choice-title b, .check b { font-weight: 600; color: var(--sea); white-space: nowrap; }
.choice-note { color: var(--muted); font-size: .9375rem; }

.check { display: flex; gap: 12px; padding: 10px 0; cursor: pointer; border-bottom: 1px solid var(--line); }
.check:last-child { border-bottom: 0; }

.stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-radius: var(--r-md); background: var(--bg); }
.stepper[hidden] { display: none; }
.stepper-ctrl { display: flex; align-items: center; gap: 4px; }
.stepper-ctrl button { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.25rem; cursor: pointer; }
.stepper-ctrl output { min-width: 2ch; text-align: center; font-weight: 600; }

/* Чек */
.receipt-wrap { position: sticky; top: 88px; filter: drop-shadow(0 18px 30px rgba(16, 48, 59, .16)); padding-bottom: 16px; }
.receipt {
  position: relative;
  background: var(--paper); color: var(--paper-ink);
  padding: 28px 26px 22px;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  font-family: var(--f-mono); font-size: .875rem; line-height: 1.5;
}
.receipt::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -16px; height: 16px;
  background:
    linear-gradient(135deg, var(--paper) 50%, transparent 50%) 0 0 / 16px 16px repeat-x,
    linear-gradient(225deg, var(--paper) 50%, transparent 50%) 0 0 / 16px 16px repeat-x;
}
.receipt-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding-bottom: 16px; border-bottom: 1px dashed #A9B6B8; color: #5A6B70; }
.receipt-head strong { font-family: var(--f-display); font-weight: 500; font-size: 1.125rem; color: var(--paper-ink); margin-bottom: 4px; }
.receipt-lines { list-style: none; margin: 0; padding: 16px 0; border-bottom: 1px dashed #A9B6B8; }
.receipt-lines li { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; }
.receipt-lines .lbl { flex: 0 1 auto; }
.receipt-lines .dots { flex: 1 1 auto; border-bottom: 1px dotted #A9B6B8; transform: translateY(-4px); min-width: 12px; }
.receipt-lines .amt { flex: none; font-weight: 600; }
.receipt-lines .free { color: #6A7A7F; }
.receipt-lines .free .amt { font-weight: 400; }
.receipt-total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0 8px; }
.receipt-total span { font-weight: 600; }
.receipt-total output { font-family: var(--f-display); font-size: 2rem; font-weight: 700; color: var(--paper-ink); }
.receipt-total output.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.08); } }
.receipt-foot { color: #5A6B70; font-size: .8125rem; margin: 4px 0 18px; }
.receipt .btn { font-family: var(--f-body); }
.send-status { min-height: 1.5em; margin: 10px 0 0; font-size: .8125rem; color: #1B6F80; text-align: center; }
@media (max-width: 860px) { .receipt-wrap { position: static; } }

/* ========== Заявка ========== */
.order-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.order-estimate { font-size: 1.0625rem; }
.order-estimate strong { font-family: var(--f-display); font-weight: 500; font-size: 1.5rem; margin-left: 6px; }
.order-form { background: var(--surface); border-radius: var(--r-md); padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; font-weight: 600; font-size: .9375rem; }
.field input, .field textarea {
  font: 400 1rem/1.5 var(--f-body); color: var(--ink); background: var(--bg);
  border: 2px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; width: 100%;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--sea); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.order-form .btn { width: 100%; }
.order-form .btn:disabled { opacity: .7; cursor: default; }
.form-status { min-height: 1.5em; margin: 12px 0 0; font-size: .9375rem; }
.form-status[data-state="ok"] { color: var(--sea); font-weight: 600; }
.form-status[data-state="error"] { color: #C2410C; }
@media (max-width: 860px) { .order-row { grid-template-columns: 1fr; } }

/* ========== Что входит ========== */
.included { background: var(--surface); }
.included-list { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
.included-list li { padding: 18px 0; border-top: 1px solid var(--line); color: var(--muted); }
.included-list strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
@media (max-width: 700px) { .included-list { grid-template-columns: 1fr; } }

/* ========== Работы ========== */
.works { background: var(--bg); }
.work { padding: 28px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px 48px; }
.work:last-child { border-bottom: 1px solid var(--line); }
.work-head { grid-row: span 2; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.work-domain { font-family: var(--f-display); font-weight: 500; font-size: clamp(1.25rem, 2.4vw, 1.75rem); color: var(--ink); text-decoration-color: var(--sun); text-decoration-thickness: 3px; text-underline-offset: 6px; word-break: break-word; }
.work-domain:hover { color: var(--sea); }
.work p { max-width: 60ch; }
.work-did { color: var(--muted); }
.tag { display: inline-block; font-size: .8125rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tag-code { background: var(--sun); border-color: var(--sun); color: var(--sun-ink); }
@media (max-width: 760px) { .work { grid-template-columns: 1fr; } .work-head { grid-row: auto; margin-bottom: 8px; } }

/* ========== Шаги ========== */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; }
.steps li { counter-increment: s; position: relative; padding-top: 52px; color: var(--muted); }
.steps li::before { content: counter(s); position: absolute; top: 0; left: 0; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--sea); color: var(--sea); font: 500 1rem/1 var(--f-display); }
.steps strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; }
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ========== Обо мне ========== */
.about { background: var(--surface); }
.about-row { display: flex; gap: clamp(24px, 5vw, 56px); align-items: flex-start; }
.about h2 { margin-bottom: 18px; }
.about p { max-width: 62ch; color: var(--muted); }
.avatar { flex: none; width: clamp(96px, 16vw, 160px); aspect-ratio: 1; border-radius: 50%; background: var(--sea); color: #fff; display: grid; place-items: center; font: 700 clamp(1.75rem, 4vw, 2.75rem)/1 var(--f-display); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 560px) { .about-row { flex-direction: column; } }

/* ========== Вопросы ========== */
.faq h2 { margin-bottom: 28px; }
.faq details { border-top: 1px solid var(--line); max-width: 820px; }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 40px 18px 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font: 500 1.5rem/1 var(--f-display); color: var(--sea); transition: transform .2s ease; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); max-width: 66ch; padding-bottom: 8px; }

/* ========== Призыв и подвал ========== */
.cta { background: var(--ink); color: var(--bg); padding: clamp(56px, 8vw, 88px) 0; }
.cta-row { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.cta h2 { max-width: 22ch; }
.site-footer { padding: 28px 0; font-size: .9375rem; color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; gap: 8px 32px; }
.footer-row a { margin-left: auto; }

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