/* КуарКод — kuarkod.ru */

@font-face {
  font-family: 'Unbounded';
  src: url('/assets/fonts/unbounded-600-cyr.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0400-04FF;
}
@font-face {
  font-family: 'Unbounded';
  src: url('/assets/fonts/unbounded-600-lat.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0000-00FF;
}

:root {
  --ink: #111114;
  --ink-soft: #3D3D46;
  --muted: #6E6E78;
  --line: #E4E4DE;
  --bg: #F6F6F2;
  --card: #FFFFFF;
  --lime: #B7F34D;
  --lime-soft: #EAFBC9;
  --blue: #1F5EFF;
  --radius: 16px;
  --font-head: 'Unbounded', system-ui, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}
img, svg { max-width: 100%; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; }
h1 { font-size: clamp(1.55rem, 4.2vw, 2.5rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.25rem, 3vw, 1.7rem); margin-bottom: 18px; }
h3 { font-size: 1.02rem; }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- шапка ---------- */

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark { flex: 0 0 auto; border-radius: 8px; }
.logo-text { font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; color: var(--ink); }
.logo-text em { font-style: normal; background: var(--lime); border-radius: 6px; padding: 0 5px; }
.logo-text.small { font-size: 1rem; }
.site-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-nav a { text-decoration: none; font-size: 0.93rem; color: var(--ink-soft); }
.site-nav a:hover { color: var(--ink); }
.site-nav .nav-all { font-weight: 600; color: var(--ink); }
@media (max-width: 720px) { .site-nav { display: none; } }

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

.hero { padding: 40px 0 56px; }
.hero h1 { max-width: 780px; }
.hero .lead { max-width: 720px; margin: 14px 0 28px; color: var(--ink-soft); font-size: 1.05rem; }
.hero-type { padding-top: 26px; }
.crumbs { font-size: 0.86rem; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 4px; }

/* ---------- генератор ---------- */

.gen {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 860px) { .gen { grid-template-columns: 1fr; } }

.gen-left {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tabs button {
  font: inherit; font-size: 0.9rem; font-weight: 600;
  padding: 9px 14px; min-height: 40px;
  background: var(--bg); color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer;
}
.tabs button:hover { border-color: var(--ink-soft); color: var(--ink); }
.tabs button.on { background: var(--ink); color: var(--lime); border-color: var(--ink); }

.pane { display: none; }
.pane.on { display: block; }

label { display: block; font-size: 0.88rem; font-weight: 600; margin: 12px 0 6px; }
label .opt { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="url"], input[type="tel"], input[type="email"], textarea, select {
  width: 100%;
  font: inherit;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #FDFDFB;
  color: var(--ink);
  min-height: 44px;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
  border-color: var(--ink);
}
textarea { resize: vertical; }
.hint { font-size: 0.83rem; color: var(--muted); margin-top: 7px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; align-items: end; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }

.check {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 400; font-size: 0.9rem; margin: 12px 0 6px;
  cursor: pointer; min-height: 24px;
}
.check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--ink); }

/* оформление */

.design { margin-top: 20px; border-top: 1px solid var(--line); }
.design summary {
  cursor: pointer; font-weight: 600; font-size: 0.95rem;
  padding: 14px 0; list-style: none; position: relative; padding-right: 28px;
}
.design summary::-webkit-details-marker { display: none; }
.design summary::after {
  content: ''; position: absolute; right: 6px; top: 50%;
  width: 9px; height: 9px;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.15s;
}
.design[open] summary::after { transform: translateY(-30%) rotate(-135deg); }

.design-in { padding-bottom: 8px; }
.d-group { margin-bottom: 16px; }
.d-label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 8px; }

