:root{
  --bg: #edf3ed;
  --surface: #f6faf6;
  --text: #17351f;
  --muted: #5f6f63;
  --border: #d6e1d6;
  --brand: #2f6d3a;
  --brand-dark: #24542d;
  --shadow: 0 2px 12px rgba(17, 24, 39, 0.05);
  --maxw: 1080px;
}

*{ box-sizing: border-box; }

html, body{
  margin: 0;
  padding: 0;
}

body{
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

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

a{
  color: var(--brand);
}

.wrap{
  width: min(var(--maxw), calc(100% - 2rem));
  margin: 0 auto;
}

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

.nav-wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 0;
}

.brand{
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--brand-dark);
  letter-spacing: .2px;
}

.site-nav{
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.2rem;
}

.site-nav a{
  text-decoration: none;
  color: #29412e;
  font-weight: 600;
  padding: .4rem .15rem;
}

.site-nav a.active,
.site-nav a:hover{
  color: var(--brand);
  text-decoration: underline;
}

.hero-shell{
  padding: 1rem 0 0;
}

.hero-image{
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 26px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.main-content{
  padding: 2.25rem 0 0;
}

h1{
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.06;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

h2{
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 1.08;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

p,
li{
  font-size: clamp(1rem, 1.35vw, 1.08rem);
}

.lead{
  font-size: clamp(1.12rem, 1.8vw, 1.5rem);
  line-height: 1.65;
  max-width: 48rem;
  margin-bottom: 1.5rem;
}

.cta-row{
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.2rem 0 1.4rem;
}

.btn{
  display: inline-block;
  padding: 0.84rem 1.1rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.2;
  border: 1px solid transparent;
}

.btn-primary{
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover{
  background: var(--brand-dark);
}

.btn-secondary{
  background: #eef3ef;
  color: #223523;
  border-color: var(--border);
}

.btn-secondary:hover{
  background: #e5ece6;
}

.theme-box,
.news-card,
.course-note{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.theme-box{
  padding: 1rem 1.1rem;
  max-width: 58rem;
}

.about{
  margin-top: 3.2rem;
}

.about-grid{
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
  gap: 2rem;
  align-items: start;
}

.about-photo img{
  width: 100%;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.about-text ul{
  padding-left: 1.25rem;
  margin-top: 1rem;
}

.course-note{
  padding: 1rem 1.1rem;
  margin-top: 1.15rem;
}

.news-section{
  margin-top: 3.3rem;
}

.section-head{
  margin-bottom: 1rem;
}

.section-head p{
  margin: 0;
  color: var(--muted);
}

.news-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.news-card{
  padding: 1.15rem 1.2rem;
}

.news-date{
  display: inline-block;
  font-size: .92rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.news-card h3{
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 0 0 0.7rem;
}

.news-card h3 a{
  text-decoration: none;
}

.news-card h3 a:hover{
  text-decoration: underline;
}

.news-source{
  margin: 0;
  color: var(--muted);
}

.site-footer{
  margin-top: 3.3rem;
  border-top: 1px solid var(--border);
  padding: 1.2rem 0 1.8rem;
}

.footer-wrap{
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-wrap a{
  text-decoration: none;
}

.footer-wrap a:hover{
  text-decoration: underline;
}

.muted{
  color: var(--muted);
}

@media (max-width: 820px){
  .nav-wrap{
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-image{
    height: 170px;
  }

  .about-grid{
    grid-template-columns: 1fr;
  }

  .about-grid{
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .about-photo{
    width: 62%;
    max-width: 280px;
    margin: 0 auto .75rem;
  }
  .about-text{
    width: 100%;
    text-align: left;
  }
  .about-photo img,
  .profile-image{
    width: 100% !important;
    max-width: 100%;
    display: block;
    border-radius: 18px;
  }
  .about h2{
    text-align: center;
  }

  .news-grid{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px){
  .wrap{
    width: min(var(--maxw), calc(100% - 1.25rem));
  }

  .hero-shell{
    padding-top: 0.75rem;
  }

  .hero-image{
    height: auto;
    aspect-ratio: 16 / 10;
    border-radius: 22px;
  }

  .main-content{
    padding-top: 1.8rem;
  }

  .cta-row{
    flex-direction: column;
  }

  .btn{
    width: 100%;
    text-align: center;
  }

  .footer-wrap{
    font-size: 0.88rem;
  }
}


.plain-list{
  margin: 0;
  padding-left: 1.2rem;
}

.plain-list li{
  margin: 0.35rem 0;
}

.hero-shell {
  position: relative;
}

.hero-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15),
    rgba(0,0,0,0.05)
  );
  pointer-events: none;
}

body {
  line-height: 1.65;
}

.profile-image {
  width: 360px;
  max-width: 100%;
  height: auto;
}

.about-grid {
  align-items: start;
}

/* ===== Digikatsaus ===== */

.k-back{
  display:inline-block;
  margin-bottom:1.25rem;
  color:var(--brand);
  text-decoration:none;
  font-size:.95rem;
  font-weight:700;
}
.k-back:hover{ text-decoration:underline; }

.k-paivays{
  font-size:.95rem;
  color:var(--muted);
  margin:-.4rem 0 1.5rem;
}

.k-intro{
  background:#e8f5e9;
  border-left:5px solid var(--brand);
  border-radius:0 12px 12px 0;
  padding:1rem 1.2rem;
  margin-bottom:1.6rem;
  max-width:52rem;
  color:#1b4020;
}

.k-pika{
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  padding:1.1rem 1.4rem 1.3rem;
  margin-bottom:2rem;
  max-width:52rem;
  box-shadow:var(--shadow);
}
.k-pika-otsikko{
  font-size:.78rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--brand);
  margin:0 0 .6rem;
}
.k-pika ul{ margin:0; padding-left:1.2rem; }
.k-pika li{ margin-bottom:.45rem; line-height:1.5; }

.k-osio{
  font-size:.78rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--muted);
  margin:0 0 1rem;
  padding-bottom:.4rem;
  border-bottom:1px solid var(--border);
  max-width:52rem;
}

.nosto-kortti{
  background:#fff;
  border:2px solid #c8e6c9;
  border-radius:18px;
  padding:1.35rem 1.5rem 1.2rem;
  margin-bottom:1.35rem;
  max-width:52rem;
  box-shadow:var(--shadow);
}
.nosto-kortti h3{
  font-size:1.25rem;
  line-height:1.35;
  letter-spacing:0;
  margin:0 0 1rem;
  color:#1b5e20;
}
.k-rivi{ margin-bottom:.95rem; }
.k-etiketti{
  display:block;
  font-size:.74rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--muted);
  margin:0 0 .22rem;
}
.k-rivi p{
  margin:.15rem 0 0;
}
.k-tag{
  display:inline-block;
  margin-top:.25rem;
  font-size:.78rem;
  font-weight:700;
  color:var(--brand);
  background:#e8f5e9;
  border-radius:999px;
  padding:.22rem .8rem;
}
.k-yksi-asia{
  background:#fff;
  border:2px solid var(--brand);
  border-radius:18px;
  padding:1.15rem 1.35rem;
  margin:2rem 0 1.5rem;
  max-width:52rem;
  box-shadow:var(--shadow);
}
.k-yksi-asia h2{
  font-size:1.35rem;
  line-height:1.25;
  margin:0 0 .55rem;
}
.k-yksi-asia p{ margin:.2rem 0 0; }

.k-lahteet{
  margin-top:2.3rem;
  padding-top:1.2rem;
  border-top:1px solid var(--border);
  max-width:52rem;
  font-size:.9rem;
  color:var(--muted);
}
.k-lahteet-otsikko{
  font-size:.76rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.07em;
  margin:0 0 .7rem;
}
.k-lahteet ol{ padding-left:1.2rem; margin:0; }
.k-lahteet li{ margin-bottom:.45rem; line-height:1.5; }

/* ===== Etusivun nosto + digiarjen kehikko ===== */

.front-feature-grid{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:1rem;
  margin-top:2rem;
}

.front-feature{
  padding:1.25rem 1.35rem;
}

.front-feature h2{
  font-size:clamp(1.45rem, 3vw, 2rem);
  line-height:1.15;
  margin-bottom:.75rem;
}

.feature-label{
  display:inline-block;
  margin:0 0 .65rem;
  font-size:.78rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--brand);
}

.digitaito-list{
  list-style:none;
  padding:0;
  margin:1rem 0 0;
}

.digitaito-list li{
  padding:.7rem .8rem;
  margin-bottom:.55rem;
  background:#edf4ed;
  border-left:4px solid #c8ddca;
  border-radius:8px;
  font-weight:700;
  color:#1b4020;
}

.digitaito-note{
  margin-top:1rem;
  color:var(--muted);
  line-height:1.6;
}

.feature-note{
  margin-top:1.1rem;
  color:var(--muted);
  line-height:1.6;
  max-width:32rem;
}

.front-feature{
  min-height:auto;
}

/* Profiilikuva etusivulla */
.profile-image{
  width:140px;
  max-width:100%;
  height:auto;
}

@media (max-width:820px){
  .front-feature-grid{
    grid-template-columns:1fr;
  }

  .profile-image{
    width: 75%;
    max-width: 320px;
    margin: 0 auto;
    display: block;
  }
}