/* ─── Etusivun sommitelmat ────────────────────────────────────────────────
   Vain tämän sivun oma kokonaisuus: pyöristetty hero-kortti, jonka taustassa
   pisteverkko ja pinkki liukuväri. Kaikki muu tulee järjestelmästä. */

.e-hero { display: flex; flex-direction: column; background: var(--s-paper); }

.e-hero__card {
  flex: none;
  /* Kortti on ruudun korkuinen. svh eikä dvh: dvh seuraa selaimen palkkien
     liikettä, jolloin kortti kasvaisi kesken vierityksen. */
  height: 100vh;
  height: 100svh;
  margin: 0 16px;
  border-radius: 28px;
  display: flex;
  overflow-y: auto;
  background-color: var(--s-paper);
  /* Kolme kerrosta, ylin ensin: valkoinen verho vaalentaa pisteitä ylhäältä,
     pisteverkko, ja pohjan pinkki liukuväri. Pisteet ovat liukuvärin päällä,
     joten ne jatkuvat värinvaihdoksen yli. */
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.46) 30%, rgba(255, 255, 255, 0) 64%),
    radial-gradient(circle, rgba(255, 166, 196, 0.55) 1.1px, transparent 1.3px),
    linear-gradient(180deg, #fff 0%, #fff 58%, rgba(255, 166, 196, 0.26) 84%, rgba(255, 166, 196, 0.62) 100%);
  background-size: 100% 100%, 15px 15px, 100% 100%;
}

/* Sisältö alkaa samalta pystylinjalta kuin ylätunnisteen logo: kortin oma
   16px:n marginaali vähennetään sivun gutterista. */
.e-hero__content {
  width: 100%;
  max-width: 980px;
  padding: var(--s-section-y) calc(var(--s-gutter) - 16px);
}

.e-hero__content .s-display { text-wrap: balance; }

@media (min-width: 901px) {
  .e-hero__content { max-width: none; }
  .e-hero__content .s-display { max-width: 28ch; }
}

@media (max-width: 640px) {
  /* Korkeus .e-herolle eikä kortille: ylätunniste ja kortti jakavat näkyvän
     korkeuden, jolloin kortin alareuna osuu ruudun alalaitaan. */
  .e-hero {
    height: calc(100vh - var(--s-header-h));
    height: calc(100svh - var(--s-header-h));
    overflow: hidden;
  }

  .e-hero__card {
    height: auto;
    flex: 1;
    min-height: 0;
    margin-inline: 8px;
    border-radius: 16px;
    background-image:
      linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.46) 30%, rgba(255, 255, 255, 0) 64%),
      radial-gradient(circle, rgba(255, 166, 196, 0.55) 1.1px, transparent 1.3px),
      linear-gradient(180deg, #fff 0%, #fff 50%, rgba(255, 166, 196, 0.22) 70%, rgba(255, 166, 196, 0.44) 100%);
    background-size: 100% 100%, 12px 12px, 100% 100%;
  }

  .e-hero__content { padding-inline: calc(var(--s-gutter) - 8px); }
}

/* ─── Hero-kortin sisältö ─────────────────────────────────────────────────
   Kortin korkeus ja tausta yllä ovat ennallaan; tässä vain sisällön osat. */
.e-hero__chip { gap: 10px; margin-bottom: var(--s-2); transition: border-color var(--s-dur-fast) var(--s-ease); }
.e-hero__chip:hover { border-color: var(--s-rule-strong); color: var(--s-ink); }
.e-hero__chip span[aria-hidden] { color: var(--s-ink-3); }
.e-hero__content .s-actions { margin-top: var(--s-2); }

