/* riinailmola.fi – one stylesheet for the whole site.
   Tokens first; see CLAUDE.md for where each colour may be used.
   Values follow the design canvas (desktop 1440 px, phone 390 px). */

/* ---------- Fonts (self-hosted, SIL OFL; licences in /assets/fonts/) ----------
   Literata files keep the optical-size (opsz) axis, so headings get the
   display cut automatically, as on the canvas. Latin + latin-ext subsets. */
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-variable.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --plum: #5B183B;
  --plum-hover: #45112C;
  --offwhite: #FAF7F2;
  --white: #FFFFFF;
  --bluegrey: #738A99;        /* shapes and panels only, never text */
  --bluegrey-dark: #4E6170;   /* small labels, meta text, icons */
  --bluegrey-light: #E2E7E8;  /* one light band per page */
  --rose: #E7C5C9;            /* small details only */
  --text: #343238;
  --rule: #D9DFE1;            /* thin dividers on off-white */
  --header-rule: #C7D0D6;     /* header bottom line (canvas "Header v2") */
  --field-border: #84929B;    /* form field borders (canvas contact form, 3.2:1) */
  --on-plum: #FAF7F2;
  --on-plum-muted: #E3D3DA;
  --on-plum-rule: rgba(250, 247, 242, 0.22);

  --font-serif: "Literata", Georgia, "Times New Roman", serif;
  --font-sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --page-max: 1440px;
  --gutter: 120px;            /* side padding on desktop */
  --section-space: 120px;     /* vertical rhythm on desktop */
  --col-gap: 24px;
  --radius: 4px;

  /* Header v2: 88 px, compacts to 64 px on scroll; name 28 → 24 px */
  --header-h: 88px;
  --header-h-compact: 64px;
  --header-name: 28px;
  --header-name-compact: 24px;
}

@media (max-width: 1279px) {
  :root { --gutter: 64px; }
}

/* Phone header values (68 → 56 px, name 24 → 21 px) are used wherever the
   menu collapses behind the button. */
@media (max-width: 1120px) {
  :root {
    --header-h: 68px;
    --header-h-compact: 56px;
    --header-name: 24px;
    --header-name-compact: 21px;
  }
}

@media (max-width: 900px) {
  :root {
    --gutter: 24px;
    --section-space: 72px;
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--offwhite);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex-shrink: 0; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--plum); }
a:hover { color: var(--plum-hover); }

:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 2px;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--plum);
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

strong, b { font-weight: 600; }

ul { margin: 0; padding: 0; list-style: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--plum);
  color: var(--on-plum);
  font-weight: 600;
  border-radius: var(--radius);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; color: var(--on-plum); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

/* 12-column grid; stacks into one column on phones */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
}

@media (max-width: 900px) {
  .grid {
    display: flex;
    flex-direction: column;
    gap: var(--grid-stack-gap, 40px);
  }
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap, 24px);
}

.stack--16 { --stack-gap: 16px; }

.divider {
  width: calc(100% - 2 * var(--gutter));
  max-width: calc(var(--page-max) - 2 * 120px);
  height: 1px;
  margin: 0 auto;
  border: 0;
  background: var(--rule);
}

.band-light { background: var(--bluegrey-light); }

/* ---------- Type ---------- */
/* Small uppercase label with the short plum line before it (calm rule 6) */
.label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bluegrey-dark);
}
.label::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--plum);
  flex-shrink: 0;
}

