/* ===================================================
   jarihaaparanta.fi — tyylitiedosto (2026)
   =================================================== */

:root {
  --punainen: #c8102e;
  --punainen-tumma: #9e0c24;
  --musta: #1c1c22;
  --harmaa: #55555e;
  --vaalea: #faf8f6;
  --valkoinen: #ffffff;
  --raja: #e8e4e0;
  --varjo: 0 2px 16px rgba(28, 28, 34, 0.08);
  --pyoristys: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--musta);
  background: var(--vaalea);
  line-height: 1.7;
  font-size: 17px;
}

img { max-width: 100%; display: block; }

a { color: var(--punainen); text-decoration: none; }
a:hover { text-decoration: underline; }

.sisalto {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Yläpalkki ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--raja);
}

.navi {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--musta);
}
.logo:hover { text-decoration: none; color: var(--punainen); }
.logo span { color: var(--punainen); }

.navi nav {
  display: flex;
  gap: 6px;
}

.navi nav a {
  color: var(--musta);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.navi nav a:hover { background: #f3eeeb; text-decoration: none; }
.navi nav a.aktiivinen { background: var(--punainen); color: var(--valkoinen); }

/* Mobiilivalikko */
.valikko-nappi {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
}
.valikko-nappi span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--musta);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 720px) {
  .valikko-nappi { display: block; }
  .navi nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--valkoinen);
    border-bottom: 1px solid var(--raja);
    flex-direction: column;
    padding: 12px 24px 18px;
    display: none;
  }
  .navi nav.auki { display: flex; }
  .navi nav a { padding: 12px 14px; border-radius: 10px; }
  body.valikko-auki .valikko-nappi span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  body.valikko-auki .valikko-nappi span:nth-child(2) { opacity: 0; }
  body.valikko-auki .valikko-nappi span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
}

/* ---------- Hero ---------- */

.hero {
  background: var(--valkoinen);
  border-bottom: 1px solid var(--raja);
}

.hero .sisalto {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 72px;
}

.hero-teksti .esirivi {
  display: inline-block;
  color: var(--punainen);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}

.hero-teksti h1 {
  font-size: clamp(2.3rem, 5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin-bottom: 18px;
}

.hero-teksti .kuvaus {
  color: var(--harmaa);
  font-size: 1.12rem;
  max-width: 46ch;
  margin-bottom: 30px;
}

.napit { display: flex; flex-wrap: wrap; gap: 12px; }

.nappi {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.nappi:hover { text-decoration: none; transform: translateY(-1px); }

.nappi-punainen {
  background: var(--punainen);
  color: var(--valkoinen);
  box-shadow: 0 4px 14px rgba(200, 16, 46, 0.3);
}
.nappi-punainen:hover { background: var(--punainen-tumma); }

.nappi-vaalea {
  background: var(--valkoinen);
  color: var(--musta);
  border: 1.5px solid var(--raja);
}
.nappi-vaalea:hover { border-color: var(--musta); }

.hero-kuva { position: relative; }

.hero-kuva img {
  width: 100%;
  aspect-ratio: 4 / 4.6;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--pyoristys);
  box-shadow: var(--varjo);
}

.hero-kuva::after {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 2px solid var(--punainen);
  border-radius: var(--pyoristys);
  z-index: -1;
  opacity: 0.5;
}

@media (max-width: 820px) {
  .hero .sisalto {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 44px;
    padding-bottom: 52px;
  }
  .hero-kuva { order: -1; max-width: 340px; }
  .hero-kuva::after { display: none; }
}

/* ---------- Osiot ---------- */

section.osio { padding: 64px 0; }

.osio-otsikko {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.osio-alaotsikko {
  color: var(--harmaa);
  margin-bottom: 36px;
  max-width: 60ch;
}

.punaviiva {
  width: 44px;
  height: 4px;
  background: var(--punainen);
  border-radius: 2px;
  margin-bottom: 18px;
}

.esittely-palstat {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.kortti {
  background: var(--valkoinen);
  border: 1px solid var(--raja);
  border-radius: var(--pyoristys);
  padding: 28px;
  box-shadow: var(--varjo);
}

.kortti h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.kortti h3::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--punainen);
  flex-shrink: 0;
}

.kortti p { color: var(--harmaa); font-size: 0.98rem; }

/* ---------- Luottamustoimet-lista ---------- */

.toimi-lista { list-style: none; }

.toimi-lista li {
  background: var(--valkoinen);
  border: 1px solid var(--raja);
  border-radius: var(--pyoristys);
  padding: 18px 24px;
  margin-bottom: 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--varjo);
}

.toimi-lista .toimi { font-weight: 600; }
.toimi-lista .vuodet {
  color: var(--punainen);
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

.toimi-ryhma-otsikko {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--harmaa);
  margin: 30px 0 14px;
}
.toimi-ryhma-otsikko:first-of-type { margin-top: 0; }

@media (max-width: 560px) {
  .toimi-lista li { flex-direction: column; gap: 4px; }
}

.toimi-lista.paattyneet li { opacity: 0.75; box-shadow: none; }
.toimi-lista.paattyneet .toimi { font-weight: 500; }
.toimi-lista.paattyneet .vuodet { color: var(--harmaa); }

/* ---------- Galleria ---------- */

.galleria-ruudukko {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.galleria-ruudukko a {
  display: block;
  border-radius: var(--pyoristys);
  overflow: hidden;
  box-shadow: var(--varjo);
  transition: transform 0.2s ease;
}
.galleria-ruudukko a:hover { transform: scale(1.02); }

.galleria-ruudukko img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* Kuvan suurennus */
.valokeila {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 24, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 4vh 4vw;
  cursor: zoom-out;
}
.valokeila.auki { display: flex; }
.valokeila img {
  max-width: 100%;
  max-height: 92vh;
  width: auto;
  border-radius: 10px;
  box-shadow: 0 10px 60px rgba(0, 0, 0, 0.5);
}

/* ---------- Yhteys ---------- */

.yhteys {
  background: var(--musta);
  color: var(--valkoinen);
  border-radius: var(--pyoristys);
  padding: 48px 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.yhteys h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.01em; }
.yhteys p { color: #c9c9d1; margin-top: 6px; }
.yhteys a.nappi-punainen { flex-shrink: 0; }

@media (max-width: 560px) {
  .yhteys { padding: 34px 26px; }
}

/* ---------- Alatunniste ---------- */

footer {
  border-top: 1px solid var(--raja);
  margin-top: 40px;
  padding: 34px 0;
  background: var(--valkoinen);
}

.footer-rivi {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--harmaa);
  font-size: 0.92rem;
}

.footer-rivi .some a {
  font-weight: 600;
  margin-left: 18px;
}

/* ---------- Sivun ylätila (alasivut) ---------- */

.sivu-otsake {
  background: var(--valkoinen);
  border-bottom: 1px solid var(--raja);
  padding: 52px 0 44px;
}
.sivu-otsake h1 {
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.sivu-otsake p { color: var(--harmaa); max-width: 62ch; }
