/* Sydänmänty® – shared styles for index.html, ukk.html and jalleenmyyjat.html
   World: Finnish architecture monograph. Large photo plates on warm paper,
   hairline rules, one measured drawing, brand olive/green as ink. */

@font-face {
  font-family: "Albert Sans";
  src: url("../fonts/albert-sans-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Albert Sans";
  src: url("../fonts/albert-sans-var-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* brand (client palette + sampled booth olive) */
  --forest: #3f5927;        /* tummanvihreä, headings and deep fields */
  --forest-deep: #2e411c;   /* footer */
  --moss: #726f44;          /* brand olive, text-safe on paper: links, buttons */
  --olive: #95916a;         /* Pantone 5773 C, fields, rules, bark */
  --sand: #e5d7c1;          /* brand beige */
  --linen: #eadfcd;         /* beige 80 %, as in the logo */

  /* wood, for the heartwood drawing */
  --sapwood: #f3ece0;
  --heartwood: #dccdab;
  --ring: #c3bc9c;
  --ring-heart: #ab9f78;

  /* paper and ink */
  --paper: #f6f2ea;
  --paper-2: #efe8db;
  --ink: #2a2b22;
  --ink-soft: #5b5a49;
  --rule: rgb(114 111 68 / 0.28);
  --on-forest: #eadfcd;
  --on-forest-soft: #cfccab;
  --rule-on-forest: rgb(234 223 205 / 0.22);

  /* type */
  --font: "Albert Sans", "Helvetica Neue", Arial, sans-serif;
  --fs-display: clamp(3rem, 1.9rem + 4.6vw, 6rem);
  --fs-h2: clamp(2.25rem, 1.55rem + 2.6vw, 4rem);
  --fs-h3: clamp(1.25rem, 1.1rem + 0.45vw, 1.5rem);
  --fs-lead: clamp(1.25rem, 1.08rem + 0.7vw, 1.75rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;

  /* space */
  --margin: clamp(20px, 4.6vw, 72px);
  --gutter: clamp(16px, 2.2vw, 32px);
  --section: clamp(96px, 11vw, 176px);
  --max: 1440px;
  --header-h: 76px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  scrollbar-color: var(--olive) var(--paper);
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.65;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4, p, figure, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1, h2, h3 {
  color: var(--forest);
  font-weight: 300;
  text-wrap: balance;
}
p { text-wrap: pretty; hyphens: auto; hyphenate-limit-chars: 12 5 5; }
.nowrap { white-space: nowrap; }

a {
  color: var(--moss);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: rgb(114 111 68 / 0.45);
  transition: color 0.2s, text-decoration-color 0.2s;
}
a:hover { color: var(--forest); text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--moss);
  outline-offset: 3px;
}

::selection { background-color: var(--forest); color: var(--linen); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--margin);
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background-color: var(--forest);
  color: var(--linen);
  border-radius: 999px;
}
.skip-link:focus { top: 12px; }
.skip-link:hover { color: var(--paper); }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-left: var(--margin);
  padding-right: var(--margin);
}

/* ---------- Type roles ---------- */
.display {
  font-size: var(--fs-display);
  line-height: 0.98;
  letter-spacing: -0.032em;
  font-weight: 300;
}
.h2 {
  font-size: var(--fs-h2);
  line-height: 1.03;
  letter-spacing: -0.028em;
}
.h3 {
  font-size: var(--fs-h3);
  line-height: 1.25;
  letter-spacing: -0.012em;
  font-weight: 500;
}
.lead {
  font-size: var(--fs-lead);
  line-height: 1.42;
  font-weight: 300;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.prose { max-width: 62ch; }
.prose > * + * { margin-top: 1.1em; }


/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  background-color: var(--forest);
  color: var(--linen);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background-color 0.25s var(--ease-soft), transform 0.25s var(--ease-soft);
}
.btn:hover { background-color: var(--moss); color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn--small { min-height: 40px; padding: 0 18px; font-size: var(--fs-small); }
.btn--light { background-color: var(--linen); color: var(--forest); }
.btn--light:hover { background-color: var(--paper); color: var(--forest); }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-weight: 600;
  font-size: var(--fs-small);
  text-decoration: none;
  color: var(--forest);
}
.arrow-link svg {
  width: 18px; height: 18px;
  transition: transform 0.3s var(--ease-out);
}
.arrow-link span {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  text-decoration-color: var(--rule);
  transition: text-decoration-color 0.2s;
}
.arrow-link:hover span { text-decoration-color: currentColor; }
.arrow-link:hover svg { transform: translateX(4px); }
.arrow-link--down:hover svg { transform: translateY(3px); }
.arrow-link--ext:hover svg { transform: translate(2px, -2px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgb(246 242 234 / 0);
  transition: background-color 0.35s var(--ease-soft), box-shadow 0.35s var(--ease-soft);
}
.site-header.is-scrolled {
  background-color: var(--paper);
  box-shadow: 0 1px 0 var(--rule);
}
.site-header.is-over { background-color: transparent; box-shadow: none; }
.site-header .brand { transition: opacity 0.35s var(--ease-soft), visibility 0.35s; }
.site-header.is-over .brand { opacity: 0; visibility: hidden; }
.site-header.is-over .nav-toggle { color: var(--linen); }
body.nav-open .site-header.is-over .nav-toggle { color: var(--forest); }
body.nav-open .site-header.is-over .brand { opacity: 1; visibility: visible; }
@media (min-width: 960px) {
  .site-header.is-over .site-nav ul a { color: var(--linen); }
  .site-header.is-over .site-nav ul a::after { background-color: var(--linen); }
  .site-header.is-over .btn { background-color: var(--linen); color: var(--forest); }
  .site-header.is-over .btn:hover { background-color: var(--paper); }
  .site-header.is-over :focus-visible { outline-color: var(--linen); }
}
.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { position: relative; z-index: 2; display: inline-flex; color: var(--forest); padding-top: 8px; padding-bottom: 8px; }
.brand__logo {
  display: block;
  width: clamp(168px, 14vw, 200px);
  height: auto;
  aspect-ratio: 1121 / 152; /* logo with ® (2026-11) */
}

.site-nav { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 40px); }
.site-nav ul { display: flex; gap: clamp(18px, 2.2vw, 34px); }
.site-nav ul a {
  position: relative;
  color: var(--ink);
  font-size: var(--fs-small);
  font-weight: 500;
  text-decoration: none;
  padding-top: 6px;
  padding-bottom: 6px;
}
.site-nav ul a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background-color: var(--moss);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}
.site-nav ul a:hover::after,
.site-nav ul a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav ul a[aria-current="page"] { color: var(--forest); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 4px 0 12px;
  border: 0;
  background: none;
  color: var(--forest);
  font: 600 0.9375rem/1 var(--font);
  cursor: pointer;
}
.nav-toggle__bars { position: relative; width: 22px; height: 12px; }
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.35s var(--ease-out), top 0.35s var(--ease-out);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { top: 10px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 5px; transform: rotate(-45deg); }

