/* Peimarin Rakennuspalvelu – theme stylesheet.
   Replaces the Louhosteema bundle (no Bootstrap): the approved design CSS (design/assets/css/style.css)
   plus WordPress additions at the end. --louhos-* tokens are mapped for parent views and the editor. */

:root {
  /* Current brand colours */
  --c-blue: #2952b7;
  --c-blue-700: #1f3f8f;
  --c-yellow: #fcba04;
  --c-yellow-600: #e8aa00;
  --c-ink: #3e383b;          /* text + dark sections (current site's dark) */
  --c-dark: #232323;          /* dark sections, as on the current site */
  --c-dark-2: #2e2e2e;       /* cards on dark */
  --c-darker: #232323;       /* footer */
  --c-paper: #f7f7f7;
  --c-white: #fff;
  --c-muted: #69646a;
  --c-line: #e3e1e2;
  --c-on-dark: #f7f7f7;
  --c-on-dark-muted: #c2c2c2;
  --c-line-dark: rgb(255 255 255 / 0.14);

  /* Type */
  --f-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --fs-h1: clamp(2.2rem, 1.1rem + 2.9vw, 3.9rem);
  --fs-h2: clamp(2rem, 1.2rem + 2.4vw, 3.5rem);
  --fs-h3: clamp(1.35rem, 1.15rem + 0.6vw, 1.75rem);
  --fs-lead: clamp(1.125rem, 1.02rem + 0.35vw, 1.3125rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-xs: 0.8125rem;

  /* Space & shape */
  --gutter: clamp(1.25rem, 0.6rem + 3vw, 4rem);
  --wrap: 82.5rem;
  --section: clamp(3.5rem, 2rem + 5vw, 6.5rem);
  --r-s: 6px;
  --r-m: 12px;
  --r-l: 18px;
  --shadow-2: 0 2px 4px rgb(62 56 59 / 0.06), 0 24px 48px -18px rgb(62 56 59 / 0.32);

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --header-h: 6.25rem;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--c-white); color: var(--c-ink);
  font-family: var(--f-sans); font-size: var(--fs-body); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
picture { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

:focus-visible { outline: 2px solid var(--c-blue); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible, .cta :focus-visible, .site-footer :focus-visible { outline-color: var(--c-yellow); }
.cta .form :focus-visible { outline-color: var(--c-blue); }

.skip-link { position: absolute; left: 1rem; top: 1rem; z-index: 100; padding: 0.75rem 1rem; background: var(--c-ink); color: #fff; border-radius: var(--r-s); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

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

/* Display type: heavy, slightly extended caps */
h1, h2 {
  font-weight: 850; font-stretch: 106%; text-transform: uppercase;
  letter-spacing: -0.012em; line-height: 0.95; text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 700; line-height: 1.15; letter-spacing: -0.005em; }
p { max-width: 42em; text-wrap: pretty; }
.lead { font-size: var(--fs-lead); line-height: 1.55; }

/* Section marker: the roof glyph from the logo + plain sentence-case text */
.kicker {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: var(--fs-small); font-weight: 600; color: var(--c-muted); letter-spacing: 0.01em;
}
.kicker svg { width: 1.1rem; height: 1.1rem; flex: none; color: var(--c-blue); }
.on-dark .kicker { color: var(--c-on-dark-muted); }
.on-dark .kicker svg { color: var(--c-yellow); }

/* ---------- Buttons ---------- */
.btn {
  --_bg: transparent; --_fg: currentColor; --_bd: currentColor;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3.25rem; padding: 0.8rem 1.6rem;
  border: 1.5px solid var(--_bd); border-radius: 999px;
  background: var(--_bg); color: var(--_fg);
  font-weight: 650; font-size: 1rem; line-height: 1.1; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}
.btn svg { width: 1.1rem; height: 1.1rem; flex: none; }
.btn:active { transform: scale(0.97); }
.btn--yellow { --_bg: var(--c-yellow); --_bd: var(--c-yellow); --_fg: var(--c-ink); }
.btn--dark { --_bg: var(--c-ink); --_bd: var(--c-ink); --_fg: #fff; }
.btn--light { --_bg: var(--c-paper); --_bd: var(--c-paper); --_fg: var(--c-ink); }
.btn--outline { --_bd: var(--c-ink); --_fg: var(--c-ink); }
.btn--sm { min-height: 2.75rem; padding: 0.55rem 1.15rem; font-size: 0.9375rem; }
@media (hover: hover) and (pointer: fine) {
  .btn--yellow:hover { --_bg: var(--c-yellow-600); --_bd: var(--c-yellow-600); }
  .btn--dark:hover { --_bg: #2a2527; --_bd: #2a2527; }
  .btn--light:hover { --_bg: #fff; --_bd: #fff; }
  .btn--outline:hover { --_bg: var(--c-ink); --_fg: #fff; }
}

.more {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-weight: 650; font-size: var(--fs-small); color: var(--c-blue); text-decoration: none; white-space: nowrap;
}
.more svg { width: 0.9rem; height: 0.9rem; transition: transform 200ms var(--ease-out); }
.on-dark .more { color: var(--c-yellow); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: var(--c-white);
  transition: transform 320ms var(--ease-out), box-shadow 200ms ease;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--c-line), 0 10px 30px -20px rgb(62 56 59 / 0.35); }
.site-header.is-hidden { transform: translateY(-100%); }
.header-row { height: 100%; display: flex; align-items: center; gap: 1rem; }
.brand { flex: none; display: block; margin-right: auto; }
.brand img { height: 4.5rem; width: auto; }
@media (max-width: 40rem) { :root { --header-h: 5.5rem; } .brand img { height: 3.9rem; } }

.nav { display: none; }
.nav-list { display: flex; align-items: center; gap: 0.1rem; margin: 0; padding: 0; list-style: none; }
.nav-list > li { position: relative; display: flex; align-items: center; }
.nav-link {
  position: relative; display: inline-flex; align-items: center;
  padding: 0.6rem 0.7rem; font-size: 0.96875rem; font-weight: 550; text-decoration: none; white-space: nowrap;
  border-radius: var(--r-s); transition: color 160ms ease;
}
.has-sub > .nav-link { padding-right: 0.2rem; }
.nav-link[aria-current="page"] { color: var(--c-blue); }
.sub-toggle {
  display: grid; place-items: center; width: 1.9rem; height: 2.25rem; padding: 0; margin-right: 0.15rem;
  border: 0; background: none; border-radius: var(--r-s); cursor: pointer; color: var(--c-muted);
}
.sub-toggle svg { width: 0.7rem; height: 0.7rem; transition: transform 220ms var(--ease-out); }
.has-sub[data-open] .sub-toggle svg { transform: rotate(180deg); }
.has-sub[data-open] > .nav-link, .has-sub[data-open] .sub-toggle { color: var(--c-blue); }
@media (hover: hover) and (pointer: fine) {
  .nav-link:hover, .sub-toggle:hover { color: var(--c-blue); }
}

.sub {
  position: absolute; top: calc(100% + 0.5rem); left: -0.5rem; z-index: 2;
  width: 20rem; padding: 0.5rem;
  background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--r-m);
  box-shadow: var(--shadow-2);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-6px) scale(0.98); transform-origin: 1.5rem 0;
  transition: opacity 120ms ease-out, transform 140ms var(--ease-out), visibility 0s linear 140ms;
}
.sub::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 0.75rem; }
.has-sub[data-open] .sub {
  opacity: 1; visibility: visible; pointer-events: auto; transform: none;
  transition: opacity 180ms ease-out, transform 220ms var(--ease-out), visibility 0s;
}
.sub ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.sub a {
  display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 0.85rem; align-items: start;
  padding: 0.75rem 0.85rem; border-radius: var(--r-s); text-decoration: none;
  transition: background-color 160ms ease;
}
.sub a svg { grid-row: 1 / span 2; width: 1.25rem; height: 1.25rem; margin-top: 0.1rem; color: var(--c-blue); }
.sub strong { font-weight: 650; font-size: 1rem; line-height: 1.3; }
.sub span { grid-column: 2; font-size: var(--fs-small); color: var(--c-muted); line-height: 1.4; }
.sub a:focus-visible { outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) { .sub a:hover { background: var(--c-paper); } }

.header-call { display: none; }
.menu-btn {
  display: inline-flex; align-items: center; gap: 0.65rem;
  min-height: 2.9rem; padding: 0 1.1rem; border: 1.5px solid var(--c-ink); border-radius: 999px;
  background: none; cursor: pointer; font-weight: 650; font-size: 0.9375rem;
}
.menu-btn .bars { position: relative; width: 1.15rem; height: 0.7rem; }
.menu-btn .bars::before, .menu-btn .bars::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; }
.menu-btn .bars::before { top: 0; }
.menu-btn .bars::after { bottom: 0; }

@media (min-width: 40rem) { .header-call { display: inline-flex; } }
@media (min-width: 82rem) {
  .nav { display: block; margin-inline: auto; }
  .brand { margin-right: 0; }
  .menu-btn { display: none; }
}

/* Mobile menu */
.mnav {
  position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none;
  margin: 0; padding: 0; border: 0; background: var(--c-white); color: var(--c-ink);
  overflow-y: auto; overscroll-behavior: contain;
  opacity: 0;
  transition: opacity 200ms ease-out, overlay 200ms, display 200ms;
  transition-behavior: allow-discrete;
}
.mnav[open] { opacity: 1; }
@starting-style { .mnav[open] { opacity: 0; } }
.mnav::backdrop { background: transparent; }
.mnav-top { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; }
.mnav-close {
  display: inline-flex; align-items: center; gap: 0.65rem; min-height: 2.9rem; padding: 0 1.1rem;
  border: 1.5px solid var(--c-ink); border-radius: 999px; background: none; cursor: pointer; font-weight: 650; font-size: 0.9375rem;
}
.mnav-close .x { position: relative; width: 1rem; height: 1rem; }
.mnav-close .x::before, .mnav-close .x::after { content: ""; position: absolute; left: 50%; top: 50%; width: 1.2rem; height: 2px; border-radius: 2px; background: currentColor; translate: -50% -50%; rotate: 45deg; }
.mnav-close .x::after { rotate: -45deg; }
.mnav-list { margin: 1rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--c-line); }
.mnav-list > li { border-bottom: 1px solid var(--c-line); }
.mnav-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.mnav-list a.top {
  display: block; flex: 1; padding: 1rem 0; text-decoration: none;
  font-weight: 800; font-stretch: 106%; text-transform: uppercase; font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2rem); line-height: 1;
}
.mnav-list a.top[aria-current="page"] { color: var(--c-blue); }
.mnav-acc {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; flex: none;
  border: 1px solid var(--c-line); border-radius: 50%; background: none; cursor: pointer;
}
.mnav-acc svg { width: 0.8rem; height: 0.8rem; transition: transform 220ms var(--ease-out); }
.mnav-acc[aria-expanded="true"] svg { transform: rotate(180deg); }
.mnav-sub { margin: 0 0 1rem; padding: 0; list-style: none; display: grid; gap: 0.15rem; }
.mnav-sub[hidden] { display: none; }
.mnav-sub a { display: block; padding: 0.55rem 0 0.55rem 1rem; border-left: 2px solid var(--c-yellow); font-weight: 600; font-size: 1.125rem; text-decoration: none; }
.mnav-foot { display: grid; gap: 0.75rem; padding-block: 2rem 2.5rem; justify-items: start; }
.mnav-foot p { color: var(--c-muted); font-size: var(--fs-small); margin-top: 0.5rem; }
@media (prefers-reduced-motion: no-preference) {
  .mnav-list > li, .mnav-foot { transition: opacity 360ms ease-out, transform 420ms var(--ease-out); transition-delay: calc(var(--i, 0) * 35ms + 60ms); }
  @starting-style { .mnav[open] .mnav-list > li, .mnav[open] .mnav-foot { opacity: 0; transform: translateY(12px); } }
}

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; padding-block: clamp(1.5rem, 3vw, 3rem) clamp(3.5rem, 6vw, 6rem); overflow: clip; }
.hero::before { /* quiet paper field behind the image side */
  content: ""; position: absolute; inset: 0 0 0 auto; width: 44%; background: var(--c-paper); z-index: -1;
}
.hero-grid { display: grid; gap: 3rem; align-items: center; }
.hero-copy { display: grid; gap: 1.5rem; justify-items: start; }
.hero h1 { color: var(--c-blue); hyphens: manual; }
.hero .lead { color: var(--c-muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.25rem; }
.trust { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.75rem; margin: 0.75rem 0 0; padding: 1.25rem 0 0; list-style: none; border-top: 1px solid var(--c-line); }
.trust li { display: inline-flex; align-items: center; gap: 0.5rem; font-size: var(--fs-small); font-weight: 600; }
.trust svg { width: 1.25rem; height: 1.25rem; color: var(--c-blue); }
.trust img { height: 3.6rem; width: auto; border-radius: 4px; }

.hero-visual { position: relative; }
.gable { position: relative; aspect-ratio: 1 / 1.02; }
.gable picture, .gable img { width: 100%; height: 100%; }
.gable picture { clip-path: polygon(0 31%, 50% 0, 100% 31%, 100% 100%, 0 100%); }
.gable img { object-fit: cover; object-position: 40% 60%; }
.gable-line { position: absolute; left: -4.5%; top: -5.6%; width: 109%; height: auto; overflow: visible; pointer-events: none; }
.gable-line path { fill: none; stroke: var(--c-yellow); stroke-width: 12; stroke-linecap: square; stroke-linejoin: miter; }
.review-card {
  position: relative; z-index: 1; margin: -4.5rem 1rem 0 auto; width: min(100% - 1rem, 24rem);
  padding: 1.4rem 1.5rem 1.25rem; background: var(--c-white); border-radius: var(--r-m); box-shadow: var(--shadow-2);
}
.review-card blockquote p { font-size: 1.0625rem; line-height: 1.5; min-height: 4.5em; }
.review-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.review-who strong { display: block; font-weight: 650; font-size: var(--fs-small); }
.review-who span { display: block; font-size: var(--fs-xs); color: var(--c-muted); }
.review-nav { display: flex; gap: 0.4rem; }
.round {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  border: 1.5px solid var(--c-line); background: var(--c-white); cursor: pointer; color: var(--c-ink);
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms var(--ease-out);
}
.round:active { transform: scale(0.94); }
.round svg { width: 1rem; height: 1rem; }
.round--fill { background: var(--c-blue); border-color: var(--c-blue); color: #fff; }
@media (hover: hover) and (pointer: fine) { .round:hover { border-color: var(--c-ink); } .round--fill:hover { background: var(--c-blue-700); border-color: var(--c-blue-700); } }
.quote-fade { transition: opacity 180ms ease; }
.quote-fade.is-swapping { opacity: 0; }

@media (min-width: 60rem) {
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 5rem); }
  .review-card { position: absolute; left: auto; right: -1.5rem; bottom: -2.5rem; margin: 0; width: min(22.5rem, 100%); }
  .hero { padding-bottom: clamp(5rem, 7vw, 7rem); }
}
@media (min-width: 82rem) {
  .review-card { right: -3rem; }
}
@media (max-width: 59.99rem) { .hero::before { width: 100%; top: auto; height: 38%; } }

