/* kredit-bg-nf — «Справочник». Design record: DESIGN.md */

@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/lora-cyrillic-700-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/lora-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --brand: #1d5a46;
  --brand-deep: #123d30;
  --brand-mid: #6fa58d;
  --tint: #e3efe8;
  --tint-2: #c6dfd1;
  --bg: #f4f7f3;
  --surface: #ffffff;
  --line: #d6e2da;
  --ink: #13251e;
  --muted: #4a5e55;
  --night: #10261e;
  --night-ink: #a9c4b8;
  --cta: #f2711c;
  --cta-hover: #f6863a;
  --cta-ink: #13251e;
  --error: #b3261e;

  --radius: 6px;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Crect width='20' height='20' rx='5' fill='%23e3efe8'/%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%231d5a46' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

*, *::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: 16px/1.55 var(--sans);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 2px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--brand-mid); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; font-feature-settings: "locl" 0; line-height: 1.18; margin: 0; color: var(--ink); }
h2 { font-size: 26px; margin-bottom: 16px; }
h3 { font-size: 19px; }
p { margin: 0 0 12px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }

/* Index-tab motif: a label sitting on a rule */
.tab {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 12px 3px;
  background: var(--tint);
  border: 1px solid var(--tint-2);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  box-shadow: 0 1px 0 var(--tint), 0 2px 0 var(--tint-2);
}

/* Top bar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 17px; min-width: 0; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar__note { display: none; color: var(--muted); font-size: 13px; white-space: nowrap; }
@media (min-width: 480px) { .topbar__note { display: inline; } }

/* CTA — the only place the CTA colour is used */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  background: var(--cta);
  color: var(--cta-ink);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  text-align: center;
  line-height: 1.2;
  transition: background-color .15s;
}
.cta:hover { background: var(--cta-hover); }
.cta::after { content: "→"; font-weight: 400; }
.cta--inline { margin-top: 24px; }

/* Hero — catalogue split */
.hero {
  display: grid;
  grid-template-columns: 1fr 96px;
  grid-template-areas:
    "title art"
    "sub sub"
    "offers offers"
    "ticks ticks"
    "note note";
  column-gap: 12px;
  padding-top: 18px;
  padding-bottom: 32px;
}
.hero__title { grid-area: title; font-size: 28px; align-self: center; }
.hero__art { grid-area: art; width: 96px; align-self: center; }
.hero__sub { grid-area: sub; margin: 10px 0 20px; color: var(--muted); font-size: 16px; }
.catalogue { grid-area: offers; min-width: 0; }
.hero__ticks { grid-area: ticks; margin-top: 24px; }
.hero__note { grid-area: note; margin: 8px 0 0; color: var(--muted); font-size: 14px; }

/* Offer list */
.offers { counter-reset: offer; display: grid; gap: 26px; padding-top: 14px; border-top: 2px solid var(--tint-2); }
.offers:empty {
  min-height: 420px;
  background:
    linear-gradient(var(--surface), var(--surface)) 0 14px / 100% 186px no-repeat,
    linear-gradient(var(--surface), var(--surface)) 0 226px / 100% 186px no-repeat;
  border-radius: var(--radius);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .55; } }
.offers__fallback { display: none; margin: 12px 0 0; color: var(--muted); font-size: 15px; }
.offers:empty + .offers__fallback { display: block; visibility: hidden; animation: reveal 0s 8s forwards; }
@keyframes reveal { to { visibility: visible; } }

.offer {
  counter-increment: offer;
  position: relative;
  display: grid;
  gap: 14px;
  padding: 18px 16px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .15s;
}
.offer::before {
  content: "№ " counter(offer);
  position: absolute;
  top: -24px;
  left: -1px;
  height: 24px;
  padding: 3px 12px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  color: var(--brand);
  font: 700 14px/1.4 var(--serif);
  font-feature-settings: "locl" 0;
}
.offer:first-child::before { background: var(--brand); border-color: var(--brand); color: #fff; }
.offer:first-child { border-color: var(--brand); }
.offer:hover { border-color: var(--brand-mid); }
.offer__head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.offer__logo { width: auto; max-width: 140px; height: 40px; object-fit: contain; object-position: left center; }
.offer__name { font-weight: 700; font-size: 17px; }
.offer__bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 0; }
.offer__bar { padding: 8px 10px; background: var(--tint); border-radius: var(--radius); }
.offer__bar dt { color: var(--muted); font-size: 13px; }
.offer__bar dd { margin: 0; font-weight: 700; font-size: 15px; }
.offer__cta { width: 100%; padding: 12px; font-size: 15px; white-space: nowrap; }
.offer__cta::after { content: "↗"; }