.h1 {
  font-size: clamp(50px, 37.4px + 3.24vw, 84px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.h2 {
  font-size: clamp(32px, 27.5px + 1.14vw, 44px);
  line-height: 1.14;
  letter-spacing: -0.01em;
}

.h2--large {
  font-size: clamp(36px, 28.6px + 1.9vw, 56px);
}

/* Serif subtitle under a heading (book subtitle, Minusta title line) */
.serif-sub {
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1.3;
  color: var(--text);
}
.serif-sub--l { font-size: 28px; }

/* Page H1 sizes for the inner pages (desktop → phone) */
.h1--xl { font-size: clamp(46px, 34.9px + 2.86vw, 76px); line-height: 1.06; letter-spacing: -0.015em; }
.h1--l  { font-size: clamp(40px, 31.1px + 2.29vw, 64px); line-height: 1.06; letter-spacing: -0.015em; }
.h1--m  { font-size: clamp(38px, 30.6px + 1.9vw, 58px);  line-height: 1.08; letter-spacing: -0.015em; }
.h1--m.h1--60 { font-size: clamp(40px, 32.6px + 1.9vw, 60px); }

.h2--s { font-size: clamp(28px, 25px + 0.76vw, 36px); line-height: 1.2; }
.h2--m { font-size: clamp(30px, 26.3px + 0.95vw, 40px); line-height: 1.16; }
.h3-card { font-size: 26px; line-height: 1.25; }

/* The one italic serif highlight line per page (calm rule 3) */
.highlight {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 30px;
  line-height: 1.3;
  color: var(--plum);
  text-wrap: balance;
}

.lead { font-size: 21px; line-height: 1.55; }
.body-l { font-size: 19px; }
.body-m { font-size: 18px; }

.meta {
  font-size: 16px;
  font-weight: 600;
  color: var(--bluegrey-dark);
}

@media (max-width: 900px) {
  .label { font-size: 13px; }
  .h2 { line-height: 1.16; }
  .highlight { font-size: 24px; }
  .serif-sub { font-size: 21px; }
  .serif-sub--l { font-size: 22px; }
  .h3-card { font-size: 23px; }
  .lead { font-size: 18px; }
  .body-l, .body-m { font-size: 17px; }
  .meta { font-size: 15px; }
}

/* ---------- Buttons and links ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 30px;
  border: 1.5px solid var(--plum);
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 600;
  font-size: 17px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  background: var(--plum);
  color: var(--white);
  cursor: pointer;
}
.button:hover { background: var(--plum-hover); border-color: var(--plum-hover); color: var(--white); }

/* Second-level button (outline), e.g. "Tutustu kirjaan" */
.button--outline { background: transparent; color: var(--plum); }
.button--outline:hover { background: var(--plum); border-color: var(--plum); color: var(--white); }

/* Button on the plum band */
.button--light { background: var(--offwhite); border-color: var(--offwhite); color: var(--plum); }
.button--light:hover { background: var(--rose); border-color: var(--rose); color: var(--plum); }

.text-link {
  display: inline-block;
  padding: 10px 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 6px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
}

@media (max-width: 900px) {
  .button { min-height: 52px; padding: 0 24px; font-size: 16px; }
  .text-link { font-size: 16px; }
  .actions--stack-sm { flex-direction: column; align-items: stretch; text-align: center; gap: 8px; }
  .actions--stack-sm .text-link { align-self: center; }
  .button--block-sm { width: 100%; }
}

/* Text link on the plum band */
.text-link--light { color: var(--on-plum); }
.text-link--light:hover { color: var(--rose); }

/* Book pill (rose detail) */
.pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--rose);
  color: var(--plum);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}
.pill em {
  font-family: var(--font-serif);
  font-weight: 400;
}

.pill--static { min-height: 0; padding: 8px 14px; }

@media (max-width: 900px) {
  .pill { padding: 6px 14px; font-size: 14px; }
  .pill__long { display: none; }
}

/* ---------- Header (canvas "Header v2") ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 247, 242, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--header-rule);
  transition: margin-bottom 0.25s ease;
}

.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
  transition: height 0.25s ease;
}

.site-name {
  font-family: var(--font-serif);
  font-size: var(--header-name);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--plum);
  text-decoration: none;
  transition: font-size 0.25s ease;
}
.site-name:hover { color: var(--plum-hover); }

/* Compact state while scrolled. The margin keeps the page from jumping
   up by the height the header loses. */
.site-header.is-compact { margin-bottom: calc(var(--header-h) - var(--header-h-compact)); }
.site-header.is-compact .site-header__row { height: var(--header-h-compact); }
.site-header.is-compact .site-name { font-size: var(--header-name-compact); }

.site-nav { height: 100%; }

