/* Rebekan Hoitokoti Oy - uudistusdemo v2 (2026-10-22), muutoskierros 2026-10-27
 * Design-jarjestelma: Avenir-rytmi (12 sar., 16 px gap, 120/72 px osiovali).
 * Paletti uudesta logosta (Oy.png, naytteet ASSETS-NOTES.md): navy, sun, snow.
 * Fontti: Plus Jakarta Sans kaikkeen. Ei frameworkia.
 */

/* ---------- Tokenit ---------- */
:root {
  --navy: #25336C;        /* logon navy: otsikot, leipateksti, napit, linkit */
  --navy-hover: #31417F;  /* napin ja kortin hover (valkoinen 9.6:1) */
  --navy-deep: #1E2A5C;   /* footer, heron scrim */
  --sun: #FFD854;         /* logon keltainen: VAIN heron korttien numero navylla + aktiivisen navin alaviiva */
  --snow: #F3F8FB;
  --white: #FFFFFF;
  --muted: #525C7E;       /* navysta johdettu: valkoisella 6.6:1, snowlla 6.2:1 */
  --rule: rgba(37, 51, 108, .12);
  --on-dark: #FFFFFF;
  --on-dark-muted: rgba(255, 255, 255, .72);
  --rule-dark: rgba(255, 255, 255, .16);

  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --fs-body: 18px;
  --fs-small: 16px;
  --fs-lead: 20px;
  --fs-display: clamp(38px, 5vw, 64px);
  --fs-h2: clamp(28px, 3vw, 38px);
  --fs-h3: clamp(22px, 2vw, 26px);
  --fs-h3-lg: clamp(24px, 2.3vw, 30px);

  --radius-sm: 8px;
  --radius: 12px;
  --gap: 16px;
  --pad-x: 32px;
  --max: 1280px;
  --section-y: 120px;
  --header-h: 88px;
  --callbar-h: 64px;

  --shadow-nav: 0 4px 12px 0 rgba(37, 51, 108, .08);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --t-ui: 300ms linear;
}

@media (max-width: 959.98px) {
  :root { --section-y: 72px; --header-h: 68px; }
}
@media (max-width: 767.98px) {
  :root { --pad-x: 20px; }
}

/* ---------- Perusta ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
h1, h2, h3 {
  margin: 0;
  font-family: var(--font);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
a { color: var(--navy); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy); text-decoration-thickness: 2px; }
a, button { -webkit-tap-highlight-color: transparent; }

:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.site-footer :focus-visible, .hero :focus-visible { outline-color: var(--white); }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--pad-x));
  margin-inline: auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
}
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.section--snow { background: var(--snow); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 8px; color: var(--white); }

/* Napit ja linkit */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: var(--white);
  font-family: var(--font);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--t-ui);
}
.btn:hover { background: var(--navy-hover); color: var(--white); }
.btn--block { width: 100%; }
.text-link { font-weight: 600; }

/* Osion otsikko */
.section-head { margin-bottom: 48px; }
.section-head h2 { font-size: var(--fs-h2); }
.section-sub { margin-top: 10px; color: var(--muted); font-size: var(--fs-small); }

/* ---------- Header: valkoinen, logo vasemmalla ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 200ms ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow-nav); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: calc(var(--header-h) - 1px);
}
.brand { display: flex; align-items: center; gap: 12px; flex: none; color: var(--navy); text-decoration: none; }
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; white-space: nowrap; }
@media (max-width: 959.98px) { .brand { gap: 10px; } .brand-name { font-size: 16px; } }
.brand-logo { height: 64px; width: auto; }
.nav-desktop ul { display: flex; align-items: center; gap: clamp(20px, 2.4vw, 40px); }
.nav-desktop a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--navy);
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
/* Alaviiva: suora, terävät paat. Hover navy, aktiivinen sun (koriste, tila myos aria-currentissa) */
.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 3px;
  border-radius: 0;
  background: var(--navy);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 200ms var(--ease);
}
.nav-desktop a:hover::after { transform: scaleX(1); }
.nav-desktop a[aria-current="page"]::after { background: var(--sun); transform: scaleX(1); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-width: 48px;
  min-height: 48px;
  margin-right: -8px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--navy);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}