.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  background: var(--bg); color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer;
}
.seg button:hover { border-color: var(--ink-soft); }
.seg button.on { background: var(--ink); color: var(--lime); border-color: var(--ink); }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sw {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--c, #fff);
  border: 2px solid var(--line);
  cursor: pointer; padding: 0;
  position: relative;
}
.sw.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--lime); }
.sw-custom { display: inline-grid; place-items: center; overflow: hidden;
  background: conic-gradient(#E7352C, #F5C518, #0BA95F, #1F5EFF, #7C3AED, #E7352C); }
.sw-grad { background: linear-gradient(135deg, var(--g1), var(--g2)); }
.sw-custom input[type="color"] { opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.check input[type="color"] { width: 30px; height: 24px; border: 1px solid var(--line); border-radius: 6px; padding: 0 2px; background: none; cursor: pointer; }

.bg-row, .logo-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bg-row .check, .logo-row .check { margin: 0; }

/* кнопки */

.btn {
  font: inherit; font-size: 0.95rem; font-weight: 600;
  min-height: 44px; padding: 10px 18px;
  border-radius: 10px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none;
}
.btn-primary { background: var(--ink); color: var(--lime); border: 1px solid var(--ink); }
.btn-primary:hover { background: #26262C; color: var(--lime); }
.btn-ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-file { position: relative; }

/* правая колонка */

.gen-right { position: sticky; top: 16px; }
@media (max-width: 860px) { .gen-right { position: static; } }

.qr-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.qr-box {
  display: grid; place-items: center;
  min-height: 240px;
  border-radius: 12px;
  background: #FDFDFB;
  border: 1px dashed var(--line);
  padding: 10px;
}
.qr-box svg, .qr-box canvas { max-width: 100%; height: auto; }
.qr-box.is-placeholder { opacity: 0.35; }
.qr-hint { font-size: 0.85rem; color: var(--muted); margin: 10px 0 14px; }
.dl-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.dl-row select { width: auto; min-width: 108px; }
.qr-note { font-size: 0.78rem; color: var(--muted); margin-top: 12px; }

/* ---------- секции ---------- */

.feats { padding: 30px 0 10px; }
.feats-grid, .types-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 860px) { .feats-grid, .types-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feats-grid, .types-grid { grid-template-columns: 1fr; } }

.feat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.feat h3 { margin-bottom: 8px; }
.feat p { font-size: 0.92rem; color: var(--ink-soft); }

.types { padding: 44px 0 10px; }
.type-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  text-decoration: none;
  transition: border-color 0.12s, transform 0.12s;
}
.type-card:hover { border-color: var(--ink); transform: translateY(-2px); color: var(--ink); }
.type-card h3 { margin-bottom: 8px; }
.type-card h3::after { content: ' →'; color: var(--muted); }
.type-card p { font-size: 0.92rem; color: var(--ink-soft); }
.type-card-s { padding: 14px 18px; }
.type-card-s h3 { margin: 0; font-size: 0.95rem; }

.howto { padding: 44px 0 10px; }
.steps { list-style: none; counter-reset: step; display: grid; gap: 12px; max-width: 760px; }
.steps li {
  counter-increment: step;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px 16px 62px;
  position: relative;
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 16px; top: 14px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: var(--lime);
  border-radius: 50%;
  font-family: var(--font-head); font-weight: 600; font-size: 0.95rem;
}

.seo-text { padding: 44px 0 10px; }
.seo-text .wrap { max-width: 800px; }
.seo-text h2 { margin-top: 26px; }
.seo-text h2:first-child { margin-top: 0; }
.seo-text p { margin: 12px 0; color: var(--ink-soft); }

.faq { padding: 44px 0 30px; }
.faq .wrap { max-width: 800px; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 10px;
  padding: 0 18px;
}
.faq-item summary {
  cursor: pointer; font-weight: 600; font-size: 0.97rem;
  padding: 15px 26px 15px 0; list-style: none; position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ''; position: absolute; right: 4px; top: 24px;
  width: 9px; height: 9px;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: rotate(45deg); transition: transform 0.15s;
}
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item p { padding: 0 0 16px; color: var(--ink-soft); font-size: 0.95rem; }

.types-more { padding-bottom: 40px; }

.page-text { padding: 40px 0 60px; }
.page-text .wrap { max-width: 760px; }
.page-text h2 { margin-top: 26px; font-size: 1.2rem; }
.page-text p { margin: 12px 0; color: var(--ink-soft); }

/* ---------- подвал ---------- */

.site-footer { border-top: 1px solid var(--line); background: #EFEFEA; padding: 36px 0 26px; margin-top: 30px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 26px; }
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-brand p { font-size: 0.88rem; color: var(--muted); margin-top: 10px; max-width: 300px; }
.foot-h { font-family: var(--font-body); font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 10px; }
.foot-col a { display: block; font-size: 0.92rem; color: var(--ink-soft); text-decoration: none; padding: 4px 0; }
.foot-col a:hover { color: var(--ink); }
.foot-note { font-size: 0.8rem; color: var(--muted); margin-top: 26px; }

/* ---------- cookie-баннер ---------- */

.cookie-bar {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 100;
  display: flex; justify-content: center;
}
.cookie-in {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(17, 17, 20, 0.14);
  padding: 16px 18px;
  max-width: 720px;
  display: flex; align-items: center; gap: 18px;
}
.cookie-text { font-size: 0.86rem; color: var(--ink-soft); }
.cookie-btns { display: flex; gap: 8px; flex: 0 0 auto; }
@media (max-width: 640px) {
  .cookie-in { flex-direction: column; align-items: stretch; text-align: left; }
  .cookie-btns { flex-direction: row; }
  .cookie-btns .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