.nav-list {
  display: flex;
  align-items: stretch;
  gap: 40px;
  height: 100%;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  font-size: 17.5px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-text {
  position: relative;
  display: inline-block;
}
/* 3 px line exactly as wide as the text; draws in from the left on hover */
.nav-text::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 3px;
  background: var(--plum);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link[aria-current="page"],
.nav-item.is-section > .nav-link { color: var(--plum); }

.nav-link:hover .nav-text::after,
.nav-link:focus-visible .nav-text::after,
.nav-link[aria-current="page"] .nav-text::after,
.nav-item.is-section > .nav-link .nav-text::after { transform: scaleX(1); }

.nav-chevron { flex-shrink: 0; }

.sub-nav {
  display: none;
  position: absolute;
  top: calc(100% - 12px);
  left: -20px;
  min-width: 240px;
  padding: 8px 0;
  background: var(--white);
  border: 1px solid var(--bluegrey-light);
  border-radius: var(--radius);
  box-shadow: 0 16px 32px -20px rgba(52, 50, 56, 0.35);
}
.has-sub:hover .sub-nav,
.has-sub:focus-within .sub-nav { display: block; }

.sub-nav a {
  display: block;
  padding: 12px 20px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--text);
  text-decoration: none;
}
.sub-nav a:hover,
.sub-nav a:focus-visible,
.sub-nav a[aria-current="page"] {
  color: var(--plum);
  background: var(--offwhite);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-right: -8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--plum);
  cursor: pointer;
}
.menu-toggle .icon-close { display: none; }
.site-header.is-open .menu-toggle .icon-open { display: none; }
.site-header.is-open .menu-toggle .icon-close { display: block; }

/* Collapsed menu: the button opens a panel under the header */
@media (max-width: 1120px) {
  .menu-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    height: auto;
    overflow-y: auto;
    background: var(--offwhite);
    border-bottom: 1px solid var(--header-rule);
    box-shadow: 0 24px 32px -24px rgba(52, 50, 56, 0.25);
  }
  .site-header.is-open .site-nav { display: block; }

  .nav-list {
    display: block;
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 12px var(--gutter) 32px;
  }
  .nav-item { display: block; }
  .nav-link {
    display: flex;
    min-height: 52px;
    padding: 12px 0;
    font-size: 20px;
  }
  .nav-text::after { bottom: -4px; }
  .nav-chevron { display: none; }

  .sub-nav {
    display: block;
    position: static;
    min-width: 0;
    margin: 0 0 8px;
    padding: 0 0 0 16px;
    background: none;
    border: 0;
    border-left: 2px solid var(--bluegrey-light);
    border-radius: 0;
    box-shadow: none;
  }
  .sub-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 0;
    font-size: 17px;
  }
  .sub-nav a:hover,
  .sub-nav a:focus-visible,
  .sub-nav a[aria-current="page"] { background: none; }
  .sub-nav a[aria-current="page"] { font-weight: 600; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .site-header__row,
  .site-name,
  .nav-link,
  .nav-text::after { transition: none !important; }
}

/* ---------- Plum band: closing call to action + footer ---------- */
.band-plum {
  flex-grow: 1;
  background: var(--plum);
  color: var(--on-plum);
}
.band-plum :focus-visible { outline-color: var(--on-plum); }

.closing { padding-top: var(--section-space); }
.closing__inner { max-width: 860px; }
.closing .label { color: var(--on-plum-muted); }
.closing .label::before { background: var(--rose); }
.closing h2 {
  color: var(--on-plum);
  font-size: clamp(32px, 24.6px + 1.9vw, 52px);
}
.closing__text {
  max-width: 640px;
  font-size: 20px;
  color: var(--on-plum-muted);
}
.closing .actions { padding-top: 8px; }
.closing--m h2 { font-size: clamp(30px, 24.3px + 1.71vw, 48px); line-height: 1.16; }
.closing--s h2 { font-size: clamp(28px, 22.1px + 1.52vw, 44px); line-height: 1.18; }
.closing__text--wide { max-width: 680px; }
.closing__note { font-size: 16px; line-height: 1.5; color: var(--on-plum-muted); }
.actions--spaced { padding-top: 8px; }
.actions--column { flex-direction: column; align-items: flex-start; gap: 16px; }