.burger { position: relative; display: block; flex: none; width: 22px; height: 14px; }
.burger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform 200ms var(--ease), opacity 200ms linear;
}
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 6px; }
.burger span:nth-child(3) { top: 12px; }
.nav-toggle[aria-expanded="true"] .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .burger span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-panel {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 49;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--white);
  padding: 8px var(--pad-x) 40px;
  animation: panelIn 240ms var(--ease) backwards;
}
.nav-panel[hidden] { display: none; }
.panel-links a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--navy);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.panel-links a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--sun);
  text-decoration-thickness: 3px;
  text-underline-offset: 8px;
}
.panel-phones { margin-top: 28px; }
.panel-phones a {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 16px;
  min-height: 56px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--navy);
  text-decoration: none;
}
.panel-unit { font-size: 17px; }
.panel-num { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }

html.nav-open, html.nav-open body { overflow: hidden; }

@media (max-width: 959.98px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-inner { gap: 12px; }
  .brand-logo { height: 48px; }
}

/* ---------- Etusivun hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  /* min-height (ei height): hero kasvaa sisallon mukaan, mitaan ei leikata */
  min-height: 640px;
  min-height: max(640px, min(92vh, 860px));
  min-height: max(640px, min(92svh, 860px));
  overflow: hidden;
  background: var(--navy-deep);
  color: var(--white);
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 40%;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  /* Navy-scrim pysaytyksin pikseleina alareunasta, koska teksti on aina alareunassa heron
     korkeudesta riippumatta. H1 >= 3:1 vaaleimmalla taustapikselilla, ks. qa/RAPORTTI.md. */
  background: linear-gradient(to top,
    rgba(30, 42, 92, .7) 0,
    rgba(30, 42, 92, .7) 300px,
    rgba(30, 42, 92, .54) 480px,
    rgba(30, 42, 92, 0) 760px);
}
/* Mobiilissa kortit pinossa nostavat H1:n korkeammalle, joten pysaytykset siirtyvat ylos */
@media (max-width: 599.98px) {
  .hero-scrim {
    background: linear-gradient(to top,
      rgba(30, 42, 92, .72) 0,
      rgba(30, 42, 92, .72) 500px,
      rgba(30, 42, 92, .5) 700px,
      rgba(30, 42, 92, 0) 920px);
  }
}
.hero-inner { position: relative; z-index: 1; padding-top: 40px; padding-bottom: 56px; }
.hero-title {
  max-width: 720px;
  font-size: clamp(40px, 5.6vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 40px;
}

/* Yksikkokortit: kolme navya korttia, kaksi kohdetta per kortti (sivu + puhelin) */
.hero-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.hero-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 8px 24px rgba(14, 20, 46, .2);
  transition: transform 200ms var(--ease), background-color 200ms linear;
}
.hc-text { flex: 1 1 auto; min-width: 0; }
.hc-name {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.hc-name a {
  display: inline-block;
  padding: 6px 0;
  margin: -6px 0;
  color: var(--white);
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.hc-name a:hover, .hc-name a:focus-visible { text-decoration-line: underline; }
.hc-place { margin-top: 4px; font-size: 16px; line-height: 1.4; color: rgba(255, 255, 255, .75); }
.hc-phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin: 12px 0 -10px;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--sun);
  text-decoration: none;
}
.hc-phone:hover { color: var(--sun); }
.hc-ico { flex: none; width: 18px; height: 18px; }
.hc-num { text-decoration-thickness: 1px; text-underline-offset: 4px; }
.hc-phone:hover .hc-num, .hc-phone:focus-visible .hc-num { text-decoration-line: underline; }
@media (hover: hover) {
  .hero-card:hover { transform: translateY(-2px); background: var(--navy-hover); }
  .hero-card:hover .hc-name a { text-decoration-line: underline; }
}

