/* =====================================================================
   TYYLITIEDOSTO (styles.css)
   Ulkoasu: värit, fontit, asettelu ja animaatiot. Sisältö on index.html,
   teemat.html, ajankohtaista.html ja ota-yhteytta.html.
   ===================================================================== */

/* ============ FONTIT (omalta palvelimelta, ei ulkopuolisia pyyntöjä) ============
   Newsreader (otsikot) ja Instrument Sans (leipäteksti), SIL Open Font License 1.1.
   Lisenssitekstit: fonts/LICENSE-*.txt
   ===================================================================== */
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/newsreader-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/newsreader-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/instrument-sans-latin-700-normal.woff2") format("woff2"); }

/* ============ VÄRIT JA MITTASUHTEET ============
   Värit pohjautuvat KD:n paletin siniseen ja oranssiin. Tekstikontrastit
   täyttävät WCAG 2.2 AA -vaatimukset. Oranssia käytetään taustoina ja koristeina,
   tekstinä vain tummempi oranssi (--oranssi-teksti). */
:root {
  --sininen: #2B67C9;
  --sininen-tumma: #1F56B0;
  --sininen-vaalea: #E6EEFB;
  --sininen-echo: #D3E3F8;
  --navy: #052750;

  --oranssi: #F18716;
  --oranssi-pehmea: #FFE3C2;
  --oranssi-teksti: #A44F00;
  --lampea: #FFF6EC;

  --pohja: #F3F6FB;
  --valkoinen: #FFFFFF;
  --teksti: #1C2A40;
  --harmaa: #4D5A70;
  --reuna: #DCE3EE;
  --kentta-reuna: #7F8DA5;

  --varjo: 0 1px 2px rgba(5, 39, 80, .06), 0 16px 36px -20px rgba(5, 39, 80, .28);
  --varjo-iso: 0 2px 4px rgba(5, 39, 80, .06), 0 28px 60px -24px rgba(5, 39, 80, .32);

  --sade: 24px;
  --sade-pieni: 14px;
  --header-korkeus: 72px;

  --otsikkofontti: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --tekstifontti: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-korkeus) + 16px); }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  font-family: var(--tekstifontti);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--teksti);
  background: var(--pohja);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: #C9DCF7; color: var(--navy); }

img { max-width: 100%; height: auto; display: block; }
main { flex: 1 0 auto; }
a { color: inherit; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }

h1, h2, h3 { font-family: var(--otsikkofontti); font-weight: 400; color: var(--navy); text-wrap: balance; margin: 0 0 .5em; }
h1 { font-size: clamp(3.1rem, 7vw, 5.6rem); line-height: 1.02; letter-spacing: -.014em; }
h2 { font-size: clamp(2.3rem, 4.4vw, 3.4rem); line-height: 1.08; letter-spacing: -.008em; }
h3 { font-size: 1.5rem; line-height: 1.15; }

p { margin: 0 0 1em; max-width: 66ch; text-wrap: pretty; hyphens: auto; }

:focus-visible { outline: 3px solid var(--sininen); outline-offset: 3px; border-radius: 8px; }

/* ============ PAINIKKEET ============ */
.nappi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: var(--sininen);
  color: var(--valkoinen);
  font: 600 1rem/1.2 var(--tekstifontti);
  text-decoration: none;
  padding: .95rem 1.6rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 14px 26px -14px rgba(43, 103, 201, .85);
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.nappi:hover { background: var(--sininen-tumma); transform: translateY(-2px); box-shadow: 0 18px 30px -14px rgba(43, 103, 201, .9); }
.nappi-pieni { font-size: .9rem; padding: .6rem 1.15rem; box-shadow: none; }
.nappi-pieni:hover { transform: none; }

/* ============ YLÄPALKKI ============ */
.menu-nappi { display: none; }
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid rgba(5, 39, 80, .08);
}
.header-in { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-korkeus); }