@media (max-width: 900px) {
  .closing__text { font-size: 18px; }
}

.site-footer {
  padding: var(--section-space) 0 48px;
  font-size: 16px;
  line-height: 1.5;
}

.band-plum--solo .site-footer { padding-top: 80px; }
.band-plum--solo .site-footer__inner { padding-top: 0; border-top: 0; }

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 64px;
  padding-top: 64px;
  border-top: 1px solid var(--on-plum-rule);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto 1fr;
  column-gap: var(--col-gap);
}
.footer-brand   { grid-column: 1 / span 4; grid-row: 1; }
.footer-follow  { grid-column: 1 / span 4; grid-row: 2; margin-top: 32px; }
.footer-col--yrityksille { grid-column: 6 / span 2; grid-row: 1 / span 2; }
.footer-col--tutustu     { grid-column: 8 / span 2; grid-row: 1 / span 2; }
.footer-col--yritys      { grid-column: 10 / span 3; grid-row: 1 / span 2; }

.footer-name {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--on-plum);
  text-decoration: none;
}

.footer-tagline {
  display: flex;
  flex-direction: column;
  max-width: 320px;
  margin-top: 12px;
  color: var(--on-plum-muted);
}

.footer-heading {
  margin: 0 0 16px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-plum-muted);
}
.footer-follow .footer-heading { margin-bottom: 10px; }

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer a { color: var(--on-plum); text-decoration: none; }
.site-footer a:hover { color: var(--rose); }

.footer-copy { font-size: 14px; color: var(--on-plum-muted); }

@media (max-width: 1279px) {
  .footer-brand,
  .footer-follow { grid-column: 1 / span 3; }
  .footer-col--yrityksille { grid-column: 4 / span 3; }
  .footer-col--tutustu     { grid-column: 7 / span 3; }
}

@media (max-width: 900px) {
  .site-footer { padding-bottom: 40px; }
  .band-plum--solo .site-footer { padding-top: 56px; }
  .site-footer__inner { gap: 40px; padding-top: 48px; }
  .footer-grid { display: flex; flex-direction: column; gap: 40px; }
  .footer-follow { margin-top: 0; }
  .footer-heading,
  .footer-follow .footer-heading { margin-bottom: 8px; }
  .footer-list { gap: 0; }
  .footer-list > li > * { display: block; padding: 10px 0; }
  .footer-follow .footer-list a { display: block; padding: 10px 0; }
}

/* =====================================================================
   Page sections
   ===================================================================== */

/* ---------- Homepage: hero ---------- */
.hero { padding: 88px 0 var(--section-space); }

.hero__text {
  grid-column: 1 / span 6;
  align-self: center;
  --stack-gap: 28px;
}
.hero__text .lead { max-width: 560px; }
.hero__text .actions { padding-top: 12px; }

.hero__media {
  grid-column: 8 / span 5;
  position: relative;
  padding-bottom: 64px;
}
/* The one blue-grey shape behind the hero photo (calm rule 4) */
.hero__media::before {
  content: "";
  position: absolute;
  left: 21%;
  right: calc(-1 * var(--gutter));
  top: 200px;
  bottom: 0;
  background: var(--bluegrey);
}
.hero__media img {
  position: relative;
  width: 100%;
  max-width: 486px;
  aspect-ratio: 486 / 600;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: var(--radius);
}

@media (max-width: 900px) {
  .hero { padding-top: 40px; }
  .hero__text { --stack-gap: 24px; }
  .hero__text .actions { padding-top: 8px; }
  .hero__media { padding-bottom: 40px; max-width: 486px; }
  .hero__media::before { left: 56px; top: 120px; }
  .hero__media img { aspect-ratio: 342 / 400; }
}

