/* Embedeon components, direction "Valo". Needs tokens.css first. Plain CSS, no build step.
   Breakpoints: 720 px (page margin grows, tokens.css), 900 px (two-column layouts). Everything is one column below 900 px.
   Contents: base · header · language switch · footer · buttons and links · labels, dots, status · stage · key figures · sections and splits ·
   product list (catalog cards) · fact row · steps · features · spec list · contact block · guide page. */

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--s4)); }
body { margin: 0; background: var(--bg); color: var(--text); font: var(--w-regular) var(--fs-body)/var(--lh-body) var(--font-sans);
  font-kerning: normal; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-sans); text-wrap: balance; }
h1 { font-size: var(--fs-display); font-weight: var(--w-light); line-height: var(--lh-tight); letter-spacing: var(--track-display); }
h2 { font-size: var(--fs-h2); font-weight: var(--w-light); line-height: var(--lh-head); letter-spacing: var(--track-display); }
h3 { font-size: var(--fs-h3); font-weight: var(--w-regular); line-height: 1.25; letter-spacing: -.01em; }
h4 { font-size: var(--fs-body); font-weight: var(--w-medium); }
p { margin: 0; max-width: var(--measure); text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--margin)); margin-inline: auto; padding-inline: var(--margin); }
.muted { color: var(--text-muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: var(--margin); top: -100px; z-index: 20; background: var(--ink); color: var(--on-ink); padding: var(--s2) var(--s4);
  border-radius: var(--radius-pill); font-weight: var(--w-medium); text-decoration: none; }
.skip-link:focus { top: var(--s3); }

/* ---------- header ---------- */
.site-header { background: var(--bg); }
.site-header.is-sticky { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); box-shadow: 0 1px 0 var(--line); }
.site-header-in { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: var(--header-h); }
.wm { height: 14px; width: auto; color: var(--text); }
.wm path { fill: currentColor; }
.brand { display: inline-flex; flex: none; padding-block: var(--s2); text-decoration: none; }
.crumb { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.crumb-sep { width: 1px; height: 16px; background: var(--line); flex: none; }
.crumb-page { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: var(--w-medium); font-size: var(--fs-small); text-decoration: none; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: var(--s5); font-size: 14px; font-weight: var(--w-medium); }
.site-nav a { text-decoration: none; padding-block: var(--s2); }
.site-nav a:not(.btn):hover { text-decoration: underline; }
.site-nav .wide { display: none; }
@media (min-width: 720px) {
  .wm { height: 16px; }
  .site-nav .wide { display: inline; }
}

/* ---------- language switch: <nav class="lang-switch"> after .site-nav, EN / FI, current one aria-current ---------- */
.site-header-in > .site-nav { margin-left: auto; }
.lang-switch { display: flex; align-items: center; flex: none; font: var(--w-medium) var(--fs-utility)/1 var(--font-utility); }
.lang-switch a { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 32px;
  padding: 0 3px; color: var(--text-muted); text-decoration: none; }
.lang-switch a:first-child { min-width: 0; padding-left: 0; }
.lang-switch a + a::before { content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: 14px; margin-top: -7px; background: var(--line); }
.lang-switch a:hover { color: var(--text); }
.lang-switch a[aria-current] { color: var(--text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
/* phones: the header holds wordmark, product name, Contact and EN / FI in 312 px, also in Finnish */
@media (max-width: 719px) {
  .site-header-in { gap: var(--s2); }
  .crumb { gap: var(--s2); }
  .site-nav { gap: var(--s4); }
  .btn-small { padding: 0 10px; }
}

/* Finnish: long compound words. Running text may hyphenate (needs lang="fi"), but only long words; headings stay whole and
   break only if a word is wider than the screen. */
:lang(fi) :is(h1, h2, h3) { overflow-wrap: break-word; }
:lang(fi) :is(p, dd, li):not(.util) { hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 12 5 5; overflow-wrap: break-word; }
:lang(fi) :is(p, dd, li) a { hyphens: manual; -webkit-hyphens: manual; }

/* ---------- footer: <footer class="site-footer"><div class="wrap"><div class="site-footer-in">, so the rule spans the content only ---------- */
.site-footer { margin-top: var(--section-gap); }
.site-footer-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3) var(--s5);
  padding-block: var(--s5) calc(var(--s6) + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line);
  font-size: var(--fs-utility); color: var(--text-muted); }
.site-footer .wm { height: 12px; color: var(--text-muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.site-footer a { text-underline-offset: 3px; }
.site-footer a:hover { color: var(--text); }

/* ---------- buttons and links ---------- */
/* one ink pill per view for the main action; every other action is a text link */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 var(--s5); border: 0;
  border-radius: var(--radius-pill); background: var(--ink); color: var(--on-ink); font: var(--w-medium) var(--fs-small)/1 var(--font-sans);
  text-decoration: none; cursor: pointer; transition: opacity var(--dur) var(--ease); }
.btn:hover { opacity: .86; }
.btn-small { min-height: 32px; padding: 0 var(--s4); font-size: var(--fs-utility); white-space: nowrap; }
.link { font-weight: var(--w-medium); text-decoration-line: underline; }
.link:hover { text-decoration-thickness: 2px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); }

/* ---------- labels, dots, status ---------- */
.util { font: var(--w-medium) var(--fs-utility)/1.4 var(--font-utility); font-variant-numeric: tabular-nums; color: var(--text-muted); letter-spacing: 0; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--product); margin-right: var(--s2); vertical-align: 1px; flex: none; }
.status { display: inline-flex; align-items: center; min-height: 26px; padding: 0 var(--s3); border: 1px solid var(--line); border-radius: var(--radius-pill);
  font: var(--w-medium) 12px/1 var(--font-utility); color: var(--text-muted); white-space: nowrap; }