.logo { text-decoration: none; display: flex; align-items: center; gap: .7rem; color: var(--navy); }
.logo img { width: 40px; height: 40px; }
.logo-nimi { font-family: var(--otsikkofontti); font-size: 1.6rem; line-height: 1; letter-spacing: -.01em; color: var(--navy); white-space: nowrap; }

.nav { display: flex; gap: .3rem; margin-left: auto; }
.nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
  color: var(--navy);
  padding: .55rem .95rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}
.nav a:hover { background: var(--sininen-vaalea); }
.nav a[aria-current="page"] { background: var(--sininen); color: var(--valkoinen); }

/* ============ ETUSIVUN YLÄOSA ============ */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 7vw, 5.5rem) 0 0;
  background:
    radial-gradient(900px 520px at 90% 0%, #DDE9FB 0%, rgba(221, 233, 251, 0) 70%),
    linear-gradient(180deg, #F4F7FD 0%, #FFFFFF 100%);
}
.hero-in {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 3rem;
  align-items: end;
}
/* Sydämen muotoiset taustat: KD:n sydänikoni, joka on muokattu taustaksi. Kuva seisoo niiden edessä. */
.hero-in::before,
.hero-in::after {
  content: "";
  position: absolute;
  pointer-events: none;
  aspect-ratio: 1200 / 1192;
  -webkit-mask: url("Sydanlogo-sininen.svg") center / contain no-repeat;
  mask: url("Sydanlogo-sininen.svg") center / contain no-repeat;
}
.hero-in::before { z-index: 0; right: 3%; bottom: 4%; width: min(460px, 42vw); background: var(--sininen); }
.hero-in::after  { z-index: 0; right: 0;   bottom: 12%; width: min(560px, 50vw); background: var(--sininen-echo); opacity: .8; }

.hero-teksti { position: relative; z-index: 1; align-self: center; padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.hero-kuva { position: relative; z-index: 1; align-self: end; width: 100%; height: auto; }

.hero-rivi {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1.6rem;
  padding: .45rem .95rem;
  border-radius: 999px;
  background: var(--sininen-vaalea);
  color: var(--sininen);
  font-weight: 600;
  font-size: .92rem;
  letter-spacing: .005em;
}
.hero h1 { margin-bottom: .3em; }
.hero-vaali { font-size: 1.2rem; font-weight: 500; margin: 0 0 1.2rem; color: var(--teksti); }
.hero-vaali strong {
  display: inline-block;
  margin-left: .3rem;
  padding: .02em .5em .08em;
  border-radius: 10px;
  background: var(--oranssi);
  color: var(--navy);
  font-family: var(--otsikkofontti);
  font-weight: 400;
  font-size: 1.45rem;
  line-height: 1.25;
  vertical-align: .05em;
}
.hero-lause {
  font-family: var(--otsikkofontti);
  font-style: italic;
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  line-height: 1.15;
  color: var(--sininen);
  margin: 0 0 2.2rem;
  max-width: 22ch;
}

/* Hero-tekstin ja kuvan kevyt sisäänliuku (poistuu, jos käyttäjä haluaa vähemmän liikettä) */
@keyframes nousu { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-teksti > * { animation: nousu .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero-teksti > :nth-child(2) { animation-delay: .06s; }
.hero-teksti > :nth-child(3) { animation-delay: .12s; }
.hero-teksti > :nth-child(4) { animation-delay: .18s; }
.hero-teksti > :nth-child(5) { animation-delay: .24s; }
.hero-kuva { animation: nousu 1s cubic-bezier(.2, .7, .2, 1) .1s both; }

/* ============ KUVAT ============ */
.kuva { border-radius: var(--sade); width: 100%; object-fit: cover; }

/* ============ OSIOT ============ */
.osio { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.osio-vaalea { background: var(--pohja); }
.osio-esittely { background: var(--valkoinen); }
.osio-yhteys { background: var(--valkoinen); }

.osion-otsikko { text-align: center; margin-bottom: clamp(2.2rem, 4vw, 3.2rem); }
.osion-otsikko h2 { margin-bottom: .4em; }
.osion-otsikko h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin: .9rem auto 0;
  border-radius: 2px;
  background: var(--oranssi);
}
.osion-otsikko .johdanto { margin: 0 auto; max-width: 42ch; font-size: 1.18rem; color: var(--harmaa); }

.kaksi { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 5vw, 5rem); align-items: center; }
.kaksi h2 { margin-bottom: 1.1rem; }
.kaksi h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin-top: .9rem;
  border-radius: 2px;
  background: var(--oranssi);
}

/* Esittelyn kuva: pyöristetty, lämmin varjo-levy taakse, kuvan rajaus pitää Harrin jalat ja pään näkyvissä */
.esittely-kuva {
  aspect-ratio: 4 / 5;
  height: auto;
  object-fit: cover;
  object-position: 50% 32%;
  border-radius: var(--sade);
  margin: 0 18px 18px 0;
  box-shadow: 18px 18px 0 var(--oranssi-pehmea);
}

/* ============ LISTAT ============ */
.lista { margin: 0 0 1em; padding-left: 1.2rem; }
.lista li { margin-bottom: .55em; padding-left: .25rem; }
.lista li::marker { color: var(--oranssi); }

.osio-esittely .lista { list-style: none; padding: 0; margin: 1.6rem 0 0; }
.osio-esittely .lista li {
  position: relative;
  padding: 0 0 0 1.5rem;
  margin-bottom: .75rem;
  max-width: 62ch;
}
.osio-esittely .lista li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--sininen);
  box-shadow: 0 0 0 4px var(--sininen-vaalea);
}

