/* =========================================================
   LVI-Union Oy — tyylit
   Värit: vihreä #42BA5B, tumma #001E2B
   ========================================================= */

/* ---------- Itse hostatut fontit ----------
   Ladattu Google Fontsista ja tarjoillaan omalta palvelimelta, jotta
   kävijän IP-osoite ei välity Googlelle. Vain latin + latin-ext.
   ------------------------------------------------------------------ */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/inter-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/inter-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/poppins-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/poppins-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/poppins-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/poppins-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/poppins-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/poppins-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


/* ---------- Tokenit ---------- */
:root {
  --green: #42ba5b;
  --green-dark: #2e8a42;
  --green-darker: #216831;
  --green-soft: #eaf7ee;
  --green-line: #c6e8d0;

  --ink: #001e2b;
  --ink-soft: #06303f;
  --ink-line: #0d3f52;

  --bg: #ffffff;
  --bg-alt: #f4f7f6;
  --text: #1b2b33;
  --text-muted: #55696f;
  --text-on-dark: #d7e6ec;

  --border: #e2e8e7;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(0, 30, 43, 0.06);
  --shadow: 0 12px 32px rgba(0, 30, 43, 0.10);
  --shadow-lg: 0 24px 60px rgba(0, 30, 43, 0.16);

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

  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(3.5rem, 8vw, 7rem);

  --header-h: 76px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 1.5rem + 3.4vw, 3.9rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem); font-weight: 700; }
h3 { font-size: clamp(1.15rem, 1rem + 0.7vw, 1.45rem); font-weight: 600; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--green-darker); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

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

:focus-visible {
  outline: 3px solid var(--green-dark);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.section { padding-block: var(--section-y); }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--ink); color: var(--text-on-dark); }
.section--dark h2,
.section--dark h3 { color: #fff; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-darker);
  margin-bottom: 0.9rem;
}
.section--dark .eyebrow { color: var(--green); }