/* ---------- Homepage: services band ---------- */
.services {
  display: flex;
  flex-direction: column;
  gap: 64px;
}
.services__head { grid-column: 1 / span 6; --stack-gap: 20px; }
.services__lead { grid-column: 8 / span 5; align-self: end; --stack-gap: 16px; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.cards-wrap { display: flex; flex-direction: column; gap: 24px; }
.cards__item { display: flex; }
.cards__item > .card { flex: 1 1 auto; }

.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 40px;
  background: var(--white);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
}
.card:hover { color: var(--text); box-shadow: 0 0 0 1.5px var(--plum); }

.card__kicker {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bluegrey-dark);
}

.card__title {
  font-size: 30px;
  line-height: 1.2;
}

.card__text {
  flex-grow: 1;
  font-size: 18px;
}

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--bluegrey-light);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}
.card__meta { color: var(--bluegrey-dark); white-space: nowrap; }
.card__more { color: var(--plum); }

/* Wide card for Yksilövalmennus under the three company cards */
.card--wide {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  align-items: center;
}
.card--wide .card__label { grid-column: 1 / span 3; display: flex; flex-direction: column; gap: 8px; }
.card--wide .card__label .card__meta { font-size: 16px; font-weight: 600; line-height: 1.4; }
.card--wide .card__title { grid-column: 4 / span 6; font-size: 26px; line-height: 1.3; }
.card--wide .card__more { grid-column: 10 / span 3; justify-self: end; font-size: 16px; font-weight: 600; line-height: 1.4; text-align: right; }

@media (max-width: 1279px) {
  .card { padding: 32px; }
  .card__title { font-size: 26px; }
}

@media (max-width: 900px) {
  .services { gap: 40px; }
  .services__intro { --grid-stack-gap: 16px; }
  .services__head { --stack-gap: 16px; }
  .cards-wrap,
  .cards { gap: 16px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card { gap: 12px; padding: 28px; }
  .card__kicker { font-size: 12px; }
  .card__title { font-size: 25px; }
  .card__text { font-size: 17px; }
  .card__foot { margin-top: 8px; padding-top: 16px; font-size: 15px; }

  .card--wide { display: flex; }
  .card--wide .card__label { flex-direction: row; flex-wrap: wrap; gap: 0; }
  .card--wide .card__label .card__meta { font-size: inherit; }
  .card--wide .card__label .card__meta::before { content: "\00a0·\00a0"; }
  .card--wide .card__title { font-size: 23px; }
  .card--wide .card__more {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--bluegrey-light);
    font-size: 15px;
  }
}

/* ---------- Homepage: book ---------- */
.book__cover { grid-column: 1 / span 4; }
.book__cover img {
  width: 100%;
  max-width: 384px;
  aspect-ratio: 442 / 640;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 28px 56px -28px rgba(52, 50, 56, 0.35);
}
.book__text { grid-column: 6 / span 6; align-self: center; }
.book__title { display: flex; flex-direction: column; gap: 12px; }

.book__text .body-m { max-width: 600px; }
.book__text .actions { padding-top: 8px; }

@media (max-width: 900px) {
  .book__cover img { max-width: 220px; }
  .book__text { --stack-gap: 20px; }
  .book__title { gap: 10px; }
  .book__text .actions { padding-top: 4px; }
}

/* ---------- Homepage: short Minusta section ---------- */
.about__media { grid-column: 1 / span 5; }
.about__media img {
  width: 100%;
  max-width: 486px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
}
.about__text { grid-column: 7 / span 6; align-self: center; }
.about__text .text-link { align-self: flex-start; }

@media (max-width: 900px) {
  .about__media img { max-width: none; }
}

/* =====================================================================
   Inner pages
   ===================================================================== */

/* Column placements on the 12-column grid */
.col-main  { grid-column: 1 / span 7; }
.col-wide  { grid-column: 1 / span 9; }
.col-aside { grid-column: 9 / span 4; align-self: start; padding-top: 52px; }
.col-head  { grid-column: 1 / span 5; --stack-gap: 20px; }
.col-body  { grid-column: 7 / span 6; }
.col-body--tight { --stack-gap: 20px; }