.offers__tip { margin: 20px 0 8px; padding: 12px 14px; background: var(--tint); border-left: 3px solid var(--brand); border-radius: 0 var(--radius) var(--radius) 0; font-size: 15px; }
.offers__order { color: var(--muted); font-size: 13px; }

/* Lists */
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { padding-left: 30px; background: var(--tick) 0 2px / 20px 20px no-repeat; }
.ruled { list-style: none; margin: 0; padding: 0; }
.ruled li { padding: 14px 0; border-top: 1px solid var(--tint-2); }
.ruled li:last-child { border-bottom: 1px solid var(--tint-2); }
.ruled strong { color: var(--brand); }

/* Sections */
.section { padding: 48px 0; }
.section--band { background: var(--tint); }
.section--band .tab { background: var(--surface); box-shadow: 0 1px 0 var(--surface), 0 2px 0 var(--tint-2); }
.lead { font-size: 17px; color: var(--muted); }
.split { display: grid; gap: 24px; }
.art { width: 200px; }

.steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 16px; counter-reset: step; }
.step { counter-increment: step; position: relative; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.step img { width: 96px; margin-bottom: 8px; }
.step::before {
  content: counter(step);
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: var(--radius);
  display: grid; place-items: center;
  background: var(--brand); color: #fff; font: 700 17px var(--serif);
}
.step__time { display: block; color: var(--brand); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); margin: 0; }

.notice { margin-top: 18px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); font-size: 15px; }
.doc { padding: 18px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.doc__warn { margin: -18px -16px 16px; padding: 10px 16px; background: var(--brand); color: #fff; font-weight: 700; border-radius: var(--radius) var(--radius) 0 0; }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; gap: 16px;
  padding: 16px 0; font-weight: 700; font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font: 700 22px/1 var(--serif); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); padding-bottom: 6px; }

/* Footer */
.footer { background: var(--night); color: var(--night-ink); padding: 36px 0 96px; font-size: 14px; }
.footer a { color: #fff; }
.footer__warn { color: #fff; font-weight: 700; font-size: 16px; }
.footer__links { margin-top: 20px; }

/* Sticky CTA (mobile, while the offers are off-screen) */
.sticky {
  position: fixed; left: 16px; right: 16px; bottom: 12px; z-index: 10;
  box-shadow: 0 6px 18px rgba(19, 37, 30, .25);
}
.sticky[hidden] { display: none; }

/* Desktop */
@media (min-width: 900px) {
  h2 { font-size: 34px; }
  .hero {
    grid-template-columns: 380px 1fr;
    grid-template-rows: auto auto auto auto 1fr;
    grid-template-areas:
      "title offers"
      "sub offers"
      "ticks offers"
      "art offers"
      "note offers";
    column-gap: 56px;
    padding-top: 48px;
    padding-bottom: 64px;
  }
  .hero__title { font-size: 46px; align-self: start; }
  .hero__sub { font-size: 18px; margin: 16px 0 24px; }
  .hero__ticks { margin-top: 0; }
  .hero__art { width: 300px; margin-top: 32px; }
  .hero__note { margin-top: 20px; }
  .catalogue { padding-top: 6px; }
  .offer {
    grid-template-columns: 160px 1fr 300px;
    align-items: center;
    gap: 20px;
    padding: 20px;
  }
  .offer__head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .offer__cta { width: 100%; font-size: 16px; padding: 12px 16px; }
  .section { padding: 72px 0; }
  .split { grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: center; }
  .split--art { grid-template-columns: 280px 1fr; }
  .art { width: 260px; justify-self: center; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; position: relative; }
  .steps::before { content: ""; position: absolute; left: 8%; right: 8%; top: 66px; border-top: 2px dashed var(--tint-2); z-index: -1; }
  .sticky { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .offers:empty { animation: none; }
}

/* privacy.html */
.page-title { font-size: 32px; margin-bottom: 24px; }
main.section h2 { font-size: 21px; margin: 28px 0 10px; }
.footer--short { padding-bottom: 36px; }