/* ============ KORTIT (teemat) ============ */
.kortit { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 1.6rem; }
.kortti {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--valkoinen);
  border: 1px solid rgba(220, 227, 238, .8);
  border-radius: var(--sade);
  padding: clamp(1.7rem, 3vw, 2.3rem);
  box-shadow: var(--varjo);
  transition: transform .25s ease, box-shadow .25s ease;
}
.kortti:hover { transform: translateY(-3px); box-shadow: var(--varjo-iso); }

.kortti svg {
  width: 28px;
  height: 28px;
  padding: 14px;
  box-sizing: content-box;
  margin-bottom: 1.4rem;
  border-radius: 18px;
  background: var(--sininen-vaalea);
  color: var(--sininen);
}
.kortti :is(h2, h3) { font-size: clamp(1.7rem, 2.6vw, 2.1rem); line-height: 1.1; width: 100%; margin-bottom: .7rem; }
.kortti :is(h2, h3)::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin-top: .85rem;
  border-radius: 2px;
  background: var(--oranssi);
}
.kortti :is(h2, h3) a { text-decoration: none; }
.kortti :is(h2, h3) a::after { content: ""; position: absolute; inset: 0; border-radius: var(--sade); }
.kortti:hover :is(h2, h3) a { text-decoration: underline; text-decoration-color: var(--oranssi); text-decoration-thickness: 2px; text-underline-offset: 4px; }

.kortti p { color: var(--harmaa); font-size: 1rem; }
.kortti .kortti-lause { color: var(--teksti); font-weight: 500; font-size: 1.05rem; line-height: 1.6; }
.kortti .lista { color: var(--harmaa); font-size: .98rem; margin-top: .4rem; }
.kortti .lista li { margin-bottom: .6em; }
.kortti .lista li::marker { color: var(--sininen); }

.loppulause {
  text-align: center;
  max-width: 30ch;
  margin: clamp(2.8rem, 5vw, 4rem) auto 0;
  font-family: var(--otsikkofontti);
  font-style: italic;
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  line-height: 1.25;
  color: var(--navy);
}

/* ============ ALALAITA ============ */
.footer { background: var(--valkoinen); border-top: 1px solid var(--reuna); color: var(--harmaa); padding: 1.8rem 0; font-size: .95rem; }
.footer-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.footer p { margin: 0; max-width: none; }
.footer p a { color: var(--navy); text-decoration-color: rgba(5, 39, 80, .35); text-underline-offset: 3px; }
.footer p a:hover { color: var(--sininen); }
.footer-oikea { display: flex; align-items: center; gap: .75rem; }