.page-hero .stack { --stack-gap: 28px; }
.page-hero .lead,
.page-hero .body-l { max-width: 640px; }
.page-hero--tall { padding-top: var(--section-space); }
.actions--hero { padding-top: 12px; }
.page-hero .legal-head { --stack-gap: 24px; }

/* Breadcrumb inside the label on the service pages */
.label a { display: inline-block; margin: -12px 0; padding: 12px 0; color: inherit; text-decoration: none; }
.label a:hover { color: var(--plum); text-decoration: underline; text-underline-offset: 4px; }
.label__sep { margin: 0 -4px; }

@media (max-width: 900px) {
  .col-aside { padding-top: 0; }
  .page-hero .stack { --stack-gap: 24px; }
}

/* Key facts box (service pages, Yksilövalmennus) */
.facts {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 36px;
  background: var(--white);
  border: 1px solid var(--bluegrey-light);
  border-radius: var(--radius);
}
.facts .button { width: 100%; }

.dl-rows { margin: 0; display: flex; flex-direction: column; }
.dl-rows > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
}
.dl-rows > div:last-child { border-bottom: 1px solid var(--rule); }
.dl-rows dt {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bluegrey-dark);
}
.dl-rows dd { margin: 0; font-size: 18px; line-height: 1.5; }
.dl-rows dd a { font-weight: 600; text-underline-offset: 4px; }
.dl-rows--s dd { font-size: 17px; line-height: 1.55; }
.price { display: flex; flex-direction: column; gap: 2px; }
.price__net { font-weight: 600; }
.price__gross { font-size: 15px; color: var(--bluegrey-dark); }

@media (max-width: 900px) {
  .facts { padding: 28px; gap: 24px; }
}

/* Bulleted list in body text */
.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 22px;
  list-style: disc;
  font-size: 19px;
  line-height: 1.55;
}
.list li { padding-left: 6px; }
.list li::marker { color: var(--plum); }

/* Ruled list (Minusta: Koulutus ja tausta) */
.rows-list li {
  padding: 18px 0;
  border-top: 1px solid var(--rule);
  font-size: 19px;
  line-height: 1.5;
}
.rows-list li:last-child { border-bottom: 1px solid var(--rule); }

@media (max-width: 900px) {
  .list, .rows-list li { font-size: 17px; }
  .rows-list li { padding: 14px 0; }
}

/* Heading block on a band (label + heading, no grid split) */
.band-head { max-width: 760px; --stack-gap: 20px; }
.band-stack { display: flex; flex-direction: column; gap: 64px; }

@media (max-width: 900px) {
  .band-head { --stack-gap: 16px; }
  .band-stack { gap: 40px; }
}

/* Yrityksille: service cards with the full description.
   Each card is body + foot. The foot is always two lines at every width,
   phones included (duration, then the link), because "Tutustu
   kehittämisprosesseihin →" doesn't fit beside its duration. With subgrid the three cards share their row heights, so the foot
   line sits at the same height in every card even where the link wraps. */
.cards--detail .card,
.cards--detail .card__body { gap: 16px; }
.cards--detail .card__body { display: flex; flex-direction: column; flex: 1 1 auto; }
.cards--detail .card__title { font-size: 28px; }
.cards--detail .card__text { flex-grow: 0; font-size: 17px; }
.cards--detail .card__slogan { flex-grow: 1; font-size: 17px; font-weight: 600; }
.cards--detail .card__foot { margin-top: 0; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 4px; }

@supports (grid-template-rows: subgrid) {
  .cards--detail .cards__item {
    display: grid;
    grid-row: span 2;
    grid-template-rows: subgrid;
    row-gap: 0;
  }
  .cards--detail .card {
    display: grid;
    grid-row: span 2;
    grid-template-rows: subgrid;
  }
}

@media (max-width: 1279px) {
  .cards--detail .card__title { font-size: 25px; }
}
@media (max-width: 900px) {
  .cards--detail .card,
  .cards--detail .card__body { gap: 12px; }
}

/* Kirja: topic cards */
.topics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.topic {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 36px;
  background: var(--white);
  border-radius: var(--radius);
}
.topic h3 { font-size: 24px; line-height: 1.25; }
.topic p { font-size: 17px; }

