/* =====================================================================
   Sähkötyö Juha Vuorimaa
   Visual system copied from homebuilderai.ai (yellow swapped to light blue).
   Rhythm from Kuljetus Savolainen, font stack from Systempoint.
   See DESIGN.md before changing layout.
   ===================================================================== */

/* Self-hosted fonts, both under the SIL Open Font License 1.1 (free for commercial use, embedding
   and self-hosting). Licence texts ship next to the files in src/fonts/. Latin + Latin Extended
   cover Finnish (ä, ö, å). No request ever goes to Google. */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("fonts/manrope-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("fonts/manrope-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: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; src: url("fonts/bricolage-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; src: url("fonts/bricolage-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; }

:root {
  color-scheme: light;

  /* Colour (homebuilderai.ai) */
  --navy: #0b1f3a;          /* text, dark panels, footer */
  --navy-2: #152842;        /* raised surface on navy */
  --sky: #8fd0ff;           /* replaces HB yellow #ffeb3a: CTAs, highlights */
  --sky-deep: #6fb9ef;      /* tag pill on a sky background */
  --blue: #2663eb;          /* tag text, heading highlight, icon squares */
  --blue-focus: #1d4ed8;    /* high-contrast focus ring on light surfaces */
  --tag-bg: #e4e9f4;
  --gray: #475569;          /* body copy (WCAG AAA 7.58:1 on white) */
  --gray-on-navy: #aeb7c4;
  --page: #ffffff;          /* sections are pure white (no white boxes on grey) */
  --white: #ffffff;
  --line: #e2e5eb;
  --deep: #0b2265;          /* dark blue: service section (replaces light blue there) */

  --radius: 20px;
  --font: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  --font-display: "Bricolage Grotesque", "Arial Narrow", sans-serif;   /* used condensed (wdth 75) + 800 */
  --footer-bg: var(--navy);
  --card-art: #e8ebef;      /* light grey service-card visual asset */
  --section-pad: clamp(56px, 6.4vw, 96px);   /* homebuilderai.ai section spacing */
  --arrow-line: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");

  /* Motion (homebuilderai.ai / Squarespace "slide + fade") */
  --anim-duration: .8s;
  --anim-ease: ease;
  --anim-distance: 21px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--navy);
  background: var(--page);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { color: var(--navy); margin: 0; }
/* Display headings: Bricolage Grotesque Condensed ExtraBold (wdth 75, wght 800), matched to the
   user's "let's Realize your best building construction" reference. */
h1, h2 {
  font-family: var(--font-display); font-weight: 800; font-stretch: 75%;
  font-variation-settings: "wdth" 75; letter-spacing: -0.02em; line-height: 1.02;
}
h3, h4 { font-family: var(--font); font-weight: 700; letter-spacing: -0.01em; line-height: 1.12; }
h1 { font-size: clamp(2.6rem, 5.1vw, 4.4rem); }
h2 { font-size: clamp(2.1rem, 3.4vw, 3.1rem); }
h3 { font-size: 1.32rem; }
p { margin: 0; }
svg { fill: currentColor; }
[hidden] { display: none !important; }
picture { display: contents; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -80px; z-index: 100; padding: 12px 20px; background: var(--navy); color: var(--white); border-radius: 10px; font-weight: 700; }
.skip-link:focus { top: 16px; }

:focus-visible { outline: 3px solid var(--blue-focus); outline-offset: 4px; }
.svc-card--dark :focus-visible, .panel :focus-visible, .contact :focus-visible, .footer :focus-visible { outline-color: var(--sky); }

/* Every section is 90% of the page width */
.container { width: 90%; margin-inline: auto; }

/* ---------- Tag pill ("• LABEL") ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  border-radius: 99px;
  background: var(--tag-bg);
  color: var(--blue);
  font-size: .95rem; font-weight: 800;
  letter-spacing: 2.4px; text-transform: uppercase;
  line-height: 1.25;
  margin-bottom: 28px;
}
.tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tag--on-sky { background: var(--sky-deep); color: var(--navy); }

/* Highlight spans keep their line breaks but no longer change colour (single-colour headings) */
.hl, .hl-sky { color: inherit; }

/* ---------- CTAs (JSWatercleaning shape): one large rounded corner bottom right, label left,
   plain arrow right. Corners square up and the arrow nudges on hover. Every CTA uses the
   service-card CTA face: Bricolage Grotesque condensed ExtraBold, sentence case. ---------- */
.btn, .sq-btn, .footer__cta, .footer__link {
  font-family: var(--font-display); font-weight: 800; font-stretch: 75%; font-variation-settings: "wdth" 75;
  letter-spacing: -0.005em; text-transform: none;
}
.btn, .sq-btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 40px;
  min-width: 288px; min-height: 74px;
  padding: 12px 30px 12px 34px;
  border-radius: 10px 10px 34px 10px;
  white-space: nowrap;
}
.btn {
  border: 1.5px solid transparent;
  font-size: 1.6rem; line-height: 1.2;
  cursor: pointer;
  transition: background-color .22s cubic-bezier(.22, 1, .36, 1), border-color .22s ease, color .22s ease, border-radius .28s cubic-bezier(.22, 1, .36, 1);
}
.sq-btn {
  background: var(--navy); color: var(--white); font-size: 1.38rem;
  transition: background-color .22s cubic-bezier(.22, 1, .36, 1), border-radius .28s cubic-bezier(.22, 1, .36, 1);
}
.btn::after, .sq-btn::after {
  content: "";
  flex: 0 0 auto;
  width: 26px; height: 26px;
  background: currentColor;
  -webkit-mask: var(--arrow-line) center / contain no-repeat;
          mask: var(--arrow-line) center / contain no-repeat;
  transition: transform .25s cubic-bezier(.22, 1, .36, 1);
}
.sq-btn:hover { background: var(--navy-2); }
@media (hover: hover) {
  .btn:hover, .sq-btn:hover { border-radius: 10px; }
  .btn:hover::after, .sq-btn:hover::after { transform: translateX(4px); }
}
.btn--sky, .btn--navy { background: var(--navy); color: var(--white); }
.btn--sky:hover, .btn--navy:hover { background: var(--navy-2); }
/* "Soita Juhalle": white button with black text on the navy panel */
.panel .btn--sky { background: var(--white); color: #000; border-color: var(--white); }
.panel .btn--sky:hover { background: var(--tag-bg); border-color: var(--tag-bg); }
.btn--outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--outline:hover { background: rgba(11, 31, 58, .06); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
/* Hero CTAs sit side by side on desktop/tablet; the nav CTA shares their size */
.hero .btn-row { flex: 0 0 auto; flex-wrap: nowrap; gap: 12px; margin-top: 0; }
.hero .btn-row .btn, .btn.nav__cta { min-width: 0; gap: 28px; padding: 10px 24px 10px 26px; font-size: 1.42rem; }
.hero .btn-row .btn::after, .btn.nav__cta::after { width: 22px; height: 22px; }

/* ---------- Header (not sticky: scrolls away with the page) ---------- */
.site-header { position: relative; z-index: 50; }

/* Nav: round logo badge (no text) left, links, CTAs right. Transparent over the hero. */
.nav { position: relative; background: transparent; }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; height: 140px; width: 90%; margin-inline: auto; }
.logo { display: inline-flex; align-items: center; }
/* The logo is white/blue on black: shown as a round black badge */
.logo__badge { width: 119px; height: 119px; flex: 0 0 auto; border-radius: 50%; background: #000; object-fit: cover; }

.nav__links { display: flex; gap: 28px; margin-inline: auto; }
/* Top-level items (links + the Palvelut button) use the hero heading face: Bricolage 500, normal width */
.nav__links > a, .nav__dd-btn {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 6px 0;
  font-family: var(--font-display); font-size: 1.95rem; font-weight: 500; font-stretch: 100%; font-variation-settings: "wdth" 100;
  line-height: 1.1; color: #000; transition: color .25s ease;
}
.nav__links > a:hover, .nav__links > a:focus-visible, .nav__dd-btn:hover, .nav__dd-btn:focus-visible { color: var(--deep); }
/* Hover: an underline sweeps in from the left and leaves to the right */
.nav__links > a::after, .nav__dd-btn::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; border-radius: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}
.nav__links > a:hover::after, .nav__links > a:focus-visible::after, .nav__dd-btn:hover::after, .nav__dd-btn:focus-visible::after { transform: scaleX(1); transform-origin: left; }

/* Palvelut dropdown: opened by main.js on click; without JS it opens on hover/focus */
.nav__dd { position: relative; display: flex; align-items: center; }
.nav__dd-btn { gap: .25em; background: none; border: 0; cursor: pointer; }
.nav__dd-caret { width: .7em; height: .7em; transition: transform .25s ease; }
.nav__dd.is-open .nav__dd-caret { transform: rotate(180deg); }
.nav__dd-menu {
  position: absolute; top: calc(100% + 10px); left: -18px; z-index: 60; min-width: 290px;
  padding: 10px; margin: 0; list-style: none; background: var(--white);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 40px rgba(11, 31, 58, .14);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.nav__dd.is-open .nav__dd-menu,
html:not(.dd-ready) .nav__dd:hover .nav__dd-menu,
html:not(.dd-ready) .nav__dd:focus-within .nav__dd-menu { opacity: 1; visibility: visible; transform: none; }
.nav__dd-menu a { display: flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: 10px; font-size: 1.05rem; font-weight: 600; color: var(--navy); transition: background-color .2s ease, color .2s ease; }
.nav__dd-menu a:hover, .nav__dd-menu a:focus-visible { background: var(--tag-bg); color: var(--deep); }
/* Logo badge tilts and grows slightly on hover */
.logo__badge { transition: transform .4s cubic-bezier(.22, 1, .36, 1); }
@media (hover: hover) { .logo:hover .logo__badge { transform: rotate(-8deg) scale(1.06); } }

.nav__actions { display: flex; align-items: center; gap: 14px; }

.burger { display: none; width: 48px; height: 48px; flex: 0 0 48px; border: 1px solid var(--line); border-radius: 50%; background: var(--white); cursor: pointer; padding: 0; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.burger span { width: 18px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .25s, opacity .25s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero: Bricolage 500 heading in navy with a bold 800 part (layout: "Hero split" below) ---------- */
.hero { position: relative; background: var(--white); }
.hero h1 { font-weight: 500; font-stretch: 100%; font-variation-settings: "wdth" 100; line-height: 1.1; }
.hero h1 strong { font-weight: 800; }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-pad); }

/* ---------- Services ---------- */
.svc-panel { background: var(--white); }

/* Header (CONS "About us"): small dashed label left, large heading + sub right */
.svc-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 32px; margin-bottom: clamp(48px, 5.6vw, 80px); }
.eyebrow::before, .footer__eyebrow::before { content: "- - "; content: "- - " / ""; }
.eyebrow::after, .footer__eyebrow::after { content: " - -"; content: " - -" / ""; }
.eyebrow { font-size: 1rem; font-weight: 500; letter-spacing: -0.01em; text-transform: uppercase; color: var(--navy); white-space: nowrap; padding-top: .7em; }
.svc-head h2 { font-size: clamp(1.9rem, 3.3vw, 3.2rem); }
.svc-head__sub { color: var(--gray); font-size: 1.05rem; line-height: 1.6; max-width: 46rem; margin-top: 24px; }

/* Cards: 4 per row, thin vertical dividers, checkerboard of deep-blue and light-grey blocks */
.svc-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.svc-card { position: relative; overflow: hidden; background: var(--card-art); display: flex; flex-direction: column; min-height: clamp(400px, 36vw, 540px); border-left: 1px solid var(--line); }
.svc-card:nth-child(4n + 1) { border-left: 0; }
.svc-card__body { display: flex; flex-direction: column; gap: 16px; min-height: clamp(230px, 18vw, 270px); background: var(--card-art); padding: clamp(28px, 2.6vw, 40px) clamp(20px, 2.2vw, 32px); }
/* Systempoint card bottom: white grid fading in from the bottom edge */
.svc-card__art { position: relative; flex: 1 1 auto; min-height: clamp(150px, 13vw, 210px); }
.svc-card__art::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--white) 2px, transparent 2px),
    linear-gradient(90deg, var(--white) 2px, transparent 2px);
  background-size: 26px 26px; background-position: 0 100%;
  -webkit-mask-image: linear-gradient(to top, #000 0%, #000 42%, rgba(0, 0, 0, .72) 64%, transparent 100%);
          mask-image: linear-gradient(to top, #000 0%, #000 42%, rgba(0, 0, 0, .72) 64%, transparent 100%);
}
.svc-card h3 { font-size: clamp(1.3rem, 1.7vw, 1.65rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; }
/* #374151 on the light grey card meets WCAG AAA (8.46:1) */
.svc-card p { color: #374151; font-size: 1.02rem; line-height: 1.65; }
/* "Ota yhteyttä": plain text link in the display face, pinned to the card's bottom-left */
.svc-card__link {
  position: absolute; left: clamp(20px, 2.2vw, 32px); bottom: clamp(18px, 2vw, 30px); z-index: 3;
  display: inline-flex; align-items: center;
  min-height: 44px; padding-block: 6px;
  color: var(--deep);
  font-family: var(--font-display); font-weight: 800; font-stretch: 75%; font-variation-settings: "wdth" 75;
  font-size: clamp(1.25rem, 1.6vw, 1.55rem); letter-spacing: -0.01em;
}
.svc-card__link:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* Two-tone line icon at the top of each card (stroke + tinted fill) */
.svc-card__icon { width: clamp(52px, 4.6vw, 68px); height: auto; color: var(--deep); margin-bottom: clamp(28px, 3.6vw, 56px); fill: none; }
.svc-card__icon .f { fill: currentColor; fill-opacity: .16; }

/* Deep-blue blocks: cards 1, 3, 6, 8 */
.svc-card--dark, .svc-card--dark .svc-card__body { background: var(--deep); }
.svc-card--dark h3, .svc-card--dark .svc-card__icon, .svc-card--dark .svc-card__link { color: var(--white); }
.svc-card--dark .svc-card__icon .f { fill-opacity: .2; }
.svc-card--dark p { color: rgba(255, 255, 255, .86); }
.svc-card--dark .svc-card__art::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .12) 1px, transparent 1px);
}

