/* base.css — reset + primitives shared by all three concepts.
   Concept stylesheets (v1/v2/v3 style.css) override the tokens. */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h, 76px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  min-height: 100svh;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[hidden] { display: none !important; }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; }
ul, ol { list-style: none; padding: 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }
h1, h2, h3, h4 { text-wrap: balance; font-weight: inherit; }
p { text-wrap: pretty; }
table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 2px solid var(--focus, currentColor);
  outline-offset: 3px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

/* ---------- Utilities ---------- */
.u-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;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 999;
  padding: 12px 18px; border-radius: 10px;
  background: var(--ink, #111); color: var(--paper, #fff);
  transition: top .2s; text-decoration: none; font-size: .9rem;
}
.skip-link:focus { top: 12px; }

/* ---------- Scroll reveal (opt-in via [data-reveal]) ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(var(--reveal-y, 22px));
  transition: opacity .8s cubic-bezier(.2,.7,.3,1), transform .8s cubic-bezier(.2,.7,.3,1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal].is-in { opacity: 1; transform: none; }
.no-js [data-reveal], [data-reveal].is-in { opacity: 1; }

/* ---------- Forms (structure only; concepts style the skin) ---------- */
[data-field] { display: flex; flex-direction: column; gap: .4rem; position: relative; }
.field-error { font-size: .82rem; color: var(--danger, #b3261e); }
[data-field][data-invalid] input,
[data-field][data-invalid] textarea,
[data-field][data-invalid] select { border-color: var(--danger, #b3261e); }

form[data-state="sending"] [type="submit"] { opacity: .6; cursor: progress; }
[data-result] { display: grid; gap: .35rem; }
[data-result] em { font-style: normal; opacity: .7; font-size: .85em; }

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, version-switcher, [data-no-print] { display: none !important; }
  body { background: #fff; color: #000; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
