/* design-v3: lämpimämpi ilme, kevyet animaatiot, parempi kontrasti.
   Ladataan viimeisenä. Ei kirjastoja, ei fontteja. Liike vain transform/opacity,
   ja kaikki liike pois, jos käyttäjä on pyytänyt vähemmän liikettä. */

:root{
  --muted:#5d625a;            /* AA-kontrasti kaikilla taustoilla (>=4.9:1) */
  --cream-2:#faf8f3;
  --r:8px;
  --ease:cubic-bezier(.2,.7,.2,1);
  --shadow-s:0 1px 2px rgba(41,45,40,.06),0 6px 18px rgba(41,45,40,.07);
  --shadow-m:0 2px 6px rgba(41,45,40,.06),0 18px 40px rgba(41,45,40,.14);
}

html{scrollbar-gutter:stable}
html body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
html body h1,html body h2,html body h3{text-wrap:balance}
html body p,html body li{text-wrap:pretty}
::selection{background:#3154bd;color:#fff}

/* ---------- Otsikko ja navigaatio ---------- */
html body .site-header{box-shadow:0 1px 0 rgba(41,45,40,.05),0 10px 28px -22px rgba(41,45,40,.5)}
html body .site-header nav a{position:relative}
html body .site-header nav a::after{content:'';position:absolute;left:0;right:0;bottom:4px;height:1px;background:currentColor;transform:scaleX(0);transform-origin:left;transition:transform .3s var(--ease)}
html body .site-header nav a:hover::after,html body .site-header nav a:focus-visible::after{transform:scaleX(1)}

/* ---------- Painikkeet ja linkit ---------- */
html body .button{border-radius:var(--r);box-shadow:0 1px 2px rgba(41,45,40,.12),0 8px 18px -10px rgba(49,84,189,.55);transition:background .2s,color .2s,transform .25s var(--ease),box-shadow .25s var(--ease)}
html body .button:hover{transform:translateY(-2px);box-shadow:0 2px 4px rgba(41,45,40,.12),0 14px 24px -10px rgba(49,84,189,.6)}
html body .button:active{transform:translateY(0);box-shadow:0 1px 2px rgba(41,45,40,.12)}
html body .button.light{box-shadow:0 1px 2px rgba(0,0,0,.15),0 10px 22px -12px rgba(0,0,0,.5)}
html body .button>span,html body .text-link>span,html body .hero-secondary>span{display:inline-block;transition:transform .25s var(--ease)}
html body .button:hover>span,html body .text-link:hover>span,html body .hero-secondary:hover>span{transform:translateX(3px)}
html body .text-link{transition:color .2s,border-color .2s}
html body .text-link:hover{border-color:var(--blue)}
html body .text-link:hover,html body .channel-links a:hover{color:var(--blue)}

/* ---------- Pienet yksityiskohdat ---------- */
html body .eyebrow::before{content:'';display:inline-block;width:22px;height:1px;background:currentColor;opacity:.55;vertical-align:middle;margin-right:12px}
html body .trust-bar{background:linear-gradient(180deg,#ebe9df,#e4e3d8)}
html body .muted,html body .section-top>p,html body .product-info p,html body .reason-list p,html body .faq details p,html body .product-footnote,html body .clips-intro>p{color:var(--muted)}
html body .google-review-score>strong>span,html body .google-review-updated,html body .google-review-card-top{color:var(--muted)}

/* ---------- Tuotekortit ---------- */
html body .product-card{background:var(--cream-2);border:1px solid rgba(41,45,40,.08);border-radius:var(--r);overflow:hidden;box-shadow:var(--shadow-s);display:flex;flex-direction:column}
html body .product-visual{border-radius:0}
html body .product-info{padding:24px 26px 0}
html body .product-bottom{padding:0 26px 26px;margin-top:auto;padding-top:22px}
html body .product-visual>img{transition:transform .6s var(--ease)}
html body .pdf-sheet{transition:transform .6s var(--ease)}
html body .product-visual:hover .pdf-sheet{transform:rotate(6deg) translateY(-5px)}

/* ---------- Syyt, sisältö, UKK ---------- */
html body .reason-list article>span{color:var(--blue);font-weight:600;letter-spacing:.08em}
html body .reason-list article{transition:transform .35s var(--ease)}
html body .reason-list article:hover{transform:translateY(-3px)}
html body .inside-image{border-radius:var(--r);box-shadow:var(--shadow-m)}
html body .inside-tabs>button{transition:color .2s,background .3s,padding .3s var(--ease),border-color .3s}
html body .inside-tabs>button:hover{color:var(--ink)}
html body .inside-tabs>button[aria-selected=true]{border-color:var(--blue);background:linear-gradient(90deg,rgba(49,84,189,.09),transparent 80%);padding-left:14px}
html body .faq summary{min-height:44px;display:flex;align-items:center;transition:color .2s}
html body .faq summary:hover{color:var(--blue)}
html body .faq details[open]>p{animation:v3-fade .35s var(--ease)}
html body .closing{background:linear-gradient(180deg,#f3f0e8,#e9e6da)}

/* ---------- Arvosteluyhteenveto ---------- */
html body .live-google-panel{border-radius:var(--r);box-shadow:var(--shadow-s);background:var(--cream-2)}
html body .live-review-summary strong{font-family:var(--serif);font-weight:400;letter-spacing:-.04em}
html body .google-live-panel{border-radius:var(--r)}

/* ---------- Tuotesivu (selaimessa piirrettävä) ---------- */
html body .gallery-main{border-radius:var(--r);overflow:hidden;box-shadow:var(--shadow-m)}
html body .gallery-thumbs button{border-radius:6px;transition:transform .25s var(--ease),box-shadow .25s}
html body .gallery-thumbs button:hover{transform:translateY(-2px);box-shadow:var(--shadow-s)}
html body .variant-options a{transition:background .2s,color .2s,transform .2s}
html body .variant-options a:hover{transform:translateY(-1px)}
html body .product-related{border-radius:var(--r);overflow:hidden}
html body .pdf-benefit{border-radius:var(--r)}

/* ---------- Dialogit ---------- */
html body dialog{border-radius:var(--r)}
html body .cart-dialog,html body .menu-dialog{border-radius:var(--r) 0 0 var(--r)}

/* ---------- Animaatiot (vain jos liike sallittu) ---------- */
@keyframes v3-fade{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
@keyframes v3-rise{from{opacity:0;transform:translate3d(0,18px,0)}to{opacity:1;transform:none}}
@keyframes v3-settle{from{scale:1.07}to{scale:1}}
@keyframes v3-drift{to{translate:0 56px}}
@keyframes v3-slide{from{transform:translate3d(36px,0,0);opacity:.6}to{transform:none;opacity:1}}
@keyframes v3-pop{from{transform:scale(.97);opacity:0}to{transform:none;opacity:1}}

@media (prefers-reduced-motion:no-preference){
  /* Kansikuva laskeutuu paikalleen (vain transform, ei viivästä LCP:tä) */
  html body .hero-background{animation:v3-settle 1.8s var(--ease) both;will-change:scale}
  html body .hero-bottom{animation:v3-rise .9s var(--ease) .15s both}
  @supports (animation-timeline:scroll()){
    /* Kuva liikkuu vierittäessä hitaammin kuin sivu. Kuva ulottuu 60 px yläreunan yli, jotta aukkoa ei synny */
    html body .hero-background{top:-60px;height:calc(100% + 60px);animation:v3-settle 1.8s var(--ease) both,v3-drift linear both;animation-timeline:auto,scroll(root);animation-range:normal,0 760px}
  }
  /* Sisältö nousee esiin vierittäessä. data-reveal on HTML:ssä, .rv asetetaan vasta kun JS on käytössä.
     reveal.js poistaa attribuutin heti kun siirtymä on valmis, jolloin hover-tyylit toimivat normaalisti. */
  html.rv [data-reveal]:not(.in){opacity:0;transform:translate3d(0,22px,0)}
  html.rv [data-reveal].in{transition:opacity .7s var(--ease) calc(var(--d,0)*90ms),transform .7s var(--ease) calc(var(--d,0)*90ms)}
  html body .product-card{transition:transform .35s var(--ease),box-shadow .35s var(--ease)}
  html body .product-card:hover{transform:translateY(-5px);box-shadow:var(--shadow-m)}
  html body dialog[open]{animation:v3-pop .25s var(--ease)}
  html body .cart-dialog[open],html body .menu-dialog[open]{animation:v3-slide .32s var(--ease)}
  html body dialog[open]::backdrop{animation:v3-fade .3s ease}
}
@media (prefers-reduced-motion:reduce){
  html body .button,html body .product-card,html body .reason-list article,html body .gallery-thumbs button{transition:none}
  html body .button:hover,html body .reason-list article:hover,html body .gallery-thumbs button:hover{transform:none}
}
@media print{html.rv [data-reveal]{opacity:1!important;transform:none!important}}

/* ---------- Mobiili ---------- */
@media (max-width:700px){
  html body .product-info{padding:20px 20px 0}
  html body .product-bottom{padding:0 20px 22px;padding-top:18px}
  /* Painike ei saa katketa kahdelle riville: se siirtyy tarvittaessa omalle rivilleen */
  html body #tuotteet .product-bottom .button{white-space:nowrap}
  /* Vanha virhe: rivinvaihdon piilotus liimasi sanat yhteen ("kotiin.Halutessasi") */
  html body #tuotteet .section-top>p br{display:revert}
  html body .eyebrow::before{width:16px;margin-right:9px}
  html body .inside-image{box-shadow:var(--shadow-s)}
}
