/* ==========================================================================
   Saarijärven Tasomaalaus Oy
   Brändityyli: Manrope (otsikot) + Inter (teksti), logon punainen aksentti ja musta,
   tumma liuskeensininen tummissa osioissa, vaaleat harmaat pohjat.
   Kulmasääntö: painikkeet pill (999px), kortit/kuvat/paneelit 16px,
   lomakekentät 10px.
   ========================================================================== */

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-var.woff2") format("woff2-variations"),
       url("../fonts/manrope-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var.woff2") format("woff2-variations"),
       url("../fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --dark-950: #111111;
  --dark-900: #1a1a1a;
  --dark-800: #2b2b2b;
  --accent: #c9291f;          /* logon punainen: koristeet ja korostussanat */
  --accent-600: var(--accent);  /* sama logon punainen (5.5:1 valkoisella) */
  --accent-700: var(--accent);
  --accent-on-dark: #ff7a6b;  /* punainen teksti tummalla pohjalla (> 4.5:1) */
  --sage: #8a8f8e;
  --accent-gradient: var(--accent);  /* painikkeet yhdellä punaisella */
  --card-overlay: linear-gradient(315deg, rgba(17, 17, 17, 0.88), rgba(26, 22, 21, 0.72) 50%, rgba(120, 24, 18, 0.55));  /* palvelusivun hero */

  --paper: #f5f5f5;
  --paper-2: #eeeeee;
  --white: #fff;
  --line: #e3e3e3;
  --line-strong: #c9c9c9;
  --ink: #221f1f;
  --text: #221f1f;
  --muted: #595e5d;
  --error: #b3261e;

  --font-head: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
  --pill: 999px;

  --container: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --section-y: clamp(4.5rem, 3rem + 5vw, 8rem);
  --header-h: 84px;
  --header-gap: 12px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* Nuoli-ikoni painikkeiden ympyrään */
  --arrow-accent: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9291f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M9 7h8v8'/%3E%3C/svg%3E");
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--header-gap) + 16px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
.hero-media > picture, .page-hero-media > picture, .midcta-media > picture { height: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--accent); color: var(--white); }

:focus-visible {
  outline: 3px solid var(--accent-600);
  outline-offset: 3px;
}
.hero :focus-visible, .page-hero :focus-visible,
.midcta :focus-visible {
  outline-color: var(--accent-on-dark);
}

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

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Typography ---------- */
h1, h2, h3 {
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.25rem, 1.3rem + 3.4vw, 4rem);
  line-height: 1.12;
}
h2 {
  font-size: clamp(1.9rem, 1.35rem + 2vw, 3rem);
  line-height: 1.18;
}
h3 {
  font-size: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
p { text-wrap: pretty; }

/* Otsikon korostettu loppuosa */
.hl { color: var(--accent); }

.eyebrow {
  font-family: var(--font-head);
  font-size: 1.0625rem;
  font-weight: 600;
}

.section { padding-block: var(--section-y); }
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem); }
.section-head h2 + .section-lead { margin-top: 1.25rem; }
.section-lead { font-size: 1.125rem; color: var(--muted); max-width: 40rem; }
.section-lead a, .faq-intro a { color: var(--accent-600); font-weight: 600; text-underline-offset: 3px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  font-family: var(--font-head);
  font-weight: 600;
  text-decoration: none;
}
.text-link::after {
  content: "";
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--white) var(--arrow-accent) center / 16px no-repeat;
  transition: transform 0.25s var(--ease-out);
}
@media (hover: hover) {
  .text-link:hover::after { transform: rotate(45deg); }
}

