/*
  Älysivut landing — Creavo.fi-tyyli-preview.
  Värit, fontit (Clash Display + General Sans) ja nappityyli poimittu
  suoraan creavo.fi:n omasta design-systeemistä (_astro-buildin CSS).
  Vaalea pohja, musta "ink", lime-vihreä ainoa aksentti.
  Mobile first. Ei ulkoisia riippuvuuksia (fontit ladataan HTML:ssä).
*/

:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --panel-tint: #F4F4F1;
  --ink-deep: #181818;
  --text: #181818;
  /* Leipätekstin harmaa. #6E6E6C oli valkoisella 5,1:1 — teknisesti AA, mutta
     0,85–0,92rem:n leipätekstissä paikoin haalea. #5C5C5A on 6,7:1 ja pysyy
     silti selvästi toissijaisena. --text-2 esiintyy vain vaaleilla pohjilla;
     tummat osiot käyttävät rgba(255,255,255,…)-sävyjä. */
  --text-2: #5C5C5A;
  --brand: #4A7A10;
  --brand-dark: #3D5520;
  --brand-tint: rgba(168, 232, 75, 0.28);
  --spark: #A8E84B;
  --lime: #A8E84B;
  --lime-dk: #98D43A;
  --lime-ink: #18280A;
  --border: #E5E5E5;
  --radius: 10px;
  --radius-card: 24px;
  --radius-pill: 999px;
  --shadow-card: 0 24px 48px -20px rgba(24, 24, 24, 0.14), 0 2px 8px rgba(24, 24, 24, 0.05);
  --shadow-card-hover: 0 32px 64px -24px rgba(24, 24, 24, 0.22), 0 2px 8px rgba(24, 24, 24, 0.05);
  --container: 1080px;
  --error-bg: #FCEBEB;
  --error-text: #791F1F;
}

/* -------------------- Reset & base -------------------- */

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  /* Ankkurihypyt (#miten-toimii jne.): sticky-header peittäisi osion otsikon
     ilman tätä. Header on mobiilissa ~72px ja työpöydällä ~84px (nav-pilleri
     kasvattaa sitä), joten varataan hieman ylimääräistä hengitystilaa. */
  scroll-padding-top: 88px;
  scroll-behavior: smooth;
}

@media (min-width: 760px) {
  html {
    scroll-padding-top: 104px;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "General Sans", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: "Clash Display", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0 0 0.5em;
  color: var(--text);
}

p {
  margin: 0 0 1em;
  color: var(--text-2);
}

ul, ol {
  margin: 0;
  padding: 0;
}

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

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.container-wide {
  max-width: 1320px;
}

section {
  padding: clamp(64px, 9vw, 110px) 0;
}

section h2 {
  max-width: 30ch;
  margin: 0 auto clamp(24px, 5vw, 44px);
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  letter-spacing: -0.03em;
  text-align: center;
  text-wrap: balance;
}

.kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-2);
  margin: 0 0 10px;
}

.kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  flex-shrink: 0;
}

/* -------------------- Header -------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Borderless glass: the hero shows through a soft blur, and the header lifts on scroll with a
     shadow instead of a hard divider line. Same 1320px width as the hero grid below it. */
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 12px 32px -26px rgba(24, 24, 24, 0.35);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  padding-top: 16px;
  padding-bottom: 16px;
  max-width: 1320px;
}

.site-header .btn {
  margin-left: auto;
}

@media (min-width: 760px) {
  .site-header .btn {
    margin-left: 0;
  }
}

/* Legal- ja muut kevyet sivut eivät sisällä navigaatiota logon ja CTA:n
   välissä. Tällöin CTA työntyy itse headerin oikeaan reunaan. */
.site-header .logo + .btn {
  margin-left: auto;
}

.site-nav {
  display: none;
}

.nav-divider {
  display: none;
}

@media (min-width: 760px) {
  .site-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 5px;
    background: rgba(21, 21, 21, 0.045);
    border-radius: var(--radius-pill);
    margin-left: auto;
  }

  .site-nav a {
    display: inline-flex;
    align-items: center;
    color: var(--text-2);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.94rem;
    white-space: nowrap;
    padding: 9px 18px;
    border-radius: var(--radius-pill);
    transition: color 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
  }

  .site-nav a:hover {
    color: var(--text);
    background: var(--surface);
    box-shadow: 0 3px 10px rgba(21, 21, 21, 0.09);
  }

  .nav-divider {
    display: block;
    width: 1px;
    height: 26px;
    background: rgba(21, 21, 21, 0.1);
  }
}

.logo {
  text-decoration: none;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* Etusivun logolukko on <span> jonka sisällä on kaksi eri linkkiä (Creavo
   ja Älysivut), koska linkkiä ei voi upottaa linkin sisään. Muilla sivuilla
   .logo on yhä itse <a>, joten nämä säännöt eivät saa olettaa kumpaakaan
   rakennetta. */
.logo-link {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.logo-mark {
  width: auto;
  height: 28px;
  display: inline-block;
  flex-shrink: 0;
}

.logo-sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
}

.logo-product {
  font-family: "General Sans", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
}

@media (max-width: 380px) {
  .logo-sep,
  .logo-product {
    display: none;
  }
}

/* -------------------- Buttons -------------------- */

.btn {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: "General Sans", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.btn-primary {
  background: var(--lime);
  color: var(--lime-ink);
  border-color: var(--lime);
  padding: 12px 22px;
  box-shadow: 0 10px 24px -10px rgba(24, 24, 24, 0.3);
}

.btn-primary:hover {
  background: var(--lime-dk);
  border-color: var(--lime-dk);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -10px rgba(24, 24, 24, 0.32);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--lime-dk);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 15px 28px;
  font-size: 1.05rem;
}

.btn[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}

/* .btn asettaa display:inline-block, joka kumoaisi selaimen [hidden]-säännön
   (display:none). Ilman tätä esim. UKK:n "Näytä kaikki" -nappi jäisi näkyviin
   desktopissa vaikka JS asettaa hidden=true. */
.btn[hidden] {
  display: none;
}

/* Header-CTA: kapeilla näytöillä lyhyt "Aloita" ettei nappi revi kahdelle
   riville. Koskee vain headerin CTA:ta, ei muita sivun CTA-painikkeita. */
.header-cta-short {
  display: none;
}

@media (max-width: 600px) {
  .header-cta-full {
    display: none;
  }

  .header-cta-short {
    display: inline;
  }
}

/* Puhelin headerissa: matalan kynnyksen kontakti niille jotka eivät täytä
   lomaketta. Mobiilissa (nav piilossa) linkki ottaa auto-marginaalin ja vetää
   itsensä + CTA:n oikealle; CTA:n oma auto-marginaali nollataan silloin,
   ettei tyhjä tila jakaudu kahden auto-marginaalin kesken. */
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
  white-space: nowrap;
}