.some {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--pohja);
  color: var(--navy);
  transition: background .2s ease, color .2s ease;
}
.some:hover { background: var(--sininen); color: var(--valkoinen); }

/* ============ ALASIVUT (Teemat, Ajankohtaista, Ota yhteyttä) ============ */
.sivu-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.2rem, 7vw, 5rem) 0 clamp(2.6rem, 5vw, 3.8rem);
  background: linear-gradient(180deg, #F4F7FD 0%, #F3F6FB 100%);
}
.sivu-hero .wrap { position: relative; z-index: 1; }
.sivu-hero::after {
  content: "";
  position: absolute;
  right: -4%;
  top: 50%;
  transform: translateY(-50%);
  width: min(380px, 38vw);
  aspect-ratio: 1200 / 1192;
  background: var(--sininen-echo);
  opacity: .75;
  pointer-events: none;
  -webkit-mask: url("Sydanlogo-sininen.svg") center / contain no-repeat;
  mask: url("Sydanlogo-sininen.svg") center / contain no-repeat;
}
.sivu-hero h1 { margin-bottom: .3em; }
.sivu-hero .hero-lause { margin-bottom: 0; }

.uutiset { display: grid; gap: 1.4rem; max-width: 760px; margin-inline: auto; }
.uutinen {
  background: var(--valkoinen);
  border: 1px solid rgba(220, 227, 238, .8);
  border-radius: var(--sade);
  padding: clamp(1.7rem, 3vw, 2.3rem);
  box-shadow: var(--varjo);
}
.uutinen h2 { font-size: clamp(2rem, 3.4vw, 2.6rem); margin-bottom: .4em; }
.uutinen p:last-child { margin-bottom: 0; }

/* Teemakorttien loppurivi on jo osio, joten ei ylimääräistä väliä */
.kortit + .loppulause { margin-top: clamp(2.8rem, 5vw, 4rem); }

