/* Kalapaikat.net — tyylit
   Suunta: musta pohja, valtava ohut groteski, pastellisävyiset gradienttikortit (40px),
   syvyyskäyrät koristeena. Pastellit ovat korostuksia – eivät koskaan tekstipinnan taustoja. */

/* Hanken Grotesk – itse isännöity (ei Google Fonts -pyyntöjä → ei IP-osoitteen siirtoa) */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(../fonts/hanken-grotesk-latin.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: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(../fonts/hanken-grotesk-latin-ext.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 {
  --bg: #000;
  --surface: #0b0c0f;
  --surface-2: #121419;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.2);
  --text: #fff;
  --text-2: rgba(255, 255, 255, 0.72);
  --text-3: rgba(255, 255, 255, 0.5);

  /* Pastelliaksentit */
  --peach: #fed0ab;
  --peach-hi: #ffe2c7;
  --lilac: #b0ade9;
  --ice: #d7f3f6;
  --mint: #3fe5a4;
  --sky: #68c6f5;
  --mist: #e6dff1;

  /* Sovelluksen oma sininen – vain sovellus-UI:n jäljitelmissä */
  --app-blue: #1d8bff;

  --font: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;

  --display: clamp(2.75rem, 1.2rem + 5.4vw, 5.5rem);
  --display-xl: clamp(3rem, 0.8rem + 7.6vw, 7rem);
  --h2: clamp(2.25rem, 1.2rem + 3.6vw, 4.5rem);
  --card-title: clamp(2rem, 1.1rem + 3vw, 4rem);
  --card-text: clamp(1.25rem, 0.8rem + 1.5vw, 2.25rem);
  --lead: clamp(1.125rem, 1rem + 0.45vw, 1.375rem);

  --r-card: 40px;
  --r-md: 20px;
  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 56px);
  --header-h: 72px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Vähennetty liike: pysäytä kaikki animaatiot ja siirtymät */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Inertiavieritys (Lenis) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
picture { display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

::selection { background: var(--ice); color: #000; }

:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--text); color: #000; padding: 10px 16px; border-radius: 999px;
  text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  transition: background-color .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.site-header .wrap {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand {
  font-size: 1.5rem; font-weight: 500; letter-spacing: -0.03em;
  text-decoration: none; color: var(--ice);
}
.brand span { color: var(--text-3); font-weight: 400; }

.nav { display: flex; align-items: center; gap: 36px; }
.nav a {
  text-decoration: none; font-size: 1rem; color: var(--text);
  position: relative; padding: 6px 0;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.nav a:hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); }

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 22px; border-radius: 999px;
  font: 500 0.9375rem/1 var(--font); text-decoration: none;
  border: 1px solid var(--line-strong); color: var(--text);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.pill:hover { background: var(--text); color: #000; border-color: var(--text); }
.pill--solid { background: var(--text); color: #000; border-color: var(--text); }
.pill--solid:hover { background: var(--ice); border-color: var(--ice); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }

.menu-btn {
  display: none; background: none; border: 1px solid var(--line-strong); color: var(--text);
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
}
.menu-btn svg { width: 20px; height: 20px; }

@media (max-width: 860px) {
  .nav, .site-header .pill { display: none; }
  .menu-btn { display: inline-flex; }
  .site-header.menu-open { background: #000; border-bottom-color: var(--line); }
  .site-header.menu-open .nav {
    display: flex; position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
    flex-direction: column; align-items: flex-start; gap: 4px;
    background: #000; padding: 24px var(--gutter);
  }
  .site-header.menu-open .nav a { font-size: 2.25rem; font-weight: 300; letter-spacing: -0.02em; padding: 8px 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  padding: calc(var(--header-h) + 40px) 0 72px;
  display: flex; align-items: center;
  overflow: clip;
}
.hero .wrap {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center;
  position: relative; z-index: 1;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-2);
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; }

.display {
  font-size: var(--display); font-weight: 300; line-height: 1; letter-spacing: -0.035em;
}
.hero h1 { margin: 0 0 32px; }
.hero .lead { max-width: 34rem; }
.lead { font-size: var(--lead); line-height: 1.5; color: var(--text-2); }

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.store {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 20px 10px 16px; border-radius: 16px;
  border: 1px solid var(--line-strong);
}
.store svg { width: 24px; height: 24px; flex: none; }
.store small { display: block; font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); line-height: 1.2; }
.store b { display: block; font-weight: 600; font-size: 1rem; letter-spacing: 0.04em; line-height: 1.3; }
a.store { text-decoration: none; color: inherit; transition: border-color .2s ease, transform .2s ease; }
a.store:hover { border-color: var(--text-2); transform: translateY(-1px); }
.free { margin-top: 18px; font-size: 0.9375rem; color: var(--text-3); }
.free strong { color: var(--mint); font-weight: 500; }

.hero-visual { position: relative; justify-self: center; width: 100%; max-width: 540px; }
.hero-visual img {
  position: relative; z-index: 1; width: 100%;
  filter: drop-shadow(0 40px 80px rgba(0, 0, 0, 0.8));
}
.hero-visual figcaption {
  position: relative; z-index: 1;
  margin-top: 8px; text-align: center; font-size: 0.875rem; color: var(--text-3);
}

/* Heron sisääntulo: elementit häivytetään näkyviin hitaasti ja porrastetusti.
   Vain kun JS on käytössä (no-js poistetaan <head>issä) ja liike on sallittu. */
/* Huom: alku-opacity 0.01 eikä 0 – täysin läpinäkyvää elementtiä selain ei hyväksy
   LCP-ehdokkaaksi (Lighthouse: NO_LCP), mikä pilaisi Core Web Vitals -mittauksen. */
@keyframes heroIn {
  from { opacity: .01; transform: translateY(28px); filter: blur(8px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes heroFade { from { opacity: 0; } }
@keyframes heroPhone {
  from { opacity: .01; transform: translateY(48px) scale(.96); filter: blur(10px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@media (prefers-reduced-motion: no-preference) {
  html:not(.no-js) .hero .contours   { animation: heroFade 3s ease-out .1s both; }
  html:not(.no-js) .hero h1          { animation: heroIn 1.6s cubic-bezier(.2,.7,.2,1) .25s both; }
  html:not(.no-js) .hero .lead       { animation: heroIn 1.6s cubic-bezier(.2,.7,.2,1) .7s both; }
  html:not(.no-js) .hero-visual      { animation: heroPhone 2s cubic-bezier(.2,.7,.2,1) .95s both; }
  html:not(.no-js) .hero .stores     { animation: heroIn 1.6s cubic-bezier(.2,.7,.2,1) 1.2s both; }
  html:not(.no-js) .hero .free       { animation: heroIn 1.6s cubic-bezier(.2,.7,.2,1) 1.45s both; }
  html:not(.no-js) .site-header .wrap { animation: heroFade 1.8s ease-out 1.6s both; }
}

/* Aksenttiluokat (korvaavat inline-tyylit, jotta CSP ei tarvitse 'unsafe-inline') */
.accent-mint  { --c: var(--mint);  --k: var(--mint); }
.accent-peach { --c: var(--peach); --k: var(--peach); }
.accent-lilac { --c: var(--lilac); --k: var(--lilac); }
.accent-ice   { --c: var(--ice);   --k: var(--ice); }
.accent-sky   { --c: var(--sky);   --k: var(--sky); }
.stack-card:nth-child(2) { --i: 1; }
.stack-card:nth-child(3) { --i: 2; }
.panel.save-demo   { --tint-strong: rgba(255, 226, 199, .22); }
.panel.radius-demo { --tint-strong: rgba(176, 173, 233, .26); }
.radius-demo .legend .dot-lilac { background: var(--lilac); }
.radius-demo .legend .dot-ice   { background: var(--ice); }
.glow--sky  { --g: rgba(104, 198, 245, .22); }
.glow--mint { --g: rgba(63, 229, 164, .16); }
.feature--spaced { margin-top: clamp(72px, 9vw, 140px); }

/* Magneettinen kallistus (main.js) */
.tilt { will-change: transform; transform-origin: 50% 50%; }

/* Syvyyskäyrät – brändin koristekieli */
.contours {
  position: absolute; pointer-events: none; z-index: 0;
  color: var(--lilac);
}
.contours path { fill: none; stroke: currentColor; vector-effect: non-scaling-stroke; }
.hero .contours { width: min(1100px, 130vw); right: -22%; top: 50%; transform: translateY(-50%); opacity: .55; }

.conditions {
  display: flex; flex-wrap: wrap; gap: 0; margin-top: 56px;
  border-top: 1px solid var(--line);
  max-width: 34rem;
}
.conditions div { flex: 1 1 0; min-width: 120px; padding: 18px 20px 0 0; }
.conditions div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.conditions b { display: block; font-size: 1.75rem; font-weight: 300; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.conditions b sup, .conditions b small { font-size: 0.875rem; color: var(--text-3); font-weight: 400; margin-left: 4px; letter-spacing: 0; }
.conditions span { font-size: 0.875rem; color: var(--text-3); }

@media (max-width: 560px) {
  .conditions { display: grid; grid-template-columns: repeat(3, 1fr); }
  .conditions div { min-width: 0; padding-right: 12px; }
  .conditions div + div { padding-left: 14px; }
  .conditions b { font-size: 1.375rem; }
  .phone-shot { width: min(100%, 290px); }
  .hero-visual { max-width: 340px; }
}

@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-visual { max-width: 420px; }
  .hero .contours { right: -50%; top: 70%; }
}

/* ---------- Section intro ---------- */
.section { padding: clamp(96px, 12vw, 180px) 0; position: relative; }
.section-head { max-width: 60rem; margin-bottom: clamp(48px, 7vw, 96px); }
.section-head .eyebrow + .display { margin-top: 24px; }
.section-head .lead { margin-top: 28px; max-width: 40rem; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.center .eyebrow::after { content: ""; width: 24px; height: 1px; background: currentColor; }

/* ---------- Pinoutuvat pilarikortit ---------- */
.stack { display: grid; gap: 32px; }
.stack-card {
  position: sticky;
  top: calc(var(--header-h) + 24px + var(--i, 0) * 28px);
  min-height: min(520px, 72vh);
  border-radius: var(--r-card);
  background-color: #000;
  background-image: linear-gradient(180deg, var(--tint-strong) -20%, var(--tint-soft) 45%, rgba(0,0,0,0) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: grid; grid-template-columns: 1.2fr 0.8fr; align-items: center; gap: 32px;
  padding: clamp(36px, 6vw, 88px) clamp(28px, 7vw, 120px);
  overflow: hidden;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.6);
}
.stack-card h3 {
  font-size: var(--card-title); font-weight: 700; line-height: 1; letter-spacing: -0.03em;
  color: var(--title);
}
.stack-card p {
  margin-top: 28px; font-size: var(--card-text); line-height: 1.12; letter-spacing: -0.015em;
  max-width: 16em;
}
.stack-card .glyph {
  justify-self: end; width: min(100%, 300px); aspect-ratio: 1; color: var(--title);
}
.stack-card .glyph svg { width: 100%; height: 100%; }
.stack-card .num {
  position: absolute; top: 28px; right: 36px;
  font-size: 0.875rem; letter-spacing: 0.12em; color: rgba(255,255,255,.6); font-variant-numeric: tabular-nums;
}

.tint-peach { --tint-strong: rgba(255, 226, 199, 0.46); --tint-soft: rgba(254, 213, 180, 0.12); --title: var(--ice); }
.tint-lilac { --tint-strong: rgba(176, 173, 233, 0.5);  --tint-soft: rgba(176, 173, 233, 0.13); --title: var(--peach); }
.tint-ice   { --tint-strong: rgba(215, 243, 246, 0.42); --tint-soft: rgba(215, 243, 246, 0.1);  --title: var(--mint); }
.tint-sky   { --tint-strong: rgba(104, 198, 245, 0.46); --tint-soft: rgba(104, 198, 245, 0.12); --title: var(--lilac); }
.tint-mist  { --tint-strong: rgba(230, 223, 241, 0.42); --tint-soft: rgba(230, 223, 241, 0.1);  --title: var(--ice); }

@media (max-width: 760px) {
  .stack-card { grid-template-columns: 1fr; min-height: 0; align-content: start; }
  .stack-card .glyph { justify-self: start; width: 96px; order: -1; }
}

/* ---------- Julistus + nauha ---------- */
.statement { text-align: center; }
.statement .display { max-width: 14em; margin: 0 auto; }
.statement .line { display: inline-block; }
.statement .sub {
  margin: 32px auto 0; max-width: 22em;
  font-size: clamp(1.5rem, 1rem + 1.8vw, 2.75rem); line-height: 1.15; letter-spacing: -0.02em; font-weight: 400;
  color: var(--text-2);
}
.marquee {
  margin-top: clamp(64px, 8vw, 112px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex; gap: 16px; width: max-content;
  animation: marquee 48s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; }
.marquee li {
  display: inline-flex; align-items: center; gap: 16px;
  padding: 22px 36px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: clamp(1.25rem, 0.9rem + 1.2vw, 2.25rem); letter-spacing: -0.02em; white-space: nowrap;
}
.marquee li i { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--ice)); flex: none; }
@keyframes marquee { to { transform: translateX(calc(-50% - 8px)); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee ul[aria-hidden="true"] { display: none; }
  .marquee ul { flex-wrap: wrap; justify-content: center; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
}

/* ---------- Ominaisuudet ---------- */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 120px); align-items: center;
  padding: clamp(72px, 9vw, 140px) 0;
  border-top: 1px solid var(--line);
}
.section-head + .feature { border-top: 0; padding-top: 0; }
.feature.flip .feature-copy { order: 2; }
.feature-copy .kicker + h3 { margin-top: 20px; }
.feature-copy .kicker {
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--k, var(--ice));
}
.feature-copy h3 {
  margin-top: 0;
  font-size: var(--h2); font-weight: 300; line-height: 1.02; letter-spacing: -0.035em;
}
.feature-copy p { margin-top: 28px; font-size: var(--lead); line-height: 1.55; color: var(--text-2); max-width: 32rem; }
.feature-copy p + p { margin-top: 16px; }
.feature-copy .note { font-size: 1rem; color: var(--text-3); }
.feature-visual { position: relative; display: flex; justify-content: center; }
.feature-visual figcaption { margin-top: 20px; text-align: center; font-size: 0.9375rem; color: var(--text-3); }
.phone-shot { width: min(100%, 360px); filter: drop-shadow(0 40px 80px rgba(0,0,0,.85)); }
.glow {
  position: absolute; inset: 10% 5%; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, var(--g, rgba(176,173,233,.28)), transparent);
  filter: blur(20px);
}

@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; }
  .feature.flip .feature-copy { order: 0; }
}

/* Paneeli ilman kuvaa (koodilla tehdyt demot) */
.panel {
  position: relative; width: 100%; max-width: 520px;
  border-radius: var(--r-card);
  background-color: var(--surface);
  background-image: linear-gradient(180deg, var(--tint-strong, rgba(255,255,255,.08)) -30%, rgba(0,0,0,0) 70%);
  border: 1px solid var(--line);
  padding: clamp(24px, 4vw, 40px);
  overflow: hidden;
}

/* Tallenna-demo */
.save-demo { text-align: center; }
.save-demo .mini-map {
  position: relative; height: 260px; border-radius: 24px; overflow: hidden;
  background: #0d1a22; border: 1px solid var(--line);
}
.save-demo .mini-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.save-demo .you {
  position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border-radius: 50%; background: var(--app-blue); border: 3px solid #fff;
  box-shadow: 0 0 0 10px rgba(29, 139, 255, .22);
}
.save-demo .mini-map .pin {
  position: absolute; left: 50%; top: 50%; right: auto; bottom: auto;
  width: 72px; height: 72px; margin: -84px 0 0 -36px;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .5));
  opacity: 0; transform: translateY(-16px) scale(.6); transition: opacity .3s ease, transform .45s cubic-bezier(.2,1.4,.4,1);
}
.save-demo.saved .pin { opacity: 1; transform: none; }
.save-btn {
  margin-top: 20px; width: 100%; min-height: 64px; border: 0; border-radius: 18px; cursor: pointer;
  background: var(--app-blue); color: #fff;
  font: 700 1.25rem/1 var(--font); letter-spacing: -0.01em;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  transition: transform .15s ease, filter .2s ease;
}
.save-btn:hover { filter: brightness(1.08); }
.save-btn:active { transform: scale(.98); }
.save-btn svg { width: 28px; height: 28px; }
.toast {
  margin-top: 16px; min-height: 52px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 0.9375rem; color: var(--text-3);
}
.toast b { color: var(--text); font-weight: 600; }
.toast .ok { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex: none; }
.save-demo.saved .toast .ok { background: var(--mint); }

/* Häivytyssäde */
.radius-demo .map {
  position: relative; aspect-ratio: 1; border-radius: 24px; overflow: hidden;
  background: #0b1216; border: 1px solid var(--line);
}
.radius-demo .map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.radius-demo .ring { fill: rgba(176, 173, 233, .12); stroke: var(--lilac); stroke-dasharray: 4 6; transition: r .35s ease; }
.radius-demo .true-pt { fill: var(--ice); }
.radius-demo .true-halo { fill: rgba(215, 243, 246, .18); }
.radius-demo .shown-pt { fill: var(--lilac); transition: cx .35s ease, cy .35s ease; }
.radius-demo .controls { margin-top: 24px; }
.radius-demo .row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.radius-demo label { font-weight: 600; font-size: 1.0625rem; }
.radius-demo output { font-size: 2rem; font-weight: 300; letter-spacing: -0.02em; color: var(--lilac); font-variant-numeric: tabular-nums; }
.radius-demo .scale { display: flex; justify-content: space-between; font-size: 0.8125rem; color: var(--text-3); margin-top: 6px; }
.radius-demo .legend { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 10px; font-size: 0.9375rem; color: var(--text-2); }
.radius-demo .legend span { display: flex; align-items: baseline; gap: 12px; }
.radius-demo .legend b { color: var(--text); font-weight: 600; }
.radius-demo .legend i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.soon {
  position: absolute; top: 20px; left: 20px; z-index: 1;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 7px 12px; border-radius: 999px; background: rgba(0,0,0,.7); border: 1px solid var(--line-strong);
}

input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; margin-top: 14px; height: 32px; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--ice), var(--lilac) var(--p, 13%), rgba(255,255,255,.15) var(--p, 13%));
}
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255,255,255,.15); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--ice), var(--lilac)); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 24px; height: 24px; margin-top: -10px; border-radius: 50%;
  background: #fff; border: 0; box-shadow: 0 0 0 6px rgba(176,173,233,.25);
}
input[type="range"]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 6px rgba(176,173,233,.25); }

