/* Julkinen etusivu. Omat värit ja typografia eivät muuta hallintaa tai widgetiä. */
#view-login {
  --home-paper: #f8f7f3;
  --home-ink: #172f43;
  --home-blue: #234bc1;
  --home-muted: #586774;
  --home-line: #d9deda;
  color: var(--home-ink);
  background: var(--home-paper);
  font-family: 'Manrope', sans-serif;
  line-height: 1.6;
}
#view-login *, #view-login *::before, #view-login *::after { box-sizing: border-box; }
#view-login :is(a, button, summary):focus-visible { outline: 3px solid var(--home-blue); outline-offset: 5px; }
.landing-shell { padding: 28px 5vw 0; }
.landing-inner, .how-section, .pricing-inner, .site-footer-inner { max-width: 1280px; margin-inline: auto; }
.landing-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; gap: 64px; padding: 64px 0 48px; }
.landing-intro { padding-top: 48px; }
.landing-title { font-size: clamp(42px, 5.1vw, 74px); font-weight: 600; line-height: 1.08; letter-spacing: -.06em; margin: 0 0 30px; max-width: 660px; }
.landing-copy { font-size: 18px; line-height: 1.65; max-width: 480px; margin: 0 0 32px; color: var(--home-muted); }
.landing-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; }
.landing-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 14px 24px; border-radius: 6px; background: var(--home-blue); color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; transition: background .16s; }
.landing-cta:hover { background: #193b9f; }
.landing-start { margin: 0 0 14px; max-width: 540px; }
.landing-start-label { display: block; font-size: 13px; font-weight: 700; color: var(--home-ink); margin: 0 0 8px; }
.landing-start-row { display: flex; gap: 10px; flex-wrap: wrap; }
.landing-start-input { flex: 1 1 220px; min-height: 54px; padding: 0 16px; border: 1px solid #b9c2c9; border-radius: 6px; background: #fff; color: var(--home-ink); font: 16px 'Manrope', sans-serif; }
.landing-start .landing-cta { border: 0; cursor: pointer; font-family: inherit; }
.landing-secondary { display: inline-flex; align-items: center; min-height: 44px; color: var(--home-ink); font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: #a8b2b8; }
.landing-secondary:hover { text-decoration-color: currentColor; }
.landing-notes { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; font-size: 12px; color: var(--home-muted); }
.conversation-stage { padding: 24px; border-radius: 12px; background: #e2e9ef; }
.landing-chat { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 18px 36px -20px #223a5066; }
.channel-strip { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 16px 30px; padding: 27px 0; border-top: 1px solid var(--home-line); }
.channel-strip p { margin: 0; color: var(--home-muted); font-size: 12px; }
.channel-strip ul { display: flex; flex-wrap: wrap; gap: 12px 34px; list-style: none; padding: 0; margin: 0; font-size: 14px; font-weight: 700; }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 52px; }
.section-heading h2, .how-intro h2, .pricing-title { font-size: clamp(32px, 3.5vw, 48px); font-weight: 500; line-height: 1.16; letter-spacing: -.045em; margin: 0; }

.how-section { display: grid; grid-template-columns: 1fr 1fr; gap: 90px; padding: 32px 5vw 56px; }
.how-steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.how-steps li { counter-increment: step; position: relative; padding: 0 0 25px 50px; }
.how-steps li + li { padding-top: 25px; border-top: 1px solid var(--home-line); }
.how-steps li::before { content: counter(step); position: absolute; left: 0; width: 28px; height: 28px; border: 1px solid #acbac4; border-radius: 50%; display: grid; place-items: center; font-size: 12px; }
.how-steps h3 { font-size: 17px; margin: 0 0 8px; font-weight: 700; }
.how-steps p { font-size: 14px; color: var(--home-muted); margin: 0; }
/* Hintatasot ovat rinnakkain vertailtavina, puhelimessa allekkain. */
.landing-price { margin: 0 0 12px; font-size: 15px; color: var(--home-muted); }
.landing-price strong { color: var(--home-ink); }
.landing-price a { display: inline-flex; align-items: center; min-height: 44px; margin-left: 8px; color: var(--home-ink); text-underline-offset: 4px; }
.pricing-strip { background: #e9eef0; padding: 72px 5vw; scroll-margin-top: 24px; }
.pricing-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; }
.pricing-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--home-muted); margin: 0 0 16px; }
.pricing-sub { font-size: 15px; color: var(--home-muted); margin: 0; line-height: 1.75; max-width: 340px; }
.pricing-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; margin-top: 40px; }
.pricing-plan { min-width: 0; border-top: 1px solid #ccd5d8; padding-top: 24px; }
.pricing-plan h3 { font-size: 24px; font-weight: 600; margin: 0 0 8px; letter-spacing: -.03em; }
.pricing-description { color: var(--home-muted); font-size: 15px; margin: 0; max-width: 360px; }
.pricing-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 14px; margin: 28px 0 20px; }
.pricing-amount { font-size: clamp(64px, 7vw, 96px); font-weight: 600; line-height: 1; letter-spacing: -.065em; }
.pricing-period { font-size: 18px; color: var(--home-muted); white-space: nowrap; }
.pricing-volume { font-size: 18px; font-weight: 600; margin: 0 0 20px; }
.pricing-features { list-style: none; padding: 0; margin: 0; font-size: 15px; color: var(--home-muted); }
.pricing-features li { padding: 9px 0; border-top: 1px solid #ccd5d8; }
.pricing-shared { margin: 28px 0; font-size: 14px; color: var(--home-muted); }
.pricing-trial-info { border-top: 1px solid #ccd5d8; padding-top: 24px; }
.pricing-trial-info h3 { font-size: 20px; font-weight: 600; margin: 0 0 8px; }
.pricing-trial-info p { max-width: 760px; font-size: 14px; color: var(--home-muted); margin: 0; }
.pricing-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 26px; margin-top: 34px; }
.pricing-note { font-size: 13px; color: var(--home-muted); margin: 0; }
.pricing-note a { color: var(--home-ink); text-underline-offset: 3px; }
.site-footer { padding: 28px 5vw; }
.site-footer-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px; font-size: 12px; color: var(--home-muted); }
.site-footer-inner a { display: inline-flex; align-items: center; min-height: 44px; color: var(--home-muted); text-decoration: none; }
.site-footer-inner a:hover { text-decoration: underline; }
.footer-sep { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .landing-hero { animation: home-enter .55s ease-out both; }
  @keyframes home-enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
}
@media (max-width: 1024px) {
  .landing-hero { gap: 32px; padding-top: 60px; }
  .conversation-stage { padding: 20px; }
  .how-section { gap: 48px; }
}
@media (max-width: 768px) {
  .landing-hero { grid-template-columns: minmax(0, 1fr); gap: 42px; padding: 48px 0 36px; }
  .landing-intro { max-width: 560px; padding-top: 0; }
  .landing-title { font-size: clamp(42px, 8vw, 60px); }
  .landing-copy { font-size: 17px; }
  .conversation-stage { width: 100%; max-width: 540px; justify-self: center; padding: 24px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 24px; margin-bottom: 32px; }

  .how-section { grid-template-columns: 1fr; gap: 36px; }
  .how-section { padding-block: 24px 60px; }
  .pricing-strip { padding-block: 56px; }
  .pricing-head { flex-direction: column; align-items: flex-start; gap: 20px; }
  .pricing-plans { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .landing-shell { padding-top: 20px; }
  .landing-title { font-size: 42px; overflow-wrap: break-word; }
  .landing-copy { font-size: 16px; }
  .landing-actions { gap: 16px; }
  .landing-cta { padding-inline: 20px; }
  .conversation-stage { padding: 14px; }
  .channel-strip ul { gap: 12px 24px; font-size: 13px; }
  .pricing-actions { gap: 16px; }
  .site-footer-inner { gap: 4px 18px; }
  .site-footer-inner > span:first-child { width: 100%; }
}

/* Saman widgetin keskustelu on etusivulla osa sivua, ei toinen ponnahdus. */
.demo-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.demo-heading h2 { margin: 0; font-size: 30px; line-height: 1.15; font-weight: 600; letter-spacing: -.045em; }
.demo-heading p { font-size: 13px; color: var(--home-muted); margin: 8px 0 0; }
.demo-character { width: 104px; height: 104px; object-fit: contain; margin-block: -18px; flex-shrink: 0; }
.demo-questions { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 16px; }
.demo-questions button { min-height: 44px; padding: 8px 12px; border: 1px solid #bdcbd8; border-radius: 6px; background: #f8fafc; color: var(--home-ink); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.demo-questions button:hover:not(:disabled) { background: #fff; border-color: var(--home-blue); }
.demo-questions button:disabled { opacity: .55; cursor: default; }
.demo-disclosure { margin: 12px 0 0; font-size: 12px; color: var(--home-muted); }
.demo-disclosure a { color: inherit; text-underline-offset: 3px; }
#demo-state { padding: 20px; font-size: 13px; }
#homepage-demo #hb-widget { --hb-accent: #234bc1 !important; --hb-font: 'Manrope', sans-serif !important; --hb-radius: 10px !important; }
#homepage-demo #hb-widget #hb-panel { height: 340px; }
#homepage-demo #hb-input { min-width: 0; font-size: 16px; }
#homepage-demo #hb-widget #hb-clear { min-width: 44px; min-height: 44px; }
/* Käyttötapaukset: linkit omille sivuilleen, kaksi saraketta työpöydällä. */
.use-cases { max-width: 1280px; padding: 48px 5vw 16px; margin: 0 auto; }
.use-cases .section-heading { margin-bottom: 26px; }
.use-case-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 40px; }
.use-case-links a { display: block; height: 100%; padding: 20px 0; border-top: 1px solid var(--home-line); color: var(--home-ink); text-decoration: none; }
.use-case-links strong { display: block; font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.use-case-links span { display: block; font-size: 14px; line-height: 1.6; color: var(--home-muted); }
.use-case-links a:hover strong { color: var(--home-blue); }
@media (max-width: 900px) { .use-case-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .use-case-links { grid-template-columns: 1fr; } .use-cases .section-heading { flex-direction: column; align-items: flex-start; gap: 12px; } }
.product-preview { max-width: 1280px; padding: 40px 5vw 56px; margin: 0 auto; }
.product-preview figure { margin: 0; padding: 20px; background: #e2e9ef; border-radius: 12px; }
.product-preview img { display: block; width: 100%; height: auto; border: 1px solid #d1dae2; border-radius: 6px; }
.product-preview figcaption { margin-top: 12px; font-size: 12px; color: var(--home-muted); }
@media (max-width: 480px) {
  .demo-heading h2 { font-size: 26px; }
  .demo-heading p { font-size: 12px; }
  .demo-character { width: 84px; height: 84px; margin-block: -16px; }
  .demo-questions button { font-size: 12px; padding-inline: 10px; }
  .product-preview figure { padding: 10px; }
}

.product-preview .section-heading { margin-bottom: 26px; }
.product-preview details { border-top: 1px solid var(--home-line); }
.product-preview summary { padding: 20px 0; min-height: 44px; font-size: 16px; font-weight: 600; cursor: pointer; }
.product-preview details[open] { padding-bottom: 20px; }
.product-preview a:focus-visible { display: block; }
.mascot-launcher { position: fixed; right: max(8px, env(safe-area-inset-right)); bottom: max(4px, env(safe-area-inset-bottom)); z-index: 9998; }
.service-mascot { position: relative; display: block; width: 190px; height: 150px; padding: 0; border: 0; background: transparent; overflow: hidden; cursor: pointer; }
.service-mascot:disabled { cursor: default; opacity: 1; }
.service-mascot:focus-visible, #mascot-motion:focus-visible { outline: 2px solid #234bc1; outline-offset: 2px; border-radius: 12px; }
.service-mascot img { display: block; width: 140px; height: 140px; object-fit: contain; margin: 0 auto; }
.service-mascot canvas { display: block; width: 100%; height: 100%; }
.service-mascot:not([data-mascot-state="fallback"]) img { display: none; }
/* Pysäytin näkyy niin kauan kuin liike jatkuu. Tervehdys kestää kahdeksan
   sekuntia, ja WCAG 2.2.2 vaatii yli viiden sekunnin liikkeelle pysäytyksen
   jonka kävijä löytää — pelkkä :hover ei ole löydettävissä kosketuslaitteella.
   Piilossa se on myös pois klikkauksilta: läpinäkyvä mutta klikattava nappi
   istui demochatin tekstikentän päällä. */
#mascot-motion { position: absolute; right: 150px; bottom: 8px; white-space: nowrap; font: 12px/1.3 inherit; padding: 6px 8px; color: #172f43; background: #f8f7f3; border: 1px solid #d7dee4; border-radius: 6px; cursor: pointer; opacity: 0; visibility: hidden; pointer-events: none; }
.mascot-launcher[data-mascot-motion="playing"] #mascot-motion,
.mascot-launcher:hover #mascot-motion,
.mascot-launcher:focus-within #mascot-motion { opacity: 1; visibility: visible; pointer-events: auto; }
@media(max-width: 640px) { .service-mascot { width: 156px; height: 136px; } .service-mascot img { width: 124px; height: 124px; } #mascot-motion { right: 130px; } }

/* Kutsunappi väistyy kun etusivun oma demochat on näkyvissä: silloin
   keskustelu on jo auki sivulla, joten kulmassa oleva toinen sisäänkäynti on
   sekä turha että tiellä. Ilman tätä maskotti istui 1280x720:ssä demon
   lähetyspainikkeen päällä, eli sivun konversiopinnan päällä. */
.mascot-launcher[data-mascot-hidden="true"] { opacity: 0; visibility: hidden; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .mascot-launcher { transition: opacity .2s ease; }
}

/* Kutsunappi on kiinteä, joten se leijuu sen päällä mitä ruudun oikeassa
   alakulmassa sattuu olemaan. Sivun omat rivit varaavat sille tilan:
   ilman varausta kanavarivin viimeiset kanavat ja alatunnisteen linkit
   jäävät maskotin alle, eikä niitä voi lukea eikä klikata. Leveys on
   maskotin 190px plus sen oma reunus. Varaus on sidottu napin olemassaoloon:
   tuotannossa Worker poistaa napin (MASCOT_LAUNCHER_ENABLED), eikä tyhjälle
   kulmalle kuulu varata tilaa. */
#view-login:has(.mascot-launcher) { --mascot-safe: 210px; }
@media (min-width: 769px) {
  #view-login:has(.mascot-launcher) :is(.channel-strip, .site-footer-inner) { padding-right: var(--mascot-safe); }
}
/* Kapealla ruudulla vaakavaraus söisi rivin kokonaan, joten alatunniste
   väistää alaspäin maskotin korkeuden verran. */
@media (max-width: 768px) {
  #view-login:has(.mascot-launcher) .site-footer { padding-bottom: 150px; }
}

#hb-widget.hb-docked { --hb-accent: #234bc1 !important; --hb-font: 'Manrope', sans-serif !important; --hb-radius: 10px !important; }

/* Käyttäjän toimittama asiakaskokemus heti aloituksen ja demon jälkeen. */
#view-login .customer-story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 48px; padding: 40px 0; border-top: 1px solid var(--home-line); }
#view-login .customer-story-label { margin: 0 0 8px; color: var(--home-muted); font-size: 13px; font-weight: 600; }
#view-login .customer-story h2 { margin: 0 0 16px; font-size: 32px; line-height: 1.2; font-weight: 600; }
#view-login .customer-story-intro > p:last-child { margin: 0; color: var(--home-muted); font-size: 15px; line-height: 1.75; }
#view-login .customer-story-quote { margin: 0; }
#view-login .customer-story blockquote { margin: 0; }
#view-login .customer-story blockquote p { margin: 0; font-size: 18px; line-height: 1.8; }
#view-login .customer-story figcaption { display: grid; gap: 4px; margin-top: 20px; font-size: 14px; }
#view-login .customer-story figcaption span { color: var(--home-muted); }
#view-login .customer-story a { color: var(--home-blue); text-underline-offset: 3px; }
@media (max-width: 700px) {
  #view-login .customer-story { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 32px; }
  #view-login .customer-story blockquote p { font-size: 16px; }
}

#view-login .customer-story-logo { display: block; width: 190px; max-width: 100%; height: auto; }
