/* Brenav design tokens + shared primitives */
[hidden] { display: none !important; }
:root {
  --ink: #313928;
  --ink-900: #22271b;
  --ink-800: #2b3223;
  --ink-700: #3d4633;
  --olive-500: #6d7a5b;
  --accent: #de7923;
  --accent-600: #c2641a;
  --accent-100: #f9e8d6;
  --paper: #faf8f2;
  --paper-2: #f3f1e8;
  --surface: #ffffff;
  --line: #e5e2d6;
  --line-strong: #d6d2c2;
  --muted: #717a67;
  --ok: #2f7d52;
  --warn: #b7791f;
  --err: #ad4038;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 2px 8px rgba(35, 40, 25, 0.06);
  --shadow: 0 14px 40px rgba(35, 40, 25, 0.1);
  --font-sans: "Inter", "Helvetica Neue", "Segoe UI", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Songti SC", Georgia, serif;
  --maxw: 1240px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-600); }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-100); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.i { flex: none; }
.muted { color: var(--muted); }
.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-600);
  font-weight: 600;
}
.eyebrow-light { color: #e7b27e; }
.section { padding: 72px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(24px, 3vw, 34px); }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.link-arrow:hover { gap: 12px; }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-700); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-600); color: #fff; }
.btn-outline { background: transparent; border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.btn-outline-light { background: transparent; border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.btn-outline-light:hover { border-color: #fff; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--paper-2); color: var(--ink); }
.btn-lg { padding: 15px 30px; font-size: 15px; }
.btn-sm { padding: 8px 14px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.btn.loading { color: transparent; position: relative; }
.btn.loading::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  color: #fff;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* forms */
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--ink-700); letter-spacing: 0.02em; }
.field-label em { color: var(--accent-600); font-style: normal; margin-left: 3px; }
.input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus { outline: none; border-color: var(--ink-700); box-shadow: 0 0 0 3px rgba(49, 57, 40, 0.08); }
.input::placeholder { color: #a5a898; }
.textarea { resize: vertical; min-height: 88px; }
.select { appearance: none; background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23717a67' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.field-hint { font-size: 11.5px; color: var(--muted); }

/* misc shared */
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13.5px; margin: 16px 0; background: #edf5ee; color: #22583a; border: 1px solid #cfe6d5; }
.flash-error { background: #fbeceb; color: var(--err); border-color: #f0cfcc; }
.flash-list { margin: 0; padding-left: 18px; }
.empty { grid-column: 1 / -1; text-align: center; padding: 64px 20px; color: var(--muted); }
.empty-mark { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-700); }
.empty h3 { color: var(--ink); font-size: 20px; margin-bottom: 8px; }
.empty .btn { margin-top: 20px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 48px; flex-wrap: wrap; }
.page { min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-size: 13px; border: 1px solid transparent; padding: 0 12px; }
.page:hover { background: var(--surface); border-color: var(--line-strong); }
.page.is-current { background: var(--ink); color: #fff; }
.page-gap { color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.status-ok { background: #e8f3ec; color: #256b45; }
.status-warn { background: #fbf0db; color: #97610f; }
.status-muted { background: #eeede5; color: #6a705f; }
.price { font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: -0.01em; }
.price-cur { font-size: 0.72em; vertical-align: top; margin-right: 1px; opacity: 0.75; }
.price-dec { font-size: 0.78em; }
.price-was { color: var(--muted); text-decoration: line-through; font-size: 13px; margin-left: 8px; font-weight: 400; }
.count-pill { display: inline-flex; min-width: 26px; height: 26px; padding: 0 8px; align-items: center; justify-content: center; background: var(--accent-100); color: var(--accent-600); border-radius: 999px; font-size: 13px; vertical-align: middle; }

/* toast */
.toast-stack { position: fixed; right: 24px; bottom: 24px; z-index: 120; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  box-shadow: var(--shadow);
  animation: toast-in 0.25s ease both;
  pointer-events: auto;
  max-width: 340px;
}
.toast.is-error { background: #8e3830; }
.toast.is-out { animation: toast-out 0.25s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

/* responsive helpers */
@media (max-width: 900px) {
  .section { padding: 52px 0; }
  .wrap { padding: 0 18px; }
}
