/* ─── 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.96) 0%, rgba(255, 255, 255, 0.78) 34%, rgba(255, 255, 255, 0.2) 68%, transparent 90%),
      radial-gradient(circle, rgba(255, 166, 196, 0.32) 1.1px, transparent 1.3px),
      linear-gradient(180deg, #fff 0%, #fff 50%, rgba(255, 166, 196, 0.14) 70%, rgba(255, 166, 196, 0.28) 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); }

/* 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%);
  translate: -12px 0;
  color: #d991ad;
  pointer-events: none;
}
.e-opportunity__arrow-straight { display: none; }
.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; }
}
/* Kortin merkit ja nuolinapit kuuluvat vain mobiilin karuselliin. */
.e-opportunity__icon, .e-opportunity__nav { display: none; }

/* Mobiilissa vaiheet ovat sama vaakakaruselli kuin verkkosivusivun
   peruste-laatat: seuraava kortti pilkistää reunasta ja nuolinapit vierittävät
   kortin kerrallaan. Kortit etenevät valkoisesta harmaaseen ja mustaan, joten
   osio erottuu herosta ja palveluista ilman erottimia. */
@media (max-width: 760px) {
  .e-opportunity { padding-block: 64px 80px; }
  .e-opportunity__intro { gap: 12px; }
  .e-opportunity__journey { margin-top: 32px; }
  .e-opportunity__steps {
    --e-bleed: var(--s-gutter);
    display: flex;
    gap: 12px;
    max-width: none;
    margin-inline: calc(var(--e-bleed) * -1);
    padding: 4px var(--e-bleed) 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--e-bleed);
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .e-opportunity__steps::-webkit-scrollbar { display: none; }
  .e-opportunity__step,
  .e-opportunity__step:nth-child(2),
  .e-opportunity__step:nth-child(3) {
    flex: 0 0 86%;
    display: flex;
    flex-direction: column;
    min-height: 400px;
    margin: 0;
    padding: 28px;
    border-radius: var(--s-radius-xl);
    scroll-snap-align: start;
  }
  .e-opportunity__step:nth-child(1) { background: #fff; box-shadow: inset 0 0 0 1px #ececef; }
  .e-opportunity__step:nth-child(2) { background: #f6f6f7; }
  .e-opportunity__step:nth-child(3) { background: var(--s-black-2); }
  .e-opportunity__icon { display: grid; margin-bottom: var(--s-6); }
  .e-opportunity__step:nth-child(2) .e-opportunity__icon { background: linear-gradient(180deg, #fcfcfd, #f2f2f4); }
  .e-opportunity__step:nth-child(3) .e-opportunity__icon { border-color: rgba(255, 255, 255, .1); background: linear-gradient(180deg, #34343b, #222227); box-shadow: none; }
  .e-opportunity__heading { position: static; }
  .e-opportunity__arrow { display: none; }
  .s-page.s-page .e-opportunity__step .s-heading-small { max-width: none; font-size: 22px; line-height: 28px; text-wrap: balance; }
  .s-page.s-page .e-opportunity__step .s-text { max-width: none; margin-top: 12px; font-size: 16px; line-height: 24px; color: #4a4a4a; }
  .s-page.s-page .e-opportunity__step:nth-child(3) .s-heading-small { color: #fff; }
  .s-page.s-page .e-opportunity__step:nth-child(3) .s-text { color: #b4b4bc; }
  .e-opportunity__nav { display: flex; gap: 12px; margin-top: var(--s-5); }
  .e-opportunity__arrow-btn {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #4a4a4a;
    color: #fff;
    transition: background-color var(--s-dur) var(--s-ease), opacity var(--s-dur) var(--s-ease);
  }
  .e-opportunity__arrow-btn svg { width: 22px; height: 22px; }
  .e-opportunity__arrow-btn:hover { background: #323232; }
  .e-opportunity__arrow-btn:disabled { opacity: .3; cursor: default; }
}

.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 aloittaa kunkin vaiheen kaikissa näyttöko’oissa. */
.e-steps li::before {
  content: "";
  display: block;
  height: 2px;
  flex-shrink: 0;
  margin-bottom: var(--s-5);
  background: linear-gradient(90deg, var(--s-accent) var(--e-p, 33%), var(--s-rule) var(--e-p, 33%));
}

.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 li::before { margin-bottom: 8px; }
  .e-steps .s-text { line-height: 1.65; }
}

/* ─── Palvelut ────────────────────────────────────────────────────────────*/
.e-services { padding-top: 0; }
.e-services .s-head { margin-bottom: clamp(24px, 3vw, 40px); }
/* Mobiilissa ingressi piilotetaan, jolloin otsikko on suoraan korttien yllä.
   Väli on selvästi korttien välistä 20px:ä suurempi, jotta otsikko luetaan
   koko ryhmän otsikoksi eikä ensimmäisen kortin osaksi. */
@media (max-width: 640px) {
  .e-services .s-head .s-lead { display: none; }
  .e-services .s-head { margin-bottom: var(--s-6); }
}

/* Palvelukorttien kuvat: yhden taustapisteen välin (14px leveydellä 399px
   = 3.5cqw) matalammat. Verkkosivun ikkuna nousee samalle korkeudelle kuin
   hakukenttä; ajanvaraus ja haku pysyvät paikallaan ja rajautuvat alhaalta;
   pöytä ja brändi nousevat saman verran, jolloin yläreunan tyhjä tila kapenee. */
.s-home .s-card__media { aspect-ratio: 100 / 59; }
.s-home .c-web__page { top: 6.8cqw; }
.s-home .c-cursor { top: 48.8cqw; }
.s-home .c-web__h { font-size: 6.2cqw; }
.s-home .v-search { align-self: start; margin-top: 10.6cqw; }
.s-home .c-table__top { top: 11.5cqw; }
.s-home .c-table__seats { top: 37cqw; }
.s-home .c-brand__sw { top: 5.5cqw; }