/* Alle 960 px: kortit pinoon, nimi + paikkakunta vasemmalla, numero oikealla */
@media (max-width: 959.98px) {
  .hero-cards { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 16px;
    padding: 16px 24px;
  }
  .hc-phone { margin: 0; }
}
/* Alle 600 px: numero nimen alle (360 px:lla nimi ja numero eivat mahdu samalle riville) */
@media (max-width: 599.98px) {
  .hero-inner { padding-bottom: 32px; }
  .hero-title { margin-bottom: 28px; }
  .hero-card {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px 20px;
  }
  .hc-phone { grid-column: 1; justify-self: start; margin: 2px 0 -8px; }
}

/* Latausanimaatio: ainoa "authored moment" */
@keyframes rise16 { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes rise12 { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes panelIn { from { opacity: 0; } to { opacity: 1; } }

.js .hero-title { animation: rise16 500ms var(--ease) 0ms backwards; }
.js .hero-card { animation: rise12 400ms var(--ease) 150ms backwards; }
.js .hero-card:nth-child(2) { animation-delay: 270ms; }
.js .hero-card:nth-child(3) { animation-delay: 390ms; }

/* Hiljainen scroll-reveal: 12 px / 500 ms, kerran */
.reveal { transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.js .reveal:not(.is-in) { opacity: 0; transform: translateY(12px); }

/* ---------- Etusivu: esittely ---------- */
.intro .grid-12 { align-items: center; }
.intro-text {
  grid-column: 1 / 8;
  max-width: 62ch;
  font-size: clamp(19px, 1.5vw, 22px);
  font-weight: 400;
  line-height: 1.55;
  color: var(--navy);
}
.intro-figure { grid-column: 9 / 13; justify-self: end; width: 100%; max-width: 420px; }
.intro-figure img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); }

/* ---------- Etusivu: palvelukortit ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--snow);
}
.card-media { aspect-ratio: 4 / 3; overflow: hidden; max-width: 460px; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 200ms ease; }
.card:hover .card-media img, .card:focus-within .card-media img { transform: scale(1.03); }
.card-body { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; flex: 1; padding: 28px 28px 32px; }
.card-body h3 { font-size: var(--fs-h3); }
.card-body p { flex: 1; }
.card-link { margin-top: 8px; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }

/* ---------- Alasivun alku ---------- */
.page-start { background: var(--snow); padding-top: 96px; padding-bottom: 96px; }
.page-start .grid-12 { align-items: center; row-gap: 40px; }
.ps-text { grid-column: 1 / 8; }
.page-title { font-size: var(--fs-display); line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 24px; }
.lead { font-size: var(--fs-lead); line-height: 1.55; max-width: 60ch; }
.lead + .lead { margin-top: 12px; }
.ps-phones { display: flex; flex-wrap: wrap; gap: 4px 32px; margin-top: 28px; }
.big-phone {
  font-size: clamp(24px, 2.2vw, 28px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--navy);
  text-underline-offset: 6px;
  font-variant-numeric: tabular-nums;
  padding: 6px 0;
}
.ps-more { margin-top: 12px; }
.ps-more a { display: inline-flex; align-items: center; min-height: 44px; }
.ps-figure { grid-column: 8 / 13; justify-self: end; width: 100%; max-width: 460px; }
.ps-figure img { width: 100%; border-radius: var(--radius); }
/* Iso talokuva (Rebekan hoitokoti): sarakkeet 7-12, natiivikoko riittaa */
.page-start--wide .ps-text { grid-column: 1 / 7; }
.page-start--wide .ps-figure { grid-column: 7 / 13; max-width: none; }
.page-start--wide .ps-figure img { aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- Tarina: yksi rakenne jokaiselle osiolle ----------
   Teksti aina sarakkeissa 1-6 (sama vasen linja kuin H1), kuva aina 8-12 ylalinjassa
   H2:n kanssa. Osioiden valissa hiusviiva ja tasainen 72 px rytmi (mobiili 48 px). */
.story-rows { --story-gap: 72px; }
.story-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: start;
}
.story-row + .story-row {
  margin-top: var(--story-gap);
  padding-top: var(--story-gap);
  border-top: 1px solid var(--rule);
}
.story-text { grid-column: 1 / 7; grid-row: 1; }
.story-text h2 { font-size: var(--fs-h2); margin-bottom: 20px; }
.story-text p + p { margin-top: 1em; }
.story-figure { grid-column: 8 / 13; grid-row: 1; width: 100%; max-width: 768px; }
.story-figure img,
.story-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}
.story-media { background: var(--navy-deep); }