/* Load sequence: image rises into the gable, roof line draws over it */
@media (prefers-reduced-motion: no-preference) {
  .js .gable picture { clip-path: polygon(0 100%, 50% 100%, 100% 100%, 100% 100%, 0 100%); }
  .js .gable-line path { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .js .hero-copy > :not(h1) { opacity: 0; transform: translateY(14px); }
  .js .review-card { opacity: 0; transform: translateY(12px); }
  .js.is-ready .gable picture { clip-path: polygon(0 31%, 50% 0, 100% 31%, 100% 100%, 0 100%); transition: clip-path 1000ms var(--ease-in-out) 120ms; }
  .js.is-ready .gable-line path { stroke-dashoffset: 0; transition: stroke-dashoffset 900ms var(--ease-in-out) 750ms; }
  .js.is-ready .hero-copy > :not(h1) { opacity: 1; transform: none; transition: opacity 500ms ease-out, transform 650ms var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms + 80ms); }
  .js.is-ready .review-card { opacity: 1; transform: none; transition: opacity 500ms ease-out 1300ms, transform 600ms var(--ease-out) 1300ms; }
}

/* ---------- Sections ---------- */
.section { position: relative; padding-block: var(--section); }
.on-dark { background: var(--c-dark); color: var(--c-on-dark); }
.paper { background: var(--c-paper); }
.head { display: grid; gap: 1rem 4rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.head > div { display: grid; gap: 1rem; align-content: start; justify-items: start; }
.head p { color: var(--c-muted); }
.on-dark .head p { color: var(--c-on-dark-muted); }
.head-action { align-self: end; justify-self: start; }
@media (min-width: 56rem) {
  .head--split { grid-template-columns: 1fr 1fr; align-items: end; }
  .head--split .head-action { justify-self: end; }
}

/* Decorative gable outline from the logo, used sparingly on dark sections */
.deco-gable { position: absolute; pointer-events: none; color: rgb(255 255 255 / 0.045); z-index: 0; overflow: visible; }
.deco-gable path { fill: none; stroke: currentColor; stroke-width: 28; }
.section > .wrap { position: relative; z-index: 1; }

/* Services (dark) */
.services { overflow: clip; }
.services h2 { color: var(--c-yellow); }
.services .head .lead { color: var(--c-on-dark); font-weight: 500; max-width: 30em; }
.svc-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
.svc {
  position: relative; display: flex; flex-direction: column;
  background: var(--c-dark-2); border-radius: var(--r-m); overflow: clip;
  border-bottom: 4px solid var(--c-yellow);
}
.on-dark .svc { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06); }
/* The image is taken out of flow so a portrait photo cannot stretch the box past its aspect ratio. */
.svc-img { position: relative; aspect-ratio: 16 / 10; overflow: clip; background: #383838; }
.svc-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease-out); }
.svc-body { display: grid; gap: 0.7rem; padding: 1.4rem 1.5rem 1.6rem; flex: 1; align-content: start; }
.svc-title { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.svc h3 { color: #fff; }
.svc h3 a { text-decoration: none; }
.svc h3 a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.svc p { color: var(--c-on-dark-muted); font-size: var(--fs-small); }
.chips { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.25rem 0 0; padding: 0; list-style: none; }
.chips a {
  display: inline-block; padding: 0.4rem 0.85rem; border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 0.24); font-size: var(--fs-xs); font-weight: 600; text-decoration: none; color: #fff;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.svc:has(h3 a:focus-visible) { outline: 2px solid var(--c-yellow); outline-offset: 3px; }
.svc h3 a:focus-visible { outline: none; }
@media (hover: hover) and (pointer: fine) {
  .svc:hover .svc-img img { transform: scale(1.04); }
  .svc:hover .more svg { transform: translateX(3px); }
  .chips a:hover { background: var(--c-yellow); border-color: var(--c-yellow); color: var(--c-ink); }
}
@media (min-width: 44rem) { .svc-grid { grid-template-columns: repeat(2, 1fr); } .svc:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (min-width: 64rem) {
  .svc-grid { grid-template-columns: repeat(6, 1fr); }
  .svc, .svc:last-child:nth-child(odd) { grid-column: span 2; }
  .svc--lg { grid-column: span 3; }
  .svc--lg .svc-img { aspect-ratio: 16 / 9; }
  .svc:not(.svc--lg) .svc-img { aspect-ratio: 4 / 3; }
}

/* About */
.about-grid { display: grid; gap: 2.5rem 5rem; }
.about-side { display: grid; gap: 1.25rem; align-content: start; justify-items: start; }
.about-side p { color: var(--c-muted); font-size: var(--fs-small); }
.about-main { display: grid; gap: 1.5rem; }
.statement { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem); font-weight: 650; line-height: 1.25; letter-spacing: -0.01em; max-width: 26em; text-wrap: pretty; }
.statement + p { color: var(--c-muted); }
.people { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin-top: 0.25rem; }
.person { display: flex; align-items: center; gap: 0.85rem; }
.person img { width: 3.5rem; height: 3.5rem; border-radius: 50%; object-fit: cover; }
.person strong { display: block; font-weight: 650; font-size: var(--fs-small); }
.person span { display: block; color: var(--c-muted); font-size: var(--fs-xs); }
.facts { display: grid; gap: 0; margin: 1rem 0 0; padding: 0; list-style: none; }
.fact { padding: 1.25rem 0; border-top: 1px solid var(--c-line); }
.fact b { display: block; font-weight: 800; font-stretch: 100%; letter-spacing: -0.015em; color: var(--c-blue); font-size: clamp(1.35rem, 1.05rem + 0.8vw, 1.85rem); line-height: 1.05; overflow-wrap: anywhere; }
.fact span { display: block; margin-top: 0.45rem; color: var(--c-muted); font-size: var(--fs-small); }
@media (min-width: 40rem) {
  .facts { grid-template-columns: repeat(3, 1fr); }
  .fact { padding: 0.25rem 1.5rem; border-top: 0; border-left: 3px solid var(--c-yellow); }
}
@media (min-width: 60rem) { .about-grid { grid-template-columns: 5fr 7fr; } }

.wide-photo { margin-top: var(--section); }
.wide-photo img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: var(--r-l); background: var(--c-paper); }
.wide-photo figcaption { margin-top: 0.75rem; font-size: var(--fs-xs); color: var(--c-muted); }
@media (max-width: 40rem) { .wide-photo img { aspect-ratio: 4 / 3; } }
.wide-video { position: relative; }
.wide-video video { display: block; width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: var(--r-l); background: var(--c-paper); }
.wide-video .video-toggle { top: 1rem; right: 1rem; }
@media (max-width: 40rem) { .wide-video video { aspect-ratio: 4 / 3; } }

/* Benefits */
.benefits-head { margin-top: var(--section); }
.benefits { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.benefit { display: grid; gap: 0.75rem; padding: 1.75rem 0; border-top: 1px solid var(--c-line); align-content: start; }
.benefit svg { width: 2.25rem; height: 2.25rem; color: var(--c-blue); }
.benefit p { color: var(--c-muted); font-size: var(--fs-small); }
@media (min-width: 40rem) { .benefits { grid-template-columns: 1fr 1fr; column-gap: 2rem; } }
@media (min-width: 64rem) {
  .benefits { grid-template-columns: repeat(4, 1fr); column-gap: 0; }
  .benefit { padding: 0.25rem 2rem; border-top: 0; border-left: 1px solid var(--c-line); }
  .benefit:first-child { padding-left: 0; border-left: 0; }
}

/* Projects gallery (dark) */
.projects { overflow: clip; }
.projects h2 { color: var(--c-yellow); }
.gallery { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; margin: 0; padding: 0; list-style: none; }
.tile { position: relative; margin: 0; border-radius: var(--r-m); overflow: clip; background: var(--c-dark-2); }
.tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08); pointer-events: none; }
.tile img { object-position: var(--pos, 50% 50%); }
.tile figure, .tile picture { height: 100%; margin: 0; }
.tile img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; transition: transform 700ms var(--ease-out); }
.tile figcaption {
  position: absolute; inset: auto 0 0; padding: 2.75rem 1.1rem 0.95rem;
  background: linear-gradient(180deg, rgb(10 9 10 / 0) 0%, rgb(10 9 10 / 0.38) 45%, rgb(10 9 10 / 0.7) 100%);
  color: #fff; line-height: 1.35;
}
.tile figcaption strong { display: block; font-weight: 650; font-size: 0.9375rem; }
.tile figcaption span { display: block; color: var(--c-on-dark-muted); font-size: var(--fs-xs); }
.tile--wide, .tile--tall, .tile:last-child { grid-column: span 2; }
.tile--wide img, .tile--tall img, .tile:last-child img { aspect-ratio: 16 / 9; }
.tile:not(.tile--wide):not(.tile--tall):not(:last-child) figcaption { padding: 2rem 0.75rem 0.7rem; }
@media (hover: hover) and (pointer: fine) { .tile:hover img { transform: scale(1.04); } }
@media (min-width: 56rem) {
  .gallery { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 15.5rem; }
  .tile, .tile:last-child { grid-column: auto; }
  .tile--wide { grid-column: span 2; }
  .tile--tall { grid-column: auto; grid-row: span 2; }
  .tile img, .tile--wide img, .tile--tall img, .tile:last-child img { aspect-ratio: auto; }
  .tile:not(.tile--wide):not(.tile--tall):not(:last-child) figcaption { padding: 2.75rem 1.1rem 0.95rem; }
}

