/* =================================================================
   Sähkötyö Pasi Nuottakari Oy — tyylit
   Hillitty vaalea pohja, grafiitinvärinen teksti ja nollajohtimen
   sininen korostus. Yhteinen tyylitiedosto kaikille sivuille.
   ================================================================= */

/* ---------- Fontit (itse isännöidyt) ---------- */
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-var.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

/* Layout: rauhallinen 12 palstan ruudukko, tummana kaistana vain yhteydenotto */
:root {
  --paper:  #F2F4F3;   /* sivun pohja */
  --sheet:  #FBFCFB;   /* kortit ja pinnat */
  --tint:   #E8ECEB;   /* vaihtoehtoinen osiopohja */
  --ink:    #14191D;   /* teksti */
  --ink-2:  #4A555C;   /* toissijainen teksti */
  --line:   #CDD4D4;   /* viivat */
  --accent: #1D5BA6;   /* N-sininen: linkit ja korostukset */
  --band:   #14191D;   /* yhteydenottokaista */
  --band-fg:#EEF2F1;
  --band-2: #A9B4B8;
  --band-line: #33404A;
  --on-accent: #FFFFFF;

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --fs-s: 0.9375rem;
  --fs-m: 1.0625rem;
  --fs-l: clamp(1.125rem, 0.4vw + 1rem, 1.25rem);
  --fs-h3: clamp(1.25rem, 0.5vw + 1.1rem, 1.45rem);
  --fs-h2s: clamp(1.45rem, 1vw + 1.15rem, 1.95rem);
  --fs-h2: clamp(1.75rem, 1.8vw + 1.2rem, 2.6rem);
  --fs-h1: clamp(2rem, 2.6vw + 1.25rem, 3.6rem);

  --wrap: 1200px;
  --space: clamp(3rem, 6vw, 5.5rem);
  --header-h: 68px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F1417; --sheet: #161C20; --tint: #131A1E; --ink: #E4EAE9; --ink-2: #A6B1B5; --line: #2D373D; --accent: #8DB8F2;
    --band: #1A2228; --band-fg: #EEF2F1; --band-2: #A9B4B8; --band-line: #34424C; --on-accent: #0F1417;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0F1417; --sheet: #161C20; --tint: #131A1E; --ink: #E4EAE9; --ink-2: #A6B1B5; --line: #2D373D; --accent: #8DB8F2;
  --band: #1A2228; --band-fg: #EEF2F1; --band-2: #A9B4B8; --band-line: #34424C; --on-accent: #0F1417;
  color-scheme: dark;
}

/* ---------- Perusta ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f-body); font-size: var(--fs-m); line-height: 1.65; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--paper); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; hyphens: manual; overflow-wrap: normal; }
p, figure, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
strong { font-weight: 600; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.wrap {
  width: 100%; max-width: calc(var(--wrap) + 64px); margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) {
  .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
}
.skip { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; font-weight: 600; }
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 12px); }

/* ---------- Typografia ---------- */
.h1, .h2, .h3 { font-family: var(--f-display); letter-spacing: -0.015em; }
.h1 { font-size: var(--fs-h1); font-weight: 780; font-stretch: 106%; line-height: 1.04; }
.h1--long { max-width: 22ch; }
.h2 { font-size: var(--fs-h2); font-weight: 760; font-stretch: 104%; line-height: 1.1; }
.h2--small { font-size: var(--fs-h2s); }
.h3 { font-size: var(--fs-h3); font-weight: 720; font-stretch: 102%; line-height: 1.2; letter-spacing: -0.005em; }
.lead { font-size: var(--fs-l); line-height: 1.6; color: var(--ink-2); max-width: 36rem; }