/* ============ YHTEYDENOTTOLOMAKE ============ */
.lomake { max-width: 620px; margin: 0 auto; display: grid; gap: 1.2rem; background: var(--pohja); border-radius: var(--sade); padding: clamp(1.6rem, 4vw, 2.6rem); }
.kentta { display: grid; gap: .4rem; }
.kentta label { font-weight: 600; color: var(--navy); font-size: .98rem; }
.kentta input, .kentta textarea {
  font: inherit;
  font-size: 1rem;
  width: 100%;
  padding: .8rem .95rem;
  border: 1.5px solid var(--kentta-reuna);
  border-radius: var(--sade-pieni);
  background: var(--valkoinen);
  color: var(--teksti);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.kentta input:focus, .kentta textarea:focus { outline: none; border-color: var(--sininen); box-shadow: 0 0 0 4px rgba(43, 103, 201, .18); }
.kentta input:focus-visible, .kentta textarea:focus-visible { outline: 3px solid var(--sininen); outline-offset: 2px; }
.kentta textarea { resize: vertical; min-height: 140px; }
.kentta input::placeholder, .kentta textarea::placeholder { color: #6B7790; opacity: 1; }
.valinnainen { font-weight: 400; color: var(--harmaa); }
.laskuri { margin: 0; text-align: right; font-size: .86rem; color: var(--harmaa); max-width: none; }
.laskuri.varoitus { color: var(--oranssi-teksti); font-weight: 600; }
.laskuri.raja { color: #B3261E; font-weight: 600; }
.lomake-huomautus { font-size: .92rem; color: var(--harmaa); margin: 0; max-width: none; }
.lomake .nappi { justify-self: start; }
.hunaja { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ilmoitus { max-width: 620px; margin: 0 auto 1.6rem; padding: 1rem 1.2rem; border-radius: var(--sade-pieni); text-align: center; font-weight: 500; }
.ilmoitus:empty { display: none; }
.ilmoitus.onnistui { background: #E4F4EA; color: #1D5C2E; }
.ilmoitus.virhe { background: #FDECEA; color: #8A1F17; }

/* ============ AJANKOHTAISTA: TAPAHTUMAT ============ */
.tapahtumat { display: grid; gap: 1rem; max-width: 760px; margin-inline: auto; }
.tapahtumat-tila { text-align: center; color: var(--harmaa); max-width: none; }

/* ============ TAPAHTUMAKALENTERI ============ */
.kalenteri {
  max-width: 900px;
  margin-inline: auto;
  background: var(--pohja);
  border: 1px solid rgba(220, 227, 238, .8);
  border-radius: 28px;
  padding: clamp(1rem, 2.6vw, 1.8rem);
  box-shadow: var(--varjo);
}
.kalenteri-ylapalkki { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.kalenteri-ylapalkki h3 { margin: 0; text-transform: capitalize; font-size: clamp(1.8rem, 3vw, 2.3rem); line-height: 1; }
.kalenteri-nappi {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--valkoinen);
  color: var(--sininen);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--varjo);
  transition: background .2s ease, color .2s ease;
}
.kalenteri-nappi:hover { background: var(--sininen); color: var(--valkoinen); }

.kalenteri-viikonpaivat, .kalenteri-ruudukko { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.kalenteri-viikonpaivat span { text-align: center; font-size: .78rem; color: var(--harmaa); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: .3rem 0 .6rem; }

.kalenteri-solu {
  min-height: 92px;
  border: 1px solid #E3E9F3;
  border-radius: var(--sade-pieni);
  padding: .45rem .5rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--valkoinen);
  overflow: hidden;
}
.kalenteri-solu.tyhja { border: 0; background: transparent; }
.kalenteri-solu.tanaan { border-color: var(--sininen); box-shadow: inset 0 0 0 1px var(--sininen); }
.kalenteri-numero { font-size: .9rem; font-weight: 600; color: var(--navy); }
.kalenteri-solu.tanaan .kalenteri-numero {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: var(--sininen);
  color: var(--valkoinen);
}

.kalenteri-solu.on-tapahtuma { cursor: pointer; background: #FBFCFF; border-color: #C3D4EE; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease; }
.kalenteri-solu.on-tapahtuma:hover { background: var(--sininen-vaalea); border-color: var(--sininen); box-shadow: 0 6px 16px -8px rgba(5, 39, 80, .35); }
.kalenteri-solu.on-tapahtuma:focus-visible { outline: 3px solid var(--sininen); outline-offset: 2px; }
.kalenteri-solu.valittu { background: var(--lampea); border-color: var(--oranssi); box-shadow: inset 0 0 0 2px var(--oranssi); }

.kalenteri-merkki {
  font-size: .74rem;
  line-height: 1.3;
  background: var(--sininen-vaalea);
  border-left: 3px solid var(--oranssi);
  padding: 2px 5px;
  border-radius: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--navy);
  transition: background .15s ease;
}
.kalenteri-solu.on-tapahtuma:hover .kalenteri-merkki,
.kalenteri-solu.valittu .kalenteri-merkki { background: var(--valkoinen); }
.kalenteri-lisaa { font-size: .74rem; color: var(--harmaa); }
.kalenteri-solu.on-tapahtuma .kalenteri-numero::after { content: "•"; color: var(--oranssi); margin-left: .2rem; display: none; }

.kalenteri-lista { margin-top: 1.4rem; display: grid; gap: .8rem; }
.kalenteri-lista .tapahtumat-tila { margin: 0; }

.kalenteri-tiedot { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--reuna); display: grid; gap: .9rem; }
.kalenteri-tiedot[hidden] { display: none; }
.kalenteri-tiedot-ylapalkki { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.kalenteri-tiedot-otsikko { margin: 0; font-family: var(--otsikkofontti); font-size: 1.5rem; color: var(--navy); }
.kalenteri-sulje {
  background: var(--valkoinen);
  color: var(--sininen);
  border: 1px solid var(--reuna);
  border-radius: 999px;
  padding: .42rem .95rem;
  font: 600 .88rem var(--tekstifontti);
  cursor: pointer;
  transition: background .2s ease;
}
.kalenteri-sulje:hover { background: var(--sininen-vaalea); }

.tapahtuma-kortti, .tapahtuma {
  background: var(--valkoinen);
  border: 1px solid var(--reuna);
  border-left: 4px solid var(--oranssi);
  border-radius: var(--sade-pieni);
  padding: 1.2rem 1.4rem;
}
.tapahtuma-tarkka { background: #F8FAFE; }
.tapahtuma-tarkka.korostettu { background: var(--lampea); border-color: var(--oranssi); }
.tapahtuma-otsikko { margin: 0 0 .7rem; font-family: var(--otsikkofontti); font-size: 1.6rem; line-height: 1.1; font-weight: 400; color: var(--navy); }
.tapahtuma-meta { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .7rem 1.2rem; }
.tapahtuma-meta-rivi { display: flex; flex-direction: column; gap: .1rem; }
.tapahtuma-meta dt { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--harmaa); }
.tapahtuma-meta dd { margin: 0; font-weight: 600; font-size: .98rem; color: var(--teksti); }
.tapahtuma-kuvaus-laatikko { margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--reuna); }
.tapahtuma-kuvaus-otsikko { display: block; margin-bottom: .3rem; font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--harmaa); }
.tapahtuma-kuvaus-laatikko .tapahtuma-kuvaus { margin: 0 0 .5rem; color: var(--teksti); font-size: .98rem; max-width: none; }
.tapahtuma-kuvaus-laatikko .tapahtuma-kuvaus:last-child { margin-bottom: 0; }
.tapahtuma-kortti h5, .tapahtuma h3 { font-size: 1.15rem; }

/* ============ PUHELIN JA TABLETTI ============ */
@media (max-width: 860px) {
  .hero-in, .kaksi { grid-template-columns: 1fr; gap: 2.2rem; }
  .kaksi > .kuva { order: -1; }
  .hero-teksti { padding-bottom: 0; }
  .hero-kuva { max-width: 440px; margin-inline: auto; }
  .hero-in::before { right: 50%; transform: translateX(50%); bottom: 6%; width: min(360px, 78vw); }
  .hero-in::after  { right: 50%; transform: translateX(50%); bottom: 16%; width: min(440px, 92vw); }
  .esittely-kuva { max-width: 440px; margin: 0 auto 14px; object-position: 50% 40%; }
  .hero-lause { max-width: none; }
}

@media (max-width: 760px) {
  .header-in { position: relative; gap: 1rem; }
  .menu-nappi {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    margin-left: auto;
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--sininen-vaalea);
    border: 0;
    border-radius: 14px;
    color: var(--navy);
    cursor: pointer;
  }
  .menu-nappi span { display: block; width: 20px; height: 2px; margin: 0 auto; background: currentColor; border-radius: 2px; }
  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    flex-direction: column;
    gap: .2rem;
    margin-left: 0;
    min-width: 240px;
    padding: .5rem;
    background: var(--valkoinen);
    border-radius: 20px;
    box-shadow: var(--varjo-iso);
    border: 1px solid var(--reuna);
  }
  .nav.auki { display: flex; }
  .nav a { padding: .85rem 1rem; font-size: 1rem; border-radius: 12px; }
  .nav a[aria-current="page"] { background: var(--sininen); }
  .sivu-hero::after { width: min(260px, 60vw); right: -60px; opacity: .6; }
}

@media (max-width: 480px) {
  .header-in { gap: .75rem; }
  .logo-nimi { font-size: 1.4rem; }
  .logo img { width: 36px; height: 36px; }
  .kalenteri-solu { min-height: 56px; padding: .3rem; }
  .kalenteri-merkki, .kalenteri-lisaa { display: none; }
  .kalenteri-solu.on-tapahtuma .kalenteri-numero::after { display: inline; }
  .kalenteri-tiedot-otsikko { font-size: 1.3rem; }
  .kalenteri-viikonpaivat span { font-size: .7rem; letter-spacing: 0; }
}

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