/* Shared tokens and components (public site + admin). Light, warm, one accent. */
:root {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --surface-2: #efe9e0;
  --ink: #1c1b19;          /* headings, key figures */
  --body: #34312c;         /* reading */
  --muted: #6b645a;        /* metadata, 5.3:1 on --bg */
  --faint: #a39b8f;        /* decorative only */
  --accent: #8a5b2f;       /* "look here": eyebrow, dash, selection, prices */
  --accent-soft: #f1e7da;
  --line: rgba(28, 27, 25, .10);
  --line-strong: rgba(28, 27, 25, .18);
  --line-accent: rgba(138, 91, 47, .55);
  --ok: #2f7d4a;
  --danger: #b4382f;
  --warn: #9a6212;
  --deal: #a8323f;          /* discounts: badges, new prices */
  --deal-soft: #f7e4e4;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 22px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Manrope", "Inter", system-ui, sans-serif;

  --fs-2xs: .75rem;
  --fs-xs: clamp(.8rem, .78rem + .1vw, .86rem);
  --fs-sm: clamp(.875rem, .85rem + .13vw, .95rem);
  --fs-base: clamp(1rem, .96rem + .2vw, 1.075rem);
  --fs-lg: clamp(1.1rem, 1.04rem + .3vw, 1.28rem);
  --fs-xl: clamp(1.28rem, 1.16rem + .56vw, 1.6rem);
  --fs-2xl: clamp(1.5rem, 1.33rem + .9vw, 2.05rem);
  --fs-3xl: clamp(1.8rem, 1.5rem + 1.5vw, 2.7rem);
  --fs-5xl: clamp(2.5rem, 1.8rem + 3.6vw, 4.6rem);
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 400 var(--fs-base)/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { color: var(--ink); margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -.025em; line-height: 1.15; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: var(--fs-xs); line-height: 1.5; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ic {
  width: 1.15em; height: 1.15em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

.label {
  font: 600 var(--fs-2xs)/1.2 var(--font);
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}

/* buttons -------------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: 0 1.35em;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: var(--fs-sm); text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background-color .2s, border-color .2s, color .2s;
}
.btn-sm { min-height: 40px; padding: 0 1.05em; font-size: var(--fs-xs); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--line-accent); color: var(--accent); }
.btn-danger { border-color: rgba(180, 56, 47, .4); color: var(--danger); background: transparent; }
.btn-danger:hover { border-color: var(--danger); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* forms ---------------------------------------------------------------------------------- */
.field { display: grid; gap: 6px; margin-top: 16px; }
.field > label, .field-label { font-size: var(--fs-sm); font-weight: 500; color: var(--ink); }
.opt { font-weight: 400; color: var(--muted); font-size: var(--fs-xs); margin-left: 4px; }
.input, .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px;
  font-size: 16px; /* no iOS zoom */
  transition: border-color .2s;
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b645a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(28, 27, 25, .32); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(138, 91, 47, .14); }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-size: var(--fs-sm); color: var(--ink); }
.check input { width: 20px; height: 20px; accent-color: var(--ink); margin: 0; flex: none; }

.alert {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 16px 0; padding: 4px 0 4px 12px;
  border-left: 2px solid var(--danger); color: var(--danger); font-size: var(--fs-sm);
}
.alert .ic { margin-top: 2px; }
.alert.is-warn { border-color: var(--warn); color: var(--warn); }
.alert.is-ok { border-color: var(--ok); color: var(--ok); }
.form-error { color: var(--danger); font-size: var(--fs-sm); margin: 12px 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* stars (shared) */
:root { --star: #c99232; --star-off: #e4ddd2; }
.stars { position: relative; display: inline-flex; vertical-align: middle; line-height: 0; }
.stars .ic { width: 15px; height: 15px; }
.stars.lg .ic { width: 20px; height: 20px; }
.stars-bg { display: inline-flex; color: var(--star-off); }
.stars-fg { position: absolute; inset: 0 auto 0 0; display: inline-flex; overflow: hidden; color: var(--star); white-space: nowrap; }
.rv-star { color: var(--star); width: 14px; height: 14px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
