/* Isännöinti Leivonen: perustyylit
   Periaatteet: ks. SUUNNITTELUPERIAATTEET.md
   Asettelut tehdään CSS Gridillä (Elementorissa Grid-kontti), flexiä ei käytetä. */

:root {
  --white: #FFFFFF;
  --surface: #F6F5F1;
  --surface-2: #ECEAE3;
  --ink: #0C1511;
  --ink-2: #434E48;
  --ink-3: #5B6560;
  --line: #E2E0D8;
  --line-strong: #C9C6BC;

  /* sama vihreä kuin logossa */
  --green: #16582A;
  --green-hover: #10461F;
  --green-mid: #3A8C55;
  --green-dark: #0A2219;
  --green-darker: #06170F;
  --mint: #CFF3DD;
  --mint-light: #E9F8EF;
  /* keltainen on varattu kiireellisille huoltoasioille ja punainen hätätilanteille */
  --sun: #FFC547;
  --sun-light: #FFF1C9;
  --red: #C93524;
  --red-light: #FDE8E4;

  --font: "Host Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --container: 1440px;
  --gutter: clamp(16px, 4vw, 56px);
  --edge: max(var(--gutter), calc((100vw - var(--container)) / 2));
  --radius-s: 12px;
  --radius: 20px;
  --header-h: 76px;
  --topbar-h: 0px;

  /* välit: osion reunat, otsikosta sisältöön, korttien välit, listan rivit ja kortin sisäreunat */
  --space-section: clamp(64px, 7vw, 112px);
  --space-head: clamp(28px, 3vw, 48px);
  --gap-cards: clamp(16px, 1.6vw, 24px);
  --gap-list: 12px;
  --pad-card: clamp(20px, 2vw, 28px);
}