.header-phone svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: var(--text-2);
}

.header-phone:hover .header-phone-number {
  text-decoration: underline;
}

.site-header .header-phone + .btn {
  margin-left: 0;
}

@media (min-width: 760px) {
  /* Desktopissa nav ottaa auto-marginaalin — puhelin istuu navin ja CTA:n
     väliin ilman omaa työntöä. */
  .header-phone {
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  /* Kapealla pelkkä kuvake: numero veisi CTA:lta tilan. aria-label kertoo
     numeron ruudunlukijalle. */
  .header-phone-number {
    display: none;
  }
}

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

/*
  Hero on valkoisella, taustakuvaa ei ole. Tiimikuvaa (img/creavo.png) kokeiltiin
  heron taustalla, mutta se ei toiminut kahdesta syystä:

  1. Kuvassa on omat kannettavat ja näytöt, jotka kilpailevat heron oman
     laitemockupin kanssa — kaksi päällekkäistä "tässä on näyttö" -kerrosta
     sekoittaa katseen.
  2. Tekstin lukukelpoisuus vaati suojaliu'un tekstisarakkeen taakse, ja
     kiinteäreunainen liuku näkyi kiireisen valokuvan päällä valkoisena
     laatikkona (terävä vasen reuna + vaakaraja luottamusrivien alla).

  Kuvan pystysijainti korjattiin ensin (top → bottom, koska kuva renderöityy
  heroa korkeammaksi ja top-ankkurointi piilotti juuri sen osan jossa sisältö
  on) — sen jälkeen kuva näkyi oikein, mutta ylläolevat kaksi ongelmaa jäivät.
  Tiedosto on jätetty repoon jos kuvalle löytyy myöhemmin parempi paikka.

  Heron oma ilme tulee .hero-glow-blobeista, ei taustakuvasta.
*/
.hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(24px, 4vw, 48px);
  padding-bottom: clamp(40px, 6vw, 72px);
}

.hero > .container {
  position: relative;
  /* No z-index here on purpose: it would establish a new stacking context and
     confine .hero-photo-stack's mix-blend-mode to inside this container,
     cutting it off from .hero-glow / the page background behind it — the
     photo's white background would then render as an opaque box instead of
     melting away. DOM order alone (this container comes after .hero-glow)
     already paints it on top, so z-index isn't needed for stacking order. */
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  animation: blob-float 18s ease-in-out infinite;
}

.blob-violet {
  width: 480px;
  height: 480px;
  top: -180px;
  right: -120px;
  background: rgba(24, 24, 24, 0.05);
}

/* Limehuuru heron alaosassa. Kasvatettu 6.8.2026 380 → 640 px: hero on nyt
   korkeampi (todistelaatikko + tarjouskortti), ja 380 px:n läikkä hukkui
   alakulmaan jättäen koko alaosan tasaisen valkoiseksi. Tausta pysyy
   valkoisena — tämä on huuru, ei värikenttä. */
.blob-amber {
  width: 640px;
  height: 640px;
  bottom: -300px;
  left: -180px;
  background: rgba(168, 232, 75, 0.16);
  animation-delay: -9s;
}

@keyframes blob-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(36px, -28px) scale(1.08); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-tint);
  color: var(--brand);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  margin: 0 0 18px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  animation: badge-pulse 1.8s ease-out infinite;
}

@keyframes badge-pulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 122, 16, 0.45); }
  100% { box-shadow: 0 0 0 9px rgba(74, 122, 16, 0); }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

/* Mobiilissa hero-text- ja hero-visual-kääreet puretaan (display: contents),
   jotta otsikko, mockup ja hintalaatikko voidaan limittää yhdeksi pinoksi:
   badge → H1 → mockup → kuvateksti → hintalaatikko → leipäteksti → CTA →
   luottamuslistaus. Kääreiden purku blockifioi inline-flex-lapset grid-
   itemeiksi, siksi badge ja CTA tarvitsevat justify-self: startin. */
@media (max-width: 859.98px) {
  .hero {
    /* Enemman ilmaa headerin ja badgen valiin mobiilissa kuin desktopilla. */
    padding-top: 40px;
  }

  /* Standardi 20px-container-gutteri tuntuu ahtaalta pitkalle leipatekstille
     ja isoille elementeille (mockup, otsikko) mobiilissa. Hero saa siksi
     omat, hieman leveammat reunat vain tassa sektiossa. */
  .hero > .container {
    padding: 0 28px;
  }

  .hero-text,
  .hero-visual {
    display: contents;
  }

  .hero-grid {
    gap: 0;
  }

  .hero-badge {
    order: 1;
    justify-self: center;
  }

  .hero-text h1 {
    order: 2;
    margin-bottom: 20px;
    text-align: center;
  }

  .hero-photo-stack {
    order: 3;
  }

  .hero-caption {
    order: 4;
    margin: 12px 0 24px;
  }

  .hero-visual .price-card {
    order: 5;
  }

  .hero-sub {
    order: 6;
    text-align: center;
  }

  .hero-text .btn {
    order: 7;
    justify-self: center;
  }

  /* PAKOLLINEN. .hero-text on täällä display: contents, joten nappirivi on
     suora grid-item. Ilman omaa order-arvoa se saisi oletuksen 0 ja hyppäisi
     koko pinon huipulle badgen yläpuolelle — vika näkyisi vain mobiilissa.
     Sama order kuin napilla aiemmin, eli paikka pinossa ei muutu. */
  .hero-actions {
    order: 7;
    justify-self: center;
    justify-content: center;
  }

  .trust-checks {
    order: 8;
    align-items: center;
    justify-self: center;
  }
}

