/* ============================================================
   TEMPLATE I · index-cards
   Каталог собран как картотека: 12 портретных карточек
   (aspect-ratio 3/4), у каждой сверху квадратная обложка,
   под ней H3 и мини-таблица <dl> на четыре строки.
   Hero — без крупной картинки: заголовок, лид, две кнопки,
   KPI на четыре ячейки и полка из шести миниатюр 64x64.
   Лояльность — вертикальная шкала с левой линейкой.
   Касса — таблица шести каналов. Доступ — три колонки H3.
   FAQ — двухколоночный поток на columns без сетки.
   Ни строки JS: всё раскрывается через <details>.
   Цвета, шрифты, префикс классов — через токены.
   ============================================================ */

:root {
  --bg:      #14171a;
  --bg2:     #1c2025;
  --accent:  #c2a24e;
  --accent2: #8ea9b4;
  --text:    #e9e6dc;
  --mute:    #9aa3a8;
  --line:    color-mix(in srgb, var(--mute) 26%, transparent);
  --line2:   color-mix(in srgb, var(--mute) 14%, transparent);
  --panel:   color-mix(in srgb, var(--bg2) 92%, var(--text) 5%);
  --f-head:  'Cinzel', Georgia, 'Times New Roman', serif;
  --f-body:  'Hind Siliguri', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap:    1180px;
  --pad:     clamp(15px, 3.6vw, 40px);
  --gap:     18px;
  --tap:     44px;
  --r:       10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.62;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--f-head);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.012em;
  margin: 0 0 12px;
}
h1 { font-size: clamp(27px, 4.4vw, 46px); }
h2 { font-size: clamp(21px, 3vw, 31px); }
h3 { font-size: clamp(16px, 1.8vw, 20px); }

p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent2); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

:focus-visible { outline: 2px solid var(--accent2); outline-offset: 3px; }

.theoskip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--bg);
  padding: 12px 18px; border-radius: 0 0 var(--r) 0; z-index: 40;
}
.theoskip:focus { left: 0; }

.theowrap {
  width: 100%; max-width: var(--wrap);
  margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad);
}

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

.theobar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(9px);
  border-bottom: 1px solid var(--line);
}
.theobar__in {
  display: flex; align-items: center; gap: 14px;
  min-height: 62px;
}
.theomark { display: flex; align-items: center; gap: 10px; color: var(--text); }
.theomark:hover { text-decoration: none; }
.theomark__svg { width: 34px; height: 34px; flex: 0 0 auto; }
.theomark__t {
  font-family: var(--f-head); font-size: 18px; line-height: 1.1;
  display: flex; flex-direction: column;
}
.theomark__sub {
  font-family: var(--f-body); font-size: 11px; color: var(--mute);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.theonav { margin-left: auto; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.theonav a {
  color: var(--mute); font-size: 14px;
  min-height: var(--tap); display: inline-flex; align-items: center; padding: 0 10px;
  border-radius: 8px;
}
.theonav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }

/* ---------- кнопки ---------- */

.theocta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); padding: 12px 24px;
  background: var(--accent); color: var(--bg);
  border-radius: var(--r); font-weight: 600; font-size: 15px;
  border: 1px solid transparent;
  transition: transform .14s ease, filter .14s ease;
}
.theocta:hover { filter: brightness(1.08); transform: translateY(-1px); text-decoration: none; }
.theocta--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.theocta--ghost:hover { border-color: var(--accent2); }
.theocta--mini { padding: 8px 16px; font-size: 14px; }
.theocta--big { padding: 16px 34px; font-size: 17px; }
.theoctarow { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 0; }

.theolink {
  color: var(--accent2); border-bottom: 1px solid var(--line);
  display: inline-flex; align-items: center; min-height: var(--tap);
}

/* ---------- общая секция ---------- */

section { padding: clamp(38px, 6vw, 70px) 0; border-top: 1px solid var(--line2); }
section:first-of-type { border-top: 0; }