.lede {
  font-size: clamp(1.05rem, 1rem + 0.45vw, 1.28rem);
  color: var(--text-muted);
  max-width: 62ch;
}
.section--dark .lede { color: var(--text-on-dark); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  background: var(--green);
  color: var(--ink);
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

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

/* ---------- Napit ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.95rem 1.6rem;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* vihreä pohja + tumma teksti = 7.4:1 kontrasti */
.btn--primary { background: var(--green); color: var(--ink); }
.btn--primary:hover { background: #55c86d; color: var(--ink); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: #fff; }

.btn--on-dark {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}
.btn--on-dark:hover { background: #fff; color: var(--ink); }

.btn--sm { padding: 0.7rem 1.25rem; font-size: 0.93rem; }
.btn--block { width: 100%; }

.btn svg { width: 1.15em; height: 1.15em; fill: currentColor; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.2s ease;
}
.header.is-stuck { box-shadow: var(--shadow-sm); }

.header__inner {
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;  /* valikko keskitetään palkkiin */
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
}

.header__logo { flex: none; display: block; }
.header__logo img { height: clamp(30px, 4vw, 38px); width: auto; }

.header__nav { justify-self: center; }

/* CTA-nappi navilistassa näkyy vain mobiilivalikossa */
.header__nav-list > li > .btn { display: none; }

.header__nav-list {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2rem);
}

.header__link {
  font-family: var(--font-head);
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding-block: 0.4rem;
  border-bottom: 2px solid transparent;
}
.header__link:hover,
.header__link[aria-current="page"] {
  color: var(--green-darker);
  border-bottom-color: var(--green);
}

.header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: clamp(0.75rem, 2vw, 1.4rem);
}

.header__phone {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.header__phone:hover { color: var(--green-darker); }
.header__phone svg { width: 1.15em; height: 1.15em; fill: var(--green-dark); flex: none; }

.header__burger {
  display: none;
  flex: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.header__burger span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
body.nav-open .header__burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .header__burger span:nth-child(2) { opacity: 0; }
body.nav-open .header__burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media picture {
  display: block;
  width: 100%;
  height: 100%;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Asentaja on kuvan oikeassa laidassa, tekstit vasemmalla.
     Rajaus pidetään oikealla, ettei hän leikkaudu kapealla näytöllä. */
  object-position: 64% center;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 30, 43, 0.97) 0%, rgba(0, 30, 43, 0.90) 42%, rgba(0, 30, 43, 0.55) 72%, rgba(0, 30, 43, 0.35) 100%),
    linear-gradient(180deg, rgba(0, 30, 43, 0.55) 0%, rgba(0, 30, 43, 0.20) 45%, rgba(0, 30, 43, 0.75) 100%);
}

.hero__inner {
  padding-block: clamp(4rem, 11vw, 9rem);
}

/* Sisältö rajataan, mutta container säilyttää leveytensä —
   muuten max-width + margin-inline:auto keskittäisi koko lohkon */
.hero__inner > * { max-width: 43rem; }

.hero h1 { color: #fff; }
.hero__lede { color: #cfe3ea; margin-top: 1.25rem; }


.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.2rem;
}

.hero__note {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: #9db9c4;
}

/* ---------- Palvelut ---------- */
.services__head {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
}

.services__grid {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 2rem);
  grid-template-columns: repeat(6, 1fr);  /* 3 korttia riville (span 2) */
  grid-auto-rows: 1fr;  /* kaikki kortit samankokoisia */
}

.card {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

/* Toisen rivin 2 korttia keskitetään ylärivin alle */
.card:nth-child(4) { grid-column: 2 / span 2; }

/* Kuvan takana värinauha, joka jää näkyviin ylhäältä ja oikealta */
.card__media {
  position: relative;
  padding: 22px 22px 0;  /* nauha näkyy ylhäältä ja yhtä leveänä molemmilta sivuilta */
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(100deg, var(--ink) 0%, var(--ink) 42%, var(--green) 100%);
}
.card__media picture { display: block; }
.card__media img {
  width: 100%;
  aspect-ratio: 16 / 9;   /* sama kuin lähdekuvissa -> ei rajaudu lainkaan */
  object-fit: cover;
  /* Kevyempi pyöristys kuin muissa valokuvissa (--radius-lg, 22px):
     korttikuvat ovat pieniä, joten isompi pyöristys näyttää niissä
     liialliselta. Tarkoituksella tokenien ulkopuolinen arvo. */
  border-radius: 10px;
  transform: translateY(20px);  /* kuva valuu nauhan alareunan yli */
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: clamp(1.4rem, 2.5vw, 1.8rem);
  padding-top: clamp(2.1rem, 3.5vw, 2.6rem);
  flex: 1;
}
.card__body h3 { margin: 0; color: var(--ink); }
.card__body p { color: var(--text-muted); margin: 0; flex: 1; }
.card .btn { align-self: flex-start; margin-top: 0.4rem; }

/* ---------- Miksi me ---------- */
.why__inner {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
}

.points { display: grid; gap: clamp(1.4rem, 2.5vw, 2rem); margin-top: 2rem; }

/* Vihreä viiva vain otsikon vieressä, leipäteksti ilman sisennystä */
.point h3 {
  position: relative;
  margin: 0 0 0.55rem;
  padding-inline-start: 0.95rem;
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.22rem);
}
.point h3::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: -0.14em;
  bottom: -0.14em;
  width: 3px;
  border-radius: 2px;
  background: var(--green);
}
.point p { color: var(--text-muted); margin: 0; }

.why__media { position: relative; }
.why__media picture { display: block; }
.why__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  /* Alle 900 px kuvasuhde vaihtuu vaakaan (16/11), jolloin cover rajaa
     pystykuvasta keskeltä kaistaleen. Nostetaan rajaus ylös, ettei pää leikkaudu.
     Työpöydällä kuva on tasan 4:5 kuten laatikkokin, joten tällä ei ole siellä
     vaikutusta. */
  object-position: center 8%;
}

.highlight-box {
  position: absolute;
  right: clamp(-0.5rem, -1vw, 0rem);
  bottom: clamp(1.25rem, 4vw, 2.5rem);
  max-width: 17rem;
  background: var(--green);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  line-height: 1.35;
  padding: 1.25rem 1.4rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}


/* ---------- CTA-laatikko ---------- */
.cta { background: var(--bg); }

.cta__box {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--text-on-dark);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(1.75rem, 4vw, 3rem) clamp(1.5rem, 4vw, 3.25rem);
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: 1.4fr auto;
  align-items: center;
}

/* Vihreä hehku oikeaan reunaan erottamaan laatikko footerista */
.cta__box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 150% at 100% 0%, rgba(66, 186, 91, 0.30), transparent 62%);
  pointer-events: none;
}
.cta__box > * { position: relative; z-index: 1; }

.cta__box h2 {
  color: #fff;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.15rem);
  margin-bottom: 0.5rem;
}
.cta__box .lede { color: var(--text-on-dark); font-size: 1.02rem; }
.cta__box .eyebrow { color: var(--green); }