.status .dot { width: 6px; height: 6px; margin-right: 6px; vertical-align: 0; }
.mail { font: var(--w-medium) 14px/1.4 var(--font-utility); color: var(--text-muted); user-select: all; overflow-wrap: anywhere; }

/* ---------- stage: one device, square corners, centred, nothing else on it ---------- */
.stage { position: relative; display: block; margin: 0; background: var(--surface); aspect-ratio: 1 / 1; overflow: hidden; }
.stage > img { position: absolute; left: 7%; top: 6%; width: 86%; height: 90%; object-fit: contain; }
.stage-wide { aspect-ratio: 1 / 1; }
.stage-tall { aspect-ratio: 4 / 3; }
@media (min-width: 900px) {
  .stage-wide { aspect-ratio: 2.1 / 1; }
  .stage-tall { aspect-ratio: 4 / 5; }
}
a.stage > img { transition: transform .6s var(--ease); }
a.stage:hover > img { transform: scale(1.015); }

/* ---------- key figures: a quiet row of four ---------- */
.figures { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5) var(--s4); margin: 0; }
.figures dt { font: var(--w-medium) var(--fs-utility)/1.4 var(--font-utility); color: var(--text-muted); }
.figures dd { margin: var(--s1) 0 0; }
.figure-num { display: block; font-size: var(--fs-figure); font-weight: var(--w-light); line-height: 1.1; letter-spacing: var(--track-head);
  font-variant-numeric: tabular-nums; }
.figure-note { display: block; margin-top: 2px; font: var(--w-regular) var(--fs-utility)/1.4 var(--font-utility); color: var(--text-muted); }
@media (min-width: 900px) { .figures { grid-template-columns: repeat(4, 1fr); gap: var(--gutter); } }

/* ---------- sections and splits ---------- */
.section { margin-top: var(--section-gap); }
.section-head { display: grid; gap: var(--s4); margin-bottom: var(--s7); }
.section-head p { color: var(--text-muted); }
.split { display: grid; gap: var(--s5); }
@media (min-width: 900px) {
  .section-head, .split { grid-template-columns: 7fr 5fr; gap: var(--gutter); align-items: end; }
  .split-top { align-items: start; }
  .section-head p, .split > :last-child > p:last-child { margin-bottom: 4px; }
}
.lede { font-size: var(--fs-lede); line-height: 1.5; }

/* ---------- product list (catalog) ---------- */
.products { display: grid; gap: var(--s9) var(--gutter); }
.product-item-body { display: grid; gap: var(--s4); padding-top: var(--s5); }
.product-name { font-size: var(--fs-h2); font-weight: var(--w-light); letter-spacing: var(--track-display); line-height: 1.1; margin: var(--s2) 0 var(--s1); }
.product-tag { font-size: 17px; }
.product-sum { color: var(--text-muted); }
.product-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); margin-top: var(--s4); }
@media (min-width: 900px) {
  .products { grid-template-columns: 1fr 1fr; }
  .products.single { grid-template-columns: 1fr; }
  .products.single .product-item-body { grid-template-columns: 7fr 5fr; gap: var(--gutter); padding-top: var(--s6); }
  .products:not(.single) .stage { aspect-ratio: 1 / 1; }
}