@media (min-width: 860px) {
  .hero-grid {
    grid-template-columns: 0.85fr 1.35fr;
    gap: 56px;
  }
}

.hero-text h1 {
  font-size: clamp(2.4rem, 4.8vw, 4rem);
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.h1-accent {
  color: var(--brand);
}

@keyframes accent-shimmer {
  0%, 100% { background-position: 0% 0; }
  50% { background-position: 100% 0; }
}

.h1-sub {
  display: block;
  margin-top: 0.2em;
  font-size: 0.42em;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-2);
}

.hero-sub {
  font-size: 1.1rem;
  max-width: 46ch;
  margin-bottom: 48px;
}

.hero-text .btn {
  margin-bottom: 24px;
}

/* Heron nappirivi: päätoiminto ja sitoutumaton vaihtoehto rinnakkain.
   Väli tulee gapista eikä nappien omasta marginaalista, joten alempi
   marginaali nollataan — muuten rivin alle jäisi 24px kahdesti. */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  /* Napit ovat eri kokoiset (päänappi btn-lg), joten ne keskitetään
     pystysuunnassa toisiinsa nähden. Oletus stretch venyttäisi pienemmän
     päänapin korkuiseksi ja hierarkia katoaisi. */
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-actions .btn {
  margin-bottom: 0;
}

/* .btn-outline käyttää samaa 28px vaakapehmustetta kuin btn-lg, jolloin pari
   vaatii ~461px eikä mahdu hero-sarakkeeseen (452px @1280px) vaan rivittyy ja
   kasvattaa heroa. Kavennus koskee vain tätä riviä, joten osioiden omat
   nappiparit säilyvät ennallaan. Teksti pidetään kokonaisena: "verkkotunnus"
   on se sana joka kertoo mihin nappi vie. */
.hero-actions .btn-outline {
  padding: 15px 20px;
}

.trust-checks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--text-2);
}

@media (min-width: 600px) {
  .trust-checks {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
  }
}

.trust-checks li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.trust-checks li::before {
  content: "✓";
  color: var(--brand);
  font-weight: 600;
}

/* -------------------- Price card (hero) -------------------- */

.price-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.hero-visual {
  position: relative;
}

.hero-photo-stack {
  position: relative;
  /* Both slide images are position:absolute (stacked, ping-pong crossfade below),
     so the stack needs its own size — the mockup renders are all 1600×1200 (4:3). */
  aspect-ratio: 4 / 3;
}

.hero-photo {
  /* Real cutout PNGs (alpha background removal) — no mix-blend-mode trick needed.
     The old multiply-on-white approach couldn't fully hide the mockup renders' soft
     vignette (never quite pure #FFFFFF), so it always left a faint box behind. */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  /* True two-way crossfade: the outgoing slide fades 1→0 at the same time the
     incoming slide fades 0→1 (JS toggles .is-active on both simultaneously).
     A previous version kept the base image permanently opaque and only faded
     the overlay in on top — the base never actually disappeared until the
     overlay reached full opacity, which read as a jarring snap, not a dissolve. */
  transition: opacity 900ms ease-in-out;
}

.hero-photo.is-active {
  opacity: 1;
}

.hero-visual .price-card {
  position: relative;
  width: min(88%, 340px);
  /* Mobiilissa hintalaatikko mockupin ALApuolella (ei overlappia). Desktopissa
     (>=860px) se nostetaan kuvan päälle negatiivisella marginilla, ks. alla. */
  margin: 0 auto 32px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(168, 232, 75, 0.12);
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.hero-visual .price-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover), 0 0 0 1px rgba(168, 232, 75, 0.18);
}

@media (min-width: 860px) {
  .hero-visual .price-card {
    margin-top: -170px;
    margin-bottom: 0;
  }
}

.hero-caption {
  margin-bottom: 12px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-2);
}

.price-card-badge {
  display: inline-flex;
  align-items: center;
  background: var(--brand-tint);
  color: var(--brand);
  font-weight: 600;
  font-size: 0.76rem;
  letter-spacing: 0.01em;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  margin: 0 0 14px;
}

.price-amount {
  font-family: "Clash Display", sans-serif;
  font-weight: 600;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  letter-spacing: -0.02em;
  color: var(--brand);
  margin: 0 0 0.25em;
  line-height: 1;
}

.price-amount span {
  font-size: 0.4em;
  font-weight: 500;
  color: var(--text-2);
  margin-left: 2px;
}

/* ALV-merkintä hinnan alle. Aiemmin sivulla luki vain "39 €/kk", mutta UKK
   puhui "65 €/h + alv" — lukija ei voinut päätellä kumpaa 39 € tarkoitti.
   Käytössä enää hero-hintakortissa; hinta-osiolla on 5.8.2026 alkaen oma
   vastineensa (.hintakortti-alv css/hinta-osio.css:ssä). */
.price-vat {
  margin: -4px 0 14px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-2);
}

.price-card-checks {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  text-align: left;
  font-size: 0.9rem;
  color: var(--text);
}