/* ---------- Buttons (pill + nuoliympyrä) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 48px;
  padding: 0.55rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--pill);
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, filter 0.2s ease, transform 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 54px; font-size: 1rem; }
.btn-primary {
  padding-right: 0.4rem;
  background: var(--accent-gradient);
  color: var(--white);
}
.btn-primary::after {
  content: "";
  flex: 0 0 auto;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--white) var(--arrow-accent) center / 18px no-repeat;
  transition: transform 0.25s var(--ease-out);
}
.btn-lg.btn-primary::after { width: 40px; height: 40px; }
.btn-ghost-light { border-color: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.08); color: var(--white); }
@media (hover: hover) {
  .btn-primary:hover { filter: brightness(0.94) saturate(1.08); }
  .btn-primary:hover::after { transform: rotate(45deg); }
  .btn-ghost-light:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
}

/* ==========================================================================
   Header: valkoinen pyöristetty palkki, joka kelluu heron päällä
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: var(--header-gap);
  margin-bottom: calc((var(--header-h) + var(--header-gap)) * -1);
  pointer-events: none;
}
.site-header > .container { pointer-events: auto; }

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: var(--header-h);
  padding-inline: 1.25rem 0.6rem;
  background: var(--white);
  border-radius: var(--radius);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(34, 31, 31, 0.06);
  transition: box-shadow 0.25s ease;
}
.site-header.is-scrolled .header-inner { box-shadow: 0 1px 2px rgba(34, 31, 31, 0.06), 0 10px 30px rgba(17, 17, 17, 0.12); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-logo { display: block; height: 70px; width: auto; }

.main-nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: clamp(1rem, 0.2rem + 1.3vw, 1.9rem); }
.nav-list a {
  position: relative;
  display: inline-block;
  padding-block: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 450;
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-list a[aria-current="true"], .nav-list a[aria-current="page"] { color: var(--accent-600); }
@media (hover: hover) {
  .nav-list a:hover { color: var(--accent-600); }
}
.nav-contact { display: none; }

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
}
.menu-toggle-bars { display: grid; gap: 6px; width: 18px; margin-inline: auto; }
.menu-toggle-bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease-out);
}
.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:last-child { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 1023px) {
  :root { --header-h: 68px; --header-gap: 10px; }
  .header-inner { gap: 0.6rem; padding-inline: 0.9rem 0.5rem; }
  .menu-toggle { display: block; }
  .header-cta { margin-left: auto; min-height: 44px; padding-left: 1rem; font-size: 0.875rem; }
  .header-cta::after { width: 30px; height: 30px; background-size: 15px; }

  .main-nav { margin: 0; }
  .nav-list {
    position: absolute;
    top: calc(100% + 8px); left: 0; right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100dvh - var(--header-h) - var(--header-gap) - 24px);
    overflow-y: auto;
    padding: 0.5rem 1.25rem 1.25rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 16px 40px rgba(17, 17, 17, 0.18);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px) scale(0.99);
    transform-origin: top center;
    transition: opacity 0.2s ease, transform 0.26s var(--ease-out), visibility 0s linear 0.26s;
  }
  .nav-list.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 0.2s ease, transform 0.26s var(--ease-out), visibility 0s;
  }
  .nav-list li { border-bottom: 1px solid var(--line); }
  .nav-list a { display: flex; align-items: center; min-height: 54px; font-family: var(--font-head); font-size: 1.25rem; font-weight: 600; }
  .nav-contact { display: block; border-bottom: 0 !important; margin-top: 0.75rem; }
  .nav-contact a { color: var(--accent-600); }
  body.menu-open { overflow: hidden; }
}
@media (max-width: 479px) {
  .brand-logo { height: 56px; }
  .header-cta { padding-block: 0.3rem; padding-left: 0.85rem; font-size: 0.8125rem; gap: 0.5rem; }
  .header-cta::after { width: 28px; height: 28px; }
}
@media (max-width: 379px) {
  .header-cta { padding-right: 0.85rem; }
  .header-cta::after { display: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100svh;
  background: var(--dark-950);
  color: var(--white);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 68% 40%;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 17, 17, 0.82) 0%, rgba(17, 17, 17, 0.62) 34%, rgba(17, 17, 17, 0.15) 62%, rgba(17, 17, 17, 0) 80%),
    linear-gradient(180deg, rgba(17, 17, 17, 0.35) 0%, rgba(17, 17, 17, 0) 25%);
}
.hero-content {
  position: relative;
  align-self: center;
  padding-top: calc(var(--header-h) + var(--header-gap) + clamp(2.5rem, 1rem + 4vw, 5rem));
  padding-bottom: clamp(3.5rem, 2rem + 5vw, 6rem);
}
.hero-content > * { max-width: 40rem; }
.hero .eyebrow { color: var(--accent-on-dark); margin-bottom: 1.1rem; }
.hero h1 { color: var(--white); max-width: 15em; font-weight: 500; }
.hero-lead {
  margin-top: 1.4rem;
  max-width: 33rem;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }

/* Keskitetty hero: otsikko, alaotsikko ja yksi CTA kuvan päällä */
.hero-media img { object-position: 45% 55%; }
.hero-media::after {
  background:
    linear-gradient(180deg, rgba(17, 17, 17, 0.35) 0%, rgba(17, 17, 17, 0.2) 35%, rgba(17, 17, 17, 0.45) 100%),
    radial-gradient(ellipse 60% 55% at 50% 55%, rgba(17, 17, 17, 0.55) 0%, rgba(17, 17, 17, 0) 100%);
}
.hero-content--center { justify-self: center; text-align: center; }
.hero-content--center > * { margin-inline: auto; }
.hero-content--center h1 { max-width: 16em; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35); }
.hero-content--center .hero-lead { max-width: 36rem; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4); }
.hero-content--center .hero-actions { justify-content: center; }
.hero-eyebrow {
  color: var(--white) !important;
  font-size: clamp(0.8125rem, 0.75rem + 0.3vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

@media (max-width: 767px) {
  .hero { min-height: 100vh; min-height: 100svh; }
  .hero-media img { object-position: 50% 50%; }
  .hero-content { padding-bottom: 3.5rem; }
  .hero h1 { font-size: clamp(2rem, 1.1rem + 4.4vw, 2.5rem); }
  .hero-actions .btn { flex: 0 1 auto; }
}

/* ==========================================================================
   Palvelukortit: kuva + punertava harso, otsikko ja ääriviivalinkki
   ========================================================================== */
.svc-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}
.svc-cards--5 {
  /* Puolikas sarake: kaksi yhdessä (+ väli) = alkuperäisen neljän kortin rivin kortin leveys */
  grid-template-columns: repeat(6, calc(((100% - 3 * 1.25rem) / 4 - 1.25rem) / 2));
  justify-content: center;
}
/* Etusivun viisi korttia: kolme ylhäällä, kaksi keskitettynä alhaalla, kaikki 1:1 */
.svc-cards--5 .svc-card { grid-column: span 2; }
.svc-cards--5 .svc-card:nth-child(4) { grid-column: 2 / span 2; }
/* Etusivulla korttirivi levenee hieman tekstisarakkeen yli (container-yksiköt eivät laske vierityspalkkia) */
.services { container-type: inline-size; }
.services .svc-cards {
  --cards-w: min(100cqw - 32px, 1440px);
  width: var(--cards-w);
  margin-inline: calc((100% - var(--cards-w)) / 2);
}

.svc-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 1 / 1;
  min-height: 300px;
  padding: clamp(1.5rem, 1rem + 1vw, 1.75rem);
  overflow: hidden;
  border-radius: 12px;
  background: var(--dark-900);
  color: var(--white);
}
.svc-card-media { position: absolute; inset: 0; z-index: -2; }
.svc-card-media picture { height: 100%; }
.svc-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}
/* Tumma punertava harso (::before) häviää hoverissa, jolloin kuvan omat värit tulevat esiin.
   Alareunan tummennus (::after) pitää otsikon luettavana. */
