/* =========================
   GOALS HERO
========================= */
#goals-hero{
  position: relative;
  height: 60vh;
  min-height: 520px;
  overflow: hidden;

  /* jos käytät taustakuvaa: */
  background-image: url("/asseets/img/goals.jpeg"); /* vaihda polku */
  background-size: cover;
  background-position: top 20% right 0;

  transition: height 700ms ease;
}

/* Zoom/blur -kerros taustalle */
#goals-hero::before{
  content:"";
  position:absolute;
  inset:0;

  background-image: inherit;
  background-size: inherit;
  background-position: inherit;

  transform: scale(1.08);
  filter: blur(0px);
  transition: transform 700ms ease, filter 700ms ease;

  z-index: 0;              /* TÄRKEÄ: jää tekstin alle */
}

/* Kevyt tumma overlay (helpottaa tekstin luettavuutta) */
#goals-hero::after{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.0);
  transition: background 700ms ease;

  z-index: 1;              /* overlay tekstin alle */
}

/* Teksti aina päällimmäiseksi */
.goals-hero-text{
  position:absolute;
  left: 5%;
  bottom: 18%;

  z-index: 2;              /* TÄRKEÄ: tekstin päälle */
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 400ms ease, transform 400ms ease;

  pointer-events: none;
}

.goals-hero-text h1{
  margin:0;
  padding: 20px 28px;
  border-radius: 12px;
  background: rgba(10, 25, 50, 0.75);
  color:#fff;
  font-size: clamp(48px, 6vw, 92px);
  font-weight: 800;
}

/* “Lukittu” tila (laukeaa scrollilla ja jää päälle) */
#goals-hero.is-locked{
  height: 35vh;            /* HERO PIENENEE */
  min-height: 420px;       /* pidä järkevänä mobiilissa */
}

#goals-hero.is-locked::before{
  transform: scale(1.00);  /* zoom out */
  filter: blur(6px);       /* blur */
}

#goals-hero.is-locked::after{
  background: rgba(0,0,0,0.18);
}

#goals-hero.is-locked .about-hero-text{
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   GOALS CONTENT (editorial)
========================= */
#goals-content.goals-editorial{
  background:var(--bg2--);
  position:relative;
  z-index:2;
  margin-top:-30px;
  padding:110px 24px 90px;
  border-radius:38px 38px 0 0;
}

/* Shared card base */
#goals-content .goals-intro,
#goals-content .goal-card,
#goals-content .goals-values,
#goals-content .goals-figure{
  background:#fff;
  border-radius:32px;
  padding:64px;
  margin:0 auto 28px;
  max-width:1200px;
  box-shadow:0 18px 48px rgba(15,23,42,.08);
  overflow:hidden;
}

#goals-content .kicker{
  margin:0 0 10px;
  letter-spacing:.28em;
  text-transform:uppercase;
  font-size:12px;
  color:#475569;
}
#goals-content .goals-title{
  margin:0 0 10px;
  font-size:clamp(30px, 4vw, 52px);
  letter-spacing:-.02em;
  color:#0f172a;
  font-family:'Space Grotesk',sans-serif;
}
#goals-content .lead{
  margin:0;
  max-width:78ch;
  font-size:18px;
  line-height:1.75;
  color:#1e293b;
}

/* Roadmap layout: 3 korttia gridissä */
#goals-content .goals-roadmap{
  max-width:1200px;
  margin:0 auto 28px;
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:18px;
}
#goals-content .goal-card{
  margin:0;           /* grid hoitaa */
  padding:40px;
  border-radius:28px;
}
#goals-content .goal-card.is-featured{
  border:1px solid rgba(46,120,254,.35);
  box-shadow:0 22px 54px rgba(15,23,42,.14);
}

#goals-content .goal-head{
  display:flex;
  gap:14px;
  align-items:flex-start;
  margin-bottom:12px;
}
#goals-content .goal-badge{
  width:42px;
  height:42px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:rgba(46,120,254,.12);
  border:1px solid rgba(46,120,254,.28);
  font-weight:900;
  color:#0b1527;
}
#goals-content .goal-card h3{
  margin:0 0 4px;
  font-size:20px;
  color:#0f172a;
}
#goals-content .goal-sub{
  margin:0;
  color:#475569;
  font-size:13px;
  line-height:1.4;
}
#goals-content .goal-card p{
  margin:0 0 14px;
  color:#1e293b;
  line-height:1.75;
}
#goals-content .goal-points{
  margin:0;
  padding-left:16px;
  color:#1e293b;
  line-height:1.7;
}
#goals-content .goal-points li{ margin:8px 0; }

