/* Xerovi theme: base layer (S7 A1, agent s7-a1-foundation, 2026-11-28).
   Loads after tokens.css. Fonts, reset, tones, type, focus, motion switches.
   Rule: colours come only from tokens.css (--xv-*); this file holds no raw colour values. */

/* ------------------------------------------------------------------ fonts
   Both files are needed: õ ä ö ü å sit in chivo-latin, š ž in chivo-latin-ext
   (08-qa/S5/font-coverage-2026-11-28.txt). Variable weight axis. */
@font-face {
  font-family: "Chivo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/chivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Chivo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/chivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------------------------------------------ motion switches
   Movement amplitudes. Components read these instead of hard-coding a distance, so
   prefers-reduced-motion and "Pause motion" (html[data-xv-motion="paused"]) stop every
   lift, nudge, zoom and press in one place (D42). Not colours, so they live here. */
:root {
  --xv-move-lift: -2px;     /* hover lift: buttons, cards */
  --xv-move-nudge: 3px;     /* arrow icon nudge */
  --xv-move-press: .97;     /* :active scale */
  --xv-move-zoom: 1.08;     /* product screenshot zoom */
  --xv-move-shift: 12px;    /* case title shift */
  --xv-move-panel: 8px;     /* mega menu entry offset */
  --xv-move-rotate: 45deg;  /* FAQ icon when open (a state, kept when paused) */
}
@media (prefers-reduced-motion: reduce) {
  :root {
    --xv-move-lift: 0px; --xv-move-nudge: 0px; --xv-move-press: 1; --xv-move-zoom: 1;
    --xv-move-shift: 0px; --xv-move-panel: 0px;
  }
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; }
}
html[data-xv-motion="paused"] {
  --xv-move-lift: 0px; --xv-move-nudge: 0px; --xv-move-press: 1; --xv-move-zoom: 1;
  --xv-move-shift: 0px; --xv-move-panel: 0px;
}
html[data-xv-motion="paused"] *, html[data-xv-motion="paused"] *::before, html[data-xv-motion="paused"] *::after {
  animation: none !important;
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--xv-header-height) + 24px);
  scroll-padding-bottom: var(--xv-cookie-space, 0px); /* set by consent.js while the cookie notice shows */
  background: var(--xv-bg);
}
body { padding-bottom: var(--xv-cookie-space, 0px); }
body {
  margin: 0;
  min-width: 320px;
  background: var(--xv-bg);
  color: var(--xv-text);
  font-family: var(--xv-font-sans);
  font-size: var(--xv-size-body);
  font-weight: var(--xv-weight-regular);
  line-height: var(--xv-leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
img, svg, video, canvas, iframe { display: block; max-width: 100%; }
img, video { height: auto; }
svg { flex-shrink: 0; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
button:disabled, [aria-disabled="true"] { cursor: not-allowed; }
:where(h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure, blockquote) { margin: 0; }
:where(ul, ol)[class], nav :where(ul, ol) { list-style: none; padding: 0; }
[hidden] { display: none !important; }
::selection { background: var(--xv-selection-bg); color: var(--xv-selection-text); }

/* ------------------------------------------------------------------ tones
   A section declares its tone (D41). The tone classes in tokens.css set the variables;
   this paints them. */
.xv-tone-ink, .xv-tone-paper { background: var(--xv-bg); color: var(--xv-text); }

/* ------------------------------------------------------------------ type
   Classes carry the look so the heading level can follow the document outline. */
h1, h2, h3, h4, .xv-display, .xv-h1, .xv-h1-article, .xv-h2-section, .xv-h2, .xv-h3-display, .xv-h3-row, .xv-h3, .xv-h4 {
  font-family: var(--xv-font-sans);
  color: var(--xv-text);
  text-wrap: balance;
  hyphens: manual;
  /* D41 asks for break-word as the last resort; "anywhere" breaks at the same points but also
     lowers the min-content width, so a long compound cannot widen a grid or flex parent. */
  overflow-wrap: anywhere;
}
.xv-display     { font-size: var(--xv-size-display); font-weight: 400; line-height: var(--xv-leading-display); letter-spacing: var(--xv-tracking-display); }
.xv-h1          { font-size: var(--xv-size-h1); font-weight: 400; line-height: var(--xv-leading-heading); letter-spacing: var(--xv-tracking-display); }
.xv-h1-article  { font-size: var(--xv-size-h1-article); font-weight: 400; line-height: var(--xv-leading-heading); letter-spacing: var(--xv-tracking-display); }
.xv-h2-section  { font-size: var(--xv-size-h2-section); font-weight: 400; line-height: var(--xv-leading-heading); letter-spacing: var(--xv-tracking-h2); }
.xv-h2          { font-size: var(--xv-size-h2); font-weight: 400; line-height: var(--xv-leading-heading); letter-spacing: var(--xv-tracking-h2); }
.xv-h3-display  { font-size: var(--xv-size-h3-display); font-weight: 400; line-height: var(--xv-leading-title); letter-spacing: var(--xv-tracking-h3); }
.xv-h3-row      { font-size: var(--xv-size-h3-row); font-weight: 400; line-height: var(--xv-leading-title); letter-spacing: var(--xv-tracking-h3); }
.xv-h3          { font-size: var(--xv-size-h3); font-weight: 500; line-height: var(--xv-leading-ui); letter-spacing: var(--xv-tracking-title); }
.xv-h4          { font-size: var(--xv-size-h4); font-weight: 500; line-height: var(--xv-leading-ui); letter-spacing: var(--xv-tracking-snug); }
.xv-lead        { font-size: var(--xv-size-lead); line-height: var(--xv-leading-lead); color: var(--xv-text-soft); max-width: var(--xv-measure); text-wrap: pretty; }
.xv-body        { font-size: var(--xv-size-body); line-height: var(--xv-leading-body); color: var(--xv-text-soft); max-width: var(--xv-measure); text-wrap: pretty; }
.xv-small       { font-size: var(--xv-size-small); font-weight: 500; line-height: var(--xv-leading-label); }
.xv-label {
  display: block;
  font-size: var(--xv-size-label);
  font-weight: 500;
  line-height: var(--xv-leading-label);
  letter-spacing: var(--xv-tracking-caps);
  text-transform: uppercase;
  color: var(--xv-text-muted);
  overflow-wrap: anywhere;
}
.xv-muted { color: var(--xv-text-muted); }
.xv-num { font-variant-numeric: tabular-nums; letter-spacing: var(--xv-tracking-number); }
p { text-wrap: pretty; }
strong, b { font-weight: 500; color: var(--xv-text); }

/* Long-form prose (articles, legal). Body text may hyphenate automatically; headings never do. */
.xv-prose { font-size: var(--xv-size-body-long); line-height: var(--xv-leading-long); color: var(--xv-text-soft); max-width: var(--xv-measure-long); hyphens: auto; }
.xv-prose > * + * { margin-top: 1em; }
.xv-prose :is(h2, h3) { margin-top: 1.4em; hyphens: manual; }
.xv-prose h2 { font-size: var(--xv-size-h2-article); font-weight: 400; line-height: var(--xv-leading-heading); letter-spacing: var(--xv-tracking-h2); }
.xv-prose h3 { font-size: var(--xv-size-h3); font-weight: 500; line-height: var(--xv-leading-ui); }
.xv-prose :is(ul, ol) { padding-left: 1.25em; }
.xv-prose li + li { margin-top: .4em; }

/* Inline link: always underlined (DESIGN.md Links). Exempt from target size. */
.xv-prose a, .xv-inline-link {
  color: var(--xv-text);
  text-decoration: underline;
  text-decoration-color: var(--xv-link-underline);
  text-decoration-thickness: var(--xv-link-underline-thickness);
  text-underline-offset: var(--xv-link-underline-offset);
  transition: text-decoration-color var(--xv-duration-fast) var(--xv-ease-out);
  overflow-wrap: anywhere;
}
@media (hover: hover) and (pointer: fine) {
  .xv-prose a:hover, .xv-inline-link:hover { text-decoration-color: currentColor; }
}

/* ET/FI (D41): soft hyphens placed by the translator, line-height 1.04 on H1/H2 (tokens.css). */
:lang(et) :is(.xv-display, .xv-h1, .xv-h1-article, .xv-h2-section, .xv-h2),
:lang(fi) :is(.xv-display, .xv-h1, .xv-h1-article, .xv-h2-section, .xv-h2) { line-height: var(--xv-leading-heading-diacritic); }

/* ------------------------------------------------------------------ focus
   2px ring, 4px offset, 6px radius, tone colour (DESIGN.md Components). */
:focus { outline: none; }
:focus-visible {
  outline: var(--xv-focus-ring-width) solid var(--xv-focus-ring-color);
  outline-offset: var(--xv-focus-ring-offset);
}
/* The ring follows the element's own radius; bare links and summaries get the 6px corner.
   :where() keeps this at zero specificity so a component's radius (pill buttons) wins. */
:where(a, summary, [tabindex]):focus-visible { border-radius: var(--xv-radius-focus); }

/* ------------------------------------------------------------------ helpers */
.xv-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.xv-icon { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Skip link: first focusable element, visible on focus. */
.xv-skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: var(--xv-z-skip);
  display: inline-flex;
  align-items: center;
  min-height: var(--xv-target-touch);
  padding: 0 var(--xv-space-5);
  border-radius: var(--xv-radius-pill);
  background: var(--xv-skip-bg);
  color: var(--xv-skip-text);
  font-size: var(--xv-size-ui);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-200%);
}
.xv-skip:focus-visible { transform: none; outline-color: var(--xv-skip-bg); }

/* Body scroll lock while the mobile menu is open. */
html.xv-scroll-lock, html.xv-scroll-lock body { overflow: hidden; }
