/* The Word for the World – Suomi
   Värit twftw.org:n mukaan. Muuttujat vastaavat WordPressin theme.json-asetuksia:
   värit → settings.color.palette, --fs-* → settings.typography.fontSizes, --space-* → settings.spacing.spacingSizes */
:root {
  /* Värit */
  --brand: #FFCF01;
  --brand-hover: #FFDB3D;
  --ink: #333132;
  --dark: #262425;
  --text: #4A4748;
  --muted: #5E5B5C;
  --soft: #F1F0F1;
  --line: #E2E0E1;
  --white: #FFFFFF;

  /* Typografia */
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fs-s: 0.9375rem;
  --fs-m: 1.0625rem;
  --fs-l: 1.25rem;
  --fs-xl: clamp(1.75rem, 3.5vw, 2.5rem);
  --fs-xxl: clamp(2.25rem, 6vw, 4rem);

  /* Välistykset */
  --space-xs: 8px;
  --space-s: 16px;
  --space-m: 24px;
  --space-l: 40px;
  --space-xl: clamp(56px, 8vw, 96px);

  --radius: 4px;
  --radius-card: 8px;
  --container: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-m);
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--brand); }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; font-weight: 700; margin: 0; overflow-wrap: break-word; hyphens: auto; }
p { margin: 0; }

.container { max-width: var(--container); margin: 0 auto; padding-inline: var(--space-m); }
@media (max-width: 480px) { .container { padding-inline: var(--space-s); } }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: var(--space-s); top: var(--space-s); background: var(--white); padding: 8px 12px; z-index: 20; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Ylätunniste */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-s); min-height: 76px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.logo img { width: auto; height: 44px; }
.logo-sub { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border-left: 1px solid var(--line); padding-left: 12px; line-height: 1.3; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.main-nav a { display: block; padding: 10px 12px; font-size: var(--fs-s); font-weight: 600; text-decoration: none; border-radius: var(--radius); white-space: nowrap; }
@media (max-width: 1239px) { .logo-sub { display: none; } }
.main-nav a:hover { background: var(--soft); }
.main-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--brand); }
.main-nav .btn { margin-left: var(--space-xs); }
.nav-toggle { display: none; }

@media (max-width: 1023px) {
  .logo-sub { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; font: inherit; font-weight: 600; font-size: var(--fs-s); color: var(--ink); background: var(--soft); border: 0; border-radius: var(--radius); cursor: pointer; }
  .nav-toggle svg { width: 20px; height: 20px; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0,0,0,.08); }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: var(--space-xs) var(--space-s) var(--space-s); }
  .main-nav a { padding: 14px 12px; font-size: var(--fs-m); }
  .main-nav .btn { margin: var(--space-xs) 0 0; }
}
@media (max-width: 400px) { .logo img { height: 36px; } }

/* Painikkeet */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: var(--radius); border: 2px solid var(--brand); background: var(--brand); color: var(--ink); font: inherit; font-size: var(--fs-s); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
/* display: flex ohittaa .main-nav a:n display: blockin, jotta teksti keskittyy painikkeeseen */
.main-nav .btn { display: flex; min-height: 44px; padding: 0 18px; }
.btn-outline { background: transparent; border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn-light { background: transparent; border-color: var(--white); color: var(--white); }
.btn-light:hover { background: var(--white); border-color: var(--white); color: var(--ink); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--dark); border-color: var(--dark); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.text-link { font-weight: 700; }

/* Osiot */
.section { padding-block: var(--space-xl); }
.section-soft { background: var(--soft); }
.section-dark { background: var(--ink); color: var(--white); }
.section-dark a { color: var(--white); }
.section-head { max-width: 44rem; margin-bottom: var(--space-l); display: flex; flex-direction: column; gap: var(--space-s); }
.section-title { font-size: var(--fs-xl); }
.eyebrow { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 28px; height: 3px; background: var(--brand); flex: none; }
.section-dark .eyebrow, .hero .eyebrow { color: var(--white); }
.lead { font-size: var(--fs-l); line-height: 1.55; color: var(--text); }
.section-dark .lead { color: rgba(255,255,255,.85); }
.split { display: grid; gap: var(--space-l); align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; gap: var(--space-xl); } }
.stack { display: flex; flex-direction: column; gap: var(--space-s); }
.stack-l { gap: var(--space-m); }
.rounded { border-radius: var(--radius-card); }