/* ---------- Pohja ---------- */

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (min-width: 900px) { body { font-size: 1.125rem; } }

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
p, ul, ol, dl, dd, figure, h1, h2, h3, blockquote { margin: 0; }
ul[role="list"] { list-style: none; padding: 0; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
/* tummilla ja vihreillä pohjilla fokusrengas on valkoinen */
:is(.split, .footer, .band--dark, .band--green, .contact-hero, .pillar--intro, .note-card--green, .compare__col--green, .post-cta, .area, .team__office, .triage__head) :focus-visible { outline-color: #fff; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--ink); color: #fff; padding: .7em 1em; font-weight: 600; border-radius: var(--radius-s);
}
.skip:focus { left: 8px; }

h1, h2 { font-weight: 600; letter-spacing: -.04em; line-height: 1.02; text-wrap: balance; }
h1 { font-size: clamp(2.7rem, 1.2rem + 4.8vw, 5.8rem); }
h2 { font-size: clamp(2rem, 1.15rem + 2.6vw, 3.5rem); letter-spacing: -.035em; line-height: 1.05; }
h3 { font-size: 1.2rem; font-weight: 600; line-height: 1.25; letter-spacing: -.015em; }

.lead { font-size: clamp(1.1rem, 1rem + .45vw, 1.3rem); line-height: 1.55; color: var(--ink-2); max-width: 46ch; }

.section { padding-block: var(--space-section); }
.section--surface { background: var(--surface); }

/* osion otsikko: otsikko vasemmalla, johdanto oikealla */
.sec-head { display: grid; gap: 1.1rem 4rem; align-items: end; margin-bottom: var(--space-head); }
@media (min-width: 980px) { .sec-head { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.sec-head .lead { max-width: 44ch; }
.sec-head > .textlink { justify-self: start; }
@media (min-width: 980px) { .sec-head > .textlink { justify-self: end; } }

.textlink {
  display: inline-block;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--green-mid);
  text-underline-offset: .3em;
}
.textlink:hover { text-decoration-color: currentColor; }

/* ---------- Painikkeet ---------- */

.btn {
  display: inline-grid; grid-auto-flow: column; place-items: center; gap: .5em;
  min-height: 52px; padding: .85em 1.5em;
  border: 1.5px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: 1rem; line-height: 1.15; letter-spacing: -.005em;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-hover); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--light { background: #fff; color: var(--green-dark); }
.btn--light:hover { background: var(--mint); }
.btn--ghost-light { border-color: rgba(255, 255, 255, .6); color: #fff; }
.btn--ghost-light:hover { background: #fff; color: var(--green-dark); }

.actions { display: grid; grid-auto-flow: column; justify-content: start; gap: .75rem; }
@media (max-width: 520px) { .actions { grid-auto-flow: row; justify-items: start; } }

/* ---------- Kortit ---------- */

.card {
  display: grid; grid-template-rows: auto 1fr;
  height: 100%;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: inherit;
  transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s, border-color .3s;
}
.card:hover { transform: translateY(-4px); border-color: transparent; box-shadow: 0 28px 48px -28px rgba(12, 21, 17, .4); }
.card__media { overflow: hidden; }
.card__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.card:hover .card__media img { transform: scale(1.045); }
.card__body { display: grid; align-content: start; gap: .6rem; padding: var(--pad-card) var(--pad-card) calc(var(--pad-card) + 4px); }
.card__meta { font-size: .9rem; color: var(--ink-3); }
.card h3 { font-size: clamp(1.25rem, 1rem + .8vw, 1.6rem); line-height: 1.15; letter-spacing: -.03em; text-wrap: balance; }
.card p { color: var(--ink-2); }
.card:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .14em; text-decoration-color: var(--green-mid); }

/* ---------- Ylätunniste ---------- */

.header { position: sticky; top: 0; z-index: 50; background: var(--white); box-shadow: 0 1px 0 transparent; transition: box-shadow .2s; }
.header.is-stuck { box-shadow: 0 1px 0 var(--line); }
.header__inner { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1.5rem; min-height: var(--header-h); }

.brand { display: inline-grid; grid-auto-flow: column; align-items: center; justify-content: start; gap: .6rem; min-height: 44px; text-decoration: none; color: var(--green); }
/* alkuperäinen logo vektorina (jäljitetty asiakkaan logotiedostosta) */
.brand__logo { display: block; width: auto; height: 46px; }

.nav { justify-self: end; }
.nav__list { display: grid; grid-auto-flow: column; align-items: center; gap: .1rem; list-style: none; margin: 0; padding: 0; }
.nav__link, .nav__sub-toggle, .nav__phone {
  display: inline-grid; grid-auto-flow: column; align-items: center; gap: .45em;
  padding: .55em .75em; border: 0; border-radius: 999px; background: none;
  font-weight: 500; font-size: 1rem; text-decoration: none; color: var(--ink); cursor: pointer;
}
.nav__link:hover, .nav__sub-toggle:hover, .nav__sub-toggle[aria-expanded="true"], .nav__phone:hover { background: var(--surface); }
.nav__phone { font-weight: 600; font-variant-numeric: tabular-nums; }
.nav__phone svg { width: 18px; height: 18px; fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav__sub-toggle::after {
  content: ""; width: .4em; height: .4em;
  border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor;
  transform: translateY(-.18em) rotate(45deg); transition: transform .15s;
}
.nav__sub-toggle[aria-expanded="true"]::after { transform: translateY(.12em) rotate(-135deg); }
.nav__has-sub { position: relative; }
.nav__sub {
  display: none;
  position: absolute; top: calc(100% + 10px); left: -1rem; z-index: 5;
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem;
  width: 520px; padding: 1.3rem 1.4rem 1.4rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 24px 48px -24px rgba(12, 21, 17, .28);
}
.nav__sub-toggle[aria-expanded="true"] + .nav__sub { display: grid; }
.nav__sub-h { font-size: .85rem; font-weight: 600; color: var(--ink-3); margin-bottom: .4rem; }
.nav__sub ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.nav__sub a { display: block; padding: .4em .6em; margin-inline: -.6em; border-radius: var(--radius-s); text-decoration: none; font-size: 1rem; }
.nav__sub a:hover { background: var(--surface); }
.nav__cta { margin-left: .5rem; }
.nav__cta--asioi + .nav__cta { margin-left: .15rem; }
.nav__cta .btn { min-height: 46px; padding: .65em 1.15em; }
.btn__icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* alavalikko: samat tehtävät ja kuvakkeet kuin etusivun avainlapuissa */
.nav__tasks a { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .8rem; padding: .5em .6em; }
.nav__tasks svg { width: 26px; height: 26px; fill: none; stroke: var(--green); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav__tasks span { display: grid; font-weight: 600; line-height: 1.25; }
.nav__tasks small { font-size: .85rem; font-weight: 400; color: var(--ink-3); }

/* työpöydällä: logon vihreä yhteystietopalkki ylimpänä ja vihreä alleviivaus valikossa */
.topbar { display: none; }
@media (min-width: 1280px) {
  :root { --topbar-h: 40px; }
  .header { top: calc(var(--topbar-h) * -1); }
  .topbar { display: block; background: var(--green); color: #fff; font-size: .9rem; }
  .topbar__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2rem; min-height: var(--topbar-h); }
  .topbar__contact { display: grid; grid-auto-flow: column; justify-content: start; align-items: center; gap: 1.4rem; }
  .topbar__contact span { color: #CFE6D6; }
  .topbar__links { display: grid; grid-auto-flow: column; gap: 1.6rem; margin: 0; }
  .topbar a { display: inline-grid; grid-auto-flow: column; align-items: center; gap: .45rem; min-height: 32px; color: #fff; font-weight: 500; text-decoration: none; }
  .topbar a:hover { text-decoration: underline; text-decoration-color: var(--mint); text-decoration-thickness: 2px; text-underline-offset: .3em; }
  .topbar svg { width: 15px; height: 15px; fill: none; stroke: var(--mint); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .topbar :focus-visible { outline-color: #fff; }
  .nav__phone-item { display: none; }

  .nav__link, .nav__sub-toggle { position: relative; }
  .nav__link::before, .nav__sub-toggle::before {
    content: ""; position: absolute; left: .75em; right: .75em; bottom: .2em; height: 2px; border-radius: 2px;
    background: var(--green); transform: scaleX(0); transform-origin: left center; transition: transform .25s cubic-bezier(.2, .7, .2, 1);
  }
  .nav__sub-toggle::before { right: 1.6em; }
  .nav__link:hover, .nav__sub-toggle:hover, .nav__sub-toggle[aria-expanded="true"] { background: none; }
  .nav__link:hover::before, .nav__link[aria-current="page"]::before,
  .nav__sub-toggle:hover::before, .nav__sub-toggle.is-current::before, .nav__sub-toggle[aria-expanded="true"]::before { transform: scaleX(1); }

  .nav__sub { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.6rem; width: 640px; padding: 1.4rem 1.5rem 1.5rem; }
  .nav__sub-toggle[aria-expanded="true"] + .nav__sub { animation: nav-drop .2s cubic-bezier(.2, .7, .2, 1); }
  .nav__sub a:hover { background: var(--mint-light); }
}
@keyframes nav-drop { from { opacity: 0; transform: translateY(-6px); } }

.nav-toggle {
  display: none; grid-auto-flow: column; align-items: center; gap: .6rem; justify-self: end;
  min-height: 46px; padding: .5em 1em; border: 1.5px solid var(--ink); border-radius: 999px;
  background: none; font-weight: 600; cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; position: relative; transition: transform .2s, background-color .2s;
}
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1279px) {
  .nav-toggle { display: inline-grid; }
  .nav {
    display: none; justify-self: stretch;
    position: absolute; top: 100%; left: 0; right: 0;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    padding: .75rem var(--gutter) 2rem;
    background: var(--white); box-shadow: 0 1px 0 var(--line) inset, 0 24px 32px -24px rgba(12, 21, 17, .35);
  }
  .nav.is-open { display: block; }
  .nav__list { grid-auto-flow: row; align-items: stretch; gap: 0; }
  .nav__link, .nav__sub-toggle, .nav__phone { width: 100%; justify-content: space-between; padding: .95em .25em; font-size: 1.15rem; border-radius: 0; box-shadow: 0 1px 0 var(--line); }
  .nav__phone { justify-content: start; }
  .nav__link:hover, .nav__sub-toggle:hover, .nav__sub-toggle[aria-expanded="true"], .nav__phone:hover { background: none; }
  .nav__sub { position: static; width: auto; grid-template-columns: 1fr; gap: 1rem; padding: 1rem 0 1.25rem; border: 0; box-shadow: none; background: none; }
  .nav__sub a { font-size: 1.05rem; }
  .nav__cta { margin: 1.25rem 0 0; }
  .nav__cta .btn { width: 100%; min-height: 52px; }
  .nav__cta--asioi + .nav__cta { margin-top: .6rem; }
}
/* puhelimella logo mahtuu, kun valikkopainikkeessa näkyy vain kuvake */
@media (max-width: 480px) {
  .brand__logo { height: 36px; }
  .nav-toggle { width: 46px; padding: 0; justify-content: center; }
  .nav-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- Hero: ilmakuva talon muotoisessa kehyksessä ---------- */

.hero { padding-block: clamp(28px, 4.5vw, 72px) clamp(48px, 5vw, 80px); overflow: hidden; }
.hero__grid { display: grid; gap: clamp(48px, 6vw, 96px); align-items: center; }
@media (min-width: 1000px) { .hero__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); } }
.hero .lead { margin-top: 1.6rem; max-width: 40ch; }
.hero .actions { margin-top: 2.1rem; }
.hero__trust { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1rem; margin-top: clamp(36px, 4vw, 56px); font-size: .95rem; line-height: 1.4; color: var(--ink-3); }
.hero__trust img { width: 56px; height: 56px; }
.hero__trust strong { display: block; font-weight: 600; color: var(--ink); }

.hero__media { position: relative; width: min(100% - 12px, 600px); aspect-ratio: 1 / 1; margin: 0 12px 12px auto; }
.hero__shape, .hero__photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  -webkit-clip-path: url(#house); clip-path: url(#house);
}
.hero__shape { background: var(--mint); transform: translate(12px, 12px); }
.hero__photo { object-fit: cover; }
.hero__lark { position: absolute; z-index: 1; width: clamp(76px, 9vw, 136px); left: clamp(-64px, -3vw, -8px); top: 3%; fill: var(--green); }
@media (min-width: 1000px) {
  /* kuvan korkeus seuraa näytön korkeutta, jotta seuraavan osion alku näkyy ensimmäisessä näkymässä */
  .hero__media { justify-self: end; aspect-ratio: 5 / 6; width: auto; max-width: calc(100% - 24px); height: clamp(440px, calc(100svh - 340px), 680px); margin: 0 24px 24px auto; }
  .hero__shape { transform: translate(24px, 24px); }
}
/* puhelimella asiointi tulee ennen isoa kuvaa, tabletilla kuva on tekstin vieressä */
@media (max-width: 699px) { .hero { padding-bottom: 48px; } .hero__media { display: none; } }
@media (min-width: 700px) and (max-width: 999px) { .hero__grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 40px; } }

/* ---------- Asiointi: avainlaput ja vikatilanteet ---------- */

.asiointi__grid { display: grid; gap: clamp(28px, 3.5vw, 48px); }
@media (min-width: 1280px) { .asiointi__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(48px, 5vw, 88px); align-items: start; } }
.asiointi__intro { display: grid; gap: 1.3rem; align-content: start; }
.asiointi__intro .lead { max-width: 40ch; }

/* avainlappu: talon muotoinen lätkä ja reikä. Ohut reuna syntyy li-elementin taustasta. */
.keys { display: grid; gap: var(--gap-cards); grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
@media (min-width: 900px) { .keys { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.keys > li { padding: 1px; background: var(--line); -webkit-clip-path: url(#tag); clip-path: url(#tag); transition: background-color .2s; }
.keys > li:hover { background: var(--green-mid); }
.keys > li:has(.key:focus-visible) { padding: 3px; background: var(--ink); }
.key {
  position: relative;
  display: grid; grid-template-rows: auto auto 1fr auto; align-content: start; gap: .6rem;
  height: 100%; min-height: 260px; padding: 56px clamp(18px, 1.8vw, 26px) 24px;
  background: #fff; color: var(--ink); text-decoration: none;
  -webkit-clip-path: url(#tag); clip-path: url(#tag);
  transition: background-color .2s;
}
.key:hover { background: var(--mint-light); }
.key:focus-visible { outline: none; }
.key::before { content: ""; position: absolute; top: 16px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); }
.key__icon { width: 30px; height: 30px; fill: none; stroke: var(--green); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.key__title { font-weight: 600; font-size: clamp(1.12rem, 1rem + .35vw, 1.3rem); line-height: 1.15; letter-spacing: -.02em; }
.key:hover .key__title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .14em; text-decoration-color: var(--green-mid); }
.key__text { font-size: .95rem; line-height: 1.45; color: var(--ink-2); }
.key__meta { font-size: .82rem; font-weight: 600; color: var(--green); }

/* puhelimella lätkät ovat vaakasuuntaisia ja reikä on vasemmalla */
@media (max-width: 599px) {
  .keys { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .keys > li, .key { -webkit-clip-path: url(#tag-h); clip-path: url(#tag-h); }
  .key { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: none; min-height: 0; column-gap: 14px; row-gap: .2rem; padding: 16px 18px 16px 56px; }
  .key__icon { grid-row: span 3; align-self: center; }
  .key__title, .key__text, .key__meta { grid-column: 2; }
  .key::before { top: 50%; left: 20px; margin: -6px 0 0; }
}

/* vika- ja hätätilanteet: hätätilanne, kiireellinen huoltoasia ja muu asia erikseen */
.triage { display: grid; gap: var(--gap-cards); }
@media (min-width: 900px) { .triage { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.vika__more { margin-top: clamp(28px, 3vw, 40px); }
.triage__item { display: grid; grid-template-rows: auto 1fr; overflow: hidden; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.triage__head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .9rem; min-height: 84px; padding: 18px var(--pad-card); }
.triage__head h3 { margin: 0; font-size: 1.25rem; font-weight: 600; line-height: 1.2; letter-spacing: -.02em; }
.triage__icon { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.triage__num { font-size: 2.6rem; font-weight: 700; line-height: .9; letter-spacing: -.05em; }
.triage__body { display: grid; align-content: start; justify-items: start; gap: .85rem; padding: var(--pad-card) var(--pad-card) calc(var(--pad-card) + 4px); }
.triage__body p { font-size: .98rem; line-height: 1.55; color: var(--ink-2); }
.triage__body strong { font-weight: 600; color: var(--ink); }
.triage__tel { font-size: 1.6rem; font-weight: 600; line-height: 1.1; letter-spacing: -.03em; text-decoration: none; font-variant-numeric: tabular-nums; }
.triage__tel:hover { color: var(--green); }
.triage__link { font-weight: 600; text-decoration-color: var(--green-mid); text-decoration-thickness: 2px; text-underline-offset: .3em; }
.triage__item--hata { border-color: var(--red); }
.triage__item--hata .triage__head { background: var(--red); color: #fff; }
.triage__item--hata .triage__link { text-decoration-color: var(--red); }
.triage__item--kiire .triage__head { background: var(--sun); color: var(--ink); }
.triage__item--muu .triage__head { background: var(--mint); color: var(--green-dark); }

/* ---------- Ohjeet: kuvakortit ---------- */

.guides { display: grid; gap: var(--gap-cards); }
@media (min-width: 700px) and (max-width: 1059px) { .guides { grid-template-columns: repeat(2, minmax(0, 1fr)); } .guides > li:first-child { grid-column: 1 / -1; } }
@media (min-width: 1060px) {
  .guides { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .guides > li:first-child { grid-row: span 2; }
  .guides > li:first-child .card__media img { aspect-ratio: 16 / 12; }
  .guides > li:not(:first-child) .card { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: none; }
  .guides > li:not(:first-child) .card__media img { height: 100%; aspect-ratio: auto; }
  .guides > li:not(:first-child) .card__body { align-content: center; }
}

/* ---------- Kuva + teksti koko leveydeltä ---------- */

.split { display: grid; background: var(--green-dark); color: #E3EDE7; }
@media (min-width: 980px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.split__media { position: relative; min-height: 340px; }
.split__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.split__body { display: grid; align-content: center; gap: 1.2rem; padding: clamp(64px, 8vw, 128px) var(--gutter); }
@media (min-width: 980px) {
  .split__body { padding-inline: clamp(40px, 6vw, 112px) var(--edge); }
  .split--media-right .split__media { order: 2; }
  .split--media-right .split__body { padding-inline: var(--edge) clamp(40px, 6vw, 112px); }
}
.split h2 { color: #fff; max-width: 16ch; }
.split p { max-width: 46ch; color: #B5C7BD; font-size: 1.12rem; }
.split .textlink { justify-self: start; margin-top: .6rem; color: #fff; text-decoration-color: var(--mint); }

/* ---------- Hallitukselle: esittelykortti ja aihekortit ---------- */

.pillars { display: grid; gap: var(--gap-cards); }
@media (min-width: 700px) { .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .pillars { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.pillar {
  display: grid; grid-template-rows: auto 1fr;
  height: 100%; padding: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: inherit;
  transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s, border-color .3s;
}
a.pillar:hover { transform: translateY(-4px); border-color: transparent; box-shadow: 0 28px 48px -28px rgba(12, 21, 17, .4); }
.pillar__media { overflow: hidden; border-radius: var(--radius-s); aspect-ratio: 4 / 3; }
.pillar__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
a.pillar:hover .pillar__media img { transform: scale(1.04); }
.pillar__body { display: grid; align-content: start; gap: .5rem; padding: 20px 10px 12px; }
.pillar h3 { font-size: clamp(1.25rem, 1.05rem + .6vw, 1.5rem); letter-spacing: -.03em; }
.pillar p { color: var(--ink-2); }
a.pillar:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .14em; text-decoration-color: var(--green-mid); }

.pillar--intro {
  position: relative; overflow: hidden;
  grid-template-rows: auto auto 1fr auto; align-content: start; gap: 1rem;
  padding: clamp(28px, 3vw, 40px);
  background: var(--green); color: #fff; border-color: transparent;
}
.pillar--intro > *:not(.pillar__lark) { position: relative; }
.pillar--intro h3 { font-size: clamp(1.7rem, 1.2rem + 1.2vw, 2.3rem); line-height: 1.08; letter-spacing: -.035em; }
.pillar--intro p { color: #D2ECDD; }
.pillar__lark { position: absolute; width: 320px; right: -70px; bottom: -36px; fill: #1E6A36; pointer-events: none; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; align-self: start; margin: .4rem 0 .6rem; }
.facts dt { font-size: .8rem; color: #CFEBDA; }
.facts dd { font-weight: 600; font-size: .98rem; line-height: 1.3; }
.pillar--intro .btn { justify-self: start; }

/* ---------- Toimialue ---------- */

.alue__grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 980px) { .alue__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.alue__text > p { margin-top: 1.3rem; max-width: 46ch; color: var(--ink-2); }
.offices { display: grid; gap: var(--gap-list); margin-top: 2rem; }
@media (min-width: 560px) and (max-width: 979px) { .offices { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.office { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .2rem 1rem; padding: calc(var(--pad-card) - 4px) var(--pad-card); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.office h3 { grid-column: 1 / -1; font-size: 1.15rem; }
.office p { font-size: .95rem; line-height: 1.45; color: var(--ink-2); }
.office a { padding-block: .25rem; font-size: .9rem; font-weight: 600; text-decoration-color: var(--green-mid); text-decoration-thickness: 2px; text-underline-offset: .3em; }
@media (min-width: 560px) and (max-width: 979px) { .office { grid-template-columns: 1fr; } }

.alue__map svg { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.map .m-land { fill: #FFFFFF; }
.map .m-sea { fill: #D9E9F0; }
.map .m-isle { fill: #FFFFFF; }
.map .m-grat { fill: none; stroke: #E3E9E5; stroke-width: 1; stroke-dasharray: 2 5; }
.map .m-road { fill: none; stroke: #CCD5D0; stroke-width: 3.5; stroke-linecap: round; }
.map .m-shield rect { fill: var(--green); }
.map .m-shield text { font-family: var(--font); font-size: 12px; font-weight: 700; fill: #fff; }
.map .m-region { font-family: var(--font); font-size: 46px; font-weight: 700; letter-spacing: 16px; fill: #EDF1EE; }
.map .m-sealabel { font-family: var(--font); font-size: 18px; font-style: italic; font-weight: 500; letter-spacing: 4px; fill: #7895A2; }
.map .m-town circle { fill: var(--ink-2); stroke: #fff; stroke-width: 2.5; }
.map .m-town text, .map .m-office text { font-family: var(--font); paint-order: stroke; stroke: #fff; stroke-width: 6px; stroke-linejoin: round; }
.map .m-town text { font-size: 19px; font-weight: 500; fill: var(--ink-2); }
.map .m-office text { font-size: 23px; font-weight: 700; letter-spacing: -.02em; fill: var(--green-dark); }
.map .m-office circle { fill: var(--green); }
.map .m-scale text, .map .m-north text { font-family: var(--font); font-size: 14px; font-weight: 600; fill: var(--ink-2); }

/* ---------- Löydä oma isännöitsijäsi ---------- */

.team__grid { display: grid; gap: clamp(32px, 4vw, 64px); align-items: start; }
@media (min-width: 1100px) { .team__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
.team__intro { display: grid; gap: 1.25rem; align-content: start; }
.team__intro .lead { max-width: 34ch; }
.team__tip { display: grid; gap: .4rem; padding: var(--pad-card); border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.team__tip h3 { font-size: 1.1rem; }
.team__tip p { font-size: .98rem; line-height: 1.5; color: var(--ink-2); }
.team__office { position: relative; overflow: hidden; display: grid; gap: .3rem; padding: var(--pad-card); border-radius: var(--radius); background: var(--green); color: #fff; }
.team__office > *:not(.team__lark) { position: relative; }
.team__office h3 { font-size: 1.1rem; }
.team__office a { color: #fff; text-decoration-color: var(--mint); text-decoration-thickness: 2px; text-underline-offset: .25em; }
.team__tel { justify-self: start; margin-top: .2rem; font-size: clamp(1.8rem, 1.4rem + 1vw, 2.3rem); font-weight: 600; line-height: 1.15; letter-spacing: -.035em; text-decoration: none; font-variant-numeric: tabular-nums; }
.team__tel:hover { text-decoration: underline; }
.team__mail { justify-self: start; padding-block: .2rem; font-weight: 500; }
.team__office p { margin-top: .5rem; font-size: .95rem; line-height: 1.5; color: #D2ECDD; }
.team__lark { position: absolute; width: 200px; right: -44px; top: -16px; fill: #1E6A36; pointer-events: none; }
.team__people { display: grid; gap: var(--gap-cards); align-content: start; }
.team__people .search { max-width: 380px; }

.people { display: grid; gap: var(--gap-cards); margin: 0; }
@media (min-width: 640px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.person {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "avatar name" "tel tel" "mail mail";
  gap: 10px 16px; padding: var(--pad-card) var(--pad-card) calc(var(--pad-card) - 6px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.person[hidden] { display: none; }
/* kuva tai nimikirjaimet talon muotoisessa kehyksessä */
.person__avatar, .person__photo { grid-area: avatar; width: 64px; height: 64px; -webkit-clip-path: url(#house); clip-path: url(#house); }
.person__avatar { display: grid; place-items: end center; padding-bottom: 10px; background: var(--mint); color: var(--green-dark); font-weight: 700; font-size: 1.05rem; letter-spacing: -.02em; }
.person__photo { object-fit: cover; }
.person__name { grid-area: name; align-self: center; }
.person__name h3 { margin: 0; font-size: 1.15rem; font-weight: 600; line-height: 1.2; letter-spacing: -.02em; }
.person__name p { font-size: .9rem; line-height: 1.35; color: var(--ink-3); }
.person__tel {
  grid-area: tel; justify-self: start; display: inline-grid; grid-auto-flow: column; align-items: center; gap: .55rem; min-height: 44px;
  font-size: 1.3rem; font-weight: 600; letter-spacing: -.015em; text-decoration: none; font-variant-numeric: tabular-nums;
}
.person__tel svg { width: 19px; height: 19px; fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.person__tel:hover { color: var(--green); }
.person__mail { grid-area: mail; justify-self: start; padding-block: .3rem; font-size: .92rem; color: var(--ink-2); overflow-wrap: anywhere; text-decoration: underline; text-decoration-color: var(--line-strong); text-decoration-thickness: 2px; text-underline-offset: .3em; }
.person__mail:hover { text-decoration-color: var(--green-mid); }

/* ---------- Artikkelit: kortit ruudukossa, uusin ensin ---------- */

.post-grid { display: grid; gap: var(--gap-cards); grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); list-style: none; margin: 0; padding: 0; }
.post-grid--fit { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.post-grid .card__media img { aspect-ratio: 16 / 10; }
/* kun artikkeleita on neljä tai enemmän, uusin nostetaan koko leveydelle */
@media (min-width: 900px) {
  .post-grid--feature > li:first-child { grid-column: 1 / -1; }
  .post-grid--feature > li:first-child .card { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: none; }
  .post-grid--feature > li:first-child .card__media img { height: 100%; min-height: 360px; aspect-ratio: auto; }
  .post-grid--feature > li:first-child .card__body { align-content: center; padding: clamp(28px, 3vw, 48px); }
  .post-grid--feature > li:first-child h3 { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.3rem); }
}

/* ---------- Tarjouspyyntö ---------- */

.cta { background: var(--green); color: #fff; }
.cta .split__body { position: relative; overflow: hidden; }
.cta__lark { position: absolute; width: min(560px, 80vw); left: -6%; bottom: -18%; fill: #114A22; pointer-events: none; }
.cta h2, .cta p, .cta .actions { position: relative; }
.cta h2 { color: #fff; max-width: 13ch; }
.cta p { color: #D2ECDD; }
.cta .actions { margin-top: .9rem; align-items: center; color: #D2ECDD; font-weight: 500; }
.cta .actions a:not(.btn) { font-weight: 700; color: #fff; text-decoration-color: var(--mint); text-decoration-thickness: 2px; text-underline-offset: .3em; }

/* ---------- Alatunniste ---------- */

.footer { background: var(--green-darker); color: #B6C6BE; font-size: .95rem; }
.footer__grid { display: grid; gap: 40px; padding-block: 72px 56px; }
@media (min-width: 700px) { .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer li a { display: inline-block; padding-block: .15rem; }
.footer .brand__logo { height: 52px; }
.footer__brand p { margin-top: 1rem; max-width: 30ch; }
.footer__h { margin-bottom: .9rem; font-size: 1rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; color: #fff; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.footer__bottom { background: #030F09; color: #8FA399; font-size: .86rem; }
.footer__bottom-inner { display: grid; gap: .5rem 2rem; padding-block: 20px; }
@media (min-width: 700px) { .footer__bottom-inner { grid-template-columns: 1fr auto; } }

/* ---------- Liike ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* =========================================================
   Alasivut
   ========================================================= */

/* nykyinen sivu valikossa */
.nav__link[aria-current="page"], .nav__sub-toggle.is-current { color: var(--green); font-weight: 600; }

/* murupolku */
.crumbs { margin-bottom: 1.4rem; font-size: .92rem; color: var(--ink-3); }
.crumbs ol { list-style: none; margin: 0; padding: 0; }
.crumbs li { display: inline; }
.crumbs li + li::before { content: "/"; margin: 0 .55rem; color: var(--ink-3); opacity: .5; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; text-decoration-color: var(--green-mid); }

/* sivun yläosa */
.phero { padding-block: clamp(28px, 4vw, 64px) clamp(64px, 7vw, 104px); overflow: hidden; }
.phero__grid { display: grid; gap: clamp(40px, 5vw, 80px); align-items: center; }
@media (min-width: 1000px) { .phero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.phero h1 { font-size: clamp(2.4rem, 1.2rem + 3.6vw, 4.6rem); }
.phero .lead { margin-top: 1.4rem; max-width: 44ch; }
.phero .actions { margin-top: 2rem; }
.phero__meta { display: grid; grid-auto-flow: column; justify-content: start; gap: .4rem 1.4rem; margin-top: 1.6rem; font-size: .95rem; color: var(--ink-3); }
.phero__meta strong { color: var(--ink); font-weight: 600; }
@media (max-width: 520px) { .phero__meta { grid-auto-flow: row; } }
.phero__media { position: relative; width: min(100% - 12px, 480px); aspect-ratio: 5 / 4; margin: 0 12px 12px auto; }
@media (min-width: 1000px) {
  .phero__media { margin: 0 20px 20px auto; }
  .phero__media .hero__shape { transform: translate(20px, 20px); }
}


/* hätätilanteiden korttipino */
.callstack { position: relative; display: grid; justify-self: center; width: min(380px, 86vw); padding: 10px 0 20px; }
.callstack__card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1rem; padding: 20px 22px; border-radius: var(--radius); box-shadow: 0 22px 34px -24px rgba(12, 21, 17, .5); }
.callstack__card + .callstack__card { margin-top: -10px; }
.callstack__card:nth-child(1) { background: var(--red); color: #fff; transform: rotate(-3deg); }
.callstack__card:nth-child(2) { background: var(--sun); color: var(--ink); transform: rotate(2deg) translateX(18px); }
.callstack__card:nth-child(3) { background: var(--mint); color: var(--green-dark); transform: rotate(-1.5deg) translateX(-6px); }
.callstack__big { font-size: 2.6rem; font-weight: 700; letter-spacing: -.05em; line-height: .9; }
.callstack__label { font-weight: 600; line-height: 1.25; }
.callstack__label small { display: block; font-weight: 500; opacity: .8; }
.callstack svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* lomakkeet */
.formwrap { display: grid; gap: clamp(24px, 3vw, 40px); align-items: start; }
@media (min-width: 1060px) { .formwrap { grid-template-columns: minmax(0, 8fr) minmax(300px, 4fr); } }
.form { display: grid; gap: clamp(28px, 3vw, 40px); padding: clamp(22px, 3vw, 44px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.form__section { display: grid; gap: 18px; min-width: 0; margin: 0; padding: 0; border: 0; }
.form__h { padding: 0; font-size: 1.3rem; font-weight: 600; letter-spacing: -.025em; }
.form__intro { color: var(--ink-2); font-size: .98rem; }
.fields { display: grid; gap: 18px 20px; }
@media (min-width: 640px) { .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field { display: grid; gap: .45rem; align-content: start; min-width: 0; margin: 0; padding: 0; border: 0; }
.field--full { grid-column: 1 / -1; }
.field > label, .field > legend { padding: 0; font-weight: 600; font-size: .98rem; line-height: 1.35; }
.req { color: var(--green); margin-left: .2em; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="date"], .field textarea {
  width: 100%; min-height: 52px; padding: .8em 1em;
  border: 1.5px solid var(--line); border-radius: var(--radius-s);
  background: var(--white); color: var(--ink); font: inherit; font-size: 1rem;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 128px; resize: vertical; line-height: 1.5; }
.field input:hover, .field textarea:hover { border-color: var(--line-strong); }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-color: var(--ink); }
.field__hint { font-size: .88rem; line-height: 1.45; color: var(--ink-3); }
.choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.choice { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .7rem; padding: .85rem 1rem; border: 1.5px solid var(--line); border-radius: var(--radius-s); cursor: pointer; font-weight: 500; transition: border-color .15s, background-color .15s; }
.choice:hover { border-color: var(--line-strong); }
.choice input { width: 24px; height: 24px; margin: 0; accent-color: var(--green); }
.choice:has(input:checked) { border-color: var(--green); background: var(--mint-light); }
.choice:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.field input[type="file"] { width: 100%; padding: .85em; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-s); background: var(--surface); font: inherit; font-size: .95rem; color: var(--ink-2); cursor: pointer; }
.field input[type="file"]::file-selector-button { margin-right: 1em; padding: .55em 1.15em; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.form__foot { display: grid; gap: 1rem; justify-items: start; }
.form__note { font-size: .9rem; color: var(--ink-3); }
/* asiointipolun alussa: mitä tarvitaan, maksaako ja mitä lähettämisen jälkeen tapahtuu */
.before { display: grid; gap: .6rem; align-self: center; max-width: 880px; padding: clamp(20px, 2.4vw, 30px); border-radius: var(--radius); background: #fff; border: 1px solid var(--line); color: var(--ink); }
.before__h { font-size: 1.15rem; font-weight: 600; line-height: 1.3; letter-spacing: -.015em; }
.before dl { display: grid; margin: 0; }
.before dl > div { display: grid; gap: .15rem 1rem; padding-block: .8rem; border-top: 1px solid var(--line); }
.before dl > div:last-child { padding-bottom: 0; }
@media (min-width: 560px) { .before dl > div { grid-template-columns: 9.5rem minmax(0, 1fr); } }
.before dt { font-weight: 600; line-height: 1.45; }
.before dd { line-height: 1.5; color: var(--ink-2); }
.before a { font-weight: 600; color: var(--ink); text-decoration-color: var(--green-mid); text-decoration-thickness: 2px; text-underline-offset: .25em; }
.before :focus-visible { outline-color: var(--ink); }
.before + .compare { margin-top: clamp(20px, 2.4vw, 32px); }
.formcol { display: grid; gap: 16px; align-content: start; min-width: 0; }

/* vahvistus lähettämisen jälkeen */
.form.is-sent > :not(.form__done) { display: none; }
.form__done { display: grid; justify-items: start; gap: .8rem; }
.form__done[hidden] { display: none; }
.form__done:focus { outline: none; }
.form__done-icon { width: 52px; height: 52px; fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.form__done h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.15; letter-spacing: -.03em; }
.form__done p { max-width: 60ch; color: var(--ink-2); }
.form__done .form__note { color: var(--ink-3); }

/* sivupalkki ja tietokortit */
.aside { display: grid; gap: 16px; align-content: start; }
@media (min-width: 1060px) { .aside { position: sticky; top: calc(var(--header-h) + 24px); } }
.note-card { position: relative; overflow: hidden; display: grid; gap: .5rem; align-content: start; padding: var(--pad-card); border-radius: var(--radius); background: var(--surface); }
.note-card > *:not(.note-card__lark) { position: relative; }
.note-card h3 { font-size: 1.15rem; }
.note-card p, .note-card li { font-size: .97rem; line-height: 1.5; color: var(--ink-2); }
.note-card ul { display: grid; gap: .45rem; margin: .2rem 0 0; padding-left: 1.1em; }
.note-card li::marker { color: var(--green); }
.note-card a:not(.btn) { font-weight: 600; color: var(--ink); text-decoration-color: var(--green-mid); text-decoration-thickness: 2px; text-underline-offset: .3em; }
.note-card--mint { background: var(--mint); }
.note-card--sun { background: var(--sun-light); }
.note-card--line { background: #fff; border: 1px solid var(--line); }
.note-card--green { background: var(--green); color: #fff; }
.note-card--green p, .note-card--green h3 { color: #fff; }
.note-card--green a:not(.btn) { color: #fff; text-decoration-color: var(--mint); }
.note-card__tel { font-size: 1.9rem; font-weight: 600; letter-spacing: -.035em; line-height: 1.1; text-decoration: none; font-variant-numeric: tabular-nums; }
.note-card__lark { position: absolute; width: 190px; right: -40px; top: -16px; fill: #1E6A36; pointer-events: none; }

.info-grid { display: grid; gap: var(--gap-cards); }
@media (min-width: 700px) { .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .info-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .info-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.info-grid .note-card { height: 100%; }

/* iso tosiasia, esim. palovaroittimet */
.fact { display: grid; gap: .6rem; align-content: start; padding: 28px; border-radius: var(--radius); background: var(--green); color: #fff; }
.fact__big { font-size: clamp(3rem, 2rem + 3vw, 4.6rem); font-weight: 700; line-height: .9; letter-spacing: -.05em; }
.fact__big sup { font-size: .45em; letter-spacing: 0; }
.fact p { color: #D2ECDD; }

/* kaksipalstainen tekstiosio */
.duo { display: grid; gap: clamp(32px, 4vw, 64px); align-items: start; }
@media (min-width: 1000px) { .duo { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.duo__text > * + * { margin-top: 1.1rem; }
.duo__text p { color: var(--ink-2); }
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
.chips li { padding: .7rem 1rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 500; text-align: center; }
.chips li.is-office { background: var(--green); border-color: transparent; color: #fff; }

/* vika- ja hätätilanteet */
.sgroup { display: grid; gap: 20px; }
.sgroup + .sgroup { margin-top: clamp(48px, 5vw, 72px); }
.sgroup__head { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 16px; }
/* tilanteen merkki ilman taustalaatikkoa: 112 tekstinä, muut kuvakkeina */
.sgroup__mark { display: grid; place-items: center; min-width: 48px; font-size: 2.5rem; font-weight: 700; line-height: 1; letter-spacing: -.05em; }
.sgroup__mark svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sgroup__head h2 { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.1rem); }
.sgroup__head p { color: var(--ink-3); font-size: .98rem; }
.scards { display: grid; gap: var(--gap-cards); }
@media (min-width: 700px) { .scards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .scards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.scard { display: grid; grid-template-rows: auto 1fr; gap: .9rem; padding: var(--pad-card); border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.scard__when { font-size: 1.1rem; font-weight: 600; line-height: 1.3; letter-spacing: -.015em; }
.scard__who { display: grid; align-content: start; gap: .35rem; font-size: .97rem; line-height: 1.5; color: var(--ink-2); }
.scard__call { font-size: 1.7rem; font-weight: 700; letter-spacing: -.04em; line-height: 1; color: var(--red); }
.scard__who a { font-weight: 600; color: var(--ink); text-decoration-color: var(--green-mid); text-decoration-thickness: 2px; text-underline-offset: .3em; }
.sgroup--hata .sgroup__mark { color: var(--red); }
.sgroup--hata .scard { background: var(--red-light); border-color: transparent; }
.sgroup--kiire .sgroup__mark { color: var(--ink); }
.sgroup--kiire .scard { background: var(--sun-light); border-color: transparent; }
.sgroup--arki .sgroup__mark { color: var(--green); }
.sgroup__note { padding: 1rem 1.2rem; border-radius: var(--radius-s); background: var(--red); color: #fff; font-weight: 600; }

/* muistilista */
.checklist-card { display: grid; gap: 18px; padding: clamp(22px, 3vw, 36px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.checklist__meta { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1rem; font-size: .95rem; color: var(--ink-3); }
.checklist__meta strong { color: var(--ink); }
.progress { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.progress span { display: block; width: var(--p, 0%); height: 100%; background: var(--green-mid); transition: width .3s; }
.checklist { display: grid; gap: var(--gap-list); list-style: none; margin: 0; padding: 0; }
.checklist label { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: .9rem; padding: .9rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius-s); background: #fff; cursor: pointer; transition: background-color .15s, border-color .15s; }
.checklist label:hover { border-color: var(--line-strong); }
.checklist input { appearance: none; -webkit-appearance: none; display: grid; place-items: center; width: 24px; height: 24px; margin: 0; border: 2px solid var(--ink-3); border-radius: 7px; background: #fff; cursor: pointer; transition: background-color .15s, border-color .15s; }
.checklist input:checked { background: var(--green); border-color: var(--green); }
.checklist input:checked::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.checklist input:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.checklist label:has(input:checked) { background: var(--mint-light); border-color: var(--mint); }
.checklist label:has(input:checked) span { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--green-mid); }
.checklist a { font-weight: 600; text-decoration-color: var(--green-mid); text-decoration-thickness: 2px; text-underline-offset: .3em; }

/* artikkeli */
.post { display: grid; gap: clamp(32px, 4vw, 64px); align-items: start; }
@media (min-width: 1060px) { .post { grid-template-columns: 280px minmax(0, 760px); justify-content: center; } }
.toc { display: grid; gap: .8rem; padding: 22px 24px; border-radius: var(--radius); background: var(--surface); }
@media (min-width: 1060px) { .toc { position: sticky; top: calc(var(--header-h) + 24px); } }
.toc h2 { font-size: 1rem; letter-spacing: -.01em; }
.toc ol { display: grid; gap: .55rem; list-style: none; margin: 0; padding: 0; }
.toc a { display: block; color: var(--ink-2); font-size: .95rem; line-height: 1.35; text-decoration: none; }
.toc a:hover { color: var(--green); text-decoration: underline; text-decoration-color: var(--green-mid); }
.prose { min-width: 0; font-size: 1.12rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.15em; }
.prose > p:first-child { font-size: clamp(1.2rem, 1.05rem + .5vw, 1.38rem); line-height: 1.6; color: var(--ink); }
.prose h2 { margin-top: 2.1em; font-size: clamp(1.5rem, 1.2rem + 1vw, 2.05rem); line-height: 1.15; letter-spacing: -.03em; scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h3 { margin-top: 1.6em; font-size: 1.25rem; }
.prose ul, .prose ol { display: grid; gap: .55em; padding-left: 1.3em; }
.prose li::marker { color: var(--green); font-weight: 700; }
.prose a { color: var(--green); font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: .2em; }
.prose strong { font-weight: 650; }
.post-cta { position: relative; overflow: hidden; display: grid; gap: .9rem; margin-top: 2.6em; padding: clamp(26px, 3vw, 40px); border-radius: var(--radius); background: var(--green); color: #fff; }
.post-cta > *:not(.note-card__lark) { position: relative; }
.post-cta h2 { margin: 0; color: #fff; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.post-cta p { color: #D2ECDD; font-size: 1.05rem; }
.post-cta .actions { margin-top: .4rem; align-items: center; color: #D2ECDD; }
.post-cta .actions a:not(.btn) { color: #fff; font-weight: 700; text-decoration-color: var(--mint); }

/* vain ruudunlukijoille */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.todistus-cta { margin-top: 16px; }
.todistus-cta .note-card { padding: clamp(26px, 3vw, 40px); }
.todistus-cta h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); letter-spacing: -.03em; }
.todistus-cta p { max-width: 60ch; }

/* kapealla näytöllä tiiviimpi yläosa */
@media (max-width: 640px) {
  .phero__grid { gap: 28px; }
  .callstack { width: min(320px, 86vw); }
  .callstack__card { padding: 14px 16px; }
  .callstack__big { font-size: 2rem; }
}

/* =========================================================
   Käyttökokemus
   ========================================================= */

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body.nav-open { overflow: hidden; }

/* soittopainike mobiilin ylätunnisteessa */
.header__call, .header__asioi { display: none; }
.header__call svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 1279px) {
  .header__inner { grid-template-columns: auto 1fr auto auto; gap: .6rem; }
  .header__call { grid-column: 3; display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--green); color: #fff; }
  .nav-toggle { grid-column: 4; }
}
/* tabletilla asukkaan reitti näkyy suoraan ylätunnisteessa */
@media (min-width: 700px) and (max-width: 1279px) {
  .header__inner { grid-template-columns: auto 1fr auto auto auto; }
  .header__asioi { grid-column: 3; display: inline-grid; min-height: 46px; padding: .6em 1.15em; }
  .header__call { grid-column: 4; }
  .nav-toggle { grid-column: 5; }
}

/* takaisin ylös */
.totop {
  position: fixed; right: clamp(16px, 2.5vw, 32px); bottom: clamp(16px, 2.5vw, 32px); z-index: 40;
  display: grid; place-items: center; width: 52px; height: 52px;
  border: 0; border-radius: 50%; background: var(--ink); color: #fff; cursor: pointer;
  box-shadow: 0 14px 30px -12px rgba(12, 21, 17, .55);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .25s, transform .25s, background-color .15s;
}
.totop.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.totop:hover { background: var(--green); }
.totop svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* lukemisen edistyminen artikkeleissa */
.readbar { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 4px; pointer-events: none; }
.readbar span { display: block; width: var(--p, 0%); height: 100%; background: var(--green-mid); }
.toc a { padding: .2rem 0 .2rem 12px; border-left: 2px solid var(--line); }
.toc a[aria-current="true"] { border-left-color: var(--green); color: var(--green); font-weight: 600; }

/* lomakkeiden virheet näkyvät vasta, kun kenttään on koskettu */
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-light); }
.field:has(:user-invalid) > label::after { content: "Tarkista tämä kenttä"; display: block; margin-top: .15rem; font-size: .85rem; font-weight: 500; color: var(--red); }

/* =========================================================
   Alasivujen omat osat
   ========================================================= */

.phero { padding-block: clamp(24px, 3vw, 44px) clamp(40px, 4.5vw, 72px); }
.phero h1, .band h1, .formpage h1, .contact-hero h1 { font-size: clamp(2.2rem, 1.3rem + 2.6vw, 3.8rem); }
@media (min-width: 1000px) { .phero__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); } }
.phero__img { overflow: hidden; border-radius: var(--radius); aspect-ratio: 16 / 10; }
.phero__img img { width: 100%; height: 100%; object-fit: cover; }
.phero--text .phero__grid { grid-template-columns: minmax(0, 1fr); }
.phero--text h1 { max-width: 22ch; }

/* värikaista lomakesivujen yläosassa */
.band { padding-block: clamp(32px, 4vw, 60px); }
.band__grid { display: grid; gap: clamp(24px, 4vw, 64px); align-items: center; }
@media (min-width: 1000px) { .band__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); } }
.band .lead { margin-top: 1rem; color: var(--ink-2); }
.band__badge { display: block; width: 48px; margin-bottom: 1rem; }
.band__badge svg { width: 48px; height: 48px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.band--green { background: var(--green); color: #fff; }
.band--green h1 { color: #fff; }
.band--green .lead, .band--green .crumbs, .band--green .crumbs a { color: #D2ECDD; }
.band--mint { background: var(--mint); color: var(--green-dark); }
.band--dark { background: var(--green-dark); color: #E3EDE7; }
.band--dark h1 { color: #fff; }
.band--dark .lead { color: #B5C7BD; }
.band--dark .crumbs, .band--dark .crumbs a { color: #B5C7BD; }
.band--dark .band__badge { color: var(--mint); }

/* kapea lomake keskellä */
.narrow { max-width: 880px; margin-inline: auto; }
.linkcards { display: grid; gap: var(--gap-cards); margin-top: 20px; }
@media (min-width: 700px) { .linkcards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.linkcard { display: grid; gap: .25rem; padding: calc(var(--pad-card) - 4px) var(--pad-card); border-radius: var(--radius); background: #fff; border: 1px solid var(--line); text-decoration: none; transition: border-color .15s, transform .25s; }
.linkcard:hover { border-color: var(--green-mid); transform: translateY(-2px); }
.linkcard strong { font-weight: 600; }
.linkcard span { font-size: .9rem; color: var(--ink-3); }

/* tarjouspyyntö: esittely ja lomake rinnakkain */
.formpage { display: grid; gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (min-width: 1060px) { .formpage { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.formpage__intro { display: grid; align-content: start; gap: 1.2rem; }
.formpage__img { overflow: hidden; border-radius: var(--radius); aspect-ratio: 16 / 10; }
.formpage__img img { width: 100%; height: 100%; object-fit: cover; }
.formpage__contact { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .1rem 1rem; padding: 16px 20px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.formpage__contact svg { grid-row: span 2; width: 30px; height: 30px; stroke: var(--green); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.formpage__contact a { font-size: 1.3rem; font-weight: 600; letter-spacing: -.02em; text-decoration: none; }
.formpage__contact span { font-size: .9rem; color: var(--ink-3); }
.formpage__links { display: grid; gap: .5rem; margin: 0; padding-left: 1.1em; }
.formpage__links a { font-weight: 600; text-decoration-color: var(--green-mid); text-decoration-thickness: 2px; text-underline-offset: .3em; }

/* vastuunjako ja muut vertailut */
.compare { display: grid; gap: var(--gap-cards); }
@media (min-width: 800px) { .compare { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.compare__col { display: grid; align-content: start; gap: .8rem; padding: clamp(22px, 3vw, 36px); border-radius: var(--radius); }
.compare__col h3 { font-size: clamp(1.25rem, 1.05rem + .6vw, 1.5rem); }
.compare__col ul { display: grid; gap: .6rem; margin: 0; padding-left: 1.1em; }
.compare__col li, .compare__col p { line-height: 1.55; }
.compare__col--green { background: var(--green); color: #fff; }
.compare__col--green li::marker { color: var(--mint); }
.compare__col--green a:not(.btn) { color: #fff; text-decoration-color: var(--mint); }
.compare__col--mint { background: var(--mint); color: var(--green-dark); }
.compare__col--mint li::marker { color: var(--green); }
.compare__col--white { background: #fff; border: 1px solid var(--line); }
.compare__col--white li::marker { color: var(--green); }
.compare__col a:not(.btn) { font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: .3em; }
.compare__item + .compare__item { margin-top: .5rem; }
.compare__item h4 { margin: 0 0 .25rem; font-size: 1.05rem; font-weight: 600; }

/* palvelusivun aiherivit */
.rows { display: grid; gap: clamp(36px, 4vw, 64px); }
.row { display: grid; gap: clamp(20px, 3vw, 56px); align-items: center; scroll-margin-top: calc(var(--header-h) + 24px); }
@media (min-width: 900px) {
  .row { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .row:nth-child(even) .row__media { order: 2; }
}
.row__media { overflow: hidden; border-radius: var(--radius); aspect-ratio: 16 / 11; }
.row__media img { width: 100%; height: 100%; object-fit: cover; }
.row__text { display: grid; gap: .8rem; max-width: 54ch; }
.row__text h3 { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.2rem); letter-spacing: -.03em; }
.row__text p { color: var(--ink-2); font-size: 1.08rem; }

/* toimialuepaneeli */
.area { position: relative; overflow: hidden; display: grid; align-content: start; gap: 1.1rem; padding: clamp(24px, 3vw, 40px); border-radius: var(--radius); background: var(--green); color: #fff; }
.area > *:not(.note-card__lark) { position: relative; }
.area h3 { font-size: clamp(1.3rem, 1.05rem + .8vw, 1.7rem); letter-spacing: -.025em; }
.area p { color: #D2ECDD; }
.area .chips li { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); color: #fff; }
.area .chips li.is-office { background: #fff; border-color: transparent; color: var(--green-dark); }

/* tosiasiat palvelusivulla */
.facts-strip { display: grid; gap: var(--gap-cards); margin: 0; }
@media (min-width: 700px) { .facts-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .facts-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.facts-strip > div { display: grid; align-content: start; gap: .4rem; padding: var(--pad-card); border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.facts-strip dt { font-size: .88rem; color: var(--ink-3); }
.facts-strip dd { font-size: 1.2rem; font-weight: 600; line-height: 1.3; letter-spacing: -.02em; }

/* yhteystiedot: numerot yläosassa ja henkilöhakemisto */
.contact-hero { padding-block: clamp(24px, 3vw, 44px) clamp(44px, 5vw, 80px); background: var(--green-dark); color: #E3EDE7; }
.contact-hero h1 { color: #fff; }
.contact-hero .lead { margin-top: 1rem; color: #B5C7BD; }
.contact-hero .crumbs, .contact-hero .crumbs a { color: #B5C7BD; }
.contact-hero__nums { display: grid; gap: 14px; }
@media (min-width: 700px) and (max-width: 999px) { .contact-hero__nums { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.contact-hero__num { display: grid; align-content: start; gap: .25rem; padding: 18px 22px; border-radius: var(--radius); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); }
.contact-hero__num h2 { font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; color: #fff; }
.contact-hero__num p { color: #B5C7BD; font-size: .95rem; }
.contact-hero__num a { color: #fff; text-decoration: none; }
.contact-hero__num .big { font-size: clamp(1.7rem, 1.3rem + 1vw, 2.2rem); font-weight: 600; letter-spacing: -.035em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.contact-hero__num a:hover { text-decoration: underline; text-decoration-color: var(--mint); }

.people-tools { display: grid; gap: 1rem 2rem; align-items: end; margin-bottom: 20px; }
@media (min-width: 800px) { .people-tools { grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); } }
.people-tools h2 { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.3rem); }
.search { position: relative; display: grid; }
.search input { width: 100%; min-height: 52px; padding: .8em 1em .8em 2.9em; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; font: inherit; font-size: 1rem; color: var(--ink); }
.search input:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-color: var(--ink); }
.search svg { position: absolute; left: 1.05em; top: 50%; width: 19px; height: 19px; transform: translateY(-50%); fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.directory { display: grid; gap: var(--gap-list); list-style: none; margin: 0; padding: 0; }
.dir-row {
  display: grid; grid-template-columns: auto minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.3fr); align-items: center; gap: .6rem 1.6rem;
  padding: 14px 22px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line);
}
.dir-row[hidden] { display: none; }
/* henkilörivi käyttää samoja osia kuin henkilökortti, mutta omaa sarakejakoa */
.dir-row > * { grid-area: auto; }
.dir-row .person__name h3 { margin: 0; font-size: 1.1rem; font-weight: 600; line-height: 1.25; letter-spacing: -.02em; }
.dir-row :is(.person__avatar, .person__photo) { width: 52px; height: 52px; }
.dir-row .person__avatar { padding-bottom: 8px; font-size: .95rem; }
.dir-row .person__tel { font-size: 1.15rem; }
@media (max-width: 860px) {
  .dir-row { grid-template-columns: auto minmax(0, 1fr); }
  .dir-row .person__tel, .dir-row .person__mail { grid-column: 2; }
}
.directory__empty { padding: 1.1rem 1.3rem; border-radius: var(--radius); background: var(--surface); color: var(--ink-2); }

.article-banner { overflow: hidden; margin-top: clamp(24px, 3vw, 40px); border-radius: var(--radius); height: clamp(220px, 30vw, 440px); }
.article-banner img { width: 100%; height: 100%; object-fit: cover; }

/* muistilistat rinnakkain ja tarttuva sivuteksti */
.checklist-pair { display: grid; gap: var(--gap-cards); align-items: start; }
@media (min-width: 1000px) { .checklist-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.checklist-card h3 { font-size: clamp(1.25rem, 1.05rem + .6vw, 1.55rem); letter-spacing: -.025em; }
@media (min-width: 1000px) { .duo__text--sticky { position: sticky; top: calc(var(--header-h) + 24px); } }
.photo-note { overflow: hidden; display: grid; grid-template-rows: auto 1fr; border-radius: var(--radius); background: var(--mint); color: var(--green-dark); }
.photo-note img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.photo-note div { display: grid; gap: .5rem; align-content: start; padding: 22px 24px 26px; }
.photo-note h3 { font-size: 1.15rem; }
.photo-note p { font-size: .97rem; line-height: 1.5; }

/* =========================================================
   Liike: harkitut animaatiot, jotka kertovat jotain sisällöstä.
   Vähennetyn liikkeen asetus pysäyttää kaikki (ks. Liike yllä).
   ========================================================= */

/* yläosa: talon muotoinen varjo asettuu paikalleen ja leivonen lentää kuvan viereen */
@keyframes photo-settle { from { transform: scale(1.05); } }
@keyframes shape-settle { from { transform: translate(0, 0); } }
@keyframes lark-in { from { opacity: 0; transform: translate(-80px, 40px) rotate(-12deg); } }
.hero__photo { animation: photo-settle 1.4s cubic-bezier(.2, .7, .2, 1) both; }
.hero__shape { animation: shape-settle 1.1s .2s cubic-bezier(.2, .7, .2, 1) both; }
.hero__lark { animation: lark-in 1.5s .35s cubic-bezier(.2, .7, .2, 1) both; }

/* avainlaput heilahtavat reiästään: hiiren alla ja kun Asioi asukkaana -linkki tuo ne näkyviin */
@keyframes tag-swing {
  18% { transform: rotate(var(--swing)); }
  42% { transform: rotate(calc(var(--swing) * -.7)); }
  66% { transform: rotate(calc(var(--swing) * .35)); }
  100% { transform: rotate(0); }
}
.keys > li { --swing: 3.5deg; transform-origin: 50% 22px; }
.keys > li:hover, .keys.is-ringing > li { animation: tag-swing .95s cubic-bezier(.3, .6, .35, 1); }
.keys.is-ringing > li:nth-child(2) { animation-delay: .07s; }
.keys.is-ringing > li:nth-child(3) { animation-delay: .14s; }
.keys.is-ringing > li:nth-child(4) { animation-delay: .21s; }
.keys.is-ringing > li:nth-child(5) { animation-delay: .28s; }
.keys.is-ringing > li:nth-child(6) { animation-delay: .35s; }
@media (max-width: 599px) { .keys > li { --swing: 1.2deg; transform-origin: 26px 50%; } }

/* korttiryhmät nousevat kerran paikalleen, kun ne tulevat näkyviin */
.js-reveal [data-reveal] > * { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .75s cubic-bezier(.2, .7, .2, 1); }
.js-reveal [data-reveal].is-in > * { opacity: 1; transform: none; }
.js-reveal [data-reveal].is-in > :nth-child(2) { transition-delay: .07s; }
.js-reveal [data-reveal].is-in > :nth-child(3) { transition-delay: .14s; }
.js-reveal [data-reveal].is-in > :nth-child(4) { transition-delay: .21s; }
.js-reveal [data-reveal].is-in > :nth-child(5) { transition-delay: .28s; }
.js-reveal [data-reveal].is-in > :nth-child(6) { transition-delay: .35s; }
.js-reveal [data-reveal].is-in > :nth-child(n + 7) { transition-delay: .42s; }

/* kartta: valtatie piirtyy ja kunnat ja toimistot ilmestyvät sen varrelle */
.alue__map .m-road { stroke-dasharray: var(--len, 2000); }
.js-reveal .alue__map[data-reveal] > * { opacity: 1; transform: none; }
.js-reveal .alue__map[data-reveal] .m-road { stroke-dashoffset: var(--len, 2000); transition: stroke-dashoffset 1.8s cubic-bezier(.45, 0, .2, 1) .2s; }
.js-reveal .alue__map[data-reveal] :is(.m-town, .m-office, .m-shield) { opacity: 0; transform: scale(.6); transform-box: fill-box; transform-origin: center; transition: opacity .45s ease, transform .6s cubic-bezier(.3, 1.5, .5, 1); }
.js-reveal .alue__map[data-reveal].is-in .m-road { stroke-dashoffset: 0; }
.js-reveal .alue__map[data-reveal].is-in :is(.m-town, .m-office, .m-shield) { opacity: 1; transform: none; }

/* lomakkeen vahvistuksen rasti piirtyy */
@keyframes draw-check { from { stroke-dashoffset: 48; } to { stroke-dashoffset: 0; } }
.form__done-icon path { stroke-dasharray: 48; animation: draw-check .6s .15s cubic-bezier(.4, 0, .2, 1) both; }

/* =========================================================
   Alasivujen yläosat: sama korkeus, välit ja otsikkokoko kaikilla sivuilla
   ========================================================= */

.phero:not(.phero--text), .band, .contact-hero { padding-block: clamp(32px, 4vw, 64px); }
.phero__grid, .band__grid, .contact-hero__grid { display: grid; gap: clamp(28px, 4vw, 64px); align-items: center; }
.phero .lead, .band .lead, .contact-hero .lead { margin-top: 1.2rem; }
.phero .actions, .contact-hero .actions { margin-top: 1.8rem; }
@media (min-width: 1000px) {
  .phero__grid, .band__grid, .contact-hero__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); min-height: 440px; }
  .phero__img { aspect-ratio: auto; height: 440px; }
}

/* yläosan sisältö asettuu paikalleen sivun latautuessa.
   Pääotsikko vain liikahtaa eikä häivy, jotta se näkyy heti (sivun latausnopeus). */
@keyframes settle { from { transform: translateY(14px); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
:is(.hero__text, .phero__text, .band__grid > div:first-child, .contact-hero__grid > div:first-child) > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
:is(.hero__text, .phero__text, .band__grid > div:first-child, .contact-hero__grid > div:first-child) > h1 { animation-name: settle; }
:is(.hero__text, .phero__text, .band__grid > div:first-child, .contact-hero__grid > div:first-child) > :nth-child(2) { animation-delay: .06s; }
:is(.hero__text, .phero__text, .band__grid > div:first-child, .contact-hero__grid > div:first-child) > :nth-child(3) { animation-delay: .12s; }
:is(.hero__text, .phero__text, .band__grid > div:first-child, .contact-hero__grid > div:first-child) > :nth-child(4) { animation-delay: .18s; }
:is(.hero__text, .phero__text, .band__grid > div:first-child, .contact-hero__grid > div:first-child) > :nth-child(n + 5) { animation-delay: .24s; }
.phero__img img { animation: photo-settle 1.4s cubic-bezier(.2, .7, .2, 1) both; }
:is(.band__grid > .before, .contact-hero__nums, .callstack) { animation: rise .8s .25s cubic-bezier(.2, .7, .2, 1) both; }
