/* ============ Токени ============ */
:root {
  --honey:      #FFC629;
  --honey-lit:  #FFE082;
  --honey-deep: #C77800;
  --ink:        #14120C;
  --ink-soft:   #2C2820;
  --muted:      #6E6555;
  --wax:        #FFFCF3;
  --wax-2:      #FBF3E0;
  --line:       #E8DCC0;
  --danger:     #B3261E;
  --ok:         #2E7D32;

  --r:      14px;
  --shadow: 0 2px 0 rgba(20,18,12,.06), 0 12px 28px -18px rgba(20,18,12,.5);
  --wrap:   1180px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--wax);
  background-image:
    linear-gradient(30deg,  rgba(255,198,41,.07) 12%, transparent 12.5% 87%, rgba(255,198,41,.07) 87.5%),
    linear-gradient(150deg, rgba(255,198,41,.07) 12%, transparent 12.5% 87%, rgba(255,198,41,.07) 87.5%),
    linear-gradient(30deg,  rgba(255,198,41,.07) 12%, transparent 12.5% 87%, rgba(255,198,41,.07) 87.5%),
    linear-gradient(150deg, rgba(255,198,41,.07) 12%, transparent 12.5% 87%, rgba(255,198,41,.07) 87.5%);
  background-size: 60px 104px;
  background-position: 0 0, 0 0, 30px 52px, 30px 52px;
}

h1, h2, h3, .display {
  font-family: 'Unbounded', 'Nunito', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.12rem; }

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

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