.svc-card::before,
.svc-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transition: opacity 0.45s var(--ease-out);
}
.svc-card::before {
  background: linear-gradient(315deg, rgba(110, 22, 16, 0.55), rgba(40, 24, 22, 0.4) 50%, rgba(17, 17, 17, 0.25));
}
.svc-card::after {
  background: linear-gradient(0deg, rgba(17, 17, 17, 0.7) 0%, rgba(17, 17, 17, 0.35) 40%, rgba(17, 17, 17, 0) 70%);
}
.svc-card h3 {
  color: var(--white);
  font-size: clamp(1.6rem, 1.25rem + 1.1vw, 2.2rem);
  line-height: 1.2;
}
.card-link { align-self: flex-start; margin-top: 1.25rem; }
/* Koko kortti on klikattava (::after on varattu nuoliympyrälle) */
.card-link::before { content: ""; position: absolute; inset: 0; z-index: 1; }
.card-link:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }
.svc-card:focus-within::before { opacity: 0; }
@media (hover: hover) {
  .svc-card:hover::before { opacity: 0; }
  .svc-card:hover .svc-card-media img { transform: scale(1.05); }
  .svc-card:hover .card-link { filter: brightness(0.94) saturate(1.08); }
  .svc-card:hover .card-link::after { transform: rotate(45deg); }
}

/* Muut palvelut: neljä korttia rivissä, joten otsikot hieman pienempinä */
.more-services .svc-card h3 { font-size: clamp(1.3rem, 1.1rem + 0.5vw, 1.45rem); }

@media (max-width: 1279px) {
  .svc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-card { aspect-ratio: 4 / 3.4; }
  /* Viisi korttia: 2 + 2 + viimeinen keskitettynä */
  .svc-cards--5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .svc-cards--5 .svc-card, .svc-cards--5 .svc-card:nth-child(4) { grid-column: span 2; }
  .svc-cards--5 .svc-card:last-child { grid-column: 2 / span 2; }
  .more-services .svc-card h3 { font-size: clamp(1.6rem, 1.25rem + 1.1vw, 2.2rem); }
}
@media (max-width: 599px) {
  .svc-cards, .svc-cards--5 { grid-template-columns: 1fr; }
  .svc-card { aspect-ratio: 1 / 1; min-height: 0; }
  .svc-cards--5 .svc-card, .svc-cards--5 .svc-card:nth-child(4), .svc-cards--5 .svc-card:last-child { grid-column: auto; }
}

/* ==========================================================================
   Hintalaskuri
   ========================================================================== */
.calc-section { background: var(--paper); }
.calc-head { text-align: center; margin-inline: auto; }
.calc-head .section-lead { margin-inline: auto; }
.calc {
  max-width: 1080px;
  margin-inline: auto;
  padding: clamp(1.25rem, 0.5rem + 3vw, 3rem);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(34, 31, 31, 0.05), 0 24px 60px rgba(17, 17, 17, 0.08);
}

/* Vaiheet */
.calc-steps {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: clamp(1.75rem, 1.25rem + 1.5vw, 2.5rem);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
}
.calc-steps li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem 0.4rem 0.4rem;
  border-radius: var(--pill);
  background: var(--paper);
  transition: background-color 0.3s ease, color 0.3s ease;
}
.calc-step-num {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--white);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8125rem;
}
.calc-steps li.is-active { background: var(--dark-900); color: var(--white); }
.calc-steps li.is-active .calc-step-num { background: var(--accent-gradient); color: var(--white); }
.calc-steps li.is-done .calc-step-num { background: var(--accent-gradient); color: var(--white); }

/* Vaiheen vaihto */
.calc-stage.is-entering { animation: calc-enter 0.45s var(--ease-out) both; }
@keyframes calc-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* Vaihe 1: palvelun valinta */
.calc-question {
  margin-bottom: 1.5rem;
  text-align: center;
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.calc-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.calc-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
  width: 100%;
  height: 100%;
  padding: 0.75rem 0.75rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.3s ease, transform 0.3s var(--ease-out);
}
.calc-media {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 0.88;
  border-radius: 12px;
  background: radial-gradient(ellipse 70% 65% at 50% 60%, #f5e6e3 0%, #faf6f5 70%, #fbf9f8 100%);
  overflow: hidden;
}
.calc-media picture { display: block; width: 76%; }
.calc-media img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 14px rgba(17, 17, 17, 0.14));
  transition: transform 0.45s var(--ease-out);
}
.calc-option-text { display: grid; gap: 0.25rem; min-width: 0; padding-inline: 0.65rem 2.5rem; }
.calc-option-title { font-family: var(--font-head); font-size: 1.125rem; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); line-height: 1.25; }
.calc-option-sub { font-size: 0.875rem; color: var(--muted); }
.calc-option-arrow {
  position: absolute;
  right: 1.1rem; bottom: 1.2rem;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--paper) var(--arrow-accent) center / 16px no-repeat;
  transition: transform 0.3s var(--ease-out), background-color 0.25s ease;
}
@media (hover: hover) {
  .calc-option:hover { border-color: rgba(201, 41, 31, 0.45); box-shadow: 0 14px 34px rgba(17, 17, 17, 0.1); transform: translateY(-3px); }
  .calc-option:hover .calc-media img { transform: translateY(-6px) scale(1.04); }
  .calc-option:hover .calc-option-arrow { transform: rotate(45deg); background-color: rgba(201, 41, 31, 0.12); }
}
.calc-option:active { transform: translateY(0) scale(0.99); }
.calc-option:focus-visible { outline: 3px solid var(--accent-600); outline-offset: 3px; }
.calc-other { margin-top: 1.5rem; text-align: center; color: var(--muted); font-size: 0.9375rem; }
.calc-other a { color: var(--accent-600); font-weight: 600; text-underline-offset: 3px; }

