/* Moacere base: reset, typography, links, focus, skip link and a deliberately small utility set.
   Author: Smarketer. */

/* ---- Reset ------------------------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  scroll-padding-top: calc(var(--header-h) + var(--s-2));
}
@media (prefers-reduced-motion: no-preference) {
  html:focus-within { scroll-behavior: smooth; }
}
body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--fw-regular);
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1;
  overflow-wrap: break-word;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
img, video { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
table { border-collapse: collapse; border-spacing: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
textarea { resize: vertical; }
[hidden] { display: none !important; }
dialog { padding: 0; border: 0; color: inherit; }
summary { cursor: pointer; }
hr { border: 0; border-top: 1px solid var(--border); margin-block: var(--s-3); }
::selection { background: var(--brand-200); color: var(--ink); }

/* ---- Typography --------------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--heading);
  font-weight: var(--fw-medium);
  line-height: var(--lh-heading);
  text-wrap: balance;
}
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }
h5, h6 { font-size: var(--fs-body); font-weight: var(--fw-semibold); }
p { text-wrap: pretty; }
small { font-size: var(--fs-sm); }
strong, b { font-weight: var(--fw-semibold); }
code, kbd, samp, pre { font-family: var(--font-mono); font-size: 0.9em; }
kbd {
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: var(--radius-xs);
  background: var(--surface);
  font-size: var(--fs-xs);
}
abbr[title] { text-decoration: underline dotted; cursor: help; }

.display { font-size: var(--fs-hero); line-height: var(--lh-tight); font-weight: var(--fw-medium); letter-spacing: -0.01em; }
.h1 { font-size: var(--fs-3xl); line-height: var(--lh-heading); }
.h2 { font-size: var(--fs-section); line-height: var(--lh-heading); }
.h3 { font-size: var(--fs-xl); line-height: var(--lh-heading); }
.h4 { font-size: var(--fs-lg); line-height: var(--lh-heading); }
.lead { font-size: var(--fs-md); line-height: 1.65; color: var(--muted-strong); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--brand-100);
  color: var(--brand-ink);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
}

/* ---- Links -------------------------------------------------------------------------------------- */
a {
  color: var(--brand-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--brand-active); text-decoration-thickness: 2px; }
.link-quiet { color: inherit; text-decoration: none; }
.link-quiet:hover { color: var(--brand-ink); text-decoration: underline; }

/* ---- Focus -------------------------------------------------------------------------------------- */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}
.on-dark :focus-visible, .on-dark:focus-visible { outline-color: var(--focus-on-dark); }

/* ---- Skip link -------------------------------------------------------------------------------- */
.skip-link {
  position: fixed;
  top: var(--s-1);
  left: var(--s-1);
  z-index: calc(var(--z-tooltip) + 1);
  padding: 12px 18px;
  border-radius: var(--radius-input);
  background: var(--ink);
  color: #fff;
  font-weight: var(--fw-medium);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform var(--dur) var(--ease-out);
}
.skip-link:focus, .skip-link:focus-visible { transform: none; color: #fff; outline-color: var(--focus-on-dark); }

/* ---- Icons ------------------------------------------------------------------------------------- */
.icon {
  display: inline-block;
  flex: none;
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.25em;
}
.icon--sm { width: 16px; height: 16px; }
.icon--md { width: 20px; height: 20px; }
.icon--lg { width: 24px; height: 24px; }
.icon--xl { width: 32px; height: 32px; }

/* ---- Utilities (keep this list short; prefer components) --------------------------------------- */
.sr-only, .visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.container {
  width: 100%;
  max-width: calc(var(--max-width) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(760px + 2 * var(--gutter)); }
.stack > * + * { margin-top: var(--stack-gap, var(--s-2)); }
.stack-sm { --stack-gap: var(--s-1); }
.stack-lg { --stack-gap: var(--s-4); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster-gap, var(--s-1-5)); }
.cluster--between { justify-content: space-between; }
.cluster--end { justify-content: flex-end; }
.grid { display: grid; gap: var(--grid-gap, var(--s-3)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.muted { color: var(--muted); }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tabular { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: 0.92em; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--s-1); }
.mt-2 { margin-top: var(--s-2); }
.mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); }
.mt-6 { margin-top: var(--s-6); }
.mb-2 { margin-bottom: var(--s-2); }
.w-full { width: 100%; }
.demo-note {
  font-size: var(--fs-xs);
  color: var(--muted);
}

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

@media print {
  .no-print, .skip-link { display: none !important; }
  body { background: #fff; }
}