/* Video tile in the gallery: muted before/after loop with a pause control */
.tile video { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 9 / 16; max-height: 34rem; background: var(--c-dark-2); }
.video-toggle {
  position: absolute; top: 0.75rem; right: 0.75rem; z-index: 2; display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0; cursor: pointer;
  background: rgb(35 35 35 / 0.7); color: #fff; transition: background-color 160ms ease, transform 160ms var(--ease-out);
}
.video-toggle:active { transform: scale(0.94); }
.video-toggle .i-pause { position: relative; width: 0.8rem; height: 0.9rem; border-inline: 3px solid currentColor; }
.video-toggle[aria-pressed="true"] .i-pause { width: 0; height: 0; border-inline: 0; border-block: 0.5rem solid transparent; border-left: 0.8rem solid currentColor; margin-left: 0.2rem; }
@media (hover: hover) and (pointer: fine) { .video-toggle:hover { background: var(--c-yellow); color: var(--c-ink); } }
@media (min-width: 56rem) { .tile video { aspect-ratio: auto; max-height: none; } }

/* Testimonials */
.stories-grid { display: grid; gap: 2rem 3rem; align-items: start; }
.story-video { display: grid; gap: 0.75rem; }
.story-video video { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-l); background: var(--c-dark); object-fit: cover; }
.story-video figcaption strong { display: block; font-weight: 650; }
.story-video figcaption span { color: var(--c-muted); font-size: var(--fs-small); }
.story-quote {
  display: grid; grid-template-columns: 6.5rem 1fr; gap: 1.25rem 1.5rem; align-items: start;
  padding: clamp(1.5rem, 3vw, 2.25rem); background: var(--c-paper); border-radius: var(--r-l);
  border-top: 4px solid var(--c-yellow);
}
.story-quote img { width: 6.5rem; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-m); }
.story-quote blockquote { grid-column: 1 / -1; }
.story-quote blockquote p { font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); line-height: 1.5; font-weight: 500; }
.story-quote figcaption { grid-column: 2; grid-row: 1; align-self: end; }
.story-quote figcaption strong { display: block; font-weight: 700; font-size: 1.125rem; }
.story-quote figcaption span { color: var(--c-muted); font-size: var(--fs-small); }
@media (min-width: 64rem) { .stories-grid { grid-template-columns: 7fr 5fr; } }