.theoover {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent2); margin: 0 0 10px;
}
.theolead { font-size: clamp(15px, 1.7vw, 17px); color: var(--mute); max-width: 74ch; }

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

.theohero { padding-top: clamp(30px, 5vw, 56px); }
.theohero__t { max-width: 24ch; }

.theokpi {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; margin: 28px 0 0;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden;
}
.theokpi__c { background: var(--bg2); padding: 16px 14px; }
.theokpi__n {
  font-family: var(--f-head); font-size: clamp(19px, 2.4vw, 26px);
  color: var(--accent2); line-height: 1.1; display: block;
}
.theokpi__l { font-size: 12px; color: var(--mute); display: block; margin-top: 6px; }

/* полка новинок: шесть миниатюр 64x64 одним рядом */
.theoshelf { margin: 22px 0 0; }
.theoshelf__t {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--mute); margin: 0 0 10px;
}
.theoshelf__row {
  display: flex; gap: 10px; align-items: center;
  overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: thin;
}
.theoshelf__i {
  flex: 0 0 auto; width: 64px; height: 64px;
  border-radius: 8px; border: 1px solid var(--line);
  object-fit: cover; background: var(--bg2);
}
.theoshelf__note { font-size: 12px; color: var(--mute); margin: 10px 0 0; }

/* ---------- картотека ---------- */

.theocards {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap); margin: 26px 0 0; padding: 0; list-style: none;
}
.theocard {
  aspect-ratio: 3 / 4;
  display: flex; flex-direction: column;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.theocard__media {
  aspect-ratio: 1 / 1; width: 100%;
  padding: 8px 8px 0; flex: 0 0 auto;
}
.theocard__img {
  width: 100%; height: 100%;
  object-fit: cover; border-radius: 7px;
  background: var(--panel);
}
.theocard__body {
  padding: 9px 11px 12px; display: flex; flex-direction: column; min-height: 0;
}
.theocard__t {
  font-size: 14px; line-height: 1.2; margin: 0 0 7px;
  letter-spacing: -0.005em;
}
.theocard__dl {
  margin: 0; display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px; row-gap: 2px;
  font-size: 11.5px; line-height: 1.32;
  border-top: 1px solid var(--line2); padding-top: 7px;
}
.theocard__dl dt { color: var(--mute); }
.theocard__dl dd { margin: 0; text-align: right; color: var(--text); }
.theocards__note { font-size: 13px; color: var(--mute); margin: 18px 0 0; max-width: 82ch; }

/* ---------- лестница лояльности ---------- */

.theoladder {
  margin: 26px 0 0; padding: 0 0 0 30px; list-style: none;
  border-left: 2px solid var(--line);
}
.theoladder__s { position: relative; padding: 0 0 24px; }
.theoladder__s:last-child { padding-bottom: 0; }
.theoladder__s::before {
  content: ""; position: absolute; left: -37px; top: 8px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.theoladder__s::after {
  content: ""; position: absolute; left: -31px; top: 15px;
  width: 22px; height: 1px; background: var(--line);
}
.theoladder__h {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 0 0 4px;
}
.theoladder__n { font-family: var(--f-head); font-size: 19px; }
.theoladder__v {
  font-size: 12px; color: var(--accent2);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px;
}
.theoladder__p { font-size: 14px; color: var(--mute); margin: 0; max-width: 70ch; }

/* ---------- таблица ---------- */

.theotablebox { overflow-x: auto; margin: 24px 0 0; border: 1px solid var(--line); border-radius: var(--r); }
.theotable { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 14px; }
.theotable caption { text-align: left; padding: 12px 14px; color: var(--mute); font-size: 13px; }
.theotable th, .theotable td { padding: 11px 14px; text-align: left; border-top: 1px solid var(--line2); }
.theotable thead th { color: var(--accent2); font-weight: 600; background: var(--bg2); border-top: 0; }
.theotable tbody tr:nth-child(even) { background: color-mix(in srgb, var(--bg2) 55%, transparent); }

/* ---------- три колонки доступа ---------- */

.theoaccess__grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px; margin: 24px 0 0;
}
.theoaccess__c {
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px;
}
.theoaccess__c p { font-size: 14px; color: var(--mute); margin: 0; }

/* ---------- панели, сетки на 2 и 3 ---------- */

.theoduo { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; align-items: start; }
.theotrio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 24px 0 0; }
.theopanel {
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--r); padding: 20px;
}
.theopanel h3 { margin-top: 0; }
.theopanel p { font-size: 14px; color: var(--mute); }
.theodl2 {
  margin: 0; display: grid; grid-template-columns: auto 1fr;
  column-gap: 14px; row-gap: 7px; font-size: 14px;
}
.theodl2 dt { color: var(--mute); }
.theodl2 dd { margin: 0; text-align: right; }

