/* ==========================================================================
   KRASTA 89 — bāze: reset, tipogrāfija, izkārtojuma palīgi
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  font-stretch: var(--stretch-body);
  font-kerning: normal;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
picture { display: contents; } /* <picture> ap .media nemaina izkārtojumu: režģī un kartītē uzvedas kā pats <img> */
input, button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: var(--fw-bold);
  font-stretch: var(--stretch-display);
  line-height: var(--lh-tight);
  letter-spacing: -0.005em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-2xl); font-weight: var(--fw-black); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); line-height: var(--lh-snug); }
h4 { font-size: var(--fs-md); line-height: var(--lh-snug); }
p, ul, ol, dl, figure, blockquote { margin: 0; }
p { text-wrap: pretty; }
small { font-size: var(--fs-sm); }

a { color: var(--c-primary); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--c-primary-hover); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
  border-radius: var(--r-1);
}

.num, td.num, .tabular { font-variant-numeric: tabular-nums; }
.mono, code, kbd { font-family: var(--font-mono); font-size: 0.92em; }
code { background: var(--c-surface-2); padding: 0.1em 0.35em; border-radius: var(--r-1); }
kbd { border: 1px solid var(--c-border-strong); border-bottom-width: 2px; padding: 0 0.35em; border-radius: var(--r-1); background: var(--c-surface); }

.eyebrow {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--c-text-muted);
}
.muted { color: var(--c-text-muted); }
.lead { font-size: var(--fs-md); color: var(--c-text-muted); max-width: var(--measure); }

/* Izkārtojums */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.container--text { max-width: calc(var(--container-text) + 2 * var(--gutter)); }
.stack { display: flex; flex-direction: column; gap: var(--stack-gap, var(--s-4)); }
.stack > * { min-width: 0; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster-gap, var(--s-3)); }
.grid { display: grid; gap: var(--grid-gap, var(--s-5)); grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--grid-min, 18rem)), 1fr)); }
.grid > * { min-width: 0; }
.section { padding-block: var(--s-7); }
@media (min-width: 60rem) { .section { padding-block: var(--s-8); } }

.visually-hidden {
  position: absolute !important; 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; left: var(--s-3); top: -100px; z-index: 100;
  background: var(--c-accent); color: var(--c-on-accent); padding: var(--s-3) var(--s-4);
  font-weight: var(--fw-bold); border-radius: var(--r-2); text-decoration: none;
}
.skip-link:focus { top: var(--s-3); }

.icon { display: inline-block; vertical-align: -0.2em; width: var(--icon); height: var(--icon); flex: none; }
.icon--lg { width: 1.75rem; height: 1.75rem; }

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