/* Bottom: values + figure */
#goals-content .goals-bottom{
  max-width:1200px;
  margin:0 auto;
  display:grid;
  grid-template-columns:1.35fr .65fr;
  gap:18px;
}
#goals-content .goals-values,
#goals-content .goals-figure{
  margin:0;
  padding:44px;
  border-radius:28px;
}
#goals-content .goals-values h3,
#goals-content .goals-figure h3{
  margin:0 0 10px;
  font-size:22px;
  color:#0f172a;
}
#goals-content .values-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
  margin-top:16px;
}
#goals-content .value{
  padding:14px 14px 16px;
  border-radius:18px;
  border:1px solid rgba(15,23,42,.10);
  background:rgba(15,23,42,.02);
}
#goals-content .value h4{
  margin:0 0 6px;
  font-size:15px;
  color:#0f172a;
}
#goals-content .value p{
  margin:0;
  color:#475569;
  line-height:1.65;
  font-size:13px;
}
#goals-content .goals-figure p{
  margin:0;
  color:#1e293b;
  line-height:1.75;
}

/* Safety */
#goals-content img, #goals-content video, #goals-content iframe{
  max-width:100%;
  height:auto;
  display:block;
}
.features-panel__media{
  width:100%;
  aspect-ratio:1/1;
  border-radius:18px;
  overflow:hidden;
  background:#f3f5f7;
}

.features-panel__media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}


/* =========================
   CHAPTER SECTION (IMAGE STYLE)
========================= */

.chapter{
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 64px);
  background: #ffffff;
  border-radius: 18px;
  margin-bottom: 80px;
}

.chapter h3{
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: #0b1a33;
  line-height: 1.15;
}

.chapter p{
  margin: 0 0 32px;
  max-width: 80ch;
  font-size: 18px;
  line-height: 1.7;
  color: #4a5568;
}

/* CTA ROW */
.chapter .cta-row{
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* BUTTON BASE */
.chapter .btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 28px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: all .2s ease;
}

/* PRIMARY BUTTON */
.chapter .btn.primary{
  background: #eef4ff;
  color: #0b1a33;
  border: 2px solid #c8d9ff;
}

.chapter .btn.primary:hover{
  background: #e2edff;
}

/* GHOST BUTTON */
.chapter .btn.ghost{
  background: #ffffff;
  color: #0b1a33;
  border: 2px solid #e5e7eb;
}

.chapter .btn.ghost:hover{
  background: #f8fafc;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 640px){
  .chapter{
    padding: 28px 20px;
  }

  .chapter p{
    font-size: 16px;
  }

  .chapter .btn{
    width: 100%;
    padding: 14px 22px;
    font-size: 16px;
  }
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width:1024px){
  #goals-hero{ min-height:460px; height:56vh; }
  #goals-content.goals-editorial{ padding:96px 18px 80px; border-radius:34px 34px 0 0; }

  #goals-content .goals-intro{ padding:52px; }
  #goals-content .goals-roadmap{ grid-template-columns:1fr; }
  #goals-content .goal-card{ padding:34px; }

  #goals-content .goals-bottom{
    grid-template-columns:1fr;
  }
}

@media (max-width:768px){
  #goals-hero{
    min-height:360px;
    height:46vh;
    background-position:top 45% center;
  }
  .goals-hero-text{
    left:16px; right:16px; bottom:14%;
  }
  .goals-hero-text h1{
    padding:14px 16px;
    font-size:clamp(30px, 8vw, 54px);
  }

  #goals-content.goals-editorial{
    padding:76px 14px 70px;
    margin-top:-18px;
    border-radius:26px 26px 0 0;
  }

  #goals-content .goals-intro,
  #goals-content .goal-card{
    padding:26px;
    border-radius:24px;
  }

  #goals-content .goals-values,
  #goals-content .goals-figure{
    padding:26px;
    border-radius:24px;
  }

  #goals-content .lead{ font-size:16px; }
}

@media (max-width:480px){
  #goals-hero{ min-height:320px; height:42vh; }
  #goals-content.goals-editorial{ padding:64px 12px 60px; }
}
