/* CTA – yleiskäyttöinen nappi */
.btn-cta {
  display: inline-flex;          /* 🔥 estää venymisen */
  align-items: center;
  justify-content: center;

  padding: 0.75rem 1.6rem;       /* hieman kapeampi */
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;

  border-radius: 0.7rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;           /* ei rivinvaihtoa */

  box-shadow: 0 4px 16px rgba(79,70,229,0.25);
  transition: all 0.2s ease;

  width: fit-content;            /* 🔥 tärkein */
  max-width: max-content;        /* fallback */
}

/* hover */
.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79,70,229,0.35);
}

/* ══════════════════════════════════════
   HERO SPLIT
   ══════════════════════════════════════ */
.hero-split {
  background-color: #f8fafc;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

/* Mobiili */
@media (max-width: 767px) {
  .hero-split {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-text-col  { order: 1; }
  .hero-image-col { order: 2; min-height: 80vw; }
}

/* ══════════════════════════════════════
   TEKSTI
   ══════════════════════════════════════ */
.hero-text-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7rem 4rem 5rem 7rem;
}

@media (max-width: 1280px) { .hero-text-col { padding: 5rem 3rem 4rem 4rem; } }
@media (max-width: 1024px) { .hero-text-col { padding: 4rem 2.5rem; } }
@media (max-width: 767px)  { .hero-text-col { padding: 5rem 1.5rem 2.5rem; } }

.hero-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #6366f1;
  margin-bottom: 1.2rem;
}

.hero-headline {
  font-size: clamp(2.2rem, 3.8vw, 3.8rem);
  font-weight: 800;
  line-height: 1.07;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin-bottom: 1.4rem;
  text-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.hero-sub {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #334155;
  max-width: 40ch;
  margin-bottom: 2rem;
}

.hero-bullets {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.hero-bullets li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.95rem;
  color: #334155;
}

.hero-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e0e7ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-check::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4f46e5;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 2.4rem;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  border-radius: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(79,70,229,0.30);
  transition: all 0.2s ease;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(79,70,229,0.35);
}

/* ══════════════════════════════════════
   KUVAPUOLI
   ══════════════════════════════════════ */
.hero-image-col {
  position: relative;
  overflow: hidden;
  background: #f8fafc;
}

/* GRID */
.hero-image-grid {
  position: absolute;
  inset: 0;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 12px;
}

/* ITEM */
.grid-item {
  position: relative;
  overflow: hidden;
  background: #fff;
}

/* 4:3 KUVA SUHDE */
.grid-item::before {
  content: "";
  display: block;
  padding-top: 75%;
}

/* KUVA */
.grid-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;

  transition: transform 0.6s ease, filter 0.4s ease;
}

/* LINKKI */
.grid-item a {
  position: absolute;
  inset: 0;
  z-index: 3;
}

/* HOVER */
.grid-item:hover img {
  transform: scale(1.05);
  filter: brightness(0.85);
}

/* OVERLAY */
.grid-item .overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 14px;

  background: linear-gradient(
    to top,
    rgba(0,0,0,0.65) 0%,
    rgba(0,0,0,0.2) 40%,
    rgba(0,0,0,0) 70%
  );

  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.grid-item:hover .overlay {
  opacity: 1;
}

.grid-item .overlay span {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
}

/* FADE vasemmalle */
.hero-image-col::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;   /* 🔥 tärkeä: ei koko leveys */
  height: 100%;

  background: linear-gradient(
    to right,
    #f8fafc 0%,
    rgba(248,250,252,0.9) 40%,
    rgba(248,250,252,0) 100%
  );

  pointer-events: none;
  z-index: 2;
}

/* ══════════════════════════════════════
   ANIMAATIOT
   ══════════════════════════════════════ */
.hero-text-col > * {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease forwards;
}

.hero-text-col > *:nth-child(1) { animation-delay: 0.1s; }
.hero-text-col > *:nth-child(2) { animation-delay: 0.2s; }
.hero-text-col > *:nth-child(3) { animation-delay: 0.3s; }
.hero-text-col > *:nth-child(4) { animation-delay: 0.4s; }
.hero-text-col > *:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* MOBILE: gradient ylös */
@media (max-width: 767px) {
  .hero-image-col::after {
    top: 0;
    left: 0;
    width: 100%;
    height: 35%; /* 🔥 kontrolloi fade-korkeutta */

    background: linear-gradient(
      to bottom,
      #f8fafc 0%,
      rgba(248,250,252,0.9) 40%,
      rgba(248,250,252,0) 100%
    );
  }
}