/* Vaihe 2: laskuri */
.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 1rem;
  align-items: stretch;
}
.calc-inputs-card {
  padding: clamp(1.25rem, 1rem + 1vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.calc-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.calc-card-head h3 { font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem); }
.calc-card-head h3:focus { outline: none; }
.calc-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0.4rem 0.95rem 0.4rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--white);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.calc-back::before {
  content: "";
  width: 7px; height: 7px;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}
@media (hover: hover) {
  .calc-back:hover { border-color: var(--line-strong); background: var(--paper); }
}

.calc-inputs { display: grid; gap: 1.75rem; }
.calc-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.calc-label {
  display: block;
  padding: 0;
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
}
.calc-field--range { display: grid; grid-template-columns: 1fr auto; align-items: end; column-gap: 1rem; }
.calc-field--range .calc-label { margin-bottom: 0.2rem; }
.calc-value {
  font-family: var(--font-head);
  font-size: clamp(2rem, 1.6rem + 1.4vw, 2.6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.calc-unit { font-size: 0.5em; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.calc-range, .calc-range-scale, .calc-field--range .calc-hint { grid-column: 1 / -1; }

/* Liukusäädin: täyttö punaisella liukuvärillä --p asti, iso peukalo kosketukseen */
.calc-range {
  --p: 50%;
  width: 100%;
  height: 44px;
  margin: 0.75rem 0 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  touch-action: pan-y;
}
.calc-range::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: var(--pill);
  background: linear-gradient(var(--accent), var(--accent)) 0 0 / var(--p) 100% no-repeat, #dcdcdc;
}
.calc-range::-moz-range-track { height: 10px; border-radius: var(--pill); background: #dcdcdc; }
.calc-range::-moz-range-progress { height: 10px; border-radius: var(--pill); background: var(--accent); }
.calc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px; height: 30px;
  margin-top: -10px;
  border: 3px solid var(--white);
  border-radius: 50%;
  background: var(--accent-600);
  box-shadow: 0 0 0 1px rgba(179, 36, 27, 0.35), 0 4px 12px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease;
}
.calc-range::-moz-range-thumb {
  width: 24px; height: 24px;
  border: 3px solid var(--white);
  border-radius: 50%;
  background: var(--accent-600);
  box-shadow: 0 0 0 1px rgba(179, 36, 27, 0.35), 0 4px 12px rgba(0, 0, 0, 0.18);
}
.calc-range:active::-webkit-slider-thumb { transform: scale(1.12); }
.calc-range:focus-visible { outline: none; }
.calc-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(201, 41, 31, 0.35), 0 4px 12px rgba(0, 0, 0, 0.18); }
.calc-range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(201, 41, 31, 0.35); }
.calc-range-scale { display: flex; justify-content: space-between; font-size: 0.8125rem; color: var(--muted); }
.calc-hint { margin-top: 0.75rem; font-size: 0.875rem; color: var(--muted); }

/* Valintapillerit (radio) */
.calc-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.calc-pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  background: var(--white);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
@media (hover: hover) {
  .calc-pill:hover { border-color: var(--accent-600); }
}
input:checked + .calc-pill {
  border-color: transparent;
  background: var(--accent-gradient);
  color: var(--white);
}
input:focus-visible + .calc-pill { outline: 3px solid var(--accent-600); outline-offset: 2px; }