:focus-visible {
  outline: 3px solid var(--honey-deep);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.mt0 { margin-top: 0; }
.muted { color: var(--muted); }
.small { font-size: .87rem; }
.center { text-align: center; }
.row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.stack > * + * { margin-top: 14px; }

/* ============ Шапка ============ */
.top {
  background: var(--ink);
  color: var(--wax);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 3px solid var(--honey);
}

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

.logo {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 1.22rem;
  color: var(--wax);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -.03em;
  white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.logo b { color: var(--honey); font-weight: 700; }
.logo .hex { width: 30px; height: 34px; flex: none; }
.logo .hex-fill { fill: var(--honey); }

.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }

.nav a {
  color: #E9E2D2;
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .96rem;
  white-space: nowrap;
}
.nav a:hover { background: rgba(255,198,41,.14); color: var(--honey-lit); text-decoration: none; }
.nav a.on { background: var(--honey); color: var(--ink); }

.nav .badge {
  background: var(--honey);
  color: var(--ink);
  border-radius: 999px;
  padding: 0 7px;
  font-size: .78rem;
  margin-left: 5px;
  font-weight: 800;
}
.nav a.on .badge { background: var(--ink); color: var(--honey); }

.burger {
  display: none;
  margin-left: auto;
  background: none;
  border: 2px solid rgba(255,198,41,.4);
  color: var(--honey);
  border-radius: 10px;
  padding: 7px 11px;
  font-size: 1.15rem;
  cursor: pointer;
}

/* ============ Герой ============ */
.hero {
  background: linear-gradient(180deg, var(--ink) 0%, #221E15 100%);
  color: var(--wax);
  padding: 62px 0 70px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(30deg,  rgba(255,198,41,.06) 12%, transparent 12.5% 87%, rgba(255,198,41,.06) 87.5%),
    linear-gradient(150deg, rgba(255,198,41,.06) 12%, transparent 12.5% 87%, rgba(255,198,41,.06) 87.5%);
  background-size: 60px 104px;
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { max-width: 17ch; }
.hero h1 em { color: var(--honey); font-style: normal; }
.hero p { max-width: 58ch; color: #D9D1BE; font-size: 1.08rem; }

.eyebrow {
  font-family: 'Unbounded', sans-serif;
  font-weight: 500;
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--honey);
  margin-bottom: 14px;
}

/* ============ Кнопки ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--honey);
  color: var(--ink);
  border: none;
  padding: 12px 24px;
  border-radius: 999px;
  font: 700 1rem 'Nunito', sans-serif;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  box-shadow: 0 4px 0 var(--honey-deep);
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 6px 0 var(--honey-deep); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--honey-deep); }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: none;
}
.btn.ghost:hover { background: var(--ink); color: var(--honey); transform: none; }

.btn.on-dark { box-shadow: 0 4px 0 rgba(0,0,0,.45); }
.btn.on-dark.ghost { color: var(--wax); border-color: rgba(255,252,243,.45); }
.btn.on-dark.ghost:hover { background: var(--wax); color: var(--ink); }

.btn.sm { padding: 8px 16px; font-size: .9rem; box-shadow: 0 3px 0 var(--honey-deep); }
.btn.wide { width: 100%; }
.btn.danger { background: #F2E3E1; color: var(--danger); box-shadow: 0 3px 0 #D8B6B2; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ============ Секції та картки ============ */
.section { padding: 54px 0; }
.section.tight { padding: 32px 0; }

.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; }

.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card.link:hover { transform: translateY(-4px); border-color: var(--honey); box-shadow: 0 2px 0 rgba(20,18,12,.06), 0 20px 34px -20px rgba(20,18,12,.55); }
.card h3 { margin-bottom: 8px; }
.card h3 a { color: var(--ink); }
.card > :last-child { margin-bottom: 0; }

.tag {
  display: inline-block;
  background: var(--wax-2);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 3px 11px;
  font-size: .78rem;
  font-weight: 700;
}
.tag.solid { background: var(--honey); border-color: var(--honey); color: var(--ink); }

.meta { color: var(--muted); font-size: .85rem; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* Стільниковий аватар — фірмовий елемент */
.hexav {
  width: 42px; height: 46px; flex: none;
  display: grid; place-items: center;
  background: var(--honey);
  color: var(--ink);
  font: 800 1rem 'Unbounded', sans-serif;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.hexav.dark { background: var(--ink); color: var(--honey); }
.hexav.sm { width: 32px; height: 35px; font-size: .8rem; }

/* ============ Статистика ============ */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.stats div { background: #fff; padding: 20px 16px; text-align: center; }
.stats b { display: block; font-family: 'Unbounded', sans-serif; font-size: 1.7rem; color: var(--honey-deep); line-height: 1.1; }
.stats span { font-size: .82rem; color: var(--muted); font-weight: 600; }

/* ============ Форум ============ */
.tlist { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.trow { display: flex; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.trow:last-child { border-bottom: none; }
.trow:hover { background: var(--wax); }
.trow .t-main { flex: 1; min-width: 0; }
.trow .t-main h3 { margin: 0 0 4px; font-size: 1.03rem; }
.trow .t-main h3 a { color: var(--ink); }
.trow .t-num { text-align: center; min-width: 62px; }
.trow .t-num b { display: block; font-family: 'Unbounded', sans-serif; font-size: 1.15rem; }
.trow .t-num span { font-size: .74rem; color: var(--muted); }
.pin { color: var(--honey-deep); }

.post {
  display: flex;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  box-shadow: var(--shadow);
}
.post.op { border-color: var(--honey); border-left: 5px solid var(--honey); }
.post .p-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.post .p-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.post .p-head b { font-weight: 800; }

/* ============ Магазин ============ */
.prod { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.prod .ph {
  aspect-ratio: 4/3;
  display: grid;
  place-items: center;
  font-size: 3.6rem;
  background: linear-gradient(160deg, var(--honey-lit), var(--honey));
  border-bottom: 1px solid var(--line);
}
.prod .ph img { width: 100%; height: 100%; object-fit: cover; }
.prod .pb { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.prod .pb > form { margin-top: auto; }
.price { font-family: 'Unbounded', sans-serif; font-size: 1.3rem; font-weight: 700; }
.price span { font-size: .82rem; color: var(--muted); font-family: 'Nunito', sans-serif; font-weight: 600; }

.qty { display: inline-flex; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { width: 34px; border: none; background: var(--wax-2); font-size: 1.1rem; cursor: pointer; font-weight: 700; }
.qty input { width: 46px; border: none; text-align: center; font: 700 1rem 'Nunito'; background: #fff; }

/* ============ Форми ============ */
.form { max-width: 560px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: .92rem; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .84rem; }

input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=number], input[type=search], select, textarea {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--line);
  border-radius: 10px;
  font: 400 1rem 'Nunito', sans-serif;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: var(--honey); outline: none; }

.note { padding: 13px 16px; border-radius: 10px; border-left: 5px solid; margin-bottom: 18px; font-weight: 600; }
.note.ok   { background: #EDF7ED; border-color: var(--ok);     color: #1B5E20; }
.note.err  { background: #FBEAE8; border-color: var(--danger); color: #8C1D18; }
.note.info { background: var(--wax-2); border-color: var(--honey); color: var(--ink-soft); }

/* ============ Стаття ============ */
.article-body { max-width: 72ch; font-size: 1.08rem; }
.article-body p { margin: 0 0 1.15em; }
.article-body h2 { margin-top: 1.6em; }
.article-body ul, .article-body ol { padding-left: 1.3em; }
.article-body li { margin-bottom: .4em; }

.lead { font-size: 1.14rem; color: var(--ink-soft); font-weight: 600; }

.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.chips a {
  padding: 7px 15px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: .89rem;
}
.chips a:hover { border-color: var(--honey); text-decoration: none; }
.chips a.on { background: var(--ink); border-color: var(--ink); color: var(--honey); }

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 28px; }
.pager a { padding: 8px 14px; border: 2px solid var(--line); border-radius: 10px; background: #fff; font-weight: 700; color: var(--ink-soft); }
.pager a.on { background: var(--honey); border-color: var(--honey); color: var(--ink); }

/* ============ Таблиці (адмінка) ============ */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.tbl th, table.tbl td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl th { background: var(--ink); color: var(--honey); font-family: 'Unbounded', sans-serif; font-weight: 500; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tr:hover td { background: var(--wax); }

.pill { padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.pill.new  { background: #FFF3CD; color: #7A5B00; }
.pill.work { background: #E3F0FB; color: #10456E; }
.pill.done { background: #E6F4EA; color: #1B5E20; }
.pill.off  { background: #F0EDE6; color: var(--muted); }

/* ============ Підвал ============ */
.foot { background: var(--ink); color: #B9B1A0; margin-top: 60px; padding: 46px 0 28px; border-top: 3px solid var(--honey); }
.foot h4 { color: var(--wax); font-family: 'Unbounded', sans-serif; font-size: .95rem; margin: 0 0 12px; }
.foot a { color: #B9B1A0; }
.foot a:hover { color: var(--honey); }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin-bottom: 7px; font-size: .93rem; }
.foot .bottom { border-top: 1px solid rgba(255,252,243,.12); margin-top: 32px; padding-top: 18px; font-size: .85rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ============ Лічильник відвідувачів ============ */
.counter {
  margin-top: 32px;
  padding: 18px 22px;
  border: 1px solid rgba(255,198,41,.25);
  border-radius: var(--r);
  background: rgba(255,198,41,.06);
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.counter-label {
  font-family: 'Unbounded', sans-serif;
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--honey);
}
.counter-nums { display: flex; gap: 28px; flex-wrap: wrap; margin-left: auto; }
.counter-nums div { text-align: center; }
.counter-nums b {
  display: block;
  font-family: 'Unbounded', sans-serif;
  font-size: 1.5rem;
  color: var(--wax);
  line-height: 1.1;
}
.counter-nums span { font-size: .76rem; color: #9A927F; }

@media (max-width: 600px) {
  .counter { justify-content: center; }
  .counter-nums { margin-left: 0; gap: 20px; width: 100%; justify-content: space-around; }
  .counter-nums b { font-size: 1.25rem; }
}

/* ============ Стовпчики статистики ============ */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; }
.bars .bar { flex: 1; min-width: 8px; background: var(--honey); border-radius: 3px 3px 0 0; position: relative; transition: background .15s; }
.bars .bar:hover { background: var(--honey-deep); }
.bars .bar.today { background: var(--ink); }

/* ============ Адаптив ============ */
@media (max-width: 860px) {
  body { font-size: 16px; }
  .burger { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--ink);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 16px 18px;
    gap: 2px;
    border-bottom: 3px solid var(--honey);
  }
  .nav.open { display: flex; }
  .top .wrap { position: relative; }
  .hero { padding: 42px 0 46px; }
  .section { padding: 38px 0; }
  .trow { flex-wrap: wrap; }
  .trow .t-num { min-width: 48px; }
}

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

@media print {
  .top, .foot, .btn { display: none; }
  body { background: #fff; }
}