.price-card-checks li {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price-card-checks li::before {
  content: "✓";
  color: var(--brand);
  font-weight: 600;
  flex-shrink: 0;
}

/* Hintakortin CTA on mobiilin ainoa toiminto tässä kohtaa pinoa, ks. kortin
   HTML-kommentti. Leveä nappi, koska kortti on kapea eikä sen sisällä ole
   muuta riviä jonka rinnalle nappi asettuisi. */
.price-card-cta {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px 22px;
}

@media (min-width: 860px) {
  .price-card-cta {
    display: none;
  }
}

.price-billing {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid rgba(21, 21, 21, 0.08);
  font-size: 0.8rem;
  color: var(--text-2);
}

/* -------------------- Steps -------------------- */

.steps-grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 700px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

.steps-grid li {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 32px 28px 28px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 250ms ease;
}

.step-num {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Numeropallo pidetään harmaana, jotta laatikko ei ole pelkkää vihreää:
     vihreä varataan ikonille, numero jää toissijaiseksi järjestysmerkiksi. */
  background: var(--panel-tint);
  color: var(--text-2);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 50%;
}

.steps-grid li:hover {
  box-shadow: var(--shadow-card-hover);
}

.steps-grid h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4em;
}

.steps-grid p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.step-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--brand-tint);
  margin-bottom: 18px;
}

.step-icon {
  width: 30px;
  height: 30px;
  color: var(--brand);
}

/* Section-level CTA under a card grid — every selling section ends in a next step. */
.section-cta {
  text-align: center;
  margin-top: clamp(30px, 4.5vw, 44px);
}

/* Sama "Pyydä ilmainen vedos" toistui aiemmin joka osiossa ainoana vaihtoehtona.
   Rinnalle matalamman kynnyksen toinen polku: se joka ei ole vielä valmis
   jättämään yhteystietojaan pääsee eteenpäin ilman umpikujaa. */
.section-cta-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

@media (min-width: 560px) {
  .section-cta-actions {
    flex-direction: row;
    justify-content: center;
  }
}

.section-cta-actions .btn-outline {
  padding: 12px 22px;
  background: var(--surface);
}

.section-cta-hint {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: var(--text-2);
}

.include-icon {
  width: 30px;
  height: 30px;
  color: var(--brand);
  margin-bottom: 14px;
}


/* -------------------- Includes -------------------- */

.includes {
  background: var(--panel-tint);
}

/* Section h2:n alamargin on mitoitettu suoraan korttiruudukolle, joten väliin
   tuleva ALV-huomautus kiritään ylös samalla tavalla kuin .examples-sub. */
.includes-vat-note {
  text-align: center;
  max-width: 52ch;
  margin: -22px auto clamp(24px, 4vw, 40px);
  font-size: 0.88rem;
}

.includes-grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 700px) {
  .includes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (min-width: 1000px) {
  .includes-grid {
    /* 6 cards → a calm 3×2 grid (was 4×1 when there were four cards). */
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Vedos-mockup marquee: brings the product's own imagery back mid-page. Real cutout
   PNGs (alpha background removal) sit on the tinted section; edges fade with a mask. */
.mockup-marquee {
  margin-top: clamp(36px, 5vw, 56px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 45s linear infinite;
}

.mockup-marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-set {
  display: flex;
  gap: 28px;
  padding-right: 28px;
}

.marquee-set img {
  height: clamp(150px, 18vw, 210px);
  width: auto;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

.includes-grid li {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 250ms ease;
}

.includes-grid li:hover {
  box-shadow: var(--shadow-card-hover);
}

.includes-grid h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4em;
}

.includes-grid p {
  margin-bottom: 0;
  font-size: 0.92rem;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
  padding: 15px 28px;
}

.btn-outline:hover {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
  transform: translateY(-2px);
}

.unit-lock {
  white-space: nowrap;
}

.price-includes {
  list-style: none;
  margin: 0 0 16px;
  padding: 14px 0 0;
  border-top: 1px solid var(--border);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.price-includes li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  line-height: 1.3;
  color: var(--text);
}

.price-includes-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--brand);
  margin-top: 1px;
}

.price-includes-title {
  display: block;
  font-weight: 600;
  line-height: 1.25;
}

.price-includes-desc {
  display: block;
  font-size: 0.79rem;
  line-height: 1.3;
  color: var(--text-2);
  margin-top: 2px;
  text-wrap: pretty;
}

/* Pakettiin jo sisältyvien jatkuvien kulujen rahallinen hyöty. Sama nosto
   toimii etusivun hintakortissa ja erillisellä hintasivulla. */
.included-savings {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 2px 0 16px;
  padding: 14px;
  background: var(--brand-tint);
  border: 1px solid rgba(32, 124, 113, 0.16);
  border-radius: 14px;
  color: var(--text);
}

.included-savings-icon {
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--brand);
  color: #fff;
}

.included-savings-icon svg {
  width: 21px;
  height: 21px;
}

.included-savings p {
  margin: 0;
}

.included-savings strong,
.included-savings p > span {
  display: block;
}

.included-savings strong {
  font-size: 0.94rem;
  line-height: 1.25;
  color: var(--brand-dark);
}

.included-savings p > span {
  margin-top: 3px;
  font-size: 0.79rem;
  line-height: 1.4;
  color: var(--text-2);
  text-wrap: pretty;
}

.hinta-price-includes > .included-savings {
  margin: 4px 0 0;
}

/* -------------------- About (Keitä olemme) -------------------- */

.about {
  background: var(--panel-tint);
}

.about-grid {
  display: grid;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

@media (min-width: 860px) {
  .about-grid {
    grid-template-columns: 5fr 6fr;
  }
}

.about-grid .kicker {
  justify-content: flex-start;
}

.about-grid h2 {
  text-align: left;
  margin-bottom: 18px;
}

.about-text > p {
  max-width: 56ch;
}

.about-photo {
  position: relative;
}

.about-photo > img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

@media (min-width: 860px) {
  .about-photo > img {
    aspect-ratio: 6 / 5;
    object-fit: cover;
    object-position: center;
  }
}

.about-photo-badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 16px;
  background: var(--surface);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card);
  font-size: 0.8rem;
  color: var(--text-2);
  white-space: nowrap;
}