@media (max-width: 959px) {
  :root { --header-h: 64px; }
  .nav-toggle { display: inline-flex; position: relative; z-index: 2; }
  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 40px;
    padding: calc(var(--header-h) + 32px) var(--margin) 48px;
    background-color: var(--paper);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.35s var(--ease-soft), visibility 0s linear 0.35s;
  }
  .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.35s var(--ease-soft);
  }
  .site-nav ul { flex-direction: column; gap: 6px; }
  .site-nav ul a {
    display: inline-block;
    font-size: clamp(2.25rem, 10vw, 3rem);
    font-weight: 300;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: var(--forest);
  }
  .site-nav ul a::after { display: none; }
  .site-nav .btn { min-height: 52px; padding: 0 26px; font-size: var(--fs-small); }
  body.nav-open { overflow: hidden; }
  body.nav-open .site-header { background-color: var(--paper); box-shadow: none; }
}

/* ---------- Plates (photographs) ---------- */
.plate {
  position: relative;
  overflow: hidden;
  background-color: var(--paper-2);
}
.plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Plates settle into place as they enter the viewport (scroll-driven, no JS, content always visible) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .plate[data-settle] img {
      animation: plate-settle linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 45%;
    }
    .plate[data-settle] {
      animation: plate-open linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 90%;
    }
  }
}
@keyframes plate-settle {
  from { transform: scale(1.09); }
  to { transform: scale(1); }
}
@keyframes plate-open {
  from { clip-path: inset(7% 0 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* ---------- Hero ---------- */
/* One photograph under a transparent header; the logo, big and centred, carries the first viewport. */
.hero {
  position: relative;
  margin-top: calc(-1 * var(--header-h));
  height: 70vh;
  height: 70svh;
  min-height: 480px;
  overflow: hidden;
  background-color: var(--forest-deep);
  isolation: isolate;
}
.hero__media,
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__media img { object-fit: cover; object-position: 50% 62%; }
/* legibility: a band under the header and a soft pool behind the logo; the photo stays untinted at the edges */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgb(31 33 24 / 0.42), rgb(31 33 24 / 0) 22%),
    radial-gradient(ellipse 70% 42% at 50% 50%, rgb(31 33 24 / 0.42), rgb(31 33 24 / 0) 100%);
}
.hero__brand {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding-left: var(--margin);
  padding-right: var(--margin);
}
.hero__brand h1 {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.2vw, 32px);
  font-size: var(--fs-display);
  line-height: 0;
}
.hero__logo {
  display: block;
  width: min(72vw, 1080px);
  height: auto;
  color: var(--linen);
  /* blur(0) is listed so the entrance can ease it out: filters only interpolate
     when both ends list the same functions in the same order */
  filter: blur(0) drop-shadow(0 2px 22px rgb(31 33 24 / 0.4));
}
/* the slogan sits under the logo so the first screen says "terrace board" */
.hero__tagline {
  display: block;
  color: var(--linen);
  font-size: clamp(1.25rem, 0.85rem + 1.9vw, 2.625rem);
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: -0.012em;
  text-align: center;
  text-wrap: balance;
  text-shadow: 0 1px 18px rgb(31 33 24 / 0.55), 0 0 2px rgb(31 33 24 / 0.25);
}

@media (prefers-reduced-motion: no-preference) {
  .hero__media img { animation: settle 2.4s var(--ease-out) both; }
  .hero__logo { animation: rise-logo 1.4s var(--ease-out) 0.35s both; }
  .hero__tagline { animation: rise 1.4s var(--ease-out) 0.7s both; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(0.4em); filter: blur(8px); }
}
@keyframes rise-logo {
  from { opacity: 0; transform: translateY(0.4em); filter: blur(8px) drop-shadow(0 2px 22px rgb(31 33 24 / 0)); }
}
@keyframes settle {
  from { transform: scale(1.12); }
  to { transform: scale(1); }
}