/* Paatoslohko: yksinkertainen kaista, otsikko + soittonappi */
.closing { padding-top: 72px; padding-bottom: 72px; }
.closing-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
}
.closing-title { max-width: 28ch; font-size: var(--fs-h3-lg); line-height: 1.2; color: var(--navy); }

/* ---------- Kotihoito: palvelulistat rinnakkain koko leveydella ---------- */
.services-intro { max-width: 62ch; margin-bottom: 56px; }
.services-intro h2 { font-size: var(--fs-h2); margin-bottom: 20px; }
.lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 48px;
  row-gap: 48px;
}
.list-block h3 { font-size: var(--fs-h3); margin-bottom: 16px; }
.dot-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 10px 0;
  border-top: 1px solid var(--rule);
  line-height: 1.35;
}
.dot-list li:last-child { border-bottom: 1px solid var(--rule); }
.services-cta { grid-column: 1 / -1; }

/* ---------- Yhteystiedot ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 48px;
  align-items: start;
}
.people {
  grid-column: 1 / 8;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 314px));
  gap: 40px 32px;
}
.person-photo { aspect-ratio: 4 / 5; max-width: 314px; overflow: hidden; border-radius: var(--radius); background: var(--snow); }
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-name { font-size: 22px; margin-top: 20px; }
.person-role { margin-top: 6px; color: var(--muted); font-size: var(--fs-small); line-height: 1.45; }
.person-links { display: flex; flex-direction: column; align-items: flex-start; margin-top: 10px; }
.person-links a { display: inline-flex; align-items: center; min-height: 44px; }
.ledger { grid-column: 8 / 13; border-bottom: 1px solid var(--rule); }
.people--single { grid-column: 1 / 5; grid-template-columns: minmax(0, 314px); }
.people--single + .ledger { grid-column: 6 / 13; }
.ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 8.5em) minmax(0, 1fr);
  column-gap: 16px;
  align-items: baseline;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
}
.ledger dt { color: var(--muted); font-size: var(--fs-small); }
.ledger dd { font-weight: 500; overflow-wrap: anywhere; }

/* ---------- Asiakirjat ---------- */
.docs { border-bottom: 1px solid var(--rule); }
.doc-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 20px;
  min-height: 72px;
  padding: 16px 16px 16px 0; /* ikoni samaan vasempaan linjaan kuin otsikot */
  border-top: 1px solid var(--rule);
  color: var(--navy);
  text-decoration: none;
  transition: background-color 200ms linear;
}
.doc-row:hover { background: var(--white); color: var(--navy); }
.doc-icon { color: var(--navy); flex: none; }
.doc-main { display: flex; flex-direction: column; min-width: 0; }
.doc-name { font-size: 20px; font-weight: 600; line-height: 1.3; }
.doc-unit { color: var(--muted); font-size: var(--fs-small); line-height: 1.4; }
.doc-end { display: flex; align-items: center; gap: 24px; white-space: nowrap; }
.doc-meta { color: var(--muted); font-size: var(--fs-small); }
.doc-action {
  min-width: 4em;
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.doc-row:hover .doc-action { text-decoration-thickness: 2px; }
.doc-note { margin-top: 20px; color: var(--muted); font-size: 15px; line-height: 1.5; max-width: 72ch; }

/* ---------- 404 ---------- */
.notfound { min-height: 56vh; display: flex; align-items: center; }
.nf-links { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 32px; }
.nf-links .text-link { display: inline-flex; align-items: center; min-height: 48px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: var(--on-dark-muted);
  font-size: 17px;
  line-height: 1.55;
  padding-top: 72px;
  padding-bottom: 48px;
}
.site-footer a { color: var(--on-dark); text-decoration-color: rgba(255, 255, 255, .4); }
.site-footer a:hover { color: var(--on-dark); text-decoration-color: var(--on-dark); }
.f-units {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px var(--gap);
}
.f-unit p + p { margin-top: 4px; }
.f-unit-name { margin-bottom: 10px; }
.f-unit-name a {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.f-unit-name a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.f-unit a[href^="tel:"], .f-unit a[href^="mailto:"] { display: inline-block; padding: 4px 0; overflow-wrap: anywhere; }
.f-privacy { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--rule-dark); }
.f-title { font-size: 20px; color: var(--on-dark); margin-bottom: 12px; }
.f-links { display: flex; flex-wrap: wrap; gap: 0 28px; }
.f-links a { display: inline-flex; align-items: center; min-height: 44px; }
.f-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px 40px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--rule-dark);
}
.f-social { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; }
.f-label { color: var(--on-dark-muted); }
.f-social ul { display: flex; flex-wrap: wrap; gap: 0 20px; }
.f-social a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; }
.f-social a:hover { text-decoration: underline; }
.f-social svg { flex: none; }
.f-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.badge {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 6px;
  border-radius: var(--radius-sm);
  background: var(--white);
}
.badge img { height: 44px; width: auto; }
.badge--wide { padding: 6px 12px; }
.f-copy { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--rule-dark); font-size: 15px; }