.about-photo-badge img {
  width: 88px;
  height: auto;
  border-radius: 0;
  box-shadow: none;
}

.about-stats {
  grid-column: 1 / -1;
  margin: 0;
  margin-top: clamp(28px, 4vw, 48px);
  padding-top: clamp(24px, 4vw, 36px);
  border-top: 1px solid var(--border);
  display: grid;
  gap: 8px;
}

.about-stats > div {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 6px;
  padding: 10px 0;
}

@media (min-width: 700px) {
  .about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(24px, 4vw, 48px);
  }

  .about-stats > div {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0;
    border-left: 1px solid var(--border);
    padding-left: clamp(24px, 4vw, 48px);
  }

  .about-stats > div:first-child {
    border-left: none;
    padding-left: 0;
  }
}

.about-stats dt {
  font-family: "Clash Display", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

.about-stats .stat-label {
  display: block;
  margin-top: 4px;
  font-size: 1.05rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.about-stats dd {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-2);
}

.about-contact {
  margin: 24px 0 0;
  font-weight: 500;
}

/* -------------------- FAQ -------------------- */

.faq .container {
  max-width: 960px;
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 700px) {
  .faq-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.faq-grid.is-collapsed details:nth-child(n+5) {
  display: none;
}

.faq-show-more-wrap {
  text-align: center;
  margin-top: 32px;
}

.faq details {
  background: var(--surface);
  border-radius: 16px;
  padding: 4px 20px;
  box-shadow: var(--shadow-card);
}

.faq details[open] {
  box-shadow: inset 3px 0 0 var(--brand), var(--shadow-card);
}

.faq summary {
  cursor: pointer;
  padding: 16px 28px 16px 0;
  font-weight: 500;
  color: var(--text);
  list-style: none;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 14px;
  font-size: 1.3rem;
  color: var(--brand);
  line-height: 1;
  transition: transform 150ms ease;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  margin: 0 0 16px;
  font-size: 0.95rem;
}

.faq-ask {
  max-width: 640px;
  margin: 32px auto 0;
  text-align: center;
}

.faq-ask p {
  margin: 0 0 14px;
  font-size: 0.95rem;
  color: var(--text-2);
}

/* -------------------- Ask more modal (UKK) -------------------- */

.ask-modal {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  margin: auto; /* global reset would otherwise kill <dialog>'s native centering */
  border: none;
  border-radius: var(--radius-card);
  padding: 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-card-hover);
}

.ask-modal::backdrop {
  background: rgba(24, 24, 24, 0.55);
  backdrop-filter: blur(3px);
}

.ask-modal-inner {
  padding: 34px 34px 30px;
}

@media (max-width: 480px) {
  .ask-modal-inner {
    padding: 26px 22px 24px;
  }
}

.ask-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ask-modal-head h3 {
  margin: 0;
  font-size: 1.5rem;
}

.ask-modal-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.ask-modal-close:hover {
  background: var(--ink-deep);
  border-color: var(--ink-deep);
  color: #fff;
}

.ask-modal-close svg {
  width: 16px;
  height: 16px;
}

.ask-modal-lead {
  margin: 8px 0 0;
  font-size: 0.92rem;
  color: var(--text-2);
  line-height: 1.6;
}

.ask-modal form {
  margin-top: 20px;
}

.ask-modal label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 14px;
}

.ask-modal-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 480px) {
  .ask-modal-row {
    grid-template-columns: 1fr;
  }
}

.ask-modal input,
.ask-modal textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--panel-tint);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  min-height: 44px;
}

.ask-modal textarea {
  min-height: 96px;
  resize: vertical;
}

.ask-modal input:focus-visible,
.ask-modal textarea:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint);
  background: var(--surface);
}

.ask-modal-submit {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

.ask-modal-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 14px 0 0;
  font-size: 0.8rem;
  color: var(--text-2);
  text-align: center;
}

.ask-modal-note svg {
  width: 15px;
  height: 15px;
  color: var(--brand);
  flex-shrink: 0;
}

.ask-modal-privacy {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(168, 232, 75, 0.14);
  font-size: 0.8rem;
  line-height: 1.5;
  color: #3a3a38;
  text-align: left;
}

.ask-modal-privacy-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--brand);
}

.ask-modal-privacy-icon svg {
  width: 16px;
  height: 16px;
}

.ask-modal-success {
  text-align: center;
  padding: 20px 8px 4px;
}

.ask-modal-success-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ask-modal-success-icon svg {
  width: 24px;
  height: 24px;
}

.ask-modal-success h4 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.ask-modal-success p {
  margin: 0 0 22px;
  font-size: 0.95rem;
  color: var(--text-2);
}

/* -------------------- Contact / form -------------------- */

.contact {
  background: var(--panel-tint);
}

.contact-sub {
  text-align: center;
  max-width: 52ch;
  margin: -16px auto 8px;
}

.form-required-legend {
  text-align: center;
  margin: 0 0 28px;
  font-size: 0.85rem;
  color: var(--text-2);
}

.form-status {
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.form-status p {
  margin: 0;
}

.form-status-error {
  background: var(--error-bg);
  color: var(--error-text);
}

.form-status-success {
  background: var(--brand-tint);
  color: var(--brand-dark);
}

#lead-form {
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  /* Pystypadding on pienempi kuin vaakapadding: lomake näyttää lyhyemmältä
     eli helpommalta täyttää, mutta rivien luettava mitta säilyy. */
  padding: clamp(24px, 4vw, 32px) clamp(24px, 5vw, 44px);
}