.theorev__meta { font-size: 12px; color: var(--mute); margin: 12px 0 0; }
.theorev p { color: var(--text); font-size: 14px; }

/* ---------- FAQ в две колонки ---------- */

.theofaq__flow { columns: 2; column-gap: 20px; margin: 24px 0 0; }
.theoq {
  break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid;
  display: inline-block; width: 100%;
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--r); padding: 4px 16px; margin: 0 0 12px;
}
.theoq summary {
  cursor: pointer; list-style: none; font-family: var(--f-head); font-size: 16px;
  padding: 12px 26px 12px 0; min-height: var(--tap);
  display: flex; align-items: center; position: relative;
}
.theoq summary::-webkit-details-marker { display: none; }
.theoq summary::after {
  content: "+"; position: absolute; right: 2px; color: var(--accent2); font-size: 20px;
}
.theoq[open] summary::after { content: "–"; }
.theoq p { font-size: 14px; color: var(--mute); padding: 0 0 12px; margin: 0; }

/* ---------- финал, автор, подвал ---------- */

.theofinal { text-align: center; }
.theofinal .theolead { margin: 0 auto; }
.theofinal .theoctarow { justify-content: center; }

.theoauthor .theopanel { max-width: 88ch; }
.theoage {
  margin: 18px 0 0; padding: 16px 18px;
  border: 1px dashed var(--line); border-radius: var(--r);
  font-size: 13px; color: var(--mute); max-width: 88ch;
}

.theofoot { border-top: 1px solid var(--line); padding: 34px 0 44px; background: var(--bg2); }
.theofoot__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.theofoot p { font-size: 13px; color: var(--mute); }
.theofoot__t { font-size: 15px; margin: 0 0 8px; }

/* ---------- планшет ---------- */

@media (max-width: 1000px) {
  .theocards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .theoaccess__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .theotrio { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .theoduo { grid-template-columns: 1fr; }
  .theocard__t { font-size: 15px; }
  .theocard__dl { font-size: 12.5px; }
}

/* ---------- мобилка: от 620 px всё в одну колонку ---------- */

@media (max-width: 620px) {
  body { font-size: 16px; }
  .theonav { display: none; }
  .theokpi { grid-template-columns: repeat(2, 1fr); }
  .theocards { grid-template-columns: minmax(0, 1fr); }
  .theocard { aspect-ratio: auto; max-width: 420px; }
  .theoaccess__grid { grid-template-columns: minmax(0, 1fr); }
  .theotrio { grid-template-columns: minmax(0, 1fr); }
  .theofaq__flow { columns: 1; }
  .theofoot__grid { grid-template-columns: minmax(0, 1fr); }
  .theoctarow .theocta { width: 100%; }
  .theoladder { padding-left: 24px; }
  .theoladder__s::before { left: -31px; }
  .theoladder__s::after { display: none; }
  .theocard__dl { font-size: 13px; }
  .theocard__t { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .theocta { transition: none; }
}