.cta__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* ---------- Sivuhero (alasivut) ---------- */
.page-hero {
  background: var(--ink);
  color: var(--text-on-dark);
  padding-block: clamp(3rem, 7vw, 5rem);
}
.page-hero h1 { color: #fff; }
.page-hero .lede { margin-top: 1rem; }

/* ---------- Yhteystiedot ---------- */
.contact__grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: 0.85fr 1.15fr;
  align-items: stretch;  /* vasen palsta venyy lomakkeen mittaiseksi */
}

/* Vasen palsta: yhteystietokortti + kartta */
.contact__col {
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
}

.info-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}

.info-card__person {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.info-card__avatar {
  flex: none;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.35rem;
  border-radius: 50%;
}
.info-card__name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
}
.info-card__role { color: var(--text-muted); font-size: 0.95rem; }

.info-list { display: grid; gap: 1.1rem; }
.info-list__item { display: flex; gap: 0.85rem; align-items: flex-start; }
.info-list__icon {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 0.2rem;
  fill: var(--green-dark);
}
.info-list__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.1rem;
}
.info-list__value {
  font-family: var(--font-head);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  font-style: normal;
}
a.info-list__value:hover { color: var(--green-darker); }

/* ---------- Kartta ---------- */
.map-card {
  position: relative;
  flex: 1;
  min-height: 260px;
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.map-card__frame {
  flex: 1;
  width: 100%;
  border: 0;
  display: block;
  filter: grayscale(1) contrast(1.06) brightness(1.04);
}

.map-card__link {
  position: absolute;
  left: 0.85rem;
  top: 0.85rem;  /* ylhäällä: ei peitä OSM-attribuutiota eikä zoom-painikkeita */
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--green);
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
}
.map-card__link:hover { background: #55c86d; color: var(--ink); }
.map-card__link svg { width: 1.05em; height: 1.05em; fill: currentColor; }

/* Merkki piirretään iframen päälle, jotta se pysyy vihreänä */
.map-card__pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 36px;
  transform: translate(-50%, -100%);
  fill: var(--green);
  stroke: #fff;
  stroke-width: 0.8;
  filter: drop-shadow(0 3px 6px rgba(0, 30, 43, 0.45));
  pointer-events: none;
}

/* ---------- Lomake ---------- */
.form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.form-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr 1fr;
}
.form-field--full { grid-column: 1 / -1; }

.form-field label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.form-field .req { color: var(--green-darker); }

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid #ccd8d6;
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-field textarea { min-height: 9rem; resize: vertical; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--green-dark);
  box-shadow: 0 0 0 3px rgba(66, 186, 91, 0.25);
}
.form-field input:user-invalid,
.form-field textarea:user-invalid { border-color: #c0392b; }

.form-consent {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.form-consent input { width: 1.1rem; height: 1.1rem; margin-top: 0.25rem; flex: none; accent-color: var(--green-dark); }

.form-note { font-size: 0.88rem; color: var(--text-muted); margin-top: 1rem; }

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: var(--text-on-dark);
  padding-top: clamp(3rem, 6vw, 4.5rem);
}

.footer__grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: 1.4fr 1fr 1fr;
}

.footer__logo img { height: 34px; width: auto; margin-bottom: 1.2rem; }
.footer__about { color: #9db9c4; font-size: 0.97rem; max-width: 40ch; }

.footer h2 {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1.1rem;
}

.footer__list { display: grid; gap: 0.75rem; }
.footer__list a,
.footer__list span,
.footer__list address {
  color: var(--text-on-dark);
  text-decoration: none;
  font-style: normal;
}
.footer__list a:hover { color: var(--green); }

.footer__bottom {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--ink-line);
  padding-block: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #7f9ba7;
}

/* =========================================================
   Responsiivisuus
   ========================================================= */
@media (max-width: 1100px) {
  /* 2 korttia riville, viides keskitetään */
  .services__grid { grid-template-columns: repeat(4, 1fr); }
  .card:nth-child(4) { grid-column: span 2; }
  .card:nth-child(5) { grid-column: 2 / span 2; }
}