.form-status {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

@media (min-width: 700px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .form-wide {
    grid-column: 1 / -1;
  }
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.field-hint {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-2);
  line-height: 1.45;
}

.required-mark {
  color: var(--brand);
}

.form-grid input,
.form-grid textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  min-height: 44px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-grid textarea {
  min-height: 96px;
  resize: vertical;
}

.form-grid input:focus-visible,
.form-grid textarea:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint);
}

.hp-wrap {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-2);
  margin-bottom: 24px;
}

.consent input {
  margin-top: 3px;
  min-width: 18px;
  min-height: 18px;
}

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

#lead-form .btn-lg {
  width: 100%;
}

@media (min-width: 500px) {
  #lead-form .btn-lg {
    width: auto;
  }
}

/* "Mitä tapahtuu, kun lähetän?" — napin alle, koska lähetys tuntui muuten
   hyppäämiseltä tuntemattomaan: sivu ei kertonut missään mitä lomakkeen
   jälkeen tapahtuu tai soittaako joku perään. */
/* Oma laatikkonsa lomakekortin alla, ei sen sisalla. Tarkoituksella ILMAN
   varjoa: lomakekortilla on --shadow-card, joten se nousee taustasta ja jaa
   sivun paakohteeksi, ja nama jaavat litteana levyna sen alle. Kaksi
   samanpainoista korttia kilpailisi keskenaan. */
.form-next-steps {
  max-width: 760px;
  margin: 20px auto 0;
  padding: clamp(22px, 4vw, 30px) clamp(24px, 5vw, 44px);
  background: var(--surface);
  border-radius: var(--radius-card);
}

.form-next-steps-title {
  margin: 0 0 18px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}

.timeline {
  --timeline-gap: 22px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--timeline-gap);
}

.timeline-step {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: start;
  gap: 14px;
}

/* Yhdistää perättäiset merkit viivalla — muuten aikajana näyttää irrallisilta
   riveiltä eikä yhdeltä prosessilta. Viiva jatkuu .timelinen gapin yli
   seuraavaan merkkiin asti, joten sen mitta on sidottu samaan muuttujaan
   kuin gap: yksi luku muuttuu, ei kahta. */
.timeline-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: calc(-1 * var(--timeline-gap));
  width: 1px;
  background: var(--border);
}

/* Vaakasuunta samalla rajalla kuin .form-grid menee kahteen palstaan.
   Kolme askelta mahtuu 760 px:n lomakkeeseen väljästi; mobiilissa ne
   jäävät päällekkäin, koska palstasta tulisi liian kapea luettavaksi. */
@media (min-width: 700px) {
  .timeline {
    --timeline-gap: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  /* align-content: start on pakollinen. Askel venyy korkeimman sarakkeen
     mittaiseksi, ja auto-rivien oletus (stretch) jakaisi ylijäämän riveille
     — jolloin lyhyemmän sarakkeen aikamerkintä valuu alemmas kuin naapurin
     eivätkä pilleririvit ole linjassa. */
  .timeline-step {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 12px;
  }

  /* Viiva kääntyy vaakaan: merkin oikealta reunalta seuraavan merkin
     vasemmalle puolelle, 10 px hengitystilaa kumpaankin päähän. */
  .timeline-step:not(:last-child)::before {
    top: 15px;
    left: 42px;
    right: calc(10px - var(--timeline-gap));
    bottom: auto;
    width: auto;
    height: 1px;
  }

  .timeline-content {
    padding-top: 0;
  }
}

.timeline-marker {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-tint);
  flex-shrink: 0;
}

.timeline-icon {
  width: 16px;
  height: 16px;
  color: var(--brand);
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 3px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-2);
}

/* Pelkka versaaliteksti, ei taytetta. Merkkiympyra kantaa jo varin, ja
   pilleritaytto tuplasi saman korostuksen: nakymassa oli seitseman
   samanlaista vaaleanlimea sirua (takuu + 3 merkkia + 3 aikamerkintaa),
   jolloin aikajana luki sirurivina eika aikajanana. */
.timeline-when {
  color: var(--text-2);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.timeline-content strong {
  color: var(--text);
  font-weight: 600;
}

/* -------------------- Footer -------------------- */

.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--ink-deep);
  color: rgba(255, 255, 255, 0.65);
  padding: 44px 0;
}

.site-footer::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -140px;
  width: 640px;
  height: 240px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(168, 232, 75, 0.35), transparent 72%);
  filter: blur(30px);
  pointer-events: none;
}

.site-footer .container {
  position: relative;
}

.site-footer p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.88rem;
  margin: 0 0 6px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: underline;
}

.site-footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

/* Neljäs sarake (Ehdot ja tiedot) lisättiin, kun footeriin tulivat
   sopimusehdot, palvelukuvaus ja evästekäytäntö tietosuojaselosteen rinnalle.
   Kolme saraketta ei enää mahtunut 760px:ssä, joten välissä on 2×2-ruudukko. */
@media (min-width: 560px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 40px;
  }
}

@media (min-width: 980px) {
  .footer-grid {
    grid-template-columns: 1.7fr 1fr 1fr 1.1fr;
    gap: 48px;
  }
}

.logo-footer .logo-product {
  color: #FFFFFF;
}

.logo-footer .logo-sep {
  background: rgba(255, 255, 255, 0.3);
}

.footer-desc {
  margin-top: 14px;
  max-width: 34ch;
}

.footer-title {
  font-weight: 600;
  color: #FFFFFF;
  font-size: 0.95rem;
  margin-bottom: 10px;
}

/* Kaupparekisteritiedot erotetaan linkeistä: toiminimi ja Y-tunnus ovat
   tunnistetietoa, eivät navigaatiota. */
.site-footer .footer-legal-id {
  margin-top: 12px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.58);
}

.site-footer .footer-col a {
  text-decoration: none;
}

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

/* -------- Legal-sivut (tietosuoja, sopimusehdot, evasteet) -------- */

.legal .container {
  max-width: 70ch;
}