/* Hero */
/* Työpöydällä teksti vasemmalla ja kuva oikealla (WordPressissä Media & teksti -lohko), mobiilissa kuva ylhäällä */
.hero { position: relative; color: var(--white); background: var(--dark); display: grid; }
.hero-media { position: relative; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero-content { position: relative; display: flex; align-items: center; padding: var(--space-xl) var(--space-m); }
.hero-content .stack { max-width: 34rem; }
.hero h1 { font-size: var(--fs-xxl); line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero .lead { color: rgba(255,255,255,.92); }
@media (min-width: 900px) {
  .hero { grid-template-columns: 1fr 1fr; min-height: min(80vh, 680px); }
  .hero-media { order: 2; }
  .hero-media::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 18%; background: linear-gradient(90deg, var(--dark), rgba(38,36,37,0)); }
  .hero-content { justify-content: flex-end; padding-left: max(var(--space-m), calc((100vw - var(--container)) / 2 + var(--space-m))); padding-right: var(--space-l); }
}
@media (max-width: 899px) {
  .hero-media img { aspect-ratio: 16 / 10; }
  .hero-content { padding-block: var(--space-l) var(--space-xl); }
}
@media (max-width: 480px) { .hero-content { padding-inline: var(--space-s); } }

/* Tilastot */
.tilastot { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-l) var(--space-m); margin: 0; }
@media (min-width: 860px) { .tilastot { grid-template-columns: repeat(4, 1fr); } }
/* column-reverse näyttää luvun ennen selitettä; flex-end pitää ne kortin yläreunassa, jolloin luvut ovat samalla tasolla */
.tilastot div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; border-top: 3px solid var(--brand); padding-top: var(--space-s); }
.tilastot dt { font-size: var(--fs-s); line-height: 1.4; color: var(--muted); }
.tilastot dd { margin: 0; font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 700; line-height: 1; }
.section-dark .tilastot dt { color: rgba(255,255,255,.75); }

/* Kortit */
.kortit { display: grid; gap: var(--space-m); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.kortti { background: var(--white); border-radius: var(--radius-card); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.06); }
.kortti img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.kortti-body { padding: var(--space-m); display: flex; flex-direction: column; gap: 12px; flex: 1; }
.kortti h3 { font-size: var(--fs-l); }
.kortti p { color: var(--text); }
.kortti .text-link { margin-top: auto; padding-top: var(--space-xs); }

/* Raamatunjae */
.jae { margin: 0 auto; max-width: 48rem; text-align: center; display: flex; flex-direction: column; gap: var(--space-m); align-items: center; }
.jae::before { content: ""; width: 48px; height: 4px; background: var(--brand); }
.jae p { font-size: clamp(1.25rem, 2.6vw, 1.75rem); font-weight: 500; line-height: 1.45; text-wrap: balance; }
.jae cite { font-style: normal; font-size: var(--fs-s); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

/* Video */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-card); overflow: hidden; background: var(--dark); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.caption { font-size: var(--fs-s); color: var(--muted); margin-top: 12px; }

