/* VONWEGEN · shared foundations and composable, Tailwind-style utilities.
   Intentionally local and build-free: no runtime CDN, no generated arbitrary values.
   Page layouts belong to their own stylesheets; reusable primitives live here. */
:root {
  --vw-bg: #faf9f6;
  --vw-surface: #ffffff;
  --vw-text: #20211f;
  --vw-muted: #666961;
  --vw-border: #dedfd8;
  --vw-accent: #b84420;
  --vw-accent-soft: #f7eae3;
  --vw-danger: #a5312c;
  --vw-success: #42633c;
  --vw-radius: 6px;
  --vw-shadow: 0 8px 32px rgb(25 30 22 / 8%);
  --vw-focus: 0 0 0 3px color-mix(in srgb, var(--vw-accent), transparent 76%);
  --vw-font: "Inter", "Inter Fallback", Arial, sans-serif;
  --vw-space-1: .25rem;
  --vw-space-2: .5rem;
  --vw-space-3: .75rem;
  --vw-space-4: 1rem;
  --vw-space-6: 1.5rem;
  --vw-space-8: 2rem;
  --vw-space-12: 3rem;
  --vw-content: 1200px;
  /* Compatibility aliases keep existing components on the same palette. */
  --page-bg: var(--vw-bg);
  --surface: var(--vw-surface);
  --text: var(--vw-text);
  --secondary-text: var(--vw-muted);
  --theme-line: var(--vw-border);
  --accent: var(--vw-accent);
  --accent-soft: var(--vw-accent-soft);
  --ink: var(--vw-text);
  --muted: var(--vw-muted);
  --panel: var(--vw-surface);
  --line: var(--vw-border);
  --bg: var(--vw-bg);
}

:root[data-theme="dark"] {
  --vw-bg: #181a18;
  --vw-surface: #222521;
  --vw-text: #f2f3ed;
  --vw-muted: #b4b9af;
  --vw-border: #40463d;
  --vw-accent: #f3a17e;
  --vw-accent-soft: #392b24;
  --vw-danger: #ffb3a9;
  --vw-success: #a4c69b;
  --vw-shadow: 0 8px 32px rgb(0 0 0 / 24%);
  --page-bg: var(--vw-bg);
  --surface: var(--vw-surface);
  --text: var(--vw-text);
  --secondary-text: var(--vw-muted);
  --theme-line: var(--vw-border);
  --accent: var(--vw-accent);
  --accent-soft: var(--vw-accent-soft);
  --ink: var(--vw-text);
  --muted: var(--vw-muted);
  --panel: var(--vw-surface);
  --line: var(--vw-border);
  --bg: var(--vw-bg);
}

:where(*, *::before, *::after) { box-sizing: border-box; }
:where(html) { scroll-padding-top: 2rem; }
:where(body) { background: var(--vw-bg); color: var(--vw-text); }
:where(button, input, textarea, select) { font: inherit; }
:where(button, a, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--vw-accent);
  outline-offset: 3px;
}
:where(button:not(:disabled), summary) { cursor: pointer; }
:where(button:disabled) { cursor: not-allowed; opacity: .55; }
:where(a) { text-underline-offset: .2em; }
:where(img, video) { max-width: 100%; }
::selection { background: var(--vw-accent-soft); color: var(--vw-text); }

/* Layout primitives: compose these rather than copy one-off declarations. */
.vw-container { width: min(var(--vw-content), calc(100% - 3rem)); margin-inline: auto; }
.vw-flex { display: flex; }
.vw-grid { display: grid; }
.vw-block { display: block; }
.vw-hidden { display: none; }
.vw-wrap { flex-wrap: wrap; }
.vw-items-center { align-items: center; }
.vw-justify-between { justify-content: space-between; }
.vw-flex-1 { flex: 1 1 0%; }
.vw-min-w-0 { min-width: 0; }
.vw-w-full { width: 100%; }
.vw-gap-1 { gap: var(--vw-space-1); }
.vw-gap-2 { gap: var(--vw-space-2); }
.vw-gap-3 { gap: var(--vw-space-3); }
.vw-gap-4 { gap: var(--vw-space-4); }
.vw-gap-6 { gap: var(--vw-space-6); }
.vw-gap-8 { gap: var(--vw-space-8); }
.vw-p-4 { padding: var(--vw-space-4); }
.vw-p-6 { padding: var(--vw-space-6); }
.vw-py-4 { padding-block: var(--vw-space-4); }
.vw-py-8 { padding-block: var(--vw-space-8); }
.vw-m-0 { margin: 0; }
.vw-mt-4 { margin-top: var(--vw-space-4); }
.vw-mt-8 { margin-top: var(--vw-space-8); }
.vw-text-sm { font-size: .8125rem; line-height: 1.5; }
.vw-text-muted { color: var(--vw-muted); }
.vw-text-accent { color: var(--vw-accent); }
.vw-font-medium { font-weight: 500; }
.vw-font-semibold { font-weight: 600; }
.vw-border { border: 1px solid var(--vw-border); }
.vw-border-b { border-bottom: 1px solid var(--vw-border); }
.vw-rounded { border-radius: var(--vw-radius); }
.vw-surface { background: var(--vw-surface); }
.vw-stack > * + * { margin-block-start: var(--vw-stack-gap, 1rem); }
.vw-panel { padding: clamp(1rem, 2.5vw, 2rem); background: var(--vw-surface); border: 1px solid var(--vw-border); border-radius: var(--vw-radius); }
.vw-button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 40px; padding: .625rem 1rem; border: 1px solid var(--vw-border);
  border-radius: var(--vw-radius); background: var(--vw-surface); color: var(--vw-text);
  font-size: .8125rem; font-weight: 500; line-height: 1.25; text-decoration: none;
  transition: background-color 140ms, border-color 140ms;
}
.vw-button:hover { background: var(--vw-accent-soft); border-color: var(--vw-accent); }
.vw-button-primary { background: var(--vw-text); color: var(--vw-bg); border-color: var(--vw-text); }
.vw-button-primary:hover { background: var(--vw-accent); color: var(--vw-surface); }
.vw-input { width: 100%; min-height: 40px; padding: .625rem .75rem; border: 1px solid var(--vw-border); border-radius: var(--vw-radius); background: var(--vw-surface); color: var(--vw-text); }
.vw-input:focus-visible { outline: 2px solid var(--vw-accent); outline-offset: -1px; box-shadow: none; }
.vw-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.vw-skip-link { position: fixed; top: .75rem; left: .75rem; z-index: 20000; padding: .75rem 1rem; background: var(--vw-text); color: var(--vw-bg); border-radius: var(--vw-radius); transform: translateY(-200%); }
.vw-skip-link:focus { transform: translateY(0); }
@media (min-width: 768px) {
  .vw-md-flex { display: flex; }
  .vw-md-grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599px) { .vw-container { width: calc(100% - 2rem); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