.legal h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 0.6em;
}

/* Versio ja päiväys heti otsikon alle: sopimusehdoissa lukijan on voitava
   nähdä yhdellä silmäyksellä mitä versiota katsoo. */
.legal-meta {
  margin: -0.4em 0 2em;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}

.legal h2 {
  max-width: none;
  margin: 1.8em 0 0.65em;
  font-size: 1.2rem;
  text-align: left;
}

.legal h3 {
  font-size: 1.02rem;
  margin-top: 1.4em;
  margin-bottom: 0.4em;
}

.legal ul {
  list-style: disc;
  padding-left: 1.4em;
  margin-bottom: 1em;
}

.legal li {
  color: var(--text-2);
  margin-bottom: 0.3em;
}

.legal code {
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--panel-tint);
  color: var(--text);
}

.legal strong {
  color: var(--text);
}

/* -------------------- Scroll reveal (JS-enhanced only) -------------------- */

/* Kesto ja liikematka pidetään pieninä: nopeasti vierittävä lukija ehtii
   muuten otsikon kohdalle ennen kuin se on täydessä peitossa, jolloin sivu
   näyttää haalealta. 240 ms + 8 px on juuri sen verran että liike huomataan. */
.js-enabled .reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 240ms ease-out, transform 240ms ease-out;
}

.js-enabled .reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

.js-enabled .steps-grid.reveal li,
.js-enabled .includes-grid.reveal li {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 260ms ease-out, transform 260ms ease-out;
}

.js-enabled .steps-grid.reveal-visible li,
.js-enabled .includes-grid.reveal-visible li {
  opacity: 1;
  transform: translateY(0);
}

/* Porrastus lyhennettiin kolmasosaan. Kuudennen kortin 550 ms:n viive tarkoitti,
   että "Mitä sisältyy" -ruudukon viimeinen kortti oli yhä tyhjä silloin kun
   lukija oli jo vierittänyt sen ohi. */
.js-enabled .steps-grid.reveal-visible li:nth-child(2),
.js-enabled .includes-grid.reveal-visible li:nth-child(2) {
  transition-delay: 40ms;
}

.js-enabled .steps-grid.reveal-visible li:nth-child(3),
.js-enabled .includes-grid.reveal-visible li:nth-child(3) {
  transition-delay: 80ms;
}

.js-enabled .includes-grid.reveal-visible li:nth-child(4) {
  transition-delay: 120ms;
}

.js-enabled .includes-grid.reveal-visible li:nth-child(5) {
  transition-delay: 160ms;
}

.js-enabled .includes-grid.reveal-visible li:nth-child(6) {
  transition-delay: 200ms;
}

/* -------------------- Consent-banneri --------------------
   Keskitetty kortti (kuten Cookiebot-popup) alapalkin sijaan - nostaa
   vastausprosenttia, koska kortti on vaikea jättää huomaamatta. Taustaa
   himmentää kevyesti, mutta pointer-events:none pitää sivun taustan
   selattavana/klikattavana - .consent-banner-inner palauttaa
   pointer-eventsit vain itselleen, ei estä maksettujen laskeutumissivujen
   selaamista. */

.consent-banner {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(23, 18, 58, 0.45);
  pointer-events: none;
  animation: consent-banner-in 0.3s ease-out both;
}

.consent-banner[hidden] {
  display: none;
}

.consent-banner-inner {
  pointer-events: auto;
  width: 100%;
  max-width: 460px;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  padding: 24px;
  background: var(--ink-deep);
  border-radius: 18px;
  box-shadow: 0 24px 60px -20px rgba(23, 18, 58, 0.55);
}

.consent-banner-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.consent-banner-title {
  margin: 0;
  font-family: "Clash Display", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}

.consent-banner-text {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(230, 224, 255, 0.85);
}

.consent-banner-text a {
  color: #fff;
}

.consent-banner-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.consent-banner-actions .btn {
  flex: 1;
  text-align: center;
}

/* Hyväksy-nappi hallitsevana: väri- ja kokopainotus on sallittua, kunhan
   molemmat valinnat ovat samassa näkymässä yhden klikkauksen päässä. */
.consent-banner-actions .btn-primary {
  flex: 1.6;
}

.consent-banner .btn-outline {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.consent-banner .btn-outline:hover {
  background: rgba(255, 255, 255, 0.16);
}

@keyframes consent-banner-in {
  from { background: rgba(23, 18, 58, 0); }
}

/* Poikkeus: evästekäytäntösivu selittää juuri näitä evästeitä, joten
   keskitetty kortti ei saa peittää tekstiä kesken lukemisen - täällä
   banneri pysyy vanhana täysleveänä alapalkkina. */
body.legal-page .consent-banner {
  align-items: flex-end;
  justify-content: stretch;
  background: transparent;
  padding: 0;
}

body.legal-page .consent-banner-inner {
  width: 100%;
  max-width: none;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -12px 32px -20px rgba(23, 18, 58, 0.5);
}

@media (min-width: 700px) {
  body.legal-page .consent-banner-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
  }
  body.legal-page .consent-banner-actions .btn {
    flex: 0 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .consent-banner {
    animation: none;
  }
}

/* -------------------- Chat-fasadi -------------------- */

/* Näkyy kunnes Smartsupp latautuu (suostumuksesta tai napista itsestään) ja
   istuu samaan kulmaan johon widget ilmestyy. z-index alle consent-kortin
   (100), jotta banneri jää päällimmäiseksi. */
.chat-launcher {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--ink-deep);
  color: #fff;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 14px 28px -12px rgba(24, 24, 24, 0.45);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.chat-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px -12px rgba(24, 24, 24, 0.5);
}

.chat-launcher:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--lime-dk);
}

.chat-launcher svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--lime);
}

@media (prefers-reduced-motion: reduce) {
  .chat-launcher {
    transition: none;
  }
}