.arrow-link, .ext-link { color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.arrow-link { display: inline-flex; align-items: center; min-height: 44px; }
.arrow-link::after { content: "→"; margin-left: 0.4em; text-decoration: none; display: inline-block; }
.arrow-link:hover, .ext-link:hover { text-decoration-thickness: 2px; }

.list { display: grid; gap: 0.6rem; }
.list li { position: relative; padding-left: 1.4rem; }
.list li::before { content: ""; position: absolute; left: 0.2rem; top: 0.7em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.list--spaced { gap: 1rem; }

/* ---------- Painikkeet ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0.7rem 1.3rem;
  font: 600 var(--fs-m)/1.2 var(--f-body); text-decoration: none; border: 1.5px solid var(--ink); border-radius: 4px; text-align: center;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 479px) { .actions .btn { flex: 1 1 100%; } }

.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: var(--header-h); position: relative; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; min-width: 0; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-name { font-family: var(--f-display); font-weight: 760; font-stretch: 102%; font-size: 1.0625rem; line-height: 1.12; letter-spacing: -0.005em; }
.brand-name > span { display: block; white-space: nowrap; }
@media (min-width: 640px) { .brand-name > span { display: inline; } .brand-name { font-size: 1.125rem; } }

.header-actions { display: flex; align-items: center; gap: 0.5rem; flex: none; }
.call-btn, .menu-btn {
  display: inline-flex; align-items: center; gap: 0.45rem; min-height: 44px; padding: 0 0.8rem;
  border: 1.5px solid var(--ink); border-radius: 4px; font: 600 0.9375rem/1 var(--f-body); text-decoration: none; cursor: pointer;
}
.call-btn { background: var(--ink); color: var(--paper); }
.call-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.call-long { display: none; }
.menu-btn { background: transparent; color: var(--ink); }
.menu-btn-icon { display: grid; gap: 4px; width: 18px; }
.menu-btn-icon span { display: block; height: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
.menu-btn[aria-expanded="true"] .menu-btn-icon span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn-icon span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .menu-btn-icon span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.menu {
  display: none; position: absolute; top: 100%; left: 0; right: 0;
  background: var(--paper); border-bottom: 1px solid var(--line);
  padding: 0.25rem max(16px, env(safe-area-inset-right, 0px)) 1rem max(16px, env(safe-area-inset-left, 0px));
  box-shadow: 0 12px 24px -16px rgba(0,0,0,.25);
}
.menu.is-open { display: block; }
.menu-list a {
  display: flex; align-items: center; min-height: 54px; border-bottom: 1px solid var(--line);
  font-family: var(--f-display); font-weight: 700; font-size: 1.25rem; text-decoration: none;
}
.menu-list li:last-child a { border-bottom: 0; }
.menu-list a[aria-current="page"] { color: var(--accent); }
.menu-call { display: flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 52px; margin-top: 0.75rem; background: var(--ink); color: var(--paper); border-radius: 4px; font-weight: 600; text-decoration: none; }
.menu-call:hover { background: var(--accent); color: var(--on-accent); }

@media (min-width: 1100px) {
  .menu-btn { display: none; }
  .call-short { display: none; }
  .call-long { display: inline; }
  .menu { display: block; position: static; background: none; border: 0; padding: 0; box-shadow: none; order: 1; margin-left: auto; }
  .header-actions { order: 2; }
  .menu-list { display: flex; gap: 0.25rem; }
  .menu-call { display: none; }
  .menu-list a { min-height: 44px; padding: 0 0.7rem; border: 0; font-family: var(--f-body); font-weight: 600; font-size: 0.9375rem; position: relative; }
  .menu-list a:hover { color: var(--accent); }
  .menu-list a[aria-current="page"]::after { content: ""; position: absolute; left: 0.7rem; right: 0.7rem; bottom: 6px; height: 2px; background: var(--accent); }
}

/* ---------- Murupolku ---------- */
.crumbs { padding-top: 1.25rem; font-size: var(--fs-s); color: var(--ink-2); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.crumbs li + li::before { content: "/"; margin-right: 0.4rem; color: var(--line); }
.crumbs a { text-underline-offset: 3px; }

/* ---------- Etusivun hero ---------- */
.hero { padding-block: clamp(2rem, 5vw, 4.5rem) clamp(2.5rem, 5vw, 4.5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: center; }
.hero-copy { display: grid; gap: 1.25rem; min-width: 0; }
.hero-photo img, .page-hero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2.5rem, 5vw, 4.5rem); }
  .hero-copy .h1 { max-width: 14ch; }
}

/* ---------- Palvelukortit ---------- */
.services { padding-block: 0 var(--space); }
.services .h2 { margin-bottom: clamp(1.25rem, 2.5vw, 2rem); }
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
@media (min-width: 760px) and (max-width: 959px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cards .card:last-child { grid-column: 1 / -1; } .cards .card:last-child .card-img { aspect-ratio: 16 / 7; } }
@media (min-width: 960px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; } }
.card { position: relative; display: flex; flex-direction: column; background: var(--sheet); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; min-width: 0; }
.card-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 0.7rem; padding: 1.25rem 1.25rem 1.4rem; flex: 1; }
.card-body p { color: var(--ink-2); }
.card-link { text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; }
.card-link:focus-visible { outline: none; }
.card:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.card-more { margin-top: auto; padding-top: 0.4rem; color: var(--accent); font-weight: 600; }
.card:hover .card-link, .card:hover .card-more { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Luottamus ---------- */
.trust { padding-block: 0 var(--space); }
.trust-inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem 3rem; }
.trust-inner::before { content: ""; grid-column: 1 / -1; height: 1px; background: var(--line); margin-bottom: clamp(0.75rem, 2vw, 1.5rem); }
.trust-copy { display: grid; gap: 0.75rem; max-width: 40rem; }
.trust-copy .arrow-link { justify-self: start; }
@media (min-width: 960px) { .trust-inner { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }

/* ---------- Yhteydenottokaista ---------- */
.contact-band { background: var(--band); color: var(--band-fg); padding-block: clamp(2.75rem, 5vw, 4.5rem); --accent: #8DB8F2; }
.contact-band-inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.75rem 3rem; align-items: center; }
.contact-band-copy { display: grid; gap: 0.75rem; }
.contact-band-copy p { color: var(--band-2); font-size: var(--fs-l); max-width: 32rem; }
.contact-card { display: grid; gap: 0.35rem; min-width: 0; }
.contact-name { font-weight: 600; font-size: var(--fs-l); margin-bottom: 0.25rem; }
.contact-link {
  display: flex; align-items: center; gap: 0.75rem; min-height: 52px; min-width: 0;
  font-family: var(--f-display); font-weight: 720; font-size: clamp(1.25rem, 2vw + 0.8rem, 2rem); letter-spacing: -0.01em;
  text-decoration: none; border-top: 1px solid var(--band-line); padding-top: 0.35rem;
}
.contact-link span { min-width: 0; overflow-wrap: anywhere; }
.contact-link--mail { font-size: clamp(1.05rem, 1.2vw + 0.8rem, 1.5rem); }
.contact-link .ico { width: 24px; height: 24px; color: var(--accent); }
.contact-link:hover span { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
@media (min-width: 960px) { .contact-band-inner { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); } }

/* ---------- Alasivujen yläosa ---------- */
.page-hero { padding-block: clamp(1.5rem, 3vw, 2.5rem) clamp(2.5rem, 5vw, 4rem); }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: center; }
.page-hero-copy { display: grid; gap: 1.1rem; min-width: 0; }
.page-hero--text .page-hero-copy { max-width: 52rem; }
@media (min-width: 960px) { .page-hero-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2.5rem, 5vw, 4.5rem); } }
.price-line { display: grid; gap: 0.2rem; padding: 0.9rem 1rem; background: var(--sheet); border-left: 3px solid var(--accent); max-width: 36rem; }
.price-line strong { font-family: var(--f-display); font-size: 1.25rem; font-weight: 750; }
.price-line span { color: var(--ink-2); font-size: var(--fs-s); }

