/*
 * src/site/assets/site.css — julkisen etusivun tyylit (Kortti 34, suunnitelma
 * docs/package-prep/KORTTI_34_ETUSIVU_SUUNNITELMA.md §2.2). Käsin kirjoitettu:
 * arvot (värit, koot, välit, katkaisukohta 768 px) ovat Lovablen sivun
 * tokeneista ja luokista 26.10.2026, mutta käännettyä CSS:ää ei kopioitu.
 * Fontit omalta palvelimelta (P2): @fontsource-variable 5.3.0, OFL 1.1
 * (fonts/OFL-*.txt); tiedostot ovat tavulleen samat kuin Lovablen sivulla.
 */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 600 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/site/fonts/bricolage-grotesque-latin-opsz-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 600 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/site/fonts/bricolage-grotesque-latin-ext-opsz-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/site/fonts/dm-sans-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/site/fonts/dm-sans-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --background: 60 20% 97%;
  --foreground: 141 18% 15%;
  --muted: 50 18% 93%;
  --muted-foreground: 144 8% 39%;
  --primary: 145 46% 34%;
  --accent: 20 79% 57%;
  --accent-foreground: 0 0% 100%;
  --border: 50 10% 88%;
  --radius: 1rem;
  --brand: 147 43% 21%;
  --brand-foreground: 40 45% 94%;
  --cream: 40 45% 94%;
  --panel: 0 0% 100%;
  --bubble: 40 45% 94%;
  --dot-inactive: 120 6% 80%;
  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* Perusta */
*, ::before, ::after { box-sizing: border-box; border: 0 solid hsl(var(--border)); }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; tab-size: 4; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}
h1, h2, h3 { margin: 0; font-size: inherit; font-weight: inherit; font-family: var(--font-display); font-style: normal; }
p { margin: 0; }
a { color: inherit; text-decoration: inherit; }
svg { display: block; vertical-align: middle; }
button { font: inherit; color: inherit; margin: 0; padding: 0; background: transparent; cursor: pointer; }
/* `hidden`-attribuutti voittaa luokkien display-arvot (Codex K34-ETUSIVU-CX-01:
   pisteiden display:flex kumosi piilotuksen, kun liikettä oli vähennetty). */
[hidden] { display: none !important; }

.page { min-height: 100vh; font-family: var(--font-body); background-color: hsl(var(--panel)); }
.container { width: 100%; margin-inline: auto; padding-inline: 1.5rem; }
.band--brand { background-color: hsl(var(--brand)); }
.band--cream { background-color: hsl(var(--cream)); }
.band--panel { background-color: hsl(var(--panel)); }

/* Yläpalkki */
.header { display: flex; align-items: center; justify-content: space-between; padding-block: 1.5rem; }
.brand { display: flex; align-items: center; gap: .5rem; }
.brand__logo { color: hsl(var(--brand-foreground)); flex-shrink: 0; }
.brand__name { font-family: var(--font-display); font-size: 1.5rem; line-height: 2rem; font-weight: 700; letter-spacing: -.02em; color: hsl(var(--brand-foreground)); }
.brand__beta {
  font-family: var(--font-body); font-size: 10px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: hsl(var(--brand-foreground) / .8); border: 1px solid hsl(var(--brand-foreground) / .4); border-radius: 9999px; padding: .125rem .5rem;
}
.lang { display: flex; align-items: center; gap: .25rem; font-family: var(--font-body); font-size: .875rem; line-height: 1.25rem; letter-spacing: .025em; }
.lang__item { padding: .125rem .375rem; border-radius: .25rem; color: hsl(var(--brand-foreground) / .6); transition: color .15s var(--ease); }
.lang__item:hover { color: hsl(var(--brand-foreground)); }
.lang__item.is-current { color: hsl(var(--brand-foreground)); font-weight: 600; }
.lang__sep { color: hsl(var(--brand-foreground) / .5); }