/* -------------------- Esimerkkisivustot (demot) -------------------- */

/* Osio istuu .includes-osion (--panel-tint) ja .pricing-osion (--ink-deep)
   välissä, joten se on valkoinen: vaalea–tintattu–valkoinen–tumma erottaa
   demokaistan omakseen ilman uutta väriä paletissa. Valkoinen tausta on myös
   ainoa, jota vasten korttien selainkehys luetaan kehyksenä eikä laatikkona. */
.examples {
  background: var(--surface);
}

/* Section h2:n oma alamargin on mitoitettu suoraan korttiruudukolle. Kun väliin
   tulee alaotsikko, se kiritään ylös samalla tavalla kuin .contact-sub. */
.examples-sub {
  text-align: center;
  max-width: 56ch;
  margin: -16px auto clamp(28px, 4vw, 40px);
}

.demo-grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 0;
  padding: 0;
}

@media (min-width: 700px) {
  .demo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (min-width: 1000px) {
  .demo-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Koko kortti on yksi linkki: kuva, nimi ja nuoli osuvat samaan kohteeseen,
   eikä sormella tarvitse etsiä pientä tekstilinkkiä. */
.demo-card > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: transform 250ms ease, box-shadow 250ms ease;
}

.demo-card > a:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.demo-card > a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--brand), var(--shadow-card);
}

/* Selainkehys: ohut yläpalkki kuvan päällä. Kehys kertoo yhdellä silmäyksellä,
   että kortissa on näkymä oikeasta sivustosta eikä koristekuva. */
.demo-frame {
  display: block;
  background: var(--panel-tint);
  border-bottom: 1px solid var(--border);
}

.demo-frame-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
}

.demo-dots {
  display: inline-flex;
  flex-shrink: 0;
  gap: 5px;
}

.demo-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-2);
  opacity: 0.35;
}

.demo-url {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 0.72rem;
  color: var(--text-2);
}

.demo-frame img {
  display: block;
  width: 100%;
  height: auto;
  /* Sama suhde kuin thumbnaileilla (1280x860). Kuvan yläreuna pidetään
     näkyvissä, koska kaappaus alkaa sivuston herosta. */
  aspect-ratio: 1280 / 860;
  object-fit: cover;
  object-position: top center;
}

.demo-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 24px 20px;
}

.demo-industry {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
}

.demo-name {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

/* margin-top: auto pitää nuolen kortin alalaidassa silloinkin, kun toimialarivi
   rivittyy naapuria pidemmäksi. Korteista poistettiin myyntilause: viisi
   seitsemästä kertoi vain, että alan sivustolla on hinnasto ja yhteystiedot,
   ja kuvakaappaus näyttää saman nopeammin. */
.demo-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--brand);
}

.demo-open svg {
  width: 16px;
  height: 16px;
  transition: transform 250ms ease;
}

.demo-card > a:hover .demo-open svg {
  transform: translateX(4px);
}

/* Kutsuruutu ruudukon lopussa. Demoja on seitsemän, joten kolmen sarakkeen
   riviltä jäi kaksi ruutua tyhjäksi. Ruutu vie sen tilan ja hoitaa samalla
   osion seuraavan askeleen, joka oli aiemmin erillisenä .section-cta-lohkona
   ruudukon alla. Leveys skaalautuu niin, ettei aukkoa synny uudelleen:
     1 sarake  ruutu on rivinsä ainoa
     2 saraketta  7 korttia + ruutu = 8 eli neljä täyttä riviä
     3 saraketta  ruutu vie kaksi ruutua = kolme täyttä riviä
   Tarkoituksella ei korttityyliä: tintattu pohja ja reunaviiva erottavat
   kehotuksen esimerkeistä, jottei sitä lueta kahdeksantena demona. */
.demo-invite {
  display: flex;
}

@media (min-width: 1000px) {
  .demo-invite {
    grid-column: span 2;
  }
}

.demo-invite-inner {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 40px);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--panel-tint);
  text-align: center;
}

.demo-invite-inner h3 {
  margin: 0 0 10px;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
}

.demo-invite-inner p:not(.kicker) {
  max-width: 46ch;
  margin: 0 0 22px;
}

/* Navi sisältää nyt seitsemän linkkiä, eikä rivi mahdu headeriin kapealla
   desktopilla. Header on flex-rivi, joten ylipitkä navi ei valu yli
   vaan puristaa logon kasaan — ja koska logon korkeus on lukittu 28 pikseliin,
   wordmark litistyy. Siksi kolme sääntöä:
   Rajat jättävät tilaa myös fonttien latauseroille:
     760–1079 px   navi piiloon kuten mobiilissa, CTA pysyy oikeassa reunassa
     1080–1279 px  kuusi linkkiä näkyy tiivistetyllä paddingilla
     1280 px →     kaikki seitsemän linkkiä näkyvät */
.site-header .logo {
  flex-shrink: 0;
}

@media (min-width: 760px) and (max-width: 1079.98px) {
  .site-nav,
  .nav-divider {
    display: none;
  }

  .site-header .btn {
    margin-left: auto;
  }
}

@media (min-width: 1080px) and (max-width: 1279.98px) {
  .site-header .container {
    gap: 14px;
  }

  .site-nav {
    gap: 0;
    padding: 4px;
  }

  .site-nav a {
    padding: 8px 12px;
    font-size: 0.9rem;
  }
}

/* -------------------- Reduced motion -------------------- */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    /* Porrastetut viiveet jättäisivät kortit hetkeksi tyhjiksi vaikka itse
       siirtymä on nollattu — nollataan myös viive. */
    transition-delay: 0ms !important;
  }

  /* Ankkurihyppy tapahtuu kerralla, ei vieritysanimaationa. */
  html {
    scroll-behavior: auto;
  }

  .js-enabled .reveal,
  .js-enabled .steps-grid.reveal li,
  .js-enabled .includes-grid.reveal li {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