/* Blog */
@media (min-width: 56rem) { .head--wide-title { grid-template-columns: 2.2fr 1fr; } }
.posts { display: grid; gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.post { position: relative; display: flex; flex-direction: column; background: var(--c-white); border: 1px solid #e9e7e8; border-radius: var(--r-m); overflow: clip; }
.post-img { overflow: clip; background: var(--c-paper); }
.post-img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 700ms var(--ease-out); }
.post-body { display: grid; gap: 0.6rem; padding: 1.4rem 1.5rem 1.6rem; align-content: start; flex: 1; }
.post time { font-size: var(--fs-xs); color: var(--c-muted); font-variant-numeric: tabular-nums; }
.post h3 { font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem); }
.post h3 a { text-decoration: none; }
.post h3 a::after { content: ""; position: absolute; inset: 0; }
.post p { color: var(--c-muted); font-size: var(--fs-small); }
.post .more { margin-top: 0.4rem; }
.post:has(h3 a:focus-visible) { outline: 2px solid var(--c-blue); outline-offset: 3px; }
.post h3 a:focus-visible { outline: none; }
@media (hover: hover) and (pointer: fine) { .post:hover .post-img img { transform: scale(1.04); } .post:hover .more svg { transform: translateX(3px); } }
@media (min-width: 48rem) { .posts { grid-template-columns: repeat(3, 1fr); } }