/* ---------- Aurinkopaneelit: photo | text ---------- */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
.feature__media { position: relative; }
.feature__media img { width: 100%; aspect-ratio: 912 / 862; object-fit: cover; border-radius: var(--radius); }
.feature__text h2 { font-size: clamp(2.2rem, 3.6vw, 3.2rem); }
.feature__text .hl { display: block; }
.feature__subhead { color: var(--navy); font-size: 1.45rem; font-weight: 500; line-height: 1.3; margin-top: 32px; max-width: 30rem; }
.feature__body { color: var(--gray); font-size: 1.05rem; line-height: 1.65; margin-top: 32px; max-width: 34rem; }

/* ---------- Meistä: navy panel (sharp edges) ---------- */
.panel { background: var(--navy); border-radius: 0; padding: 72px clamp(28px, 5.4vw, 78px); color: var(--white); }
.panel__top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.panel__top h2 { color: var(--white); font-size: clamp(2.2rem, 3.8vw, 3.4rem); }
.panel__top .hl-sky { display: block; }
.panel__lead { color: var(--white); font-size: 1.6rem; font-weight: 500; line-height: 1.3; }
.panel__rule { height: 1px; background: rgba(255, 255, 255, .15); margin: 64px 0; }
.panel__bottom { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.panel__media { position: relative; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(14px, 1.8vw, 22px); align-items: stretch; }
.panel__side { display: flex; flex-direction: column; gap: clamp(14px, 1.8vw, 22px); min-width: 0; }
.panel__photo { width: 100%; overflow: hidden; background: var(--navy-2); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.panel__photo--tall { aspect-ratio: 3 / 4; height: 100%; }
.panel__photo--square { aspect-ratio: 1 / 1; flex: 1 1 auto; }
.panel__photo img { width: 100%; height: 100%; object-fit: cover; }

/* 2013 badge: sits cleanly below the square photo without covering either image */
.stat-card { background: var(--white); border-radius: 12px; padding: 20px 24px; display: flex; flex-direction: column; justify-content: center; }
.stat-card strong { display: block; color: var(--navy); font-size: clamp(2.1rem, 2.8vw, 2.8rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
.stat-card span { display: block; color: var(--gray); font-size: 1.02rem; margin-top: 4px; }
.panel__text p { color: var(--white); font-size: calc(1.05rem + 5px); line-height: 1.65; }
.panel__text p + p { margin-top: 20px; }

/* ---------- Toiminta-alue: heading + square CTA, text cut into the map ---------- */
.area__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; margin-bottom: 48px; }
.area__head h2 { max-width: 22ch; }
.area__body { position: relative; }
.map { position: relative; width: 100%; overflow: hidden; aspect-ratio: 1287 / 466; min-height: 420px; background: #dff5e3; border-radius: var(--radius); }
.map img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 55%; }   /* screenshot of the owner's Google Maps view; keeps Seinäjoki and the pin in frame */
/* Google requires visible attribution on map screenshots */
.map__credit { position: absolute; right: 0; bottom: 0; padding: 3px 10px; background: rgba(255, 255, 255, .85); color: #333; font-size: .75rem; line-height: 1.4; border-top-left-radius: 8px; }
.area__text {
  position: absolute; left: 0; top: 0;
  width: 41%;
  padding: 0 48px 40px 0;
  background: var(--page);
  border-bottom-right-radius: var(--radius);
}
.area__text h3 { font-size: clamp(1.5rem, 2.3vw, 2.1rem); max-width: 14ch; }
.area__text p { color: var(--navy); font-size: 1.02rem; line-height: 1.6; margin-top: 24px; max-width: 30rem; }

/* ---------- Pixel blocks (CONS): notches at the reference image's top-left ---------- */
.pixels { position: absolute; z-index: 2; pointer-events: none; }
.pixels i { position: absolute; width: calc(var(--u) * var(--w, 1)); height: calc(var(--u) * var(--h, 1)); background: var(--white); }
.pixels--ref { left: 0; top: 0; --u: clamp(14px, 1.4vw, 20px); }
.pixels--ref i { left: calc(var(--u) * var(--x)); top: calc(var(--u) * var(--y)); }
.pixels--ref .pixels__out { background: var(--tag-bg); }
/* Coordinates live here, never in inline styles */
.pixels--ref i:nth-child(1) { --x: 0; --y: 0; }
.pixels--ref i:nth-child(2) { --x: 1; --y: 1; }
.pixels--ref i:nth-child(3) { --x: 1; --y: -1; }
.pixels--ref i:nth-child(4) { --x: -1; --y: 1; }

/* ---------- Referenssit: CONS "Our project" carousel ---------- */
.refs__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: clamp(40px, 4.4vw, 64px); }
.refs__title { max-width: 18ch; margin-top: 20px; font-size: clamp(2rem, 3.4vw, 3.2rem); }
.refs__nav { display: flex; gap: 12px; flex: 0 0 auto; }
.circle-btn { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); color: var(--navy); display: grid; place-items: center; cursor: pointer; padding: 0; transition: background-color .2s ease, color .2s ease, opacity .2s ease; }
.circle-btn svg { width: 20px; height: 20px; }
.circle-btn--fill { background: var(--navy); border-color: var(--navy); color: var(--white); }
.circle-btn:hover { background: var(--navy-2); border-color: var(--navy-2); color: var(--white); }
.circle-btn:disabled { opacity: .35; cursor: default; }

/* Track starts at the container edge and bleeds off the right of the page */
.refs {
  display: flex; gap: clamp(24px, 3.4vw, 48px); align-items: flex-start;
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scroll-behavior: smooth;
  padding: clamp(16px, 1.6vw, 24px) 5% 4px; scroll-padding-inline: 5%;
  scrollbar-width: none;
}
.refs::-webkit-scrollbar { display: none; }
.ref { flex: 0 0 clamp(280px, 44%, 640px); scroll-snap-align: start; }
/* Staggered: every second card sits lower with a wider, shorter photo */
.ref:nth-child(even) { padding-top: clamp(24px, 3vw, 44px); }
.ref__media { position: relative; }
.ref__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.ref__media img.ref__img--low { object-position: 50% 60%; }   /* portrait photo: keep the whole metering cabinet in frame */
.ref:nth-child(even) .ref__media img { aspect-ratio: 16 / 9; }

/* ---------- UKK: sticky intro left, questions right ---------- */
.section--white { background: var(--white); }
.ukk { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 112px); align-items: start; }
.ukk__intro { display: flex; flex-direction: column; align-items: flex-start; text-align: left; position: sticky; top: 32px; }
.ukk__sub { margin-top: 28px; font-size: 1.35rem; font-weight: 600; color: #475569; }
.ukk__lead { margin: 4px 0 32px; font-size: 1.35rem; font-weight: 600; color: var(--navy); }
.ukk__mail { margin-top: 32px; color: #475569; }
.ukk__mail a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.faq { border-top: 1px solid #e5e7eb; }
.faq details { border-bottom: 1px solid #e5e7eb; }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 25px 0;
  color: #0a0a0a; font-weight: 700; font-size: 1.35rem; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none;
  width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid #d1d5db;
  background:
    linear-gradient(#0a0a0a, #0a0a0a) center / 10px 1.5px no-repeat,
    linear-gradient(#0a0a0a, #0a0a0a) center / 1.5px 10px no-repeat;
  transition: border-color .2s, background-color .2s;
}
.faq details[open] summary::after {
  border-color: var(--blue);
  background: linear-gradient(#fff, #fff) center / 10px 1.5px no-repeat, var(--blue);
}
.faq summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 8px; }
.faq details p { color: #334155; padding: 0 52px 28px 0; font-size: 1.1rem; line-height: 1.8; }

/* ---------- Yhteystiedot: navy block with grid lines ---------- */
.contact {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; align-items: center;
  padding: 104px clamp(28px, 5.4vw, 78px);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px) 0 0 / 117px 117px,
    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px) 0 0 / 117px 117px,
    var(--navy);
}
.contact__square { position: absolute; width: 117px; height: 117px; background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, 0)); pointer-events: none; }
.contact__square--a { left: 351px; top: 351px; }
.contact__square--b { right: 117px; top: 0; }
.contact__main, .contact__details { position: relative; z-index: 1; }
.contact h2 { color: var(--white); font-size: clamp(2.1rem, 3.4vw, 3.1rem); max-width: 16ch; }
.contact__sub { color: var(--gray-on-navy); font-size: 1.1rem; font-weight: 500; line-height: 1.55; margin-top: 24px; max-width: 34rem; }
.contact__details { display: grid; gap: 22px; margin: 0; }
.contact__details dt { color: var(--gray-on-navy); font-size: .78rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.contact__details dd { margin: 4px 0 0; color: var(--white); font-size: 1.15rem; font-weight: 600; }
.contact__details a:hover { text-decoration: underline; }
.contact .tag--on-sky { background: var(--navy-2); color: var(--white); }
.contact .btn--navy { background: var(--white); color: var(--navy); }
.contact .btn--navy:hover { background: var(--tag-bg); }
.contact .btn--outline { color: var(--white); border-color: var(--white); }
.contact .btn--outline:hover { background: rgba(255, 255, 255, .08); }

/* ---------- Footer (CONS): full-width navy block. CTA heading + white pill left, uppercase
   contact details right, then the logo and the bottom bar. ---------- */
.footer { background: var(--white); padding: 64px 0 0; }
.footer__box { background: var(--footer-bg); color: var(--white); overflow: hidden; padding-top: clamp(56px, 6vw, 96px); }
.footer__top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px clamp(40px, 6vw, 96px); align-items: start; }
.footer__eyebrow { font-size: .92rem; font-weight: 500; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
.footer__title { color: var(--white); font-size: clamp(2.2rem, 4vw, 3.9rem); max-width: 13ch; margin-top: 18px; }
.footer__pill { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; margin-top: 36px; padding: 12px 22px; border-radius: 99px; background: var(--white); color: #000; font-weight: 600; font-size: 1rem; transition: background-color .2s ease; }
.footer__pill svg, .footer__link svg { width: 16px; height: 16px; transition: transform .2s ease; }
.footer__pill:hover { background: var(--tag-bg); }
.footer__pill:hover svg, .footer__link:hover svg { transform: translate(2px, -2px); }
.footer__details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; margin: 0; }
.footer__wide { grid-column: 1 / -1; }
.footer__details dt { color: rgba(255, 255, 255, .76); font-size: .9rem; }
.footer__details dd { margin: 6px 0 0; font-size: 1.02rem; font-weight: 500; text-transform: uppercase; letter-spacing: .01em; overflow-wrap: anywhere; }
.footer__details a:hover, .footer__link:hover { color: var(--sky); }
.footer__link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding-block: 6px; margin-top: 36px; font-size: 1.2rem; }
.footer__logo { margin-top: clamp(40px, 5vw, 64px); display: flex; align-items: center; }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px 28px; flex-wrap: wrap; margin-top: 28px; border-top: 1px solid rgba(255, 255, 255, .12); padding-block: 28px; color: var(--white); font-size: .95rem; }
/* "Design by [Sivusuunta logo]" sits in the bottom-right corner in pure white */
.footer__credit { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--white); transition: opacity .2s ease; }
.footer__credit:hover { opacity: .85; }
.footer__credit-logo { height: 22px; width: auto; display: block; }

/* ---------- Hero split + navbar (body.v-split) ----------
   Split layout from the "Bony" reference: heading, grey sub and CTAs on the left (55%); the photo
   fills the right 45% edge to edge and runs up under the transparent nav to the page top. */
.v-split { --header-h: 140px; }   /* nav height; the hero slides up under the transparent nav */
.hero--split { padding: 0; margin-top: calc(-1 * var(--header-h)); }
.hero-split { display: grid; grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); height: 100svh; min-height: 620px; }
.hero-split__text { display: flex; flex-direction: column; justify-content: center; padding: calc(var(--header-h) + clamp(24px, 5svh, 64px)) clamp(32px, 4vw, 72px) clamp(24px, 5svh, 64px) 10%; }
.hero--split h1 { font-size: clamp(2.4rem, min(3.8vw, 8svh), 4.4rem); line-height: 1.12; }
.hero--split h1 strong { display: block; }   /* bold part on its own line */
.hero-split__sub { margin-top: clamp(16px, 3.4svh, 36px); color: var(--gray); font-size: clamp(1.02rem, 1.3vw, 1.25rem); line-height: 1.7; max-width: 34ch; }
.hero--split .hero-split__btns { flex-wrap: wrap; margin-top: clamp(20px, 4.4svh, 48px); }
.hero-split__media { position: relative; overflow: hidden; }
.hero-split__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* Navbar: logo, links and one CTA ("Pyydä tarjous", navy like the hero CTA) over the photo */
.v-split .nav__inner { justify-content: flex-start; gap: clamp(20px, 2vw, 40px); }
.v-split .logo__badge { width: 102px; height: 102px; }
.v-split .nav__links { margin-inline: 0; gap: clamp(18px, 1.6vw, 32px); }
.v-split .nav__links > a, .v-split .nav__dd-btn { font-size: clamp(1rem, 1.25vw, 1.35rem); }   /* scales with the window so the links always end before the hero photo (55%) */
.v-split .nav__actions { margin-left: auto; }
/* From 1280px the inline links start 48px after the logo (logo starts at 5% and is 102px wide) */
@media (min-width: 1280px) {
  .v-split .nav__links { position: absolute; top: 50%; left: calc(5% + 150px); transform: translateY(-50%); }
}