/* Yhteenveto */
.calc-summary {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
  border-radius: var(--radius);
  background: var(--accent);
  color: rgba(255, 255, 255, 0.92);
}
.calc-summary-label { font-size: 0.9375rem; color: var(--white); font-weight: 600; }
.calc-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.3em;
  margin-top: 0.5rem;
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  white-space: nowrap;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}
.calc-price-sep, .calc-price-cur { color: rgba(255, 255, 255, 0.75); font-weight: 500; }
.calc-summary-note { margin-top: 0.5rem; font-size: 0.8125rem; color: rgba(255, 255, 255, 0.9); }
.calc-tax {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.12);
  font-size: 0.875rem;
}
.calc-tax-value { margin-top: 0.2rem; font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; color: var(--white); font-variant-numeric: tabular-nums; }
.calc-tax-note { margin-top: 0.35rem; font-size: 0.8125rem; color: rgba(255, 255, 255, 0.9); }
.calc-disclaimer { margin-top: 1.25rem; font-size: 0.8125rem; color: rgba(255, 255, 255, 0.9); }
.calc-sample {
  margin-top: 1rem;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--white);
  font-size: 0.8125rem;
}
.calc-cta { margin-top: auto; align-self: stretch; justify-content: space-between; padding-left: 1.5rem; }
/* Punaisella pohjalla valkoinen painike, punainen nuolipallo */
.calc-summary .btn-primary { background: var(--white); color: var(--ink); }
.calc-summary :focus-visible { outline-color: var(--white); }
.calc-summary .btn-primary::after { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M9 7h8v8'/%3E%3C/svg%3E") center / 18px no-repeat; }
.calc-disclaimer + .calc-cta, .calc-sample + .calc-cta { margin-top: 1.5rem; }

@media (max-width: 1023px) {
  .calc-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 559px) {
  .calc { border-radius: var(--radius); }
  .calc-options { grid-template-columns: 1fr; gap: 0.6rem; }
  .calc-option { flex-direction: row; align-items: center; gap: 1rem; padding: 1rem 1.1rem; }
  .calc-media { flex: 0 0 auto; width: 88px; aspect-ratio: 1; border-radius: 10px; }
  .calc-media picture { width: 90%; }
  .calc-option-arrow { top: 50%; bottom: auto; margin-top: -16px; }
  .calc-steps { font-size: 0.8125rem; }
}
@media (max-width: 399px) {
  .calc-price { white-space: normal; font-size: 1.6rem; }
  .calc-option { gap: 0.75rem; padding-inline: 0.85rem; }
  .calc-media { width: 68px; }
  .calc-option-text { padding-inline: 0 2.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .calc-stage.is-entering { animation: none; }
  .calc-option, .calc-media img, .calc-option-arrow { transition: none; }
}

/* ==========================================================================
   Meistä: keskitetty otsikko, kuva ja toimintaperiaatteet
   ========================================================================== */
.about { background: #f8f4f3; }
.about-head { max-width: 54rem; margin: 0 auto; text-align: center; }
.about-eyebrow {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}
.about-head h2 { margin-top: 1.25rem; }
.about-lead { margin-top: 1.25rem; font-size: 1.0625rem; color: var(--muted); }
.about-lead + .about-lead { margin-top: 1rem; }

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  align-items: center;
  margin-top: clamp(3rem, 2rem + 3vw, 5rem);
}
.about-media { aspect-ratio: 4 / 2.9; overflow: hidden; border-radius: var(--radius-sm); }
.about-media picture { display: block; height: 100%; }
.about-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; transform: scale(1.06); }

.about-point {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line-strong);
}
.about-point:first-child { padding-top: 0; }
.about-point:last-child { padding-bottom: 0; border-bottom: 0; }
/* Täytetyt ikonit maskina, täyttönä nappien liukuväri */
.about-icon {
  flex: 0 0 auto;
  width: 52px; height: 52px;
  background: var(--accent-gradient);
  -webkit-mask: var(--icon) center / contain no-repeat;
          mask: var(--icon) center / contain no-repeat;
}
.about-icon--sopimus { --icon: url("../img/ikonit/clipboard-text.svg"); }
.about-icon--aikataulu { --icon: url("../img/ikonit/calendar-check.svg"); }
.about-icon--tyonjalki { --icon: url("../img/ikonit/paint-roller.svg"); }
.about-icon--kalusto { --icon: url("../img/ikonit/toolbox.svg"); }
.about-point h3 { font-size: clamp(1.2rem, 1.05rem + 0.5vw, 1.5rem); font-weight: 500; letter-spacing: -0.015em; line-height: 1.25; }
.about-point p { margin-top: 0.6rem; font-size: 0.9375rem; color: var(--muted); }

/* Luvut: iso punainen numero, selite alla, pystyviivat välissä */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(3.5rem, 2.5rem + 3vw, 5.5rem);
  padding-top: clamp(2rem, 1.5rem + 2vw, 3rem);
  border-top: 1px solid var(--ink);
}
.stat {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 0.5rem;
  padding-inline: 1rem;
  text-align: center;
}
.stat + .stat { border-left: 1px solid var(--line-strong); }
.stat-value {
  font-family: var(--font-head);
  font-size: clamp(3rem, 2rem + 4vw, 5.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat-suffix { font-size: 0.6em; letter-spacing: 0; vertical-align: 0.55em; }
.stat-label { font-size: 1rem; font-weight: 500; color: var(--muted); }

@media (max-width: 1023px) {
  .about-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 599px) {
  .stats { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); padding-top: 1.75rem; }
}
@media (max-width: 479px) {
  .about-eyebrow { font-size: 0.75rem; letter-spacing: 0.02em; padding-inline: 0.9rem; }
  .about-point { gap: 1rem; }
  .about-icon { width: 44px; height: 44px; }
}

/* ==========================================================================
   Palvelemme: palveluosion jatko
   ========================================================================== */
.audience {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 10fr);
  gap: 1.5rem clamp(1.5rem, 1rem + 2vw, 3rem);
  margin-top: clamp(3rem, 2rem + 3vw, 5rem);
  padding-top: clamp(1.5rem, 1rem + 1vw, 2rem);
  border-top: 1px solid var(--ink);
}
.audience-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6b706f;
  padding-top: 0.45rem;
}
.audience-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.audience-list li {
  display: grid;
  align-content: start;
  gap: 0.4rem;
  padding: 0 clamp(1rem, 0.5rem + 1vw, 1.75rem);
  border-left: 1px solid var(--line-strong);
}
.audience-title {
  font-family: var(--font-head);
  font-size: clamp(1.15rem, 1rem + 0.5vw, 1.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
}
.audience-text { font-size: 0.9375rem; color: var(--muted); }
@media (max-width: 1023px) {
  .audience { grid-template-columns: minmax(0, 1fr); }
  .audience-list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.75rem; }
  .audience-list li:nth-child(odd) { border-left: 0; padding-left: 0; }
}
@media (max-width: 479px) {
  .audience-list { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .audience-list li { border-left: 0; padding: 0.9rem 0; border-top: 1px solid var(--line); }
  .audience-list li:first-child { border-top: 0; padding-top: 0; }
}

/* ==========================================================================
   Väli-CTA
   ========================================================================== */
.midcta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--dark-950);
  color: var(--white);
}
.midcta-media { position: absolute; inset: 0; z-index: -1; }
.midcta-media img { width: 100%; height: 100%; object-fit: cover; object-position: 68% 50%; }
.midcta-inner { padding-block: clamp(5rem, 3rem + 6vw, 8.5rem); }
.midcta h2 { color: var(--white); max-width: 16em; }
.midcta p { margin-top: 1.25rem; max-width: 32rem; font-size: 1.1875rem; color: rgba(255, 255, 255, 0.9); }
.midcta .btn { margin-top: 2rem; }