/* Sisältölohkot */
.prose-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem 4rem; padding-block: 0 var(--space); }
@media (min-width: 860px) { .prose-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.block { display: grid; gap: 0.9rem; align-content: start; min-width: 0; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.block p { max-width: 38rem; }

.section { padding-block: 0 var(--space); }
.section--tint { background: var(--tint); padding-block: var(--space); margin-bottom: var(--space); }
.section-head { display: grid; gap: 0.6rem; margin-bottom: 1.5rem; max-width: 44rem; }
.section-head p { color: var(--ink-2); }

/* ---------- Ilmalämpöpumppumallit ---------- */
.models { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 680px) { .models { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .models { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; } }
.model { display: flex; flex-direction: column; gap: 0.75rem; background: var(--sheet); border: 1px solid var(--line); border-radius: 4px; padding: 1.25rem; min-width: 0; }
.model-name { font-family: var(--f-display); font-weight: 720; font-size: 1.25rem; line-height: 1.2; }
.model-note { font-size: var(--fs-s); color: var(--ink-2); margin-top: -0.4rem; }
.model-key, .model-specs { display: grid; }
.model-key div, .model-specs div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-block: 0.45rem; border-bottom: 1px solid var(--line); }
.model-key div:first-child { border-top: 1px solid var(--line); }
.model-key dt, .model-specs dt { color: var(--ink-2); font-size: var(--fs-s); }
.model-key dd, .model-specs dd { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.model-more { margin-top: auto; }
.model-more summary {
  display: flex; align-items: center; justify-content: space-between; min-height: 44px; cursor: pointer; list-style: none;
  color: var(--accent); font-weight: 600;
}
.model-more summary::-webkit-details-marker { display: none; }
.model-more summary::after, .acc summary::after { content: "+"; font-family: var(--f-display); font-size: 1.5rem; font-weight: 500; line-height: 1; }
.model-more[open] summary::after, .acc[open] summary::after { content: "−"; }
.model-specs { padding-bottom: 0.25rem; }

/* Avattavat osiot */
.accordions { display: grid; border-top: 1px solid var(--ink); max-width: 52rem; }
.acc { border-bottom: 1px solid var(--line); }
.acc summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; cursor: pointer; list-style: none;
  font-family: var(--f-display); font-weight: 720; font-size: var(--fs-h3);
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary:hover span { text-decoration: underline; text-underline-offset: 4px; }
.acc .list { padding: 0.25rem 0 1.5rem; }

.files { display: grid; border-top: 1px solid var(--line); }
.files a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 52px; border-bottom: 1px solid var(--line); font-weight: 600; text-decoration: none; }
.files a:hover { color: var(--accent); }
.file-type { font-size: 0.8125rem; color: var(--accent); border: 1px solid currentColor; border-radius: 3px; padding: 0.05rem 0.4rem; }

/* ---------- Referenssit ---------- */
.refs { display: grid; gap: 2.5rem; padding-block: 0 var(--space); }
.ref-year { display: grid; gap: 0.5rem; }
.ref-list { border-top: 1px solid var(--ink); }
.ref { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.15rem 1rem; padding-block: 0.9rem; border-bottom: 1px solid var(--line); }
.ref-title { font-weight: 600; }
.ref-note { display: block; font-weight: 400; font-size: var(--fs-s); color: var(--ink-2); }
.ref-work { grid-column: 1; color: var(--ink-2); }
.ref-area { grid-column: 2; grid-row: 1; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (min-width: 860px) {
  .ref { grid-template-columns: minmax(0, 5fr) minmax(0, 5fr) minmax(5rem, 1fr); align-items: baseline; }
  .ref-work { grid-column: 2; grid-row: 1; color: var(--ink); }
  .ref-area { grid-column: 3; }
}

/* ---------- Yhteystiedot-sivu ---------- */
.contact-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem 4rem; padding-block: 0 var(--space); }
@media (min-width: 960px) { .contact-page { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.contact-side { display: grid; gap: 3rem; align-content: start; min-width: 0; }
.contact-name--lg { font-family: var(--f-display); font-size: var(--fs-h3); font-weight: 720; margin: 0; }
.contact-company { color: var(--ink-2); margin-top: -0.5rem; }
.facts { display: grid; }
.facts div { display: grid; gap: 0.2rem; padding-block: 0.9rem; border-bottom: 1px solid var(--line); }
.facts div:first-child { border-top: 1px solid var(--line); }
.facts dt { font-size: var(--fs-s); color: var(--ink-2); }
.facts dd { display: grid; gap: 0.35rem; justify-items: start; min-width: 0; }
.facts address { font-style: normal; font-size: var(--fs-l); }
.fact-link { font-family: var(--f-display); font-weight: 720; font-size: clamp(1.5rem, 2vw + 1rem, 2.1rem); text-decoration: none; line-height: 1.15; }
.fact-link--mail { font-size: clamp(1.1rem, 1vw + 0.9rem, 1.4rem); overflow-wrap: anywhere; }
.fact-link:hover { color: var(--accent); }
.columns { columns: 2 10rem; column-gap: 2rem; }
.columns li { padding-block: 0.3rem; break-inside: avoid; border-bottom: 1px solid var(--line); }

/* ---------- Footer: keskitetty ja tiivis kaikilla leveyksillä ---------- */
.site-footer { background: var(--sheet); border-top: 1px solid var(--line); padding-block: 1.5rem calc(1.25rem + env(safe-area-inset-bottom, 0px)); font-size: 0.875rem; color: var(--ink-2); text-align: center; line-height: 1.55; }
.footer-inner { display: grid; justify-items: center; gap: 0.75rem; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 0.5rem; color: var(--ink); font-family: var(--f-display); font-weight: 760; font-size: 1rem; margin-bottom: 0.15rem; }
.footer-brand .brand-mark { width: 22px; height: 22px; }
.footer-info a, .footer-links a { text-underline-offset: 3px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 1.1rem; }
.footer-links a { display: inline-flex; align-items: center; min-height: 40px; color: var(--ink); font-weight: 600; text-decoration: none; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }
.footer-copy { font-size: 0.8125rem; }

/* =================================================================
   Mobiili: tiivis header (alle 640 px) ja kevyempi asettelu (alle 760 px).
   ================================================================= */
@media (max-width: 639px) {
  :root { --header-h: 64px; }
  .header-inner { gap: 0.5rem; }
  .brand { gap: 0.55rem; }
  .brand-mark { width: 26px; height: 26px; }
  .brand-name { font-size: 1rem; line-height: 1.15; }
  .header-actions { gap: 0.4rem; }
  .call-btn, .menu-btn { width: 46px; height: 46px; min-height: 46px; padding: 0; justify-content: center; }
  .call-btn .ico { width: 21px; height: 21px; }
  .call-short, .menu-btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .menu-btn-icon { width: 20px; }
}

@media (max-width: 759px) {
  :root { --space: 2.75rem; }
  body { font-size: 1rem; }
  .lead { font-size: 1.0625rem; }

  /* Kuvat ulottuvat reunasta reunaan, teksti vasemmassa reunassa */
  .hero { padding-block: 1.5rem 2.5rem; }
  .hero-grid, .page-hero-grid { gap: 1.5rem; }
  .hero-photo, .page-hero-photo {
    margin-left: calc(-1 * max(16px, env(safe-area-inset-left, 0px)));
    margin-right: calc(-1 * max(16px, env(safe-area-inset-right, 0px)));
  }
  .hero-photo img, .page-hero-photo img { aspect-ratio: 3 / 2; border-radius: 0; }
  .page-hero { padding-block: 1rem 2.5rem; }
  .crumbs { padding-top: 1rem; }

  /* Painikkeet: ensisijainen täysleveä, toissijainen kevyt tekstilinkki */
  .actions { flex-direction: column; align-items: stretch; gap: 0.25rem; }
  .actions .btn { flex: none; border-radius: 10px; }
  .actions .btn-line { border-color: transparent; background: none; min-height: 46px; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
  .actions .btn-line:hover { background: none; color: var(--accent); text-decoration-thickness: 2px; }
  .price-line { border-radius: 0 10px 10px 0; }

  /* Palvelut listana: pikkukuva, nimi, yksi virke */
  .services .h2 { margin-bottom: 0.5rem; }
  .cards { gap: 0; }
  .card { flex-direction: row; align-items: center; gap: 1rem; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; overflow: visible; padding-block: 1rem; }
  .cards .card:first-child { border-top: 1px solid var(--line); }
  .card picture { flex: none; }
  .card-img { width: 96px; height: 96px; aspect-ratio: 1; border-radius: 10px; }
  .card-body { padding: 0; gap: 0.25rem; }
  .card-body .h3 { font-size: 1.15rem; }
  .card-body p { font-size: 0.9375rem; line-height: 1.5; }
  .card-extra { display: none; }
  .card-more { padding-top: 0.15rem; font-size: 0.9375rem; }
  .card:focus-within { outline-offset: 4px; }

  /* Luottamus */
  .trust-inner { gap: 0.75rem; }
  .trust-inner::before { margin-bottom: 0.5rem; }
  .trust-copy p { font-size: 0.9875rem; }

  /* Yhteydenotto: lyhyt toimintakehotus keskitettynä, numerot napautettavina painikkeina */
  .contact-band { padding-block: 2.5rem; }
  .contact-band-inner { gap: 1.25rem; text-align: center; }
  .contact-band-copy { justify-items: center; }
  .contact-band-copy p { margin-inline: auto; font-size: 1rem; }
  .contact-card { gap: 0.6rem; }
  .contact-name { margin-bottom: 0; }
  .contact-link { justify-content: center; border: 1px solid var(--band-line); border-radius: 10px; padding: 0.5rem 1rem; min-height: 56px; font-size: 1.35rem; }
  .contact-link--mail { font-size: 1rem; }

  /* Sisältölohkot ja mallit */
  .prose-grid { gap: 2rem; }
  .block { padding-top: 1.25rem; }
  .model, .acc summary { border-radius: 10px; }
  .model { padding: 1.1rem; }
  .section--tint { padding-block: 2.5rem; }
  .facts .fact-link { font-size: 1.5rem; }
}
/* Etusivun mobiilihero: kuva täyttää ensimmäisen näkymän, keskitetty teksti
   tummennetun kuvan päällä. Tummennus on aina tumma, joten teksti on aina valkoinen. */
@media (max-width: 759px) {
  .hero { padding: 0; }
  .hero-grid { display: grid; grid-template-areas: "hero"; gap: 0; }
  .hero-photo, .hero-copy { grid-area: hero; }
  .hero-photo { position: relative; }
  .hero-photo img { aspect-ratio: auto; height: min(80svh, 640px); min-height: 520px; object-position: 40% 50% !important; }
  .hero-photo::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(10,14,17,.93) 0%, rgba(10,14,17,.72) 45%, rgba(10,14,17,.12) 74%, rgba(10,14,17,0) 100%);
  }
  .hero-copy {
    position: relative; z-index: 1; align-self: end;
    padding-bottom: 1.75rem; gap: 0.9rem;
    color: #FFFFFF; text-align: center; justify-items: center;
  }
  .hero-copy .h1 { font-stretch: 114%; font-weight: 800; font-size: clamp(1.9rem, 8.6vw, 2.6rem); line-height: 1.02; letter-spacing: -0.025em; max-width: 12ch; margin-inline: auto; }
  .hero-copy .h1-place { color: #9CC2F5; }
  .hero-copy .lead { color: rgba(255,255,255,.88); font-size: 1rem; line-height: 1.6; max-width: 30rem; margin-inline: auto; }
  .hero-copy .actions { width: 100%; margin-top: 0.25rem; }
  .hero-copy .btn-solid { background: #FFFFFF; color: #14191D; border-color: #FFFFFF; }
  .hero-copy .btn-solid:hover { background: #DCE6F5; border-color: #DCE6F5; color: #14191D; }
  .hero-copy .actions .btn-line, .hero-copy .actions .btn-line:hover { color: #FFFFFF; }
  .services { padding-top: 2.5rem; }
}

/* Mobiili: Palvelut-otsikko ja luottamusosio keskitettyinä */
@media (max-width: 759px) {
  .services .h2 { text-align: center; }
  .trust-inner { text-align: center; justify-items: center; }
  .trust-inner .h2 { margin-inline: auto; }
  .trust-inner::before { display: none; }
  .trust-copy { justify-items: center; }
  .trust-copy p { margin-inline: auto; max-width: 32rem; }
  .trust-copy .arrow-link { justify-self: center; }
}

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