/* ---------- Mobiilin soittopalkki ---------- */
.callbar { display: none; }

/* ---------- Responsiivisuus ---------- */
@media (max-width: 959.98px) {
  .grid-12, .story-row, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .intro .grid-12 { row-gap: 40px; }
  .intro-text, .intro-figure, .ps-text, .ps-figure,
  .page-start--wide .ps-text, .page-start--wide .ps-figure,
  .story-row .story-text, .story-row .story-figure,
  .people, .ledger { grid-column: 1 / -1; grid-row: auto; }
  .intro-figure, .ps-figure { justify-self: start; }
  .page-start--wide .ps-figure { max-width: 768px; }
  .closing { padding-top: 56px; padding-bottom: 56px; }
  .people--single + .ledger { grid-column: 1 / -1; }
  .page-start { padding-top: 56px; padding-bottom: 64px; }
  .story-rows { --story-gap: 48px; }
  .story-row { row-gap: 32px; }
  .section-head { margin-bottom: 36px; }
  .lists { column-gap: 32px; }

  .cards { grid-template-columns: minmax(0, 1fr); }
  .card { flex-direction: row; }
  .card-media { flex: 0 0 min(42%, 340px); aspect-ratio: auto; }
  .card-body { padding: 24px; }

  .f-units { grid-template-columns: minmax(0, 1fr); gap: 32px; }

  .callbar {
    display: flex;
    align-items: center;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    min-height: var(--callbar-h);
    padding: 8px var(--pad-x) calc(8px + env(safe-area-inset-bottom, 0px));
    background: var(--white);
    border-top: 1px solid var(--rule);
  }
  body.has-callbar { padding-bottom: calc(var(--callbar-h) + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 599.98px) {
  .card { flex-direction: column; }
  .card-media { flex: none; aspect-ratio: 4 / 3; width: 100%; }
  .card { max-width: 460px; }
  .people { grid-template-columns: minmax(0, 1fr); }
  .person-photo { max-width: 240px; }
  .lists { grid-template-columns: minmax(0, 1fr); }
  .closing-inner { flex-direction: column; align-items: flex-start; }
  .doc-row { grid-template-columns: 20px minmax(0, 1fr); row-gap: 6px; column-gap: 16px; padding-left: 0; padding-right: 0; }
  .doc-end { grid-column: 2; justify-content: flex-start; gap: 20px; }
  .ledger-row { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
  .f-row { flex-direction: column; align-items: flex-start; }
}

/* ---------- Vahennetty liike ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .js .reveal:not(.is-in) { opacity: 1; transform: none; }
}
