/* MergenKit base layer
   Reset, root typography, accessibility helpers. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-relaxed);
  color: var(--ink);
  background: var(--app-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'cv11';
}

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

h1, h2, h3, h4, h5, h6, p, figure, ul, ol {
  margin: 0;
}

ul, ol { padding: 0; list-style: none; }

a {
  color: var(--wine);
  text-decoration: none;
  transition: color var(--motion-base) var(--ease-out);
}

a:hover { color: var(--wine-hover); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

input, select, textarea, button { font-family: inherit; font-size: inherit; color: inherit; }

::selection { background: rgba(140, 42, 47, 0.25); color: var(--ink); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--wine);
  color: var(--surface);
  padding: var(--space-3) var(--space-5);
  border-radius: 0 0 var(--radius-md) 0;
  font-size: var(--fs-small);
  font-weight: 500;
  z-index: 1000;
  transition: top var(--motion-base) var(--ease-out);
}

.skip-link:focus { top: 0; color: var(--surface); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

h1 {
  font-size: var(--fs-h1);
  font-weight: 600;
  letter-spacing: var(--ls-h1);
  line-height: var(--lh-tight);
  color: var(--ink);
}

h2 {
  font-size: var(--fs-h2);
  font-weight: 600;
  letter-spacing: var(--ls-h2);
  line-height: 1.15;
  color: var(--ink);
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  letter-spacing: var(--ls-h3);
  line-height: 1.3;
  color: var(--ink);
}

p { line-height: var(--lh-relaxed); color: var(--ink); }

.text-secondary { color: var(--secondary); }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }

.period-wine { color: var(--wine); }
.italic-accent { font-family: var(--font-italic); font-style: italic; font-weight: 400; color: var(--wine); }

code, pre, .mono { font-family: var(--font-mono); font-size: var(--fs-mono); }