@media (max-width: 719px) {
  .hero { min-height: 440px; }
  .hero__media img { object-position: 50% 70%; }
  .hero__logo { width: 100%; }
}

/* ---------- Sections ---------- */
.section { padding-top: var(--section); padding-bottom: var(--section); }
.section + .section { padding-top: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}

/* Story: "Terassilauta täydestä sydämestä" */
.story__head { align-items: start; row-gap: 32px; }
.story__head .h2 { grid-column: 1 / span 5; }
.story__head .lead { grid-column: 7 / -1; padding-top: 0.5rem; }

/* Heartwood exploded view. Static by default; heartwood.js adds .is-live and scrubs it on scroll. */
.heartwood { margin-top: clamp(72px, 9vw, 144px); row-gap: 40px; }
.heartwood__stage { grid-column: 1 / span 8; align-self: start; }
.heartwood__steps { grid-column: 9 / -1; align-self: center; }
.heartwood__panel { background-color: var(--paper-2); padding: clamp(16px, 2.6vw, 40px); }
.heartwood__art { --ar: 1; width: 100%; margin-inline: auto; }
.heartwood__art > img,
.heartwood__art > svg { display: block; width: 100%; height: auto; }
.heartwood__art > img { max-width: 560px; margin-inline: auto; }
.heartwood__step { max-width: 46ch; }
.heartwood__step + .heartwood__step { margin-top: 1.1em; }

.heartwood.is-live .heartwood__stage {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
}
.heartwood.is-live .heartwood__panel { width: 100%; }
.heartwood.is-live .heartwood__art {
  width: min(100%, calc((100vh - var(--header-h) - 2 * clamp(16px, 2.6vw, 40px) - 56px) * var(--ar)));
}
.heartwood.is-live .heartwood__steps { align-self: start; padding-top: 30vh; padding-bottom: 34vh; }
.heartwood__step > p + p { margin-top: 1.1em; }
.heartwood__close { color: var(--forest); font-weight: 500; }
.heartwood.is-live .heartwood__step {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 62vh;
  margin: 0;
  color: var(--ink-soft);
  opacity: 0.38;
  transition: opacity 0.5s var(--ease-soft), color 0.5s var(--ease-soft);
}
.heartwood.is-live .heartwood__step.is-active { opacity: 1; color: var(--ink); }
.heartwood__now,
.heartwood__bars { display: none; }