@media (max-width: 900px) {
  .why__inner { grid-template-columns: 1fr; }
  .why__media img { aspect-ratio: 16 / 11; }
  .highlight-box { right: 1rem; bottom: 1rem; }

  .cta__box { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  .map-card { min-height: 280px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

/* Mobiilivalikko */
@media (max-width: 860px) {
  .header__burger { display: block; }

  /* Drawer on fixed eli poissa ruudukosta -> flex riittää */
  .header__inner {
    display: flex;
    justify-content: space-between;
  }

  .header__actions .btn { display: none; }
  .header__phone span { display: none; }
  .header__phone {
    width: 46px;
    height: 46px;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 12px;
  }
  .header__phone svg { width: 20px; height: 20px; }

  /* Header piirtyy drawerin päälle, drawer taustakalvon päälle.
     backdrop-filter pois: se tekisi headerista containing blockin
     fixed-positioidulle valikolle, jolloin drawer kutistuisi headerin kokoiseksi. */
  .header {
    z-index: 101;
    background: #fff;
    backdrop-filter: none;
  }

  .header__nav {
    position: fixed;
    z-index: 100;
    inset: var(--header-h) 0 0 auto;  /* alkaa headerin alta, ei peitä logoa */
    width: min(88vw, 360px);
    background: var(--ink);
    padding: 1.5rem var(--gutter) 2rem;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
  }
  body.nav-open .header__nav { transform: translateX(0); }

  .header__nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }
  .header__link {
    display: block;
    color: #fff;
    font-size: 1.15rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--ink-line);
  }
  .header__link:hover,
  .header__link[aria-current="page"] { color: var(--green); border-bottom-color: var(--ink-line); }
  .header__nav-list > li > .btn {
    display: inline-flex;
    margin-top: 1.5rem;
    width: 100%;
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 30, 43, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 99;
  }
  body.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
}

@media (max-width: 860px) {
  /* Kapealla näytöllä rajaus hieman toisin, ettei kasvot jää ruudun reunan taakse */
  .hero__media img { object-position: 68% center; }
}

@media (max-width: 640px) {
  .services__grid { grid-template-columns: 1fr; }
  .card,
  .card:nth-child(4),
  .card:nth-child(5) { grid-column: 1 / -1; }
  .form-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .header, .footer, .hero__media, .hero__overlay { display: none; }
  body { color: #000; }
}

/* =========================================================
   Sisältösivut (tietosuojaseloste, kiitos, 404)
   ========================================================= */

/* Tumman page-heron kontrastikorjaukset:
   --green-darker antoi 2.53:1 ja --text-muted 2.98:1 tummaa taustaa vasten,
   eli molemmat jäivät alle WCAG AA:n 4.5:1 rajan. */
.page-hero .eyebrow { color: var(--green); }
.page-hero .lede { color: var(--text-on-dark); }

.page-hero__meta {
  margin-top: 1.25rem;
  margin-bottom: 0;
  font-size: 0.9rem;
  color: #7f9ba7;
}

.prose {
  /* Kapea lukupalsta, joka alkaa samasta reunasta kuin sivun muu sisältö */
  max-width: 72ch;
}

.prose h2 {
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
  margin-top: 2.75rem;
}
.prose > h2:first-child { margin-top: 0; }

.prose h3 { margin-top: 2rem; }

.prose ul,
.prose ol {
  margin: 0 0 1.4em;
  padding-left: 1.4rem;
}
.prose ul li { list-style: disc; }
.prose ol li { list-style: decimal; }
/* Tietosuojaselosteen a) b) c) -kohdat */
.prose ol.prose__alpha li { list-style: lower-alpha; }
.prose li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}
.prose li::marker { color: var(--green-dark); }

.prose strong { color: var(--ink); font-weight: 600; }

.prose .hero__actions { margin-top: 2.5rem; }

/* Taulukko: käsittelytarkoitukset ja oikeusperusteet */
.prose__table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.6em;
  font-size: 0.97rem;
}
.prose__table th,
.prose__table td {
  text-align: left;
  vertical-align: top;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
}
.prose__table thead th {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--ink);
  background: var(--bg-alt);
  border-bottom-color: var(--green-line);
}
.prose__table tbody tr:last-child td { border-bottom: none; }

/* Footerin tietosuojalinkki */
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
.footer__legal a {
  color: inherit;
  text-decoration: underline;
}
.footer__legal a:hover { color: #fff; }

/* Lomakkeen hunajapurkki: pois näkyvistä, mutta jää DOMiin bottien täytettäväksi */
.form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 560px) {
  /* Kapealla näytöllä taulukko puretaan riveiksi */
  .prose__table thead { display: none; }
  .prose__table,
  .prose__table tbody,
  .prose__table tr,
  .prose__table td { display: block; width: 100%; }
  .prose__table tr {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    padding: 0.5rem 0;
  }
  .prose__table td { border-bottom: none; padding-block: 0.4rem; }
  .prose__table td:first-child { font-weight: 600; color: var(--ink); }
  .prose__table td:last-child { color: var(--text-muted); font-size: 0.92rem; }
}