/* FAQ */
.faq-grid { display: grid; gap: 2.5rem 5rem; }
.faq-side { display: grid; gap: 1.25rem; align-content: start; justify-items: start; }
.faq-side p { color: var(--c-muted); }
.faq-list { border-top: 1.5px solid var(--c-ink); }
.faq-list details { border-bottom: 1px solid #d6d3d4; }
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding-block: 1.3rem; cursor: pointer; list-style: none;
  font-weight: 650; font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); line-height: 1.3;
  transition: color 160ms ease;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary svg { flex: none; width: 1rem; height: 1rem; transition: transform 240ms var(--ease-out); }
.faq-list details[open] summary { color: var(--c-blue); }
.faq-list details[open] summary svg { transform: rotate(180deg); }
.faq-list .answer { padding-bottom: 1.4rem; color: var(--c-muted); }
@media (hover: hover) and (pointer: fine) { .faq-list summary:hover { color: var(--c-blue); } }
@media (min-width: 60rem) { .faq-grid { grid-template-columns: 5fr 7fr; } }

/* Contact CTA (blue band, gable cut into the top edge) */
.cta { position: relative; background: var(--c-blue); color: #fff; padding-block: calc(clamp(2.5rem, 5vw, 5rem) + clamp(2.5rem, 4vw, 4rem)) clamp(2.5rem, 4vw, 3.75rem); }
.cta::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: clamp(2.5rem, 5vw, 5rem);
  background: var(--c-white); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 0, 0 100%);
}
.cta-grid { display: grid; gap: 2.5rem 4.5rem; align-items: start; }
.cta h2 { color: #fff; }
.cta .lead { margin-top: 1rem; color: rgb(255 255 255 / 0.92); }
.cta .people { margin-top: 1.5rem; }
.cta .person span { color: rgb(255 255 255 / 0.85); }
.cta .person a { color: #fff; font-weight: 650; font-size: var(--fs-small); text-decoration: none; font-variant-numeric: tabular-nums; }
.cta-mail { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid rgb(255 255 255 / 0.22); display: grid; gap: 0.25rem; font-size: var(--fs-small); }
.cta-mail a { color: #fff; font-weight: 650; text-decoration: none; }
.form { display: grid; gap: 0.85rem; padding: clamp(1.25rem, 2.6vw, 2rem); background: var(--c-white); color: var(--c-ink); border-radius: var(--r-l); box-shadow: 0 30px 60px -30px rgb(20 30 70 / 0.55); }
.form-row { display: grid; gap: 1rem; }
@media (min-width: 36rem) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: var(--fs-small); font-weight: 600; }
.field .opt { font-weight: 400; color: var(--c-muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 3.1rem; padding: 0.75rem 0.95rem;
  border: 1px solid #c9c5c7; border-radius: var(--r-s); background: #fff; color: var(--c-ink);
  font: inherit; font-size: 1rem; transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field textarea { min-height: 6.5rem; resize: vertical; }
.field select {
  appearance: none; padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%233e383b' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; background-size: 0.75rem;
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--c-blue); box-shadow: 0 0 0 3px rgb(41 82 183 / 0.25); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.form-foot small { color: var(--c-muted); font-size: var(--fs-xs); max-width: 24em; }
.form-status { font-size: var(--fs-small); font-weight: 600; color: var(--c-blue); }
.form-status:empty { display: none; }
@media (min-width: 60rem) { .cta-grid { grid-template-columns: 5fr 7fr; } }

/* Footer */
.site-footer { position: relative; background: var(--c-darker); color: var(--c-on-dark); overflow: clip; }
.site-footer .deco-gable { color: rgb(255 255 255 / 0.035); }
.site-footer > .wrap { position: relative; z-index: 1; }
.footer-top { display: grid; gap: 2rem 4rem; padding-block: clamp(3.5rem, 6vw, 5rem) 2.5rem; align-items: start; }
.footer-top > img { width: 17rem; height: auto; }
.footer-about { display: grid; gap: 0.6rem; justify-items: start; }
.footer-about p { color: var(--c-on-dark-muted); font-size: var(--fs-small); max-width: 34em; }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; margin-top: 1rem; }
.badges img { height: 4.25rem; width: auto; border-radius: 4px; }
@media (min-width: 56rem) { .footer-top { grid-template-columns: 1fr 1fr; } }

.footer-services { border-block: 1px solid var(--c-line-dark); }
.footer-services ul { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 0.6rem 1.75rem; margin: 0; padding: 1.75rem 0; list-style: none; }
@media (min-width: 72rem) { .footer-services ul { justify-content: space-between; } }
.footer-services a {
  font-weight: 800; font-stretch: 100%; text-transform: uppercase; text-decoration: none;
  font-size: clamp(1.15rem, 0.75rem + 1vw, 1.6rem); line-height: 1.1; transition: color 160ms ease;
}
@media (hover: hover) and (pointer: fine) { .footer-services a:hover { color: var(--c-yellow); } }

.footer-cols { display: grid; gap: 2.25rem; padding-block: 3rem; }
.footer-cols h2 {
  display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem;
  font-size: var(--fs-xs); font-weight: 600; font-stretch: 100%; text-transform: none; letter-spacing: 0.02em; color: var(--c-yellow); line-height: 1.2;
}
.footer-cols h2::after { content: ""; flex: 1; height: 1px; background: var(--c-line-dark); }
.footer-cols ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.45rem; }
.footer-cols a { text-decoration: none; }
.footer-cols p, .footer-cols li { font-size: var(--fs-small); color: var(--c-on-dark); }
.footer-cols .muted { color: var(--c-on-dark-muted); }
.footer-cols .big { display: inline-block; font-size: clamp(1.2rem, 1rem + 0.6vw, 1.5rem); font-weight: 650; font-variant-numeric: tabular-nums; }
.footer-cols .stack { display: grid; gap: 0.2rem; }
.footer-cols .stack + .stack { margin-top: 1rem; }
.billing { display: grid; gap: 0.9rem; }
.billing p { line-height: 1.5; }
.billing .muted { font-size: var(--fs-xs); }
.social { display: flex; gap: 0.6rem; margin-top: 0.25rem; }
.social a { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: rgb(255 255 255 / 0.08); transition: background-color 160ms ease, color 160ms ease; }
.social svg { width: 1.15rem; height: 1.15rem; }
@media (hover: hover) and (pointer: fine) {
  .footer-cols ul a:hover, .footer-cols .stack a:hover { color: var(--c-yellow); }
  .social a:hover { background: var(--c-yellow); color: var(--c-ink); }
}
@media (min-width: 48rem) { .footer-cols { grid-template-columns: 1fr 1fr; } }
@media (min-width: 72rem) { .footer-cols { grid-template-columns: 0.8fr 1.2fr 1.3fr 0.7fr; gap: 3rem; } }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem; padding-block: 1.5rem 2rem; border-top: 1px solid var(--c-line-dark); font-size: var(--fs-xs); color: var(--c-on-dark-muted); }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.footer-bottom a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .footer-bottom a:hover { color: #fff; text-decoration: underline; } }

@media (forced-colors: active) {
  .btn, .sub, .form, .svc, .post, .review-card { border: 1px solid CanvasText; }
  .gable-line path { stroke: CanvasText; }
}

/* =====================================================================
   WordPress additions (not in the static design)
   ===================================================================== */

/* Louhosteema tokens, so parent views and the block editor follow the brand. */
:root {
  --louhos-primary: var(--c-blue);
  --louhos-primary-dark: var(--c-blue-700);
  --louhos-accent: var(--c-yellow);
  --louhos-headings: var(--c-ink);
  --louhos-body-color: var(--c-ink);
  --louhos-dark-1: var(--c-dark);
  --louhos-dark-2: var(--c-dark-2);
  --louhos-grey: var(--c-paper);
  --louhos-border: var(--c-line);
  --louhos-font-family: var(--f-sans);
  --louhos-radius: var(--r-m);
  --louhos-radius-lg: var(--r-l);
  --louhos-header-height: var(--header-h);
}

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.brand--dialog img { height: 3.9rem; }
.brand-text { font-weight: 800; font-size: 1.25rem; text-transform: uppercase; }
.block-placeholder { padding: 1.5rem; border: 2px dashed var(--c-line); border-radius: var(--r-m); color: var(--c-muted); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Design sections split into separate blocks: keep the original rhythm. */
.block-video .wide-photo { margin-top: 0; }
.block-video:last-child { padding-bottom: var(--section); }
.benefits-block .benefits-head { margin-top: 0; }

/* Hero, subpage variant: no review card, slightly calmer type. */
.hero--page h1 { font-size: clamp(2rem, 1.2rem + 2.4vw, 3.4rem); overflow-wrap: anywhere; }

/* Page heading for pages without a hero block, blog and posts. */
.page-head { padding-block: clamp(3rem, 6vw, 5.5rem) clamp(2rem, 4vw, 3.5rem); }
.page-head .wrap { display: grid; gap: 1rem; justify-items: start; }
.page-head h1 { font-size: var(--fs-h1); max-width: 22ch; }
.page-head--post h1 { font-size: clamp(1.9rem, 1.2rem + 2vw, 3rem); max-width: none; text-transform: none; font-stretch: 100%; letter-spacing: -0.01em; line-height: 1.12; }
.page-head .kicker a { display: inline-flex; align-items: center; gap: 0.5rem; color: inherit; text-decoration: none; }
.page-head .kicker a:hover { text-decoration: underline; }
.post-meta { color: var(--c-muted); font-size: var(--fs-small); }
.wrap--text { width: min(100% - 2 * var(--gutter), 46rem); }
.wrap--media { width: min(100% - 2 * var(--gutter), 64rem); }
.post-hero img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-l); }
.single .prose { padding-block: clamp(2rem, 4vw, 3.5rem) var(--section); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem) var(--section); }
.chips--light a { border-color: var(--c-line); color: var(--c-ink); }
.chips--light a[aria-current] { background: var(--c-ink); border-color: var(--c-ink); color: #fff; }
@media (hover: hover) and (pointer: fine) { .chips--light a:hover { background: var(--c-yellow); border-color: var(--c-yellow); } }

.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem; margin-top: clamp(2rem, 4vw, 3rem); }
.pager ol { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.pager li > * { display: grid; place-items: center; min-width: 2.75rem; min-height: 2.75rem; border-radius: 999px; font-weight: 600; text-decoration: none; color: var(--c-ink); }
.pager [aria-current] { background: var(--c-ink); color: #fff; }

/* Long-form text: posts, free-text pages, Teksti + kuva. */
.prose { font-size: var(--fs-body); line-height: 1.7; }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3, .prose h4 { text-transform: none; font-stretch: 100%; letter-spacing: -0.01em; line-height: 1.2; margin-top: 1.8em; }
.prose h2 { font-size: clamp(1.5rem, 1.25rem + 0.8vw, 2rem); }
.prose h3 { font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.45rem); }
.prose h4 { font-size: 1.1rem; }
.prose > :first-child { margin-top: 0; }
.prose a { color: var(--c-blue); text-underline-offset: 0.15em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.35em; }
.prose img { height: auto; border-radius: var(--r-m); }
.prose figure { margin-inline: 0; }
.prose figcaption { font-size: var(--fs-xs); color: var(--c-muted); margin-top: 0.5rem; }
.prose blockquote { margin-inline: 0; padding-left: 1.25rem; border-left: 4px solid var(--c-yellow); font-weight: 500; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); display: block; overflow-x: auto; }
.prose th, .prose td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--c-line); text-align: left; vertical-align: top; }
.prose th { background: var(--c-paper); }
.prose .alignleft { float: left; margin: 0.3em 1.5em 1em 0; max-width: 50%; }
.prose .alignright { float: right; margin: 0.3em 0 1em 1.5em; max-width: 50%; }
.prose .aligncenter { margin-inline: auto; }
.prose::after { content: ""; display: table; clear: both; }
.prose--page { padding-bottom: var(--section); }