/* ---------- Motion: copied from homebuilderai.ai ----------
   Every [data-anim] block starts at opacity 0 (+21px lower for "slide"), then transitions in over
   0.8s `ease` when it enters the viewport. main.js adds .anim-pre (start) and .anim-in (end, kept
   permanently) plus a per-element delay class so blocks entering together cascade. Classes are
   only added by JS, so content stays visible without it. */
.anim-pre {
  opacity: 0;
  transform: translateY(var(--anim-distance));
  transition: opacity var(--anim-duration) var(--anim-ease), transform var(--anim-duration) var(--anim-ease);
}
/* Animated buttons keep their hover transitions alongside the entrance one */
.sq-btn.anim-pre { transition: opacity var(--anim-duration) var(--anim-ease), transform var(--anim-duration) var(--anim-ease), background-color .22s cubic-bezier(.22, 1, .36, 1), border-radius .28s cubic-bezier(.22, 1, .36, 1); }
.anim-pre[data-anim="fade"] { transform: none; }
.anim-pre.anim-in { opacity: 1; transform: none; }
.anim-delay-0 { transition-delay: 0.00s; }
.anim-delay-1 { transition-delay: 0.08s; }
.anim-delay-2 { transition-delay: 0.16s; }
.anim-delay-3 { transition-delay: 0.24s; }
.anim-delay-4 { transition-delay: 0.32s; }
.anim-delay-5 { transition-delay: 0.40s; }
.anim-delay-6 { transition-delay: 0.48s; }
@media (prefers-reduced-motion: reduce) {
  html, .refs { scroll-behavior: auto; }
  .nav__links a, .nav__links a::after, .nav__dd-btn, .nav__dd-btn::after, .nav__dd-caret, .nav__dd-menu, .logo__badge { transition: none; }
  .logo:hover .logo__badge { transform: none; }
  .anim-pre { opacity: 1; transform: none; transition: none; }
  [data-anim] { transition-delay: 0s; }
}
/* Printing must never hide content that has not scrolled into view yet */
@media print {
  .anim-pre { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-card:nth-child(n) { border-left: 1px solid var(--line); }
  .svc-card:nth-child(2n + 1) { border-left: 0; }
  .svc-card:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .panel__bottom { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .area__text { position: static; width: auto; padding: 0 0 32px; }
  .area__body { display: flex; flex-direction: column-reverse; }
  .map { aspect-ratio: 16 / 10; min-height: 0; }
  .map img { object-position: 35% 55%; }   /* Seinäjoki sits at ~25% of the width, the pin at ~57% */
}

/* The full nav fits from 1280px up (the nav "Pyydä tarjous" is hidden until 1560px): burger menu below that */
@media (max-width: 1279px) {
  .nav__actions { margin-left: auto; }
  .nav-ready .burger { display: flex; }
  .nav-ready .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--page); border-bottom: 1px solid var(--line);
    padding: 8px 24px 20px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav-ready .nav__links.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav__links > a, .nav__dd-btn { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.89rem; transition: color .25s ease, padding-left .3s cubic-bezier(.22, 1, .36, 1); }
  .v-split .nav__links > a, .v-split .nav__dd-btn { font-size: 1.89rem; }   /* 1.5 × the earlier 1.26rem */
  .nav__links > a::after, .nav__dd-btn::after { display: none; }
  .nav__links > a:hover, .nav__dd-btn:hover { padding-left: 10px; }
  .nav__links > a:last-child { border-bottom: 0; }
  /* In the stacked menu the dropdown opens in place, indented under its button */
  .nav__dd { flex-direction: column; align-items: stretch; }
  .nav__dd-btn { width: 100%; justify-content: space-between; text-align: left; }
  .nav__dd-menu { position: static; display: none; min-width: 0; padding: 6px 0 10px 16px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; transition: none; }
  .nav__dd.is-open .nav__dd-menu, html:not(.dd-ready) .nav__dd:focus-within .nav__dd-menu { display: block; }
  .nav-ready .nav__links.is-open { max-height: calc(100svh - var(--header-h, 140px)); overflow-y: auto; }
  /* Without JS the links stay visible as a stacked list */
  html:not(.nav-ready) .nav__inner { flex-wrap: wrap; height: auto; }
  html:not(.nav-ready) .nav__links { position: static; display: flex; flex-direction: column; width: 100%; }
  html:not(.nav-ready) .v-split .hero--split { margin-top: 0; }
  html:not(.nav-ready) .v-split .hero-split__text { padding-top: 40px; }
}

@media (max-width: 900px) {
  .hero-split { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; }
  .hero-split__text { padding-right: 5%; padding-bottom: 36px; padding-left: 5%; }
  .hero-split__media { aspect-ratio: 4 / 3; }
}

@media (max-width: 880px) {
  .nav__cta { display: none; }
  .v-split .nav__cta { display: inline-flex; min-height: 48px; gap: 0; padding: 8px 20px; font-size: clamp(0.95rem, 3.6vw, 1.1rem); border-radius: 10px 10px 22px 10px; white-space: nowrap; }
  .v-split .nav__cta::after { display: none; }
  .hero .btn-row .btn { flex: 1 1 0; }
  .feature, .panel__top, .panel__bottom, .contact { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .svc-head { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .eyebrow { padding-top: 0; }
  .map { aspect-ratio: 4 / 3; }
  .panel__rule { margin: 40px 0; }
  .ukk { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .ukk__intro { position: static; }
  .footer__top { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 680px) {
  .v-split { --header-h: 112px; }
  .nav__inner { gap: 12px; height: 112px; }
  .logo__badge, .v-split .logo__badge { width: 84px; height: 84px; }
  .btn, .sq-btn { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: break-word; gap: 16px; padding: 14px 26px 14px 26px; border-radius: 10px 10px 26px 10px; }
  .btn-row .btn { flex: 1 1 100%; }
  .hero .btn-row .btn { flex: 1 1 0; min-height: 62px; gap: 12px; padding: 12px 18px 12px 20px; font-size: 1.22rem; white-space: normal; border-radius: 10px 10px 24px 10px; }
  .hero .btn-row .btn::after { width: 20px; height: 20px; }
  .ref { flex-basis: 82%; }
  .refs__head { align-items: flex-start; flex-wrap: wrap; }
  .area__head { flex-direction: column; gap: 24px; margin-bottom: 32px; }
  .svc-grid { grid-template-columns: minmax(0, 1fr); }
  .svc-card:nth-child(n) { border-left: 0; min-height: 0; border-top: 1px solid var(--line); }
  .svc-card:first-child { border-top: 0; }
  .svc-card__art { min-height: 120px; }
  .svc-card__body { padding: 28px 22px; min-height: 0; }
  .panel { padding: 48px 22px; }
  .panel__lead { font-size: 1.3rem; }
  .stat-card { padding: 16px 20px; }
  .stat-card strong { font-size: 2.1rem; }
  .contact { padding: 56px 22px; }
  .contact h2 { font-size: clamp(1.6rem, 7.4vw, 2.2rem); overflow-wrap: break-word; }
  .footer { padding: 40px 0 0; }
  .footer__details { grid-template-columns: minmax(0, 1fr); }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .faq summary { font-size: 1.08rem; }
  .faq details p { padding-right: 0; font-size: 1rem; }
  .ukk__sub, .ukk__lead { font-size: 1.15rem; }
}

@media (max-width: 560px) {
  .hero .btn-row { flex-wrap: wrap; }
  .hero .btn-row .btn { flex: 1 1 100%; font-size: 1.35rem; padding: 14px 24px 14px 26px; }
}

@media (max-width: 480px) {
  .panel__media { grid-template-columns: minmax(0, 1fr); }
  .panel__photo--tall { height: auto; }
}

@media (max-width: 374px) {
  .logo__badge, .v-split .logo__badge { width: 68px; height: 68px; }
  .nav__actions { gap: 8px; }
  .v-split .nav__cta { padding: 6px 12px; font-size: 0.88rem; min-height: 44px; border-radius: 8px 8px 18px 8px; }
}

/* ---------- 404 page ---------- */
.notfound { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; min-height: 100svh; width: 90%; margin-inline: auto; padding-block: 48px; text-align: center; }
.notfound h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 500; font-stretch: 100%; font-variation-settings: "wdth" 100; }
.notfound__sub { max-width: 36ch; color: var(--gray); font-size: 1.15rem; line-height: 1.7; }
.notfound .btn-row { justify-content: center; }