/* Drawing */
.hw { display: block; overflow: visible; font-family: var(--font); --u: 1; --fs: 14; }
.hw-bark { fill: var(--olive); opacity: 0; }
.hw-sap { fill: var(--sapwood); opacity: 0; }
.hw-heart { fill: var(--heartwood); stroke: var(--moss); stroke-width: calc(var(--su, 1) * 1.4px); opacity: 0; }
.hw-ring,
.hw-cut {
  fill: none;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.hw-ring { stroke: var(--ring); stroke-width: calc(var(--su, 1) * 1px); }
.hw-ring--heart { stroke: var(--ring-heart); }
.hw-ring--bark { stroke: var(--olive); stroke-width: calc(var(--su, 1) * 1.4px); }
.hw-pith { fill: var(--forest); }
.hw-cut { stroke: var(--forest); stroke-width: calc(var(--su, 1) * 1.8px); }
.hw-void {
  fill: var(--paper-2);
  stroke: var(--forest);
  stroke-width: calc(var(--su, 1) * 1.1px);
  stroke-dasharray: calc(var(--su, 1) * 4px) calc(var(--su, 1) * 3px);
  opacity: 0;
}
.hw-board { opacity: 0; }
.hw-board__body { fill: var(--heartwood); }
.hw-board__grain { fill: none; stroke: var(--ring-heart); stroke-width: calc(var(--su, 1) * 1px); }
.hw-board__edge { fill: none; stroke: var(--forest); stroke-width: calc(var(--su, 1) * 1.8px); stroke-linejoin: round; }
.hw-note { opacity: 0; }
.hw-leader { fill: none; stroke: var(--forest); stroke-width: calc(var(--u) * 1px); }
path.hw-leader[pathLength] { stroke-dasharray: 1; stroke-dashoffset: 1; }
.hw-dot { fill: var(--forest); }
.hw-dim { fill: none; stroke: var(--ink-soft); stroke-width: calc(var(--u) * 1px); }
.hw-text { font-size: calc(var(--fs) * 1px); fill: var(--forest); font-weight: 600; }
.hw-text--title { font-size: calc(var(--fs) * 1.08px); }
.hw-text--sub { font-weight: 400; fill: var(--ink-soft); font-size: calc(var(--fs) * 0.94px); }
.hw-text--dim { font-weight: 500; fill: var(--ink); font-variant-numeric: tabular-nums; }

@media (max-width: 959px) {
  .story__head .h2,
  .story__head .lead,
  .heartwood__stage,
  .heartwood__steps { grid-column: 1 / -1; }
}
@media (max-width: 959px) {
  /* 300vh until heartwood.js sets the exact scroll length from its plan */
  .heartwood.is-live { position: relative; min-height: 300vh; align-content: start; }
  /* the stage is exactly the visible screen under the header: the text keeps the room its
     longest step needs (heartwood.js sets min-height), the drawing scales into the rest */
  .heartwood.is-live .heartwood__stage {
    z-index: 2;
    height: calc(100vh - var(--header-h));
    height: calc(100svh - var(--header-h));
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 16px;
    padding-top: 8px;
    padding-bottom: 16px;
    background-color: var(--paper);
  }
  .heartwood.is-live .heartwood__panel {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
  }
  .heartwood.is-live .heartwood__art {
    width: auto;
    height: 100%;
    max-width: 100%;
    aspect-ratio: var(--ar);
  }
  .heartwood.is-live .heartwood__art > svg { width: 100%; height: 100%; }
  /* paragraph window: the text scrolls through it 1:1 with the finger, soft at both edges */
  .heartwood.is-live .heartwood__now {
    flex: none;
    position: relative;
    overflow: hidden;
    max-width: 46ch;
    font-size: 1rem;
    line-height: 1.55;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12px, #000 calc(100% - 12px), transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 12px, #000 calc(100% - 12px), transparent);
  }
  .heartwood__track { will-change: transform; }
  .heartwood__slide { padding-top: 12px; padding-bottom: 12px; }
  .heartwood__slide > p + p { margin-top: 0.9em; }
  .heartwood.is-live .heartwood__bars { display: flex; flex: none; gap: 6px; margin-bottom: -10px; }
  .heartwood__bars span {
    width: 28px;
    height: 2px;
    background-color: var(--rule);
    transition: background-color 0.3s var(--ease-soft);
  }
  .heartwood__bars span.is-on { background-color: var(--forest); }
  .heartwood.is-live .heartwood__steps {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .heartwood.is-live .heartwood__now { display: block; }
}

/* Properties */
.props { background-color: var(--paper-2); padding-top: var(--section); padding-bottom: var(--section); }
.props__grid { row-gap: 56px; align-items: start; }
.props__figure { grid-column: 1 / span 5; position: sticky; top: calc(var(--header-h) + 32px); }
.props__figure .plate { aspect-ratio: 4 / 5; }
.props__photo { object-position: 50% 62%; }  /* IMG_1166: keep the brushed boards, trim the sky */
.props__body { grid-column: 7 / -1; }
.props__list { margin-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--rule); }
.prop {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  column-gap: clamp(20px, 2.4vw, 40px);
  padding-top: 24px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--rule);
}
.prop__term { display: flex; align-items: flex-start; gap: 14px; }
.prop__icon {
  flex: none;
  width: 30px; height: 30px;
  margin-top: 1px;
  color: var(--moss);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.prop__icon .fill { fill: currentColor; stroke: none; opacity: 0.22; }
.prop h3 { font-size: 1.25rem; }
.prop p { color: var(--ink-soft); max-width: 48ch; padding-top: 2px; }
.props__more {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: clamp(20px, 3vw, 40px);
  row-gap: 18px;
  margin-top: clamp(56px, 7vw, 96px);
  padding: clamp(24px, 3.4vw, 44px) clamp(24px, 3.4vw, 48px);
  background-color: var(--paper);
  border-top: 2px solid var(--forest);
}
.props__more-icon {
  width: 48px; height: 48px;
  fill: none;
  stroke: var(--forest);
  stroke-width: 1.6;
  stroke-linecap: round;
}
.props__more-icon .dot { fill: var(--forest); stroke: none; }
.props__more p {
  max-width: 58ch;
  font-size: var(--fs-lead);
  line-height: 1.38;
  font-weight: 300;
  letter-spacing: -0.012em;
  color: var(--ink);
}

@media (max-width: 959px) {
  .props__figure { position: static; grid-column: 1 / -1; }
  .props__figure .plate { aspect-ratio: 4 / 3; }
  .props__body { grid-column: 1 / -1; }
  .props__more { grid-template-columns: auto minmax(0, 1fr); }
  .props__more .btn { grid-column: 1 / -1; justify-self: start; }
  .prop { grid-template-columns: 1fr; row-gap: 8px; }
  .prop p { padding-left: 44px; }
}

/* Full-bleed interlude */
.interlude { padding-top: 0; }  /* sits flush under the properties band */
.interlude .plate[data-settle] { animation: none; clip-path: none; }  /* no top-edge reveal, or the band shows a gap while scrolling in */
.interlude .plate { height: clamp(360px, 82vh, 920px); }
.interlude .plate img { object-position: 45% 72%; }

/* Products */
.products__head { align-items: end; row-gap: 24px; }
.products__head .h2 { grid-column: 1 / span 7; }
.products__head p { grid-column: 9 / -1; color: var(--ink-soft); max-width: 40ch; }

.compare {
  --pos: 50%;
  position: relative;
  margin-top: clamp(40px, 5vw, 72px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--paper-2);
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}
.compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 44% 30%;
  pointer-events: none;
}
.compare__top { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.compare__line {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background-color: var(--paper);
  box-shadow: 0 0 0 1px rgb(42 43 34 / 0.08);
  pointer-events: none;
}
.compare__knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px; height: 56px;
  margin: -28px 0 0 -28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background-color: var(--paper);
  color: var(--forest);
  box-shadow: 0 6px 20px rgb(42 43 34 / 0.22), 0 1px 3px rgb(42 43 34 / 0.18);
  transition: transform 0.3s var(--ease-out);
}
.compare__knob svg { width: 26px; height: 26px; }
.compare:hover .compare__knob { transform: scale(1.06); }
.compare:has(.compare__range:focus-visible) .compare__knob {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}
.compare__tag {
  position: absolute;
  top: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgb(246 242 234 / 0.9);
  color: var(--forest);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  pointer-events: none;
  transition: opacity 0.3s;
}
.compare__tag.is-covered { opacity: 0; }  /* main.js: the line has reached the label */
.compare__tag--a { left: 18px; }
.compare__tag--b { right: 18px; }
.compare__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
}
.compare__range::-webkit-slider-thumb { -webkit-appearance: none; width: 56px; height: 100vh; }
.compare__range::-moz-range-thumb { width: 56px; height: 100vh; border: 0; }