@media (max-width: 600px) {
  .e-hero__content .e-hero__actions {
    width: auto;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .e-hero__content .e-hero__actions > .s-btn {
    width: auto;
    flex: 0 0 auto;
    padding-inline: 18px;
    white-space: nowrap;
  }

  .e-hero__content .e-hero__actions > .s-btn--secondary { display: none; }
}

/* An open descending sequence: understand the business, find an opportunity,
   then make a concrete proposal. No cards or divider rows. */
.e-opportunity__intro {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(40px, 7vw, 110px);
}
.e-opportunity__intro .s-title { max-width: 19ch; }
.e-opportunity__intro .s-lead { max-width: 36ch; }
.e-opportunity__journey {
  position: relative;
  margin-top: clamp(52px, 6vw, 92px);
}
.e-opportunity__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  --e-opportunity-gap: clamp(30px, 4.8vw, 76px);
  column-gap: var(--e-opportunity-gap);
}
.e-opportunity__step { position: relative; --e-step-offset: 0px; padding-top: var(--e-step-offset); }
.e-opportunity__step:nth-child(2) { --e-step-offset: 40px; }
.e-opportunity__step:nth-child(3) { --e-step-offset: 80px; }
.e-opportunity__heading { position: relative; }
.e-opportunity__arrow {
  --e-arrow-width: min(40px, var(--e-opportunity-gap));
  position: absolute;
  width: var(--e-arrow-width);
  height: 36px;
  /* Half of the 40px step down places the arrow between heading centres. */
  top: calc(50% + 20px);
  right: calc(var(--e-opportunity-gap) / -2);
  transform: translate(50%, -50%);
  color: #d991ad;
  pointer-events: none;
}
.e-opportunity__arrow-straight { display: none; }
.e-opportunity__label {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px; color: var(--s-ink-3);
}
.e-opportunity__label > span { color: #a34162; }
.e-opportunity__step .s-heading-small { max-width: 21ch; text-wrap: balance; }
.e-opportunity__step .s-text { max-width: 34ch; margin-top: 16px; }

@media (max-width: 900px) {
  .e-opportunity__intro { grid-template-columns: 1fr; gap: 24px; }
  .e-opportunity__intro .s-lead { max-width: 48ch; }
  .e-opportunity__steps { --e-opportunity-gap: 28px; }
}
@media (max-width: 760px) {
  .e-opportunity { padding-block: 64px 80px; }
  .e-opportunity__intro { gap: 20px; }
  .e-opportunity__intro .s-lead { display: none; }
  .e-opportunity__journey { margin-top: 52px; }
  .e-opportunity__steps {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 80px;
    max-width: 480px;
  }
  .e-opportunity__step,
  .e-opportunity__step:nth-child(2),
  .e-opportunity__step:nth-child(3) {
    padding: 0;
    margin: 0;
  }
  .e-opportunity__heading { position: static; }
  .e-opportunity__arrow {
    display: block;
    width: 32px;
    height: 32px;
    top: auto;
    right: auto;
    bottom: -56px;
    left: 0;
    transform: none;
  }
  .e-opportunity__arrow-curve { display: none; }
  .e-opportunity__arrow-straight { display: block; }
  .e-opportunity__label { gap: 14px; margin-bottom: 18px; }
  .e-opportunity__step .s-heading-small { max-width: none; text-wrap: pretty; }
  .e-opportunity__step .s-text { max-width: 36ch; margin-top: 16px; line-height: 1.7; }
}

.e-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 48px);
}

.e-steps li {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.e-steps .s-text { font-size: var(--s-fs-ui); line-height: 1.55; }

/* Etenemisviiva päättää kunkin vaiheen tekstin. Yhteinen alareuna pitää
   viivat samalla tasolla, vaikka tekstien pituudet vaihtelevat. */
.e-steps li::after {
  content: "";
  display: block;
  height: 2px;
  flex-shrink: 0;
  margin-top: auto;
  background: linear-gradient(90deg, var(--s-accent) var(--e-p, 33%), var(--s-rule) var(--e-p, 33%));
}

.e-steps .s-text { margin-bottom: var(--s-5); }

.e-steps li:nth-child(2) { --e-p: 66%; }
.e-steps li:nth-child(3) { --e-p: 100%; }
.e-steps__num { margin-bottom: var(--s-2); }

@media (max-width: 800px) {
  .e-steps { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .e-steps li { gap: 16px; }
  .e-steps__num { margin-bottom: 0; }
  .e-steps .s-text { margin-bottom: 8px; line-height: 1.65; }
}

/* ─── Palvelut ────────────────────────────────────────────────────────────*/
.e-services { padding-top: 0; }