/* Olosuhdekortit (pienet gradienttikortit) */
.cond-cards {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-top: clamp(48px, 6vw, 80px);
}
.cond-card {
  border-radius: var(--r-card); padding: 32px 28px 36px; min-height: 260px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  background-color: #000;
  background-image: linear-gradient(180deg, var(--tint-strong) -10%, var(--tint-soft) 55%, rgba(0,0,0,0) 100%);
  border: 1px solid rgba(255,255,255,.06);
}
.cond-card svg { width: 36px; height: 36px; }
.cond-card b { display: block; font-size: clamp(1.75rem, 1.2rem + 1.4vw, 2.5rem); font-weight: 300; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.cond-card span { display: block; margin-top: 10px; font-size: 1.125rem; line-height: 1.25; }
.cond-card small { display: block; margin-top: 6px; font-size: 0.875rem; color: var(--text-3); }
@media (max-width: 1000px) { .cond-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .cond-cards { grid-template-columns: 1fr; } .cond-card { min-height: 0; } }

/* ---------- Finaali ---------- */
.finale { text-align: center; overflow: clip; }
.finale .contours { width: min(1400px, 160vw); left: 50%; top: 50%; transform: translate(-50%, -50%); opacity: .4; color: var(--ice); }
.finale .wrap { position: relative; z-index: 1; }
.finale .contours, .finale .gradient-text, .finale .lead, .finale .stores { will-change: translate; }
/* Häivytä syvyyskäyrät osion ylä- ja alareunassa, ettei parallaksi paljasta kovaa rajaa */
.finale::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, #000 0%, rgba(0,0,0,0) 28%, rgba(0,0,0,0) 80%, #000 100%);
}
.gradient-text {
  font-size: var(--display-xl); font-weight: 300; line-height: 0.98; letter-spacing: -0.045em;
  background: linear-gradient(279deg, var(--lilac) 32%, var(--ice) 97%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  max-width: 11em; margin: 0 auto;
}
.finale .lead { margin: 40px auto 0; max-width: 32rem; }
.finale .actions { margin-top: 44px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.finale .stores { justify-content: center; margin-top: 56px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 40px; font-size: 0.9375rem; color: var(--text-3); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.site-footer a { text-decoration: none; color: var(--text-2); }
.site-footer a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Ilmestymisanimaatio ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Tietosuojaseloste ---------- */
.doc-hero { padding: calc(var(--header-h) + 88px) 0 64px; position: relative; overflow: clip; }
.doc-hero .contours { width: min(1000px, 140vw); right: -25%; top: -10%; opacity: .4; }
.doc-hero .wrap { position: relative; z-index: 1; }
.doc-hero h1 { margin-top: 24px; }
.doc-hero .lead { margin-top: 28px; max-width: 40rem; }
.not-found { min-height: calc(100svh - 160px); display: flex; align-items: center; }
.not-found-actions { margin-top: 40px; }
.site-footer .copyright { margin-top: 8px; }
.site-footer .credit { margin-top: 4px; color: var(--text-3); }
.doc-meta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 8px 32px; font-size: 0.9375rem; color: var(--text-3); }
.doc-meta b { color: var(--text); font-weight: 500; }

.doc-layout { display: grid; grid-template-columns: 240px 1fr; gap: clamp(40px, 6vw, 96px); padding-bottom: 140px; }
.toc { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
.toc h2 { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 16px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a { display: flex; gap: 14px; padding: 8px 0; text-decoration: none; color: var(--text-2); font-size: 0.9375rem; }
.toc a span { color: var(--text-3); font-variant-numeric: tabular-nums; }
.toc a:hover, .toc a.active { color: var(--text); }
.toc a.active span { color: var(--lilac); }

.summary { margin-bottom: 96px; }
.summary h2 { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2); }
.summary ul { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 20px; }
.summary li { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.5rem); line-height: 1.35; letter-spacing: -0.01em; padding-left: 28px; position: relative; }
.summary li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; border-radius: 50%; background: var(--ice); }

.doc-section { padding: 56px 0; border-top: 1px solid var(--line); }
.doc-section .n { font-size: 0.875rem; letter-spacing: 0.12em; color: var(--lilac); font-variant-numeric: tabular-nums; }
.doc-section h2 { margin-top: 12px; font-size: clamp(2rem, 1.3rem + 2.2vw, 3.25rem); font-weight: 300; line-height: 1.05; letter-spacing: -0.03em; }
.doc-section p { margin-top: 20px; max-width: 42rem; color: var(--text-2); font-size: 1.125rem; line-height: 1.65; }
.doc-section p strong { color: var(--text); font-weight: 600; }
.doc-section h2 + p { margin-top: 28px; }

.lists { margin-top: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lists .cond-card { min-height: 0; justify-content: flex-start; }
.lists h3 { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.lists ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.lists li { font-size: 1.0625rem; line-height: 1.4; padding-left: 22px; position: relative; }
.lists li::before { position: absolute; left: 0; top: 0; color: var(--text-3); }
.lists .no li::before { content: "–"; }
.lists .yes li::before { content: "·"; font-weight: 700; }
@media (max-width: 700px) { .lists { grid-template-columns: 1fr; } }

.data-table { margin-top: 32px; width: 100%; max-width: 42rem; border-collapse: collapse; font-size: 1rem; }
.data-table th { text-align: left; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); padding: 0 16px 12px 0; border-bottom: 1px solid var(--line-strong); }
.data-table td { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text-2); }
.data-table td:last-child { color: var(--text); white-space: nowrap; }

.doc-layout > * { min-width: 0; }
@media (max-width: 600px) {
  .data-table td:last-child { white-space: normal; }
}
@media (max-width: 900px) {
  .doc-layout { grid-template-columns: 1fr; }
  .toc { position: static; border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px 24px; }
}