@media (max-width: 1120px) {
  .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .topics { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .topic { padding: 28px; }
  .topic h3 { font-size: 22px; }
}

/* Kirja: hero */
.book-hero__cover { grid-column: 1 / span 5; }
.book-hero__cover img {
  width: 100%;
  max-width: 432px;
  aspect-ratio: 442 / 640;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 28px 56px -28px rgba(52, 50, 56, 0.35);
}
.book-hero__text { grid-column: 7 / span 6; align-self: center; }
.book-hero__title { display: flex; flex-direction: column; gap: 14px; }
.book-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.book-hero .highlight { font-size: 28px; }
.book-hero .actions { padding-top: 4px; }

@media (max-width: 900px) {
  .book-hero__cover img { max-width: 260px; }
  .book-hero__title { gap: 10px; }
  .book-hero .highlight { font-size: 24px; }
}

/* Minusta: hero */
.about-hero__text { grid-column: 1 / span 6; align-self: center; }
.about-hero__media { grid-column: 8 / span 5; }
.about-hero__media img {
  width: 100%;
  max-width: 486px;
  aspect-ratio: 486 / 620;
  object-fit: cover;
  object-position: 50% 25%;
  border-radius: var(--radius);
}
.highlight--h2 { font-size: clamp(28px, 24px + 1.14vw, 40px); line-height: 1.22; }
.inline-book { font-style: italic; text-underline-offset: 4px; }

/* Ota yhteyttä */
.contact-aside { grid-column: 9 / span 4; --stack-gap: 40px; }
.contact-aside img {
  width: 100%;
  max-width: 384px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
}

@media (max-width: 900px) {
  .contact-aside { --stack-gap: 32px; }
}

.form-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 20px;
  padding: 48px;
  background: var(--white);
  border: 1px solid var(--bluegrey-light);
  border-radius: var(--radius);
}
.form-card h2 { font-size: 26px; line-height: 1.25; }

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 15px; font-weight: 600; line-height: 1.4; }
.field__req { color: var(--plum); }
.field__opt { font-weight: 400; font-style: italic; color: var(--bluegrey-dark); }

.field input,
.field textarea {
  width: 100%;
  margin: 0;
  padding: 0 16px;
  border: 1px solid var(--field-border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
}
.field input { height: 52px; }
.field textarea {
  min-height: 168px;
  padding: 14px 16px;
  line-height: 1.5;
  resize: vertical;
}
.field input:focus,
.field textarea:focus { outline: 2px solid var(--plum); outline-offset: 1px; }
.field textarea::placeholder { color: var(--bluegrey-dark); opacity: 1; }

/* Honeypot: off-screen for people, present for bots */
.form-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 8px;
}
.form-foot .button { flex-shrink: 0; }
.form-privacy {
  max-width: 380px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--bluegrey-dark);
}
.form-privacy a { font-weight: 600; text-underline-offset: 3px; }

/* Error messages from lomake.php: the redirect adds #virhe-…, :target shows it */
.form-error {
  display: none;
  padding: 14px 18px;
  border: 1.5px solid var(--plum);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--plum);
  font-weight: 600;
  scroll-margin-top: 120px;
}
.form-error:target { display: block; }
.form-error:focus { outline: none; }

@media (max-width: 900px) {
  .form-card { padding: 24px; gap: 20px; }
  .form-card h2 { font-size: 23px; }
  .form-row { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .form-foot { flex-direction: column-reverse; align-items: stretch; }
  .form-foot .button { width: 100%; }
  .form-privacy { max-width: none; }
}

/* Tietosuojaseloste */
.legal { display: flex; flex-direction: column; gap: 48px; margin-top: 64px; }
.legal section { display: flex; flex-direction: column; gap: 12px; }
.legal h2 { font-size: 26px; line-height: 1.25; }
.legal p { font-size: 18px; }

@media (max-width: 900px) {
  .legal { gap: 36px; margin-top: 48px; }
  .legal h2 { font-size: 23px; }
  .legal p { font-size: 17px; }
}