/* ---------- fact row: three or four short facts over hairlines ---------- */
.facts { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--line); }
.facts > div { display: grid; grid-template-columns: 9rem 1fr; gap: var(--s4); padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
.facts dt { font: var(--w-medium) var(--fs-utility)/1.6 var(--font-utility); color: var(--text-muted); }
.facts dd { margin: 0; font-size: 17px; }
@media (min-width: 900px) {
  .facts { grid-template-columns: repeat(3, 1fr); gap: var(--gutter); border-top: 0; }
  .facts > div { grid-template-columns: 1fr; gap: var(--s2); padding: var(--s4) 0 0; border-bottom: 0; border-top: 1px solid var(--line); }
  .facts dd { font-size: var(--fs-h3); font-weight: var(--w-light); line-height: 1.25; letter-spacing: -.01em; }
}
@media (max-width: 420px) { .facts > div { grid-template-columns: 1fr; gap: var(--s1); } }

/* ---------- steps: numbered by CSS, so the numbers are not page text ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: var(--s6); }
.steps > li { counter-increment: step; display: grid; gap: var(--s2); align-content: start; padding-top: var(--s4); border-top: 1px solid var(--line); }
.steps > li::before { content: "Step " counter(step); font: var(--w-medium) var(--fs-utility)/1.4 var(--font-utility); color: var(--text-muted); }
.steps p { color: var(--text-muted); }
:lang(fi) .steps > li::before { content: "Vaihe " counter(step); }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: var(--gutter); } }

/* ---------- features ---------- */
.features { display: grid; gap: var(--s6) var(--gutter); }
.feature { display: grid; gap: var(--s2); align-content: start; }
.feature h3 { font-size: 19px; font-weight: var(--w-medium); letter-spacing: -.005em; }
.feature p { color: var(--text-muted); }
@media (min-width: 560px) { .features { grid-template-columns: 1fr 1fr; } }

/* ---------- spec list ---------- */
.spec-list { margin: 0; border-top: 1px solid var(--line); }
.spec-list > div { display: grid; gap: var(--s1); padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
.spec-list dt { font: var(--w-medium) var(--fs-utility)/1.6 var(--font-utility); color: var(--text-muted); }
.spec-list dd { margin: 0; font-variant-numeric: tabular-nums; }
@media (min-width: 560px) { .spec-list > div { grid-template-columns: 10rem 1fr; gap: var(--s5); align-items: baseline; } }

/* ---------- contact block ---------- */
.contact { display: grid; gap: var(--s4); }
.contact h2 { max-width: 14ch; }
.contact-body { display: grid; gap: var(--s5); align-content: start; }
.contact-body p { color: var(--text-muted); }
@media (min-width: 900px) { .contact { grid-template-columns: 7fr 5fr; gap: var(--gutter); align-items: start; } }

/* ---------- guide page: contents on the left, one reading column ---------- */
.guide { display: grid; gap: var(--s7); padding-top: var(--s7); }
.guide-head { display: grid; gap: var(--s4); }
.guide-head > p:not(.util) { color: var(--text-muted); font-size: var(--fs-lede); }
.guide-toc { font-size: var(--fs-small); }
.guide-toc h2 { font: var(--w-medium) var(--fs-utility)/1.4 var(--font-utility); color: var(--text-muted); letter-spacing: 0; margin-bottom: var(--s3); }
.guide-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); border-left: 1px solid var(--line); }
.guide-toc a { display: block; padding: 2px 0 2px var(--s4); margin-left: -1px; border-left: 1px solid transparent; text-decoration: none; color: var(--text-muted); }
.guide-toc a:hover, .guide-toc a[aria-current="true"] { color: var(--text); border-left-color: var(--text); }
.guide-body { max-width: 68ch; }
.guide-body > * + * { margin-top: var(--s4); }
.guide-body h2 { font-size: clamp(26px, 1.3rem + 1vw, 34px); margin-top: var(--s8); scroll-margin-top: calc(var(--header-h) + var(--s4)); }
.guide-body > h2:first-child { margin-top: 0; }
.guide-body h3 { margin-top: var(--s6); }
.guide-body .stage-tall { aspect-ratio: 4 / 3; }
.guide-body ol, .guide-body ul { padding-left: 1.3em; }
.guide-body li + li { margin-top: var(--s2); }
.guide-body li::marker { color: var(--text-muted); font-family: var(--font-utility); font-size: .9em; }
.guide-body figure { margin: var(--s6) 0; }
.guide-body figcaption { margin-top: var(--s2); font: var(--w-regular) var(--fs-utility)/1.5 var(--font-utility); color: var(--text-muted); }
.guide-body code, .guide-body kbd { font: var(--w-medium) .88em var(--font-utility); background: var(--bg); border: 1px solid var(--line); padding: 0 5px; border-radius: var(--radius-small); }
.guide-body table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
.guide-body th { text-align: left; font: var(--w-medium) var(--fs-utility)/1.4 var(--font-utility); color: var(--text-muted); }
.guide-body th, .guide-body td { padding: var(--s3) var(--s4) var(--s3) 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-scroll { overflow-x: auto; }
.note { padding: var(--s4) var(--s5); background: var(--surface); }
.note > .util { display: block; margin-bottom: var(--s1); }
.note.caution { box-shadow: inset 2px 0 0 var(--text); }
@media (min-width: 900px) {
  .guide { grid-template-columns: 3fr 9fr; gap: var(--s5) var(--gutter); }
  .guide-head { grid-column: 2; }
  .guide-toc { grid-column: 1; grid-row: 2; position: sticky; top: calc(var(--header-h) + var(--s5)); align-self: start; }
  .guide-body { grid-column: 2; grid-row: 2; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
  a.stage:hover > img { transform: none; }
}