/* ==========================================================================
   Työn kulku: isot numerot ja viisi vaihetta rivissä
   ========================================================================== */
.process { background: var(--white); }
.process-head { max-width: 44rem; }
.process h2 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); }
/* Lyhyt punainen viiva otsikon alla */
.process-head h2::after {
  content: "";
  display: block;
  width: 40px; height: 2px;
  margin-top: 1.5rem;
  background: var(--accent);
}
.process-head p { margin-top: 1.5rem; font-size: 1.125rem; color: var(--muted); }

.steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2rem clamp(1.25rem, 0.5rem + 2vw, 2.5rem);
  margin-top: clamp(3rem, 2rem + 3vw, 4.5rem);
}
.step-num {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(2.75rem, 2rem + 2vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.step h3 { margin-top: 1.25rem; font-size: 1.15rem; line-height: 1.3; }
.step p { margin-top: 0.75rem; font-size: 0.9375rem; line-height: 1.65; color: var(--muted); }

.process-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem); }

@media (max-width: 1023px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 559px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 2.25rem; }
  .process-actions .btn { flex: 1 1 100%; }
}

/* ==========================================================================
   Toiminta-alue
   ========================================================================== */
.area { background: var(--paper); }
.area-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 1rem + 5vw, 6rem);
  align-items: center;
}
.area-text > p { margin-top: 1.25rem; font-size: 1.125rem; color: var(--muted); max-width: 38rem; }
.towns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 2.5rem;
}
.town {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
  font-family: var(--font-head);
  font-size: clamp(1.2rem, 1.05rem + 0.5vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
}
.town-icon { flex: 0 0 auto; width: 1.5em; height: 1.5em; color: var(--accent-600); }
.town-icon [opacity] { opacity: 0.35; }
.town--region { color: var(--accent-600); }

.area-figure { max-width: 380px; justify-self: center; width: 100%; }
.area-map { display: block; width: 100%; height: auto; }
.area-figure figcaption { margin-top: 1rem; font-size: 0.8125rem; color: var(--muted); text-align: center; }

@media (max-width: 1023px) {
  .area-grid { grid-template-columns: 1fr; }
  .area-figure { max-width: 280px; }
}
@media (max-width: 479px) {
  .towns { grid-template-columns: 1fr; }
}

/* ==========================================================================
   UKK
   ========================================================================== */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: start;
}
.faq--svc { background: var(--paper); }
.faq-intro { position: sticky; top: calc(var(--header-h) + var(--header-gap) + 2rem); }
.faq-intro p { margin-top: 1rem; color: var(--muted); }
.faq-list { display: grid; gap: 0.6rem; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  transition: border-color 0.2s ease;
}
.faq-item[open] { border-color: var(--line-strong); }
.faq-item summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 1rem 4rem 1rem 1.4rem;
  font-family: var(--font-head);
  font-size: clamp(1.02rem, 0.98rem + 0.25vw, 1.15rem);
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  position: absolute;
  right: 1rem; top: 50%;
  width: 32px; height: 32px;
  margin-top: -16px;
  border-radius: 50%;
  background:
    linear-gradient(var(--white), var(--white)) center / 12px 2px no-repeat,
    linear-gradient(var(--white), var(--white)) center / 2px 12px no-repeat,
    var(--accent-gradient);
  transition: transform 0.25s var(--ease-out);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
@media (hover: hover) {
  .faq-item:hover { border-color: var(--line-strong); }
}
.faq-answer { padding: 0 4rem 1.4rem 1.4rem; max-width: 46rem; color: var(--muted); }

@media (max-width: 1023px) {
  .faq-grid { grid-template-columns: 1fr; }
  .faq-intro { position: static; }
}
@media (max-width: 479px) {
  .faq-item summary { padding-left: 1.1rem; padding-right: 3.5rem; }
  .faq-answer { padding: 0 1.1rem 1.3rem; }
}

/* ==========================================================================
   Yhteystiedot + lomake
   ========================================================================== */
.contact {
  padding-block: var(--section-y);
  background: linear-gradient(180deg, #f8f4f3 0%, #f2e9e7 100%);
  border-top: 1px solid #eadcd9;
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 1rem + 5vw, 6rem);
  align-items: start;
}
.contact-info > p { margin-top: 1.25rem; font-size: 1.125rem; max-width: 30rem; color: var(--muted); }
.contact-details { margin-top: 2.5rem; display: grid; gap: 0.75rem; }
.contact-details > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 1rem;
  align-items: center;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid #eadcd9;
}
.contact-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--accent-gradient);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(201, 41, 31, 0.24);
}
.contact-icon-svg { width: 26px; height: 26px; }
.contact-icon-svg [opacity] { opacity: 0.35; }
.contact-details dt { font-size: 0.875rem; color: var(--muted); }
.contact-details dd { font-family: var(--font-head); font-size: 1.2rem; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.contact-details a { color: var(--accent-700); text-decoration: none; }
@media (hover: hover) {
  .contact-details a:hover { text-decoration: underline; text-underline-offset: 4px; }
}

.form-wrap {
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(34, 31, 31, 0.05), 0 24px 60px rgba(150, 30, 22, 0.1);
  color: var(--text);
  padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
}
.form-wrap:focus { outline: none; }
.form-note { font-size: 0.875rem; color: var(--muted); margin-bottom: 1.5rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.25rem; min-width: 0; }
.field label { font-size: 0.9375rem; font-weight: 500; color: var(--ink); }
.req { color: var(--accent-600); }
.optional { font-weight: 400; color: var(--muted); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 0.7rem 0.95rem;
  background: var(--paper);
  border: 1px solid #8e9392;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
  background: var(--white);
  border-color: var(--accent-600);
  box-shadow: 0 0 0 3px rgba(201, 41, 31, 0.3);
}
.select { position: relative; }
.select::after {
  content: "";
  position: absolute;
  right: 1rem; top: 50%;
  width: 8px; height: 8px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.select select { padding-right: 2.5rem; cursor: pointer; }
.field-hint { font-size: 0.875rem; color: var(--muted); }
.field-error { font-size: 0.875rem; font-weight: 600; color: var(--error); }
.field-error:empty { display: none; }
.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea { border-color: var(--error); border-width: 2px; padding: calc(0.7rem - 1px) calc(0.95rem - 1px); }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 0.5rem; }
.form-actions .btn[disabled] { opacity: 0.7; cursor: progress; }
.form-status { font-size: 0.9375rem; font-weight: 600; }
.form-status.is-error { color: var(--error); }

.form-success { padding-block: 1rem; }
.form-success:focus { outline: none; }
.form-success h3 { position: relative; padding-top: 1.5rem; }
.form-success h3::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 48px; height: 4px;
  border-radius: 4px;
  background: var(--accent);
}
.form-success p { margin-top: 0.75rem; color: var(--muted); }