/* Hero */
.hero { max-width: 42rem; padding-block: 4rem; text-align: center; }
.hero__headline { margin-bottom: 1rem; font-family: var(--font-display); font-size: 44px; font-weight: 700; line-height: 1.05; letter-spacing: -.02em; color: hsl(var(--brand-foreground)); }
.hero__sub { max-width: 32rem; margin: 0 auto 1.75rem; font-size: 17px; line-height: 1.5; color: hsl(var(--brand-foreground) / .75); }
.btn { display: inline-block; padding: 1rem 2rem; border-radius: 9999px; font-family: var(--font-body); font-size: 17px; font-weight: 500; transition: background-color .15s var(--ease), color .15s var(--ease); }
.btn--accent { background-color: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.btn--accent:hover { background-color: hsl(var(--accent) / .85); }
.btn--brand { background-color: hsl(var(--brand)); color: hsl(var(--brand-foreground)); }
.btn--brand:hover { background-color: hsl(var(--brand) / .9); }
.note { margin-top: .75rem; font-size: 13px; }
.note--on-dark { color: hsl(var(--brand-foreground) / .7); }
.note--on-light { color: hsl(var(--foreground) / .6); }

/* Osiot */
.section { padding-block: 4rem; }

/* Karuselli. Ilman skriptiä diat ovat allekkain; carousel.js lisää
   .is-carousel-luokan, jolloin diat ovat päällekkäin ja vain yksi näkyy. */
.chat { width: 100%; max-width: 420px; margin-inline: auto; }
.chat__title { margin-bottom: 1rem; text-align: center; font-size: 15px; color: hsl(var(--foreground) / .7); }
.chat__panel { display: flex; flex-direction: column; gap: 1.5rem; padding: 1rem; border-radius: 1rem; background-color: hsl(var(--panel)); }
.chat__slide { display: flex; flex-direction: column; gap: .5rem; }
.chat.is-carousel .chat__panel { display: grid; gap: 0; }
/* Paneelin korkeus = korkein dia, joten sivu ei hypi diojen vaihtuessa.
   Lyhyemmän dian kuplat ankkuroidaan alas kuten chat-sovelluksessa: tyhjä
   tila jää keskustelun alkuun eikä viimeisen viestin ja pisteiden väliin. */
.chat.is-carousel .chat__slide { grid-column-start: 1; grid-row-start: 1; justify-content: flex-end; opacity: 0; pointer-events: none; transition: opacity 600ms var(--ease); }
.chat.is-carousel .chat__slide.is-active { opacity: 1; pointer-events: auto; }
.bubble { max-width: 85%; padding: .625rem 1rem; border-radius: 1rem; font-size: 17px; line-height: 1.5; white-space: pre-line; }
.bubble--user { align-self: flex-end; border-bottom-right-radius: calc(var(--radius) - 2px); background-color: hsl(var(--brand)); color: hsl(var(--brand-foreground)); }
.bubble--triber { align-self: flex-start; border-bottom-left-radius: calc(var(--radius) - 2px); background-color: hsl(var(--bubble)); color: hsl(var(--foreground)); }
.bubble strong { font-weight: 700; }
.chat__dots { display: flex; justify-content: center; gap: .5rem; margin-top: 1rem; }
.chat__dots:empty { display: none; }
.chat__dot { width: .5rem; height: .5rem; border-radius: 9999px; background-color: hsl(var(--dot-inactive)); transition: background-color .15s var(--ease); }
.chat__dot:hover { background-color: hsl(var(--brand) / .4); }
.chat__dot.is-active { background-color: hsl(var(--brand)); }

/* Vaiheet */
.steps { display: grid; gap: 2.5rem; max-width: 56rem; margin-inline: auto; }
.step { text-align: center; }
.step__num { display: block; margin-bottom: .75rem; font-family: var(--font-display); font-size: 48px; font-weight: 700; line-height: 1; color: hsl(var(--brand)); }
.step__title { margin-bottom: .5rem; font-family: var(--font-display); font-size: 22px; font-weight: 600; line-height: 1.2; color: hsl(var(--foreground)); }
.step__body { font-size: 17px; line-height: 1.6; color: hsl(var(--muted-foreground)); }

/* Lainaus */
.quote-section { padding-block: 72px; }
.quote { max-width: 48rem; margin-inline: auto; text-align: center; }
.quote__text { font-family: var(--font-display); font-size: 36px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; color: hsl(var(--brand-foreground)); }

/* Loppu-CTA */
.final { text-align: center; }
.final__headline { margin-bottom: .75rem; font-family: var(--font-display); font-size: 28px; font-weight: 600; line-height: 1.15; letter-spacing: -.01em; color: hsl(var(--foreground)); }
.final__sub { max-width: 36rem; margin: 0 auto 2rem; font-size: 17px; color: hsl(var(--foreground) / .7); }

/* Alatunniste */
.footer { padding-block: 2.5rem; background-color: hsl(var(--brand)); }
.footer__row { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: .75rem; font-size: 15px; color: hsl(var(--brand-foreground) / .8); }
.footer__brand { font-family: var(--font-display); font-weight: 700; color: hsl(var(--brand-foreground)); }
.footer__links { display: flex; gap: 1rem; }
.footer__links a, .footer__phone { color: hsl(var(--brand-foreground)); }
.footer__links a:hover, .footer__phone:hover { text-decoration-line: underline; }
.footer__copy { margin-top: 1.5rem; text-align: center; font-size: 13px; color: hsl(var(--brand-foreground) / .7); }

/* 404 */
.notfound { display: flex; min-height: 100vh; align-items: center; justify-content: center; background-color: hsl(var(--muted)); }
.notfound__box { text-align: center; }
.notfound__heading { margin-bottom: 1rem; font-size: 2.25rem; line-height: 2.5rem; font-weight: 700; }
.notfound__text { margin-bottom: 1rem; font-size: 1.25rem; line-height: 1.75rem; color: hsl(var(--muted-foreground)); }
.notfound__link { color: hsl(var(--primary)); text-decoration-line: underline; }
.notfound__link:hover { color: hsl(var(--primary) / .9); }

/* Oikeudelliset tekstisivut (seloste, käyttöehdot): luettava palsta etusivun
   tokeneilla (suunnitelma KORTTI_34_OIKEUDELLISET_SIVUT_TRIBER_LIFE §2.2). */
.legal { max-width: 46rem; padding-block: 3rem 4rem; }
.legal__title { margin-bottom: 1rem; font-size: 2.25rem; line-height: 2.5rem; font-weight: 700; color: hsl(var(--brand)); }
.legal h2 { margin-top: 2.25rem; margin-bottom: .5rem; font-size: 1.25rem; line-height: 1.75rem; font-weight: 700; color: hsl(var(--brand)); scroll-margin-top: 1rem; }
.legal p, .legal ul { margin-top: .75rem; }
.legal ul { padding-left: 1.25rem; }
.legal li + li { margin-top: .375rem; }
.legal a { color: hsl(var(--primary)); text-decoration-line: underline; overflow-wrap: anywhere; }
.legal a:hover { color: hsl(var(--primary) / .9); }
a.brand { color: inherit; }

@media (min-width: 768px) {
  .hero { padding-block: 104px; }
  .hero__headline { font-size: 64px; }
  .hero__sub { font-size: 19px; }
  .section { padding-block: 6rem; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3.5rem; }
  .step { text-align: left; }
  .quote-section { padding-block: 112px; }
  .quote__text { font-size: 56px; }
  .final__headline { font-size: 36px; }
  .footer { padding-block: 3.5rem; }
  .footer__row { flex-direction: row; gap: 1rem; }
}

@media (min-width: 1040px) {
  .container { max-width: 1040px; }
  .hero { max-width: 42rem; }
}