/* Louhos: Teksti + kuva */
.ti-grid { display: grid; gap: 2.5rem 5rem; align-items: center; }
.ti-copy { display: grid; gap: 1.25rem; justify-items: start; }
.ti-copy .prose { color: var(--c-ink); }
.ti-title { max-width: 22ch; }
.ti-media { position: relative; }
.ti-media > img:first-child { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-l); }
.ti-badge { position: absolute; left: -1rem; bottom: -1rem; width: 9rem; height: auto; background: #fff; padding: 0.5rem; border-radius: var(--r-m); box-shadow: var(--shadow-2); }
@media (min-width: 60rem) {
  .ti-grid { grid-template-columns: 1fr 1fr; }
  .ti--img-left .ti-media { order: -1; }
  /* Text only: title in the left column, text on the right, so the section does not leave half the page empty. */
  .ti--text .ti-grid { grid-template-columns: 1fr; }
  .ti--text .ti-copy { grid-template-columns: 5fr 7fr; gap: 0 clamp(2rem, 5vw, 5rem); align-items: start; }
  .ti--text .ti-copy > :not(.ti-title) ~ :not(.ti-title) { margin-top: 1.25rem; }
  .ti--text .ti-title { grid-column: 1; grid-row: 1 / span 4; max-width: none; }
  .ti--text .ti-copy > :not(.ti-title) { grid-column: 2; }
}

/* Contact Form 7 in the quote request. */
.cta-form .wpcf7 { color: var(--c-ink); }
.cta-form .wpcf7-form-control-wrap { display: block; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: #b3261e; }
.wpcf7-not-valid-tip { display: block; margin-top: 0.35rem; color: #b3261e; font-size: var(--fs-xs); font-weight: 600; }
.wpcf7 form .wpcf7-response-output { margin: 0; padding: 0.75rem 1rem; border: 0; border-radius: var(--r-s); font-size: var(--fs-small); font-weight: 600; background: var(--c-paper); }
.wpcf7 form.sent .wpcf7-response-output { background: #e6f3ea; color: #1d5c32; }
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.failed .wpcf7-response-output, .wpcf7 form.spam .wpcf7-response-output { background: #fbeaea; color: #8c1d18; }
.wpcf7-spinner { margin: 0 0 0 0.5rem; }
.form-foot small a { color: inherit; }
.grecaptcha-badge { visibility: hidden; }
/* CF7 internals normally hidden by its own stylesheet (disabled above). */
.wpcf7 .screen-reader-response { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); border: 0; white-space: nowrap; }
.wpcf7 .hidden-fields-container { display: none; }
.wpcf7 form.init .wpcf7-response-output, .wpcf7 form.resetting .wpcf7-response-output, .wpcf7 form.submitting .wpcf7-response-output { display: none; }
.wpcf7-spinner { display: inline-block; width: 1.25rem; height: 1.25rem; margin: 0 0 0 0.5rem; border: 2px solid var(--c-line); border-top-color: var(--c-blue); border-radius: 50%; visibility: hidden; vertical-align: middle; }
.wpcf7 form.submitting .wpcf7-spinner { visibility: visible; animation: peimari-spin 700ms linear infinite; }
@keyframes peimari-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wpcf7 form.submitting .wpcf7-spinner { animation-duration: 2s; } }
.post-img--empty { display: grid; place-items: center; aspect-ratio: 16 / 10; background: var(--c-dark); color: var(--c-yellow); }
.post-img--empty svg { width: 3.5rem; height: 3.5rem; }
.page-head + .section:not(.paper):not(.on-dark) { padding-top: 0; }

/* Smaller section headings: sentence case (display caps stay for H1 and the large section titles). */
.ti-title, .blog-latest .head h2, .related-posts .head h2, .faq-side h2, .contact-billing h2 {
  font-size: clamp(1.75rem, 1.25rem + 1.4vw, 2.6rem); font-weight: 800; font-stretch: 100%;
  text-transform: none; letter-spacing: -0.02em; line-height: 1.08;
}

/* Section rhythm: one --section gap between any two sections. Adjacent sections on the same
   background (and a plain section right under a subpage hero) share it instead of doubling it. */
.section:not(.paper):not(.on-dark) + .section:not(.paper):not(.on-dark),
.section.paper + .section.paper,
.section.on-dark + .section.on-dark,
.hero--page + .section:not(.paper):not(.on-dark) { padding-top: 0; }
.hero.hero--page { padding-bottom: var(--section); }
/* The quote band's gable cut takes the colour of the last section above it, whether that is a
   block in the page content (.entry) or a template section (blog index, related posts). */
.site-main:has(> .paper:last-child, .entry > .paper:last-child) + .cta::before { background: var(--c-paper); }
.site-main:has(> .on-dark:last-child, .entry > .on-dark:last-child) + .cta::before { background: var(--c-dark); }

/* Peimari: Yhteystiedot */
.contact-page { padding-block: clamp(3rem, 6vw, 5.5rem) var(--section); }
.contact-head { display: grid; gap: 1.25rem 4rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.contact-head > div { display: grid; gap: 1rem; justify-items: start; }
.contact-head h1 { color: var(--c-blue); }
.contact-head .lead { color: var(--c-muted); max-width: 32em; }
@media (min-width: 56rem) { .contact-head { grid-template-columns: 1fr 1fr; align-items: end; } }

.contact-grid { display: grid; gap: 1.25rem; }
.contact-card {
  display: grid; gap: 1.25rem; align-content: start; justify-items: start;
  padding: clamp(1.5rem, 3vw, 2.25rem); background: var(--c-paper); border-radius: var(--r-l);
  border-top: 4px solid var(--c-yellow);
}
.contact-card h2 { font-size: var(--fs-h3); font-weight: 750; font-stretch: 100%; text-transform: none; letter-spacing: -0.01em; line-height: 1.15; }
.contact-photo { width: 5.5rem; height: 5.5rem; border-radius: 50%; object-fit: cover; }
.contact-who p { margin-top: 0.3rem; color: var(--c-muted); font-size: var(--fs-small); }
.contact-lines { display: grid; gap: 0.7rem; margin: 0; padding: 0; list-style: none; }
.contact-lines li { display: flex; align-items: flex-start; gap: 0.65rem; }
.contact-lines a { display: inline-flex; align-items: center; gap: 0.65rem; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; transition: color 160ms ease; }
.contact-lines svg { width: 1.15rem; height: 1.15rem; flex: none; color: var(--c-blue); }
.contact-lines li > svg { margin-top: 0.2em; }
.contact-lines address { font-style: normal; }
.contact-big { font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.65rem); font-weight: 700; font-variant-numeric: tabular-nums; }
.contact-big svg { width: 1.3rem; height: 1.3rem; }
.contact-muted { color: var(--c-muted); font-size: var(--fs-small); }
.contact-company { background: var(--c-dark); color: var(--c-on-dark); }
.contact-company svg { color: var(--c-yellow); }
.contact-company .contact-muted { color: var(--c-on-dark-muted); }
.contact-company .btn--outline { --_bd: rgb(255 255 255 / 0.55); --_fg: #fff; }
.contact-company :focus-visible { outline-color: var(--c-yellow); }
@media (hover: hover) and (pointer: fine) {
  .contact-lines a:hover { color: var(--c-blue); }
  .contact-company .contact-lines a:hover { color: var(--c-yellow); }
  .contact-company .btn--outline:hover { --_bg: var(--c-yellow); --_bd: var(--c-yellow); --_fg: var(--c-ink); }
}
@media (min-width: 44rem) { .contact-grid { grid-template-columns: 1fr 1fr; } .contact-company { grid-column: 1 / -1; } }
@media (min-width: 64rem) { .contact-grid { grid-template-columns: repeat(3, 1fr); } .contact-company { grid-column: auto; } }

.billing-grid { display: grid; gap: 2rem 5rem; }
.billing-grid > div:first-child p { margin-top: 1rem; color: var(--c-muted); }
.billing-cols { display: grid; gap: 2rem 3rem; }
.billing-cols h3 { margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1.5px solid var(--c-ink); font-size: 1.125rem; }
.billing-cols dl { display: grid; gap: 0.85rem; margin: 0; }
.billing-cols dt { color: var(--c-muted); font-size: var(--fs-xs); }
.billing-cols dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.billing-cols p { font-weight: 600; line-height: 1.7; }
@media (min-width: 40rem) { .billing-cols { grid-template-columns: 1fr 1fr; } }
@media (min-width: 60rem) { .billing-grid { grid-template-columns: 5fr 7fr; } }

/* ---------- Complianz: consent banner, settings button, legal documents ---------- */
/* The banner follows the site's card pattern (contact and quote cards): white card, yellow top edge,
   the roof glyph from the logo before the title, sentence-case title and the site's pill buttons.
   Complianz's own variables first, then its selectors (doubled class to win over its stylesheet). */
body { --cmplz_category_header_always_active_color: var(--c-muted); }
body .cmplz-cookiebanner {
  --cmplz_banner_width: 30rem;
  --cmplz_banner_margin: 1.25rem;
  --cmplz_banner_background_color: var(--c-white);
  --cmplz_banner_border_radius: var(--r-l);
  --cmplz_text_color: var(--c-ink);
  --cmplz_hyperlink_color: var(--c-ink);
  --cmplz_text_font_size: 0.9375rem;
  --cmplz_link_font_size: var(--fs-xs);
  --cmplz_category_body_font_size: var(--fs-xs);
  --cmplz_category_header_title_font_size: 0.9375rem;
  --cmplz_slider_active_color: var(--c-blue);
  --cmplz_slider_inactive_color: #a9a5a7;
  --cmplz_slider_bullet_color: var(--c-white);
}
.cmplz-cookiebanner.cmplz-cookiebanner {
  padding: 1.5rem 1.5rem 1.25rem; gap: 1rem;
  border: 0; border-top: 4px solid var(--c-yellow);
  font-family: var(--f-sans); color: var(--c-ink);
  box-shadow: var(--shadow-2);
}
.cmplz-cookiebanner.cmplz-show:hover { box-shadow: var(--shadow-2); transition: none; }
.cmplz-cookiebanner.cmplz-cookiebanner .cmplz-divider { display: none; }

/* Title: roof glyph + "Evästeet", like the site's section markers. */
.cmplz-cookiebanner.cmplz-cookiebanner .cmplz-header { grid-template-columns: 1fr auto; }
.cmplz-cookiebanner.cmplz-cookiebanner .cmplz-title {
  display: inline-flex; align-items: center; gap: 0.6rem;
  grid-column-start: 1; justify-self: start; text-align: left;
  font-size: 1.375rem; font-weight: 750; font-stretch: 100%; letter-spacing: -0.01em; line-height: 1.15; color: var(--c-ink);
}
.cmplz-cookiebanner.cmplz-cookiebanner .cmplz-title::before {
  content: ""; width: 1.25rem; height: 1.25rem; flex: none; background: var(--c-blue);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 21V10.5L12 4l8 6.5' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='square'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 21V10.5L12 4l8 6.5' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='square'/%3E%3C/svg%3E") center / contain no-repeat;
}
.cmplz-cookiebanner.cmplz-cookiebanner .cmplz-message { margin: 0; line-height: 1.6; }

/* Buttons: the site's own. Accept = yellow primary, deny and choose = outline (same size and weight). */
.cmplz-cookiebanner.cmplz-cookiebanner .cmplz-buttons { gap: 0.6rem; }
.cmplz-cookiebanner.cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
  flex: 1 1 auto; width: auto; height: auto; min-height: 2.9rem; padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--c-ink); border-radius: 999px; background: transparent; color: var(--c-ink);
  font-family: inherit; font-size: 0.9375rem; font-weight: 650; line-height: 1.15; white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}
.cmplz-cookiebanner.cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-accept { background: var(--c-yellow); border-color: var(--c-yellow); color: var(--c-ink); }
.cmplz-cookiebanner.cmplz-cookiebanner .cmplz-buttons .cmplz-btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .cmplz-cookiebanner.cmplz-cookiebanner .cmplz-buttons .cmplz-btn:hover { background: var(--c-ink); border-color: var(--c-ink); color: #fff; }
  .cmplz-cookiebanner.cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-accept:hover { background: var(--c-yellow-600); border-color: var(--c-yellow-600); color: var(--c-ink); }
}

/* Categories ("Valitse itse"): paper rows like the FAQ, the site's chevron. */
.cmplz-cookiebanner.cmplz-cookiebanner .cmplz-categories .cmplz-category { background: var(--c-paper); border-radius: var(--r-m); }
.cmplz-cookiebanner.cmplz-cookiebanner .cmplz-categories .cmplz-category:not(:last-child) { margin-bottom: 0.5rem; }
.cmplz-cookiebanner.cmplz-cookiebanner .cmplz-category .cmplz-category-header { padding: 0.8rem 1rem; }
.cmplz-cookiebanner.cmplz-cookiebanner .cmplz-category .cmplz-category-title { font-weight: 650; }
.cmplz-cookiebanner.cmplz-cookiebanner .cmplz-category .cmplz-description { padding: 0 1rem 0.9rem; line-height: 1.5; color: var(--c-muted); }
.cmplz-cookiebanner.cmplz-cookiebanner .cmplz-category .cmplz-icon.cmplz-open { width: 1rem; height: 1rem; margin: 0 0 0 0.5rem; background: none; color: var(--c-ink); }
.cmplz-cookiebanner.cmplz-cookiebanner .cmplz-category .cmplz-icon.cmplz-open svg { width: 1rem; height: 1rem; fill: currentColor; }

/* Policy links: small, muted, left-aligned. */
.cmplz-cookiebanner.cmplz-cookiebanner .cmplz-documents.cmplz-links { justify-content: flex-start; }
.cmplz-cookiebanner.cmplz-cookiebanner .cmplz-documents ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.cmplz-cookiebanner.cmplz-cookiebanner .cmplz-links .cmplz-link { color: var(--c-muted); text-underline-offset: 0.2em; }
@media (hover: hover) and (pointer: fine) { .cmplz-cookiebanner.cmplz-cookiebanner .cmplz-links .cmplz-link:hover { color: var(--c-ink); } }

.cmplz-cookiebanner :is(.cmplz-btn, .cmplz-link, .cmplz-close, summary):focus-visible,
.cmplz-cookiebanner input.cmplz-consent-checkbox:focus-visible + .cmplz-label::before {
  outline: 2px solid var(--c-blue); outline-offset: 3px;
}

/* Phones: a sheet along the bottom edge, buttons stacked (accept on top), title kept. */
@media (max-width: 47.99rem) {
  body .cmplz-cookiebanner { --cmplz_banner_margin: 0; }
  .cmplz-cookiebanner.cmplz-cookiebanner {
    left: 0; right: 0; bottom: 0; width: 100%; padding: 1.25rem var(--gutter) calc(1rem + env(safe-area-inset-bottom, 0px));
    border-radius: var(--r-l) var(--r-l) 0 0;
  }
  .cmplz-cookiebanner.cmplz-cookiebanner .cmplz-header .cmplz-title { display: inline-flex; font-size: 1.25rem; }
  .cmplz-cookiebanner.cmplz-cookiebanner .cmplz-buttons .cmplz-btn { flex: none; width: 100%; }
}

/* "Evästeasetukset" in the footer opens the banner again; looks like the links next to it. */
.footer-consent {
  padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { .footer-consent:hover { color: #fff; text-decoration: underline; } }

/* Cookie policy generated by Complianz, inside the page's prose column. */
#cmplz-document { max-width: none; font-size: var(--fs-body); }
#cmplz-document, #cmplz-document p, #cmplz-document li { color: var(--c-ink); line-height: 1.65; }
#cmplz-document h2 {
  margin-top: 2.25rem; font-size: clamp(1.4rem, 1.2rem + 0.6vw, 1.75rem); font-weight: 800;
  font-stretch: 100%; text-transform: none; letter-spacing: -0.01em; line-height: 1.2;
}
#cmplz-document h3 { margin-top: 1.5rem; font-size: 1.125rem; font-weight: 700; }
#cmplz-document a { color: var(--c-blue); }
#cmplz-document .cmplz-dropdown { border-radius: var(--r-m); background: var(--c-paper); }
#cmplz-document .cmplz-dropdown summary { padding: 1rem 1.25rem; }
#cmplz-document .cmplz-dropdown summary h3 { margin: 0; }
#cmplz-document .cmplz-service-description, #cmplz-document .cmplz-sharing-data, #cmplz-document .cookies-per-purpose { padding-inline: 1.25rem; }
#cmplz-document .cookies-per-purpose { overflow-wrap: anywhere; }