@media (max-width: 1023px) {
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 639px) {
  .field-row { grid-template-columns: 1fr; }
  .form-actions .btn { width: 100%; justify-content: space-between; padding-left: 1.5rem; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--paper); color: var(--text); font-size: 0.9375rem; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) repeat(4, minmax(0, 2fr));
  gap: 2.5rem;
  padding-block: clamp(3rem, 2rem + 3vw, 4.5rem);
}
.footer-name { font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 0.75rem; }
.footer-brand p:last-child { max-width: 24rem; color: var(--muted); }
.footer-title {
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
}
.footer-col li + li { margin-top: 0.5rem; }
.footer-col li { color: var(--muted); }
.footer-col a { text-decoration: none; }
@media (hover: hover) {
  .footer-col a:hover, .footer-bottom a:hover { color: var(--accent-600); }
}
.footer-bottom {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.footer-bottom::before {
  content: "";
  position: absolute;
  top: 0; left: var(--gutter); right: var(--gutter);
  height: 1px;
  background: var(--line-strong);
}
.footer-bottom a { text-decoration: none; }

@media (max-width: 1023px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 639px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ==========================================================================
   Palvelusivut
   ========================================================================== */
.page-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: end;
  min-height: min(78svh, 640px);
  padding-top: calc(var(--header-h) + var(--header-gap) + clamp(3rem, 2rem + 4vw, 5rem));
  padding-bottom: clamp(3rem, 2rem + 3vw, 4.5rem);
  overflow: hidden;
  background: var(--dark-900);
  color: var(--white);
}
.page-hero-media { position: absolute; inset: 0; z-index: -2; }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(0deg, rgba(17, 17, 17, 0.6) 0%, rgba(17, 17, 17, 0) 60%),
    var(--card-overlay);
}
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; font-size: 0.9375rem; color: rgba(255, 255, 255, 0.88); }
.breadcrumb li + li::before { content: "/"; margin-right: 0.5rem; opacity: 0.7; }
.breadcrumb a { color: var(--white); text-underline-offset: 3px; }
.page-hero h1 { margin-top: 1.25rem; max-width: 16em; color: var(--white); font-weight: 600; }
.page-hero .hero-lead { max-width: 38rem; }
.page-hero .hero-actions { margin-top: 2rem; }

/* Palvelusivu: kiinteä sisällysluettelo ja viivoilla erotetut palvelut */
.svc-layout {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 1rem + 5vw, 7rem);
  align-items: start;
}
.svc-aside { position: sticky; top: calc(var(--header-h) + var(--header-gap) + 2.5rem); }
.svc-aside h2 { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.9rem); }
.svc-aside-lead { margin-top: 1rem; color: var(--muted); font-size: 1.0625rem; max-width: 26rem; }
.svc-toc { margin-top: 2.25rem; border-top: 1px solid var(--line); }
.svc-toc a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.3s var(--ease-out);
}
.svc-toc-num { flex: 0 0 auto; width: 1.6rem; font-size: 0.8125rem; color: #8a8f8e; font-variant-numeric: tabular-nums; }
@media (hover: hover) {
  .svc-toc a:hover { color: var(--accent-700); padding-left: 0.4rem; }
}

.svc-rows { border-top: 1px solid var(--ink); }
.svc-row {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  column-gap: 1rem;
  padding: clamp(2rem, 1.5rem + 2vw, 3.25rem) 0;
  border-bottom: 1px solid var(--line-strong);
  scroll-margin-top: calc(var(--header-h) + var(--header-gap) + 1.5rem);
}
.svc-row > * { grid-column: 2; }
.svc-row-num {
  grid-column: 1;
  grid-row: 1;
  padding-top: 0.55rem;
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent-600);
  font-variant-numeric: tabular-nums;
}
.svc-row h3 { grid-row: 1; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem); line-height: 1.15; letter-spacing: -0.025em; }
.svc-row-text { margin-top: 0.9rem; font-size: 1.0625rem; color: var(--muted); max-width: 40rem; }
.svc-row-label {
  margin-top: 1.75rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6b706f;
}
.svc-row-steps { margin-top: 0.6rem; max-width: 40rem; }
.svc-row-steps li {
  display: flex;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
}
.svc-row-steps li::before {
  content: "";
  flex: 0 0 auto;
  width: 14px; height: 2px;
  margin-top: 0.72em;
  background: var(--accent);
}
.svc-row-steps a { color: var(--accent-700); text-underline-offset: 3px; }

