/* =====================================================================================================================
   v9 shell (WP0): skip link, header (.hd9) and footer (.ft9). Self-contained: its own tokens and resets inside the
   scope, so it is safe on the v9 layout and next to the old public/css/landing.css (which sets a, ul, img and * rules
   globally). Needs public/css/fonts.css (Geologica, Mona Sans). Pinnat look (CLAUDE.md rule 10).
   Contrast: ink #1A2225 on #ECF0EE 14.1:1, on white 16.2:1; text-2 #3B4549 8.6 / 9.8; Kuusi #1F4D47 on the page
   8.3:1; white on Kuusi 9.5:1; focus #0B57B0 on the page 6.1:1.
   ===================================================================================================================== */
.skip9, .hd9, .ft9 {
  --s9-page: #ECF0EE; --s9-sheet: #FFFFFF; --s9-ink: #1A2225; --s9-ink-2: #3B4549; --s9-rule: #DCE4E0;
  --s9-edge: #727E79; --s9-kuusi: #1F4D47; --s9-kuusi-2: #183E39; --s9-kuusi-3: #12302C; --s9-tint: #E0EDE7;
  --s9-focus: #0B57B0; --s9-hover: rgb(26 34 37 / .06);
  --s9-sans: "Geologica", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --s9-disp: "Mona Sans", "Geologica", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --s9-ease: cubic-bezier(.2, .8, .2, 1);
  --s9-sh-btn: 0 1px 0 rgb(255 255 255 / .14) inset, 0 1px 2px rgb(18 48 44 / .28);
  --s9-max: 1312px; --s9-gut: 16px; --s9-h: 64px;
  font-family: var(--s9-sans); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
@media (min-width: 64rem) { .skip9, .hd9, .ft9 { --s9-gut: 40px; --s9-h: 72px; } }
@media (min-width: 82.5rem) { .skip9, .hd9, .ft9 { --s9-gut: 64px; } }
.hd9 *, .hd9 *::before, .hd9 *::after, .ft9 *, .ft9 *::before, .ft9 *::after { box-sizing: border-box; }
:where(.hd9, .ft9) ul { list-style: none; margin: 0; padding: 0; }
:where(.hd9, .ft9) p { margin: 0; }
:where(.hd9, .ft9) svg { display: block; }
:where(.hd9, .ft9) a { color: inherit; -webkit-tap-highlight-color: transparent; }
.hd9 :focus-visible, .ft9 :focus-visible, .skip9:focus-visible { outline: 3px solid var(--s9-focus); outline-offset: 2px; }

/* skip link: the first thing a keyboard reaches */
.skip9 {
  position: fixed; left: 16px; top: 12px; z-index: 100; padding: 12px 18px; border-radius: 12px;
  background: var(--s9-ink); color: #fff; font-size: 17px; font-weight: 600; text-decoration: none;
  transform: translateY(-160%);
}
.skip9:focus, .skip9:focus-visible { transform: none; }

/* ------------------------------------------------------------------------------------------------ header */
.hd9 {
  position: sticky; top: 0; z-index: 40; height: var(--s9-h);
  background: var(--s9-page); color: var(--s9-ink);
  box-shadow: 0 1px 0 rgb(26 34 37 / .08);
}
.hd9__in {
  display: flex; align-items: center; gap: 12px; height: 100%;
  width: 100%; max-width: calc(var(--s9-max) + 2 * var(--s9-gut)); margin: 0 auto; padding: 0 var(--s9-gut);
}
.hd9__logo { display: inline-flex; align-items: center; flex: none; height: 44px; margin-right: auto; padding: 0 2px; border-radius: 8px; }
.hd9__logo svg { width: auto; height: 24px; }
.hd9__nav { display: none; }
.hd9__acts { display: flex; align-items: center; gap: 8px; flex: none; }

.hd9__cta, .hd9__menu, .hd9__lang, .hd9__login, .hd9__link { min-width: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  font-family: var(--s9-sans); font-size: 16px; font-weight: 600; line-height: 1; white-space: nowrap; text-decoration: none;
  border-radius: 12px; transition: transform 120ms var(--s9-ease), background-color 120ms linear, color 120ms linear;
}
.hd9__lang, .hd9__login { display: none; }
.hd9__cta { padding: 0 16px; background: var(--s9-kuusi); color: #fff; box-shadow: var(--s9-sh-btn); }
.hd9__cta:hover { background: var(--s9-kuusi-2); }
.hd9__cta:active, .hd9__menu:active, .hd9__close:active, .hd9__mcta:active, .hd9__mbtn:active { transform: scale(.97); }
.hd9__menu { padding: 0 12px; min-width: 44px; background: var(--s9-sheet); color: var(--s9-ink); box-shadow: inset 0 0 0 1.5px var(--s9-edge); }
.hd9__menu svg { width: 22px; height: 22px; flex: none; }
.hd9__menu-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 22.49rem) { .hd9__cta { display: none; } }
@media (min-width: 26rem) { .hd9__menu { padding: 0 14px 0 12px; } .hd9__menu-t { position: static; width: auto; height: auto; overflow: visible; clip-path: none; } }
@media (min-width: 30rem) { .hd9__logo svg { height: 26px; } .hd9__cta { padding: 0 18px; font-size: 17px; } .hd9__menu { font-size: 17px; } }

/* desktop: the whole nav in the bar from 1200 px (six links since 1.11.2026: Tietoa and Yhteystiedot are back; they
   overflowed the bar below 1200 px, so narrower screens get the menu button, which lists every link) */
@media (min-width: 75rem) {
  .hd9__in { gap: 8px; }
  .hd9__logo { margin-right: 28px; }
  .hd9__logo svg { height: 28px; }
  .hd9__nav { display: block; margin-right: auto; }
  .hd9__list { display: flex; align-items: center; gap: 2px; }
  .hd9__link { padding: 0 12px; font-size: 17px; font-weight: 500; color: var(--s9-ink); }
  .hd9__link:hover { background: var(--s9-hover); }
  .hd9__link[aria-current] { color: var(--s9-kuusi); font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 9px; }
  .hd9__lang, .hd9__login { display: inline-flex; padding: 0 12px; font-size: 17px; font-weight: 500; color: var(--s9-ink); }
  .hd9__lang:hover, .hd9__login:hover { background: var(--s9-hover); }
  .hd9__cta { margin-left: 8px; min-height: 48px; padding: 0 22px; font-size: 17px; }
  .hd9__menu { display: none; }
}
@media (min-width: 75rem) and (max-width: 79.99rem) {
  .hd9__logo { margin-right: 16px; }
  .hd9__link, .hd9__lang, .hd9__login { padding: 0 10px; font-size: 16px; }
  .hd9__cta { padding: 0 18px; font-size: 16px; }
}

/* the menu (below 1200 px): a full-screen modal sheet in the top layer */
.hd9__dlg {
  position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--s9-page); color: var(--s9-ink); overflow-y: auto; overscroll-behavior: contain;
}
.hd9__dlg:not([open]) { display: none; }
.hd9__dlg::backdrop { background: var(--s9-page); }
.hd9__dlg[open] { display: flex; flex-direction: column; opacity: 1; transform: none; transition: opacity 180ms var(--s9-ease), transform 180ms var(--s9-ease); }
@starting-style { .hd9__dlg[open] { opacity: .35; transform: translateY(-8px); } }
.hd9__top {
  display: flex; align-items: center; gap: 12px; flex: none; height: var(--s9-h);
  width: 100%; max-width: calc(var(--s9-max) + 2 * var(--s9-gut)); margin: 0 auto; padding: 0 var(--s9-gut);
  box-shadow: 0 1px 0 rgb(26 34 37 / .08);
}
.hd9__close {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 14px 0 12px; border: 0; border-radius: 12px;
  background: var(--s9-sheet); color: var(--s9-ink); box-shadow: inset 0 0 0 1.5px var(--s9-edge);
  font: 600 17px/1 var(--s9-sans); cursor: pointer; transition: transform 120ms var(--s9-ease);
}
.hd9__close svg { width: 22px; height: 22px; flex: none; }
.hd9__sheet {
  flex: 1 0 auto; display: flex; flex-direction: column; gap: 24px;
  width: 100%; max-width: calc(40rem + 2 * var(--s9-gut)); margin: 0 auto; padding: 16px var(--s9-gut) max(24px, env(safe-area-inset-bottom));
}
.hd9__mlist { background: var(--s9-sheet); border-radius: 24px; padding: 8px 20px; box-shadow: 0 0 0 1px rgb(26 34 37 / .07), 0 1px 2px rgb(26 34 37 / .07), 0 10px 28px -10px rgb(26 34 37 / .18); }
.hd9__mlist li + li { border-top: 1px solid var(--s9-rule); }
.hd9__mlink {
  display: flex; align-items: center; justify-content: space-between; min-height: 64px;
  font-family: var(--s9-disp); font-stretch: 105%; font-size: 24px; font-weight: 700; letter-spacing: -.01em; text-decoration: none; color: var(--s9-ink);
}
.hd9__mlink::after {
  content: ""; width: 10px; height: 10px; margin-right: 6px; flex: none;
  border-top: 2.5px solid currentColor; border-right: 2.5px solid currentColor; transform: rotate(45deg); opacity: .55;
}
.hd9__mlink[aria-current] { color: var(--s9-kuusi); }
.hd9__mlink[aria-current]::after { opacity: 1; }
.hd9__mfoot { display: flex; flex-direction: column; gap: 12px; margin-top: auto; }
@media (min-width: 48rem) { .hd9__mfoot { margin-top: 8px; } }
.hd9__mcta, .hd9__mbtn {
  display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 20px; border-radius: 12px;
  font: 600 18px/1 var(--s9-sans); text-decoration: none; transition: transform 120ms var(--s9-ease);
}
.hd9__mcta { background: var(--s9-kuusi); color: #fff; box-shadow: var(--s9-sh-btn); }
.hd9__mrow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hd9__mbtn { background: var(--s9-sheet); color: var(--s9-ink); box-shadow: inset 0 0 0 1.5px var(--s9-edge); }
html:has(.hd9__dlg[open]) { overflow: hidden; }
@media (min-width: 75rem) { .hd9__dlg { display: none !important; } }

/* ------------------------------------------------------------------------------------------------ footer */
.ft9 { background: var(--s9-page); color: var(--s9-ink); border-top: 1px solid var(--s9-rule); }
.ft9__in {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px;
  width: 100%; max-width: calc(var(--s9-max) + 2 * var(--s9-gut)); margin: 0 auto; padding: 56px var(--s9-gut) max(40px, env(safe-area-inset-bottom));
}
.ft9__logo { display: inline-flex; align-items: center; min-height: 44px; padding: 4px 0; border-radius: 8px; }
.ft9__logo svg { width: auto; height: 32px; }
.ft9__tag { margin-top: 14px; max-width: 22em; font-size: 18px; line-height: 1.5; color: var(--s9-ink-2); }
.ft9__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; outline: none; }
.ft9__h { margin-bottom: 8px; font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--s9-ink-2); }
.ft9__ul li { display: flex; flex-direction: column; }
.ft9__a {
  display: inline-flex; align-items: center; align-self: flex-start; min-height: 44px;
  font-size: 17px; font-weight: 500; line-height: 1.3; text-decoration: none; color: var(--s9-ink); border-radius: 6px;
}
.ft9__a:hover { color: var(--s9-kuusi); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.ft9__a[aria-current] { color: var(--s9-kuusi); font-weight: 600; }
.ft9__n { margin-top: -6px; padding-bottom: 6px; font-size: 16px; line-height: 1.4; color: var(--s9-ink-2); }
.ft9__base {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px;
  padding-top: 24px; border-top: 1px solid var(--s9-rule); font-size: 16px; line-height: 1.5; color: var(--s9-ink-2);
}
.ft9__legal { display: flex; flex-direction: column; gap: 4px; }
.ft9__mail, .ft9__lang a { display: inline-flex; align-items: center; min-height: 44px; color: var(--s9-ink); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.ft9__legal p { display: flex; flex-wrap: wrap; align-items: center; column-gap: .35em; }
.ft9__lang { display: flex; align-items: center; gap: 10px; }
.ft9__lang a[aria-current] { font-weight: 600; text-decoration: none; }
@media (min-width: 48rem) {
  .ft9__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 64rem) {
  .ft9__in { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: 32px; row-gap: 56px; padding-top: 72px; }
  .ft9__base { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .hd9 *, .ft9 *, .hd9__dlg { transition: none !important; }
}
html.rm .hd9 *, html.rm .ft9 *, html.rm .hd9__dlg { transition: none !important; }