.product-list {
  margin-top: clamp(56px, 7vw, 104px);
  row-gap: 64px;
}
.product { grid-column: span 6; padding-right: clamp(0px, 3vw, 48px); }
.product h3 {
  font-size: clamp(1.5rem, 1.25rem + 0.9vw, 2.125rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 400;
}
.product h3 span { display: block; color: var(--moss); }
.product p { margin-top: 18px; max-width: 54ch; }
.specs {
  display: grid;
  grid-template-columns: max-content 1fr;
  margin-top: 28px;
  border-top: 1px solid var(--rule);
  font-size: var(--fs-small);
}
.specs dt,
.specs dd { padding-top: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.specs dt { color: var(--ink-soft); padding-right: 32px; }
.specs dd { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.product .arrow-link { margin-top: 26px; }

@media (max-width: 959px) {
  .products__head .h2,
  .products__head p { grid-column: 1 / -1; }
  .compare { aspect-ratio: 4 / 3; }
}
@media (max-width: 719px) {
  .product { grid-column: 1 / -1; padding-right: 0; }
  .compare { aspect-ratio: 4 / 5; }
  .compare__tag { top: 12px; padding: 6px 11px; }
  .compare__tag--a { left: 12px; }
  .compare__tag--b { right: 12px; }
}

/* References: a horizontal reel of plates, one row, swipe or step */
.refs__head {
  display: flex;
  flex-wrap: wrap;  /* the long heading never pushes the step buttons past a narrow screen */
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
}
.refs__head .h2 { min-width: 0; }
.reel__controls { display: flex; gap: 10px; margin-left: auto; }
.reel { margin-top: clamp(32px, 4vw, 56px); }
.reel__track {
  --reel-h: clamp(300px, 38vw, 560px);
  display: flex;
  gap: clamp(12px, 1.6vw, 24px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-left: max(var(--margin), calc((100vw - var(--max)) / 2 + var(--margin)));
  scroll-padding-right: max(var(--margin), calc((100vw - var(--max)) / 2 + var(--margin)));
  padding-left: max(var(--margin), calc((100vw - var(--max)) / 2 + var(--margin)));
  padding-right: max(var(--margin), calc((100vw - var(--max)) / 2 + var(--margin)));
  scrollbar-width: none;
}
.reel__track::-webkit-scrollbar { display: none; }
.reel__track:focus-visible { outline-offset: -2px; }
.reel__slide {
  flex: none;
  height: var(--reel-h);
  aspect-ratio: 3 / 4;
  scroll-snap-align: start;
  overflow: hidden;
  background-color: var(--paper-2);
}
.reel__slide--wide { aspect-ratio: 16 / 10; }
.reel__slide a { display: block; height: 100%; cursor: zoom-in; }
.reel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out);
}
.reel__slide a:hover img { transform: scale(1.035); }
.reel__slide a:focus-visible { outline-offset: -4px; }
.reel__rail {
  position: relative;
  height: 1px;
  margin-top: 22px;
  background-color: var(--rule);
}
.reel__rail span {
  position: absolute;
  left: 0; top: -1px;
  height: 3px;
  width: 20%;
  background-color: var(--forest);
  transform-origin: left;
}
.icon-btn.icon-btn--ink { color: var(--forest); border-color: var(--rule); }
.icon-btn.icon-btn--ink:hover { background-color: var(--paper-2); border-color: var(--moss); }
.icon-btn.icon-btn--ink[disabled] { opacity: 0.35; cursor: default; background: none; border-color: var(--rule); }

@media (max-width: 719px) {
  .reel__track { --reel-h: 300px; }
  .reel__slide--wide { aspect-ratio: 4 / 3; }
}

/* Lightbox */
.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background-color: #1f2118;
  color: var(--linen);
}
.lightbox::backdrop { background: rgb(31 33 24 / 0.6); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; animation: fade 0.35s var(--ease-soft); }
.lightbox__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px var(--margin);
  font-size: var(--fs-small);
}
.lightbox__stage {
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
  padding: 0 var(--margin);
}
.lightbox__stage img {
  max-width: 100%;
  max-height: calc(100dvh - 176px);
  width: auto;
  height: auto;
  object-fit: contain;
}
.lightbox__foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 24px;
  padding: 16px var(--margin) 22px;
}
.lightbox__nav { display: flex; gap: 10px; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 48px; height: 48px;
  border: 1px solid rgb(234 223 205 / 0.3);
  border-radius: 50%;
  background: none;
  color: var(--linen);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
.icon-btn:hover { background: rgb(234 223 205 / 0.12); border-color: rgb(234 223 205 / 0.6); }
.icon-btn svg { width: 20px; height: 20px; }
.lightbox :focus-visible { outline-color: var(--linen); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Contact (forest field) ---------- */
.contact {
  position: relative;
  overflow: hidden;
  background-color: var(--forest);
  color: var(--on-forest);
  padding-top: var(--section);
  padding-bottom: var(--section);
}
.contact__mark {
  position: absolute;
  right: -6vw;
  bottom: -14vw;
  width: clamp(360px, 46vw, 720px);
  height: auto;
  aspect-ratio: 490.8 / 545.7;
  color: color-mix(in srgb, var(--forest) 90%, var(--linen));
  pointer-events: none;
}
.contact .grid { position: relative; row-gap: 56px; align-items: start; }
.contact__head { grid-column: 1 / span 6; }
.contact h2 { color: var(--linen); }
.contact__intro { color: var(--on-forest-soft); margin-top: 24px; max-width: 40ch; }
.contact__intro a { color: var(--linen); text-decoration-color: rgb(234 223 205 / 0.45); }
.contact__intro a:hover { color: var(--paper); text-decoration-color: currentColor; }
.contact__people { grid-column: 8 / -1; border-top: 1px solid var(--rule-on-forest); }
.person {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(18px, 2vw, 28px);
  padding-top: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule-on-forest);
}
.person__photo {
  width: clamp(76px, 7.5vw, 108px);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  background-color: var(--forest-deep);
}
.person__name { font-size: var(--fs-h3); font-weight: 500; letter-spacing: -0.01em; color: var(--linen); }
.person__links { display: flex; flex-wrap: wrap; gap: 6px 28px; margin-top: 10px; }
.person__links a {
  color: var(--on-forest);
  font-size: 1.0625rem;
  text-decoration-color: rgb(234 223 205 / 0.35);
  font-variant-numeric: tabular-nums;
}
.person__links a:hover { color: var(--paper); text-decoration-color: currentColor; }
.contact :focus-visible { outline-color: var(--linen); }

@media (max-width: 959px) {
  .contact__head,
  .contact__people { grid-column: 1 / -1; }
  .contact__mark { right: -30vw; bottom: -20vw; width: 90vw; }
}

/* ---------- Footer ---------- */
.site-footer {
  background-color: var(--forest-deep);
  color: var(--on-forest-soft);
  padding-top: clamp(64px, 7vw, 104px);
  padding-bottom: 40px;
  font-size: var(--fs-small);
}
.site-footer .grid { row-gap: 48px; }
.sources { grid-column: 1 / span 8; }
.sources h2 {
  font-size: var(--fs-h3);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--linen);
}
.sources ol { margin-top: 20px; border-top: 1px solid var(--rule-on-forest); }
.sources li { padding-top: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--rule-on-forest); }
.sources a {
  color: var(--linen);
  font-weight: 500;
  text-decoration-color: rgb(234 223 205 / 0.3);
}
.sources a:hover { color: var(--paper); text-decoration-color: currentColor; }
.sources a svg { display: inline-block; width: 0.9em; height: 0.9em; margin-left: 0.25em; vertical-align: -0.05em; }
.sources .src-meta { display: block; margin-top: 4px; color: var(--on-forest-soft); }
.site-footer :focus-visible { outline-color: var(--linen); }