.more-services h2 { margin-bottom: clamp(2rem, 1.5rem + 2vw, 3rem); }

/* ==========================================================================
   Asiakaspalaute (etusivu)
   ========================================================================== */
.testimonial { background: var(--white); }
.testimonial-media { max-width: 50rem; margin: 0 auto clamp(2.5rem, 2rem + 2vw, 3.5rem); overflow: hidden; border-radius: var(--radius-sm); }
.testimonial-media picture { display: block; }
.testimonial-media img { width: 100%; height: auto; transform: scale(1.06); }
.testimonial-inner { max-width: 50rem; margin-inline: auto; text-align: center; }
.testimonial-inner::before {
  content: "\201D";
  display: block;
  font-family: var(--font-head);
  font-size: clamp(5rem, 4rem + 4vw, 7.5rem);
  font-weight: 700;
  line-height: 0.6;
  color: var(--accent);
}
.testimonial-label {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.testimonial-quote { margin-top: 1.5rem; }
.testimonial-quote p { font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); line-height: 1.65; color: var(--muted); }
.testimonial-quote p + p { margin-top: 1rem; }
.testimonial-quote .testimonial-highlight {
  margin-top: 1.75rem;
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2.1rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.testimonial-cite {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-strong);
  display: inline-block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
}

/* ==========================================================================
   Referenssit: luvut ruudukossa ja avatut kohteet
   ========================================================================== */
.ref-numbers h2, .ref-cases h2 { margin-bottom: clamp(2rem, 1.5rem + 2vw, 3rem); }
.ref-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
}
.ref-stat {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: clamp(1.5rem, 1rem + 1.5vw, 2.25rem) clamp(1rem, 0.5rem + 1vw, 1.75rem);
  border-bottom: 1px solid var(--line-strong);
}
.ref-stat:not(:nth-child(4n + 1)) { border-left: 1px solid var(--line-strong); }
.ref-stat-value {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 1.9rem + 2.2vw, 3.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.ref-stat-value--text { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.2rem); letter-spacing: -0.02em; line-height: 1.1; min-height: calc(clamp(2.5rem, 1.9rem + 2.2vw, 3.75rem)); display: flex; align-items: flex-end; }
.ref-stat-label { font-size: 1rem; font-weight: 500; line-height: 1.45; color: var(--ink); }

.ref-cases { background: var(--paper); }
.ref-case-list { display: grid; gap: clamp(3rem, 2rem + 3vw, 5rem); }
.ref-case {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 1rem + 3vw, 4.5rem);
  align-items: center;
}
/* Ennen/jälkeen-kuvat näytetään rajaamatta, jotta jakoviiva ja molemmat puolet näkyvät */
.ref-case-media { overflow: hidden; border-radius: var(--radius-sm); }
.ref-case-media picture { display: block; }
.ref-case-media img { width: 100%; height: auto; transform: scale(1.04); }
/* Joka toinen kohde kuva oikealla */
.ref-case:nth-child(even) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.ref-case:nth-child(even) .ref-case-media { order: 2; }
.ref-case-place { font-size: 0.875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.ref-case h3 { margin-top: 0.6rem; font-size: clamp(1.75rem, 1.35rem + 1.3vw, 2.5rem); line-height: 1.15; }
.ref-case-text > p:not(.ref-case-place) { margin-top: 1.1rem; font-size: 1.0625rem; color: var(--muted); }
.ref-case-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.ref-case-tags li {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  background: var(--white);
  font-size: 0.875rem;
  font-weight: 500;
}

@media (max-width: 1023px) {
  .ref-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ref-stat:not(:nth-child(4n + 1)) { border-left: 0; }
  .ref-stat:nth-child(even) { border-left: 1px solid var(--line-strong); }
  .ref-case, .ref-case:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
  .ref-case:nth-child(even) .ref-case-media { order: 0; }
}
@media (max-width: 559px) {
  .ref-stats { grid-template-columns: minmax(0, 1fr); }
  .ref-stat:nth-child(even) { border-left: 0; }
  .ref-stat { padding-inline: 0; }
}

@media (max-width: 767px) {
  .page-hero { min-height: 0; }
  .page-hero h1 { font-size: clamp(1.85rem, 0.9rem + 4.8vw, 2.5rem); }
}
@media (max-width: 479px) {
  h1, h2, h3 { -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; }
}
@media (max-width: 899px) {
  .svc-layout { grid-template-columns: minmax(0, 1fr); }
  .svc-aside { position: static; }
}
@media (max-width: 559px) {
  .svc-row { grid-template-columns: minmax(0, 1fr); }
  .svc-row > *, .svc-row-num, .svc-row h3 { grid-column: 1; grid-row: auto; }
  .svc-row-num { padding-top: 0; margin-bottom: 0.4rem; }
}

/* Kiitos- ja 404-sivut */
.simple-page { min-height: 100svh; padding-top: calc(var(--header-h) + var(--header-gap) + var(--section-y)); }
.simple-page h1 { font-size: clamp(2rem, 1.4rem + 2.5vw, 3.25rem); max-width: 18em; }
.simple-page p { margin-top: 1.25rem; font-size: 1.125rem; color: var(--muted); }
.simple-page .btn { margin-top: 2rem; }

/* ==========================================================================
   Liikkeen alkutilat (vain kun JS + liike sallittu). main.js poistaa .motion-luokan,
   jos GSAP ei lataudu, joten sisältö ei koskaan jää piiloon.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  /* H1 jätetään näkyviin (LCP-elementti): sitä animoidaan vain liikkeellä */
  .js.motion .hero-anim:not(h1) { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .about-media img { transform: none; }
  .svc-card-media img { transition: none; }
  .nav-list, .menu-toggle-bars span { transition: none !important; }
}
