/* Студия «Контур» — site styles. Self-contained, no external requests. */

:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --ink: #16211f;
  --muted: #5c6b67;
  --line: #e2e0d8;
  --brand: #0f3d3e;
  --brand-soft: #e4efeb;
  --accent: #1f8a70;
  --amber: #d99a2b;
  --blue: #2f6fb0;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(22, 33, 31, .05), 0 8px 24px rgba(22, 33, 31, .06);
  --shadow-up: 0 2px 4px rgba(22, 33, 31, .06), 0 16px 40px rgba(22, 33, 31, .10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 4.6vw, 50px); margin: 0 0 18px; font-weight: 700; }
h2 { font-size: clamp(24px, 3vw, 34px); margin: 0 0 12px; font-weight: 700; }
h3 { font-size: 19px; margin: 0 0 8px; font-weight: 650; }
p { margin: 0 0 14px; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 760px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(247, 246, 242, .82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-stuck { border-bottom-color: var(--line); }

.header-inner { display: flex; align-items: center; gap: 18px; min-height: 68px; }

.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--brand); text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 30px; height: 30px; color: var(--accent); }
.logo-text { font-weight: 700; font-size: 19px; letter-spacing: -.02em; display: flex; flex-direction: column; line-height: 1; }
.logo-text small { font-weight: 500; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  color: var(--ink); font-size: 15px; padding: 8px 12px; border-radius: 10px;
}
.nav a:hover { background: var(--brand-soft); text-decoration: none; }

.burger { display: none; background: none; border: 0; padding: 8px; margin-left: auto; }
.burger span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; text-decoration: none;
  padding: 13px 22px; border-radius: 12px; font-weight: 600; font-size: 15px;
  border: 1px solid var(--brand);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { background: #14494a; text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: none; }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn-small { padding: 9px 16px; font-size: 14px; white-space: nowrap; }

/* ---------- hero ---------- */

.hero { padding: 64px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }

.eyebrow {
  color: var(--accent); font-size: 13px; font-weight: 650;
  letter-spacing: .1em; text-transform: uppercase; margin: 0 0 16px;
}
.lead { font-size: 18px; color: var(--muted); max-width: 54ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 34px; }

.hero-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 34px; margin: 0; padding: 0; }
.hero-facts li { display: flex; flex-direction: column; }
.hero-facts b { font-size: 26px; letter-spacing: -.02em; }
.hero-facts span { font-size: 13px; color: var(--muted); }

.hero-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px;
}
.panel-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: 15px;
}
.panel-row:last-of-type { border-bottom: 0; }
.panel-val { margin-left: auto; color: var(--muted); font-size: 14px; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot-green { background: var(--accent); }
.dot-blue { background: var(--blue); }
.dot-amber { background: var(--amber); }
.panel-note { margin: 16px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- sections ---------- */

.section { padding: 72px 0; }
.section-alt { background: linear-gradient(180deg, #eef1ec 0%, #e9eee9 100%); border-block: 1px solid var(--line); }
.section-title { margin-bottom: 10px; }
.section-lead { color: var(--muted); max-width: 62ch; margin-bottom: 34px; }
.fineprint { font-size: 13px; color: var(--muted); }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card, .case, .contacts-note {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover, .case:hover { transform: translateY(-3px); box-shadow: var(--shadow-up); }
.card p, .case p { color: var(--muted); font-size: 15px; }

.ticks { list-style: none; margin: 14px 0 0; padding: 0; font-size: 14px; color: var(--muted); }
.ticks li { position: relative; padding-left: 20px; margin-bottom: 6px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 11px; height: 6px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.steps p { font-size: 15px; color: var(--muted); margin: 0; }
.step-num {
  display: block; font-size: 13px; font-weight: 700; color: var(--accent);
  letter-spacing: .12em; margin-bottom: 12px;
}

.faq { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; list-style: none; position: relative; padding-right: 26px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 2px; top: 8px;
  font-size: 20px; color: var(--accent); line-height: 1;
}
.faq[open] summary::after { content: "–"; }
.faq p { color: var(--muted); margin: 0 0 14px; }

/* ---------- contacts ---------- */

.contacts { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: start; }
.contact-list { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; margin: 0 0 26px; }
.contact-list dt { color: var(--muted); font-size: 14px; }
.contact-list dd { margin: 0; font-weight: 550; }
.contacts-note { background: var(--brand); color: #eef4f2; border-color: var(--brand); }
.contacts-note h3 { color: #fff; }
.contacts-note p { color: #cfdfda; }
.contacts-note .fineprint { color: #a9c3bc; }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 26px 0 40px; font-size: 14px; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.footer-nav { display: flex; gap: 20px; }
.footer-nav a { color: var(--muted); }

/* ---------- chat widget ---------- */

.chat { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.chat-toggle {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: 999px; padding: 11px 18px; font: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; box-shadow: var(--shadow);
}
.chat-toggle:hover { box-shadow: var(--shadow-up); }
.chat-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); }
.chat-dot.on { background: var(--accent); }
.chat-dot.off { background: #b9b6ad; }
.chat-panel {
  width: min(320px, calc(100vw - 40px));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-up); padding: 18px;
}
.chat-head { font-weight: 650; margin-bottom: 8px; }
.chat-status { color: var(--muted); font-size: 14px; margin: 0; }
.chat-fallback { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- reveal animation ---------- */

/* Появление блоков: работает только когда JS поднялся (класс .js на <html>),
   иначе контент остаётся видимым. */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.shown { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover, .case:hover { transform: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0; margin: 0; padding: 8px 20px 16px;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .burger { display: block; }
  .header-inner .btn-small { display: none; }
  .grid-3, .grid-2, .steps, .contacts { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 36px; }
  .section { padding: 52px 0; }
  .contact-list { grid-template-columns: 1fr; gap: 2px 0; }
  .contact-list dd { margin-bottom: 10px; }
}