.footer-base {
  margin-top: clamp(56px, 7vw, 96px);
  padding-top: 28px;
  border-top: 1px solid var(--rule-on-forest);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.by-icoma-link { display: inline-block; transition: opacity 0.25s var(--ease-soft); }
.by-icoma-link:hover { opacity: 0.8; }
.by-icoma {
  display: block;
  width: 260px;
  height: auto;
}

@media (max-width: 959px) {
  .sources { grid-column: 1 / -1; }
}

@media (forced-colors: active) {
  .brand__logo { color: CanvasText; }
  .contact__mark { display: none; }
}

/* ---------- UKK page ---------- */
.faq-hero { padding-top: clamp(40px, 6vw, 96px); padding-bottom: clamp(56px, 7vw, 112px); }
.faq-hero .grid { row-gap: 32px; align-items: end; }
.faq-hero h1 { grid-column: 1 / span 7; }
.faq-hero .faq-hero__intro { grid-column: 9 / -1; }
.faq-hero__intro p { color: var(--ink-soft); }
.faq-hero__intro a { font-weight: 600; }

.faq-index {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.faq-index a {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  min-height: 44px;
  align-items: center;
  padding: 0 18px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--forest);
  font-weight: 500;
  font-size: var(--fs-small);
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s;
}
.faq-index a:hover { background-color: var(--paper-2); border-color: var(--moss); }
.faq-index a span { color: var(--ink-soft); font-variant-numeric: tabular-nums; font-weight: 400; }

.faq-group { padding-bottom: clamp(72px, 9vw, 136px); }
.faq-group .grid { row-gap: 32px; align-items: start; }
.faq-group__head { grid-column: 1 / span 4; position: sticky; top: calc(var(--header-h) + 32px); }
.faq-group__head .plate { margin-top: 28px; aspect-ratio: 4 / 3; }
.faq-list { grid-column: 6 / -1; border-top: 1px solid var(--rule); }

.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item summary {
  display: grid;
  grid-template-columns: 1fr 32px;
  gap: 24px;
  align-items: center;
  padding-top: 24px;
  padding-bottom: 24px;
  cursor: pointer;
  list-style: none;
  color: var(--forest);
  font-size: var(--fs-h3);
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: -0.012em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover .faq-item__q { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; text-decoration-color: var(--rule); }
.faq-item__toggle {
  position: relative;
  width: 32px; height: 32px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  transition: background-color 0.25s, border-color 0.25s, transform 0.45s var(--ease-out);
}
.faq-item__toggle::before,
.faq-item__toggle::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 12px; height: 1.5px;
  margin: -0.75px 0 0 -6px;
  background-color: var(--forest);
}
.faq-item__toggle::after { transform: rotate(90deg); transition: transform 0.45s var(--ease-out); }
.faq-item[open] .faq-item__toggle { background-color: var(--forest); border-color: var(--forest); }
.faq-item[open] .faq-item__toggle::before,
.faq-item[open] .faq-item__toggle::after { background-color: var(--linen); }
.faq-item[open] .faq-item__toggle::after { transform: rotate(0deg); }

.faq-item__answer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  padding-bottom: 36px;
}
.faq-item__answer .prose { color: var(--ink); }
.faq-item__answer--figure { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
.faq-item__answer figure .plate { aspect-ratio: 4 / 3; }
.faq-item__answer figure.log-figure { background-color: var(--paper-2); padding: 16px; }

.todo {
  padding: 18px 20px;
  border: 1px dashed var(--olive);
  background: rgb(149 145 106 / 0.08);
  color: var(--ink-soft);
  font-size: var(--fs-small);
}
.todo strong { display: block; color: var(--moss); font-weight: 600; margin-bottom: 4px; }
.todo--figure { aspect-ratio: 4 / 3; display: grid; place-items: center; text-align: center; }

/* Quality specifications (UKK "laatumääritykset", from the product card): property | requirement.
   Hairline rows like .specs; on phones each row stacks, the property above its requirement. */
.quality-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--rule);
  font-size: var(--fs-small);
  line-height: 1.55;
}
.quality-table caption {
  max-width: 62ch;
  padding-bottom: 24px;
  color: var(--ink);
  font-size: var(--fs-body);
  line-height: 1.65;
  text-align: left;
  text-wrap: pretty;
}
.quality-table th,
.quality-table td {
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}
.quality-table thead th {
  padding-top: 10px;
  padding-bottom: 10px;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.quality-table tbody th {
  width: 34%;
  padding-right: clamp(16px, 2.4vw, 32px);
  color: var(--forest);
  font-weight: 500;
}
.quality-table td { color: var(--ink); }

@media (max-width: 719px) {
  .quality-table thead {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .quality-table tr {
    display: block;
    padding-top: 12px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--rule);
  }
  .quality-table tbody th,
  .quality-table td {
    display: block;
    width: auto;
    padding: 0;
    border: 0;
  }
  .quality-table tbody th { margin-bottom: 2px; }
}

@supports selector(::details-content) {
  @media (prefers-reduced-motion: no-preference) {
    .faq-item { interpolate-size: allow-keywords; }
    .faq-item::details-content {
      height: 0;
      overflow: clip;
      opacity: 0;
      transition: height 0.5s var(--ease-out), opacity 0.4s var(--ease-soft), content-visibility 0.5s allow-discrete;
    }
    .faq-item[open]::details-content { height: auto; opacity: 1; }
  }
}

@media (max-width: 959px) {
  .faq-hero h1,
  .faq-hero .faq-hero__intro,
  .faq-group__head,
  .faq-list { grid-column: 1 / -1; }
  .faq-group__head { position: static; }
  .faq-group__head .plate { display: none; }
  .faq-item__answer--figure { grid-template-columns: 1fr; }
}
@media (max-width: 719px) {
  .faq-item summary { padding-top: 20px; padding-bottom: 20px; gap: 16px; }
}

/* ---------- Jälleenmyyjät page ---------- */
/* Store-locator layout: title, region links and list on the left, the map sticky
   on the right from the top of the page so every pin is in the first view.
   The list is the content; the map (dealers-map.js) is drawn from it and only exists with JS.
   Region links reuse .faq-index. */
.dealers { padding-top: 24px; padding-bottom: clamp(72px, 9vw, 136px); }
.dealers .grid { row-gap: 40px; align-items: start; }
.dealers__head { grid-column: 1 / span 7; padding-top: clamp(16px, 3vw, 48px); }
.dealers__title {
  font-size: var(--fs-h2);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 300;
}
.dealers__intro { margin-top: 20px; max-width: 46ch; color: var(--ink-soft); }
.dealers__intro a { font-weight: 600; }
.dealers__regions { margin-top: 28px; gap: 8px; }
.dealers__regions a { min-height: 40px; padding: 0 15px; }
.dealers__list { grid-column: 1 / -1; }
.dealers__map { display: none; }
.js .dealers__head { grid-column: 1 / span 5; grid-row: 1; }
.js .dealers__list { grid-column: 1 / span 5; grid-row: 2; }
.js .dealers__map {
  display: block;
  grid-column: 7 / -1;
  grid-row: 1 / span 2;
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.region { border-top: 1px solid var(--rule); padding-top: 22px; padding-bottom: 44px; }
.region:last-child { padding-bottom: 0; }
.region:focus { outline: none; }
.region__title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: var(--fs-h3);
  line-height: 1.25;
  font-weight: 400;
  letter-spacing: -0.012em;
}
.region__title span { color: var(--ink-soft); font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
.region__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14.5rem), 1fr));
  gap: 12px var(--gutter);
  margin-top: 14px;
}