/* Tukemisen CTA */
.cta { background: var(--brand); padding-block: var(--space-xl); }
.cta .split { align-items: start; }
.cta .eyebrow { color: var(--ink); }
.cta .eyebrow::before { background: var(--ink); }
.cta .lead { color: var(--ink); }
.cta-tavat { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cta-tavat a { display: flex; align-items: center; justify-content: space-between; gap: var(--space-s); padding: 18px 20px; background: var(--white); border-radius: var(--radius-card); text-decoration: none; }
.cta-tavat a:hover { background: var(--ink); color: var(--white); }
.cta-tavat strong { display: block; font-size: var(--fs-l); }
.cta-tavat span span { display: block; font-size: var(--fs-s); }
.cta-tavat svg { width: 24px; height: 24px; flex: none; }

/* Lahjoitustiedot */
.lahjoitus { display: grid; gap: 4px 16px; grid-template-columns: auto 1fr; margin: 0; font-size: var(--fs-s); }
.lahjoitus dt { font-weight: 700; }
.lahjoitus dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lahjoitustavat { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.lahjoitustapa { background: var(--white); border-radius: var(--radius-card); padding: 20px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.lahjoitustapa h3 { font-size: var(--fs-l); }
.lahjoitustapa .lahjoitus { grid-template-columns: 1fr; gap: 0; font-size: var(--fs-m); }
.lahjoitustapa .lahjoitus dt { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.lahjoitustapa .lahjoitus dd + dt { margin-top: 10px; }
.mobilepay-qr { width: 120px; height: 120px; image-rendering: pixelated; }
.mobilepay-btn { min-height: 44px; padding: 0 18px; }
.lupa { font-size: var(--fs-s); }
/* Puhelimella QR-koodia ei voi skannata samalta laitteelta, joten siellä näytetään vain maksupainike */
@media (max-width: 759px) { .mobilepay-qr { display: none; } }@media (max-width: 359px) { .lahjoitus { grid-template-columns: 1fr; } .lahjoitus dd + dt { margin-top: 6px; } }

/* Alatunniste */
.site-footer { background: var(--dark); color: rgba(255,255,255,.85); padding-block: var(--space-xl) var(--space-l); font-size: var(--fs-s); }
.site-footer a { color: var(--white); text-decoration-color: rgba(255,255,255,.4); }
.site-footer a:hover { color: var(--brand); text-decoration-color: var(--brand); }
.site-footer ul a { text-decoration: none; }
.site-footer ul a:hover { text-decoration: underline; }
.site-footer :focus-visible { outline-color: var(--brand); }
.footer-grid { display: grid; gap: var(--space-l); }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1.3fr 0.8fr; } }.site-footer h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--brand); margin-bottom: var(--space-s); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-logo img { height: 48px; width: auto; }
.footer-bottom { margin-top: var(--space-l); padding-top: var(--space-m); border-top: 1px solid rgba(255,255,255,.15); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-s); color: rgba(255,255,255,.65); }
.site-footer .lahjoitus { color: rgba(255,255,255,.85); }

/* Alasivun hero: sama rakenne kuin etusivulla, matalampi */
@media (min-width: 900px) { .hero-sivu { min-height: 420px; } }
.hero-sivu h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }

/* Alasivun otsikko ilman kuvaa */
.sivu-otsikko { background: var(--soft); padding-block: var(--space-xl) var(--space-l); }
.sivu-otsikko h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
.sivu-otsikko .stack { max-width: 44rem; }

/* Tekstisisältö */
.prose { max-width: 44rem; display: flex; flex-direction: column; gap: var(--space-s); }
.prose h2 { font-size: var(--fs-xl); margin-top: var(--space-s); }
.prose h3 { font-size: var(--fs-l); margin-top: var(--space-xs); }
.prose ul, .prose ol { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 8px; }
.prose li::marker { color: var(--muted); font-weight: 700; }
.prose .lead { margin-bottom: var(--space-xs); }

/* Kortit ilman kuvaa (arvot, tehtävät) */
.kortti-teksti { padding: var(--space-m); gap: 10px; border-top: 4px solid var(--brand); }
.kortti-teksti h3 { font-size: var(--fs-l); }
.numero { font-size: 13px; font-weight: 700; letter-spacing: .1em; color: var(--muted); }

/* Uskontunnustus */
.tunnustus { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-s); counter-reset: kohta; max-width: 52rem; }
.tunnustus li { counter-increment: kohta; display: grid; grid-template-columns: 44px 1fr; gap: var(--space-s); padding-bottom: var(--space-s); border-bottom: 1px solid var(--line); }
.tunnustus li::before { content: counter(kohta); width: 36px; height: 36px; border-radius: 50%; background: var(--brand); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: var(--fs-s); }

/* Käännösprosessin vaiheet */
.vaiheet { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-m); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); counter-reset: vaihe; }
.vaiheet li { counter-increment: vaihe; background: var(--white); border-radius: var(--radius-card); padding: var(--space-m); display: flex; flex-direction: column; gap: 8px; }
.vaiheet li::before { content: counter(vaihe); font-size: 2.5rem; font-weight: 700; line-height: 1; color: var(--brand); -webkit-text-stroke: 1px var(--ink); }
.vaiheet h3 { font-size: var(--fs-l); }
.vaiheet p { color: var(--text); }

/* Henkilöt */
.henkilot { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-s); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.henkilot li { background: var(--soft); border-radius: var(--radius-card); padding: 20px; display: flex; flex-direction: column; }
.henkilot strong { font-size: var(--fs-l); }
.henkilot span { color: var(--muted); font-size: var(--fs-s); }

/* Linkkilistat */
.linkit { display: grid; gap: var(--space-l); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.linkit h3 { font-size: var(--fs-l); margin-bottom: 12px; }
.linkit ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.linkit a { font-weight: 600; }
.linkit span { display: block; font-size: var(--fs-s); color: var(--muted); }

/* Tuotteet */
.tuote { background: var(--white); }
.tuote-kuva { background: var(--soft); display: flex; align-items: center; justify-content: center; padding: var(--space-m); aspect-ratio: 4 / 3; }
.kortti .tuote-kuva img { width: auto; height: 100%; max-height: 240px; aspect-ratio: auto; object-fit: contain; }
.hinnat { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.hinnat li { display: flex; justify-content: space-between; gap: var(--space-s); border-bottom: 1px dashed var(--line); padding-bottom: 4px; }
.hinnat strong { white-space: nowrap; }
.tuote-tiedot { font-size: var(--fs-s); color: var(--muted); }
.merkki { align-self: flex-start; background: var(--brand); font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }

/* Lomakkeet */
.lomake { display: grid; gap: var(--space-s); }
.lomake .kentat { display: grid; gap: var(--space-s); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.kentta { display: flex; flex-direction: column; gap: 6px; }
.kentta label, .lomake legend { font-weight: 700; font-size: var(--fs-s); }
.kentta .ohje { font-size: var(--fs-s); color: var(--muted); }
.lomake input[type="text"], .lomake input[type="email"], .lomake input[type="tel"], .lomake input[type="number"], .lomake select, .lomake textarea {
  font: inherit; color: var(--ink); background: var(--white); border: 2px solid #8A8788; border-radius: var(--radius); padding: 10px 12px; min-height: 48px; width: 100%;
}
.lomake textarea { min-height: 140px; resize: vertical; }
.lomake input:focus, .lomake select:focus, .lomake textarea:focus { outline: 3px solid var(--brand); outline-offset: 0; border-color: var(--ink); }
.lomake fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.valinta { display: flex; align-items: center; gap: 10px; }
.valinta input { width: 22px; height: 22px; accent-color: var(--ink); flex: none; }
.tilausrivi { display: grid; grid-template-columns: 1fr 96px; align-items: center; gap: var(--space-s); padding: 10px 0; border-bottom: 1px solid var(--line); }
.tilausrivi label { font-weight: 600; }
.tilausrivi span { display: block; font-size: var(--fs-s); color: var(--muted); font-weight: 400; }
.pakollinen { color: #B3261E; }
.lomake-huom { font-size: var(--fs-s); color: var(--muted); }
.lomake-laatikko { background: var(--soft); border-radius: var(--radius-card); padding: var(--space-l) var(--space-m); }
@media (min-width: 600px) { .lomake-laatikko { padding: var(--space-l); } }

/* Yhteystietokortit */
.yhteys { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.yhteys li { display: flex; gap: 14px; align-items: flex-start; }
.yhteys svg { width: 24px; height: 24px; flex: none; margin-top: 2px; }
.yhteys strong { display: block; font-size: var(--fs-s); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* Huomautus */
.huom { background: #FFF6CC; border-left: 4px solid var(--brand); padding: var(--space-s) var(--space-m); border-radius: var(--radius); font-size: var(--fs-s); }
.lahjoitus dd.saaja { white-space: normal; }
.section .lahjoitustapa { background: var(--soft); }