.dealer {
  padding: 14px 16px 12px;
  margin-inline: -16px;
  transition: background-color 0.3s var(--ease-soft);
}
.dealer.is-active { background-color: var(--paper-2); box-shadow: inset 2px 0 0 var(--forest); }
.dealer__name { font-size: 1.125rem; line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; }
.dealer__addr { margin-top: 4px; color: var(--ink-soft); font-size: var(--fs-small); line-height: 1.5; hyphens: manual; }
.dealer__addr span { display: block; }
.dealer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  margin-top: 6px;
  font-size: var(--fs-small);
}
.dealer__show,
.dealer__route {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--forest);
  font: 600 var(--fs-small)/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
}
.dealer__show > span,
.dealer__route {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  text-decoration-color: var(--rule);
  transition: text-decoration-color 0.2s;
}
.dealer__show:hover > span,
.dealer__route:hover { color: var(--forest); text-decoration-color: currentColor; }
.dealer__show svg { width: 17px; height: 17px; flex: none; }
.dealer__route svg { width: 0.9em; height: 0.9em; margin-left: -2px; flex: none; }
.dealer__show[hidden] { display: none; }

/* Map frame: a plate on paper-2 until the tiles arrive */
.dealer-map {
  position: relative;
  height: clamp(480px, calc(100svh - var(--header-h) - 48px), 880px);
  background-color: var(--paper-2);
  overflow: hidden;
}
.dealer-map__canvas { position: absolute; inset: 0; }
.dealer-map__note {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--ink-soft);
  font-size: var(--fs-small);
  text-align: center;
}
.dealer-map.is-ready .dealer-map__note { display: none; }
.dealer-map.is-failed .dealer-map__canvas { display: none; }
.dealer-map__reset {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background-color: var(--paper);
  color: var(--forest);
  font: 600 0.875rem/1 var(--font);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
.dealer-map__reset:hover { background-color: var(--paper-2); border-color: var(--moss); }
.dealer-map__reset[hidden] { display: none; }

/* MapLibre controls and popup in the site's voice */
.dealer-map .maplibregl-ctrl-group {
  border-radius: 0;
  background-color: var(--paper);
  box-shadow: 0 0 0 1px var(--rule);
}
.dealer-map .maplibregl-ctrl-group button { width: 36px; height: 36px; }
.dealer-map .maplibregl-ctrl-group button + button { border-top-color: var(--rule); }
.dealer-map .maplibregl-ctrl-attrib { font-size: 0.75rem; background-color: rgb(246 242 234 / 0.85); }
.dealer-map .maplibregl-ctrl-attrib a { color: var(--ink-soft); }
.dealer-map .maplibregl-cooperative-gesture-screen { font-family: var(--font); font-size: 1.125rem; background: rgb(42 43 34 / 0.55); }
.dealer-map .maplibregl-popup-content {
  padding: 16px 44px 14px 18px;
  border-radius: 0;
  background-color: var(--paper);
  box-shadow: 0 12px 32px rgb(42 43 34 / 0.18), 0 0 0 1px var(--rule);
  font-family: var(--font);
  color: var(--ink);
}
.dealer-map .maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
.dealer-map .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
.dealer-map .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--paper); }
.dealer-map .maplibregl-popup-anchor-top .maplibregl-popup-tip,
.dealer-map .maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
.dealer-map .maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--paper); }
.dealer-map .maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--paper); }
.dealer-map .maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--paper); }
.dealer-map .maplibregl-popup-close-button {
  top: 6px;
  right: 6px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--forest);
  font-size: 1.375rem;
  line-height: 1;
}
.dealer-map .maplibregl-popup-close-button:hover { background-color: var(--paper-2); }
.map-popup__name { color: var(--forest); font-size: 1.0625rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.map-popup__addr { margin-top: 4px; color: var(--ink-soft); font-size: var(--fs-small); line-height: 1.5; }
.map-popup__route { display: inline-block; margin-top: 8px; font-size: var(--fs-small); font-weight: 600; color: var(--forest); }

@media (max-width: 959px) {
  .dealers__head,
  .js .dealers__head,
  .js .dealers__list,
  .js .dealers__map { grid-column: 1 / -1; grid-row: auto; }
  .js .dealers__map { position: static; }
  .dealers__intro { max-width: 60ch; }
  .dealer-map { height: clamp(360px, 62svh, 560px); }
}
@media (max-width: 719px) {
  .dealers .wrap { padding-left: 0; padding-right: 0; }
  .dealers__head,
  .dealers__list { padding-left: var(--margin); padding-right: var(--margin); }
  .dealers .grid { row-gap: 32px; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .nav-toggle, .lightbox, .contact__mark { display: none !important; }
  body { background: none; }
  .contact, .site-footer { background: none; color: var(--ink); }
}
