/*
 * Etusivun liike. Lähtökohta on Striimifyn oma merkki: wordmarkin vinot //-palkit ja 45°
 * viisteet. Hero näyttää tapahtumavirran (oikeat overlay-kortit pinoutuvat), alla kulkee
 * tapahtumanauha ja ominaisuudet vaihtuvat vierittäessä kiinnitetyssä paneelissa.
 * Sivu toimii ilman JavaScriptiä; prefers-reduced-motion pysäyttää liikkeen.
 */

.lp { overflow-x: clip; }

/* ---------- Hero ---------- */
.lp-hero { position: relative; isolation: isolate; padding: clamp(48px, 9vh, 104px) 0 clamp(40px, 7vh, 72px); }
.lp-hero > .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 900px) { .lp-hero > .wrap { grid-template-columns: minmax(0, 1fr); } }

/* Taustan vinot palkit = wordmarkin kaksois-I suurennettuna */
.lp-slashes { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.lp-slashes i { position: absolute; top: -10%; height: 130%; width: clamp(40px, 6vw, 90px); background: var(--lime); transform: skewX(-18deg); opacity: .05; }
.lp-slashes i:nth-child(1) { right: 22%; }
.lp-slashes i:nth-child(2) { right: calc(22% - clamp(60px, 8vw, 130px)); opacity: .09; background: var(--teal); }
.lp-slashes i:nth-child(3) { left: -4%; width: 14px; opacity: .12; background: var(--violet); }
.js .lp-slashes i { animation: lp-slash-in 1.1s cubic-bezier(.7, 0, .2, 1) both; }
.js .lp-slashes i:nth-child(2) { animation-delay: .12s; }
.js .lp-slashes i:nth-child(3) { animation-delay: .24s; }
@keyframes lp-slash-in { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }

/* Otsikko paljastuu vinon pyyhkäisyn takaa */
.lp-hero h1 { font-size: clamp(2.6rem, 6.4vw, 4.8rem); line-height: .98; letter-spacing: -.035em; margin-bottom: .35em; }
.lp-hero h1 span { color: var(--lime); display: block; }
.js .lp-hero h1, .js .lp-hero h1 span { animation: lp-wipe .9s cubic-bezier(.7, 0, .2, 1) .15s both; }
.js .lp-hero h1 span { animation-delay: .4s; }
@keyframes lp-wipe { from { clip-path: polygon(0 0, 0 0, -20% 100%, -20% 100%); } to { clip-path: polygon(0 0, 120% 0, 100% 100%, -20% 100%); } }
.js .lp-hero .lead, .js .lp-hero .cta, .js .lp-hero .hero-meta { animation: lp-up .7s cubic-bezier(.2, .8, .2, 1) both; }
.js .lp-hero .lead { animation-delay: .7s; }
.js .lp-hero .cta { animation-delay: .82s; }
.js .lp-hero .hero-meta { animation-delay: .95s; }
@keyframes lp-up { from { opacity: 0; translate: 0 14px; } }

/* ---------- Tapahtumavirta ---------- */
.lp-feed { position: relative; display: grid; gap: 14px; }
.lp-feed-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lp-feed-head .mono { color: var(--subtle); }
.lp-clock { font: 700 1.5rem/1 var(--font-head); font-variant-numeric: tabular-nums; }
.lp-clock em { font-style: normal; color: var(--lime); font-size: .9rem; margin-left: 8px; display: inline-block; opacity: 0; }
.lp-clock em.bump { animation: lp-bump 1.6s ease-out both; }
@keyframes lp-bump { 0% { opacity: 0; translate: 0 6px; } 15% { opacity: 1; translate: 0 0; } 75% { opacity: 1; } 100% { opacity: 0; } }

.lp-goal { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); }
.lp-goal-head { display: flex; justify-content: space-between; gap: 10px; font: 600 .95rem var(--font-head); }
.lp-goal-head span:last-child { font: 400 .8rem var(--font-mono); color: var(--muted); }
.lp-goal-bar { margin-top: 10px; height: 8px; background: var(--graphite); }
.lp-goal-bar b { display: block; height: 100%; background: var(--lime); transition: width 1s cubic-bezier(.2, .8, .2, 1); }

.lp-stack { position: relative; height: 290px; }
.lp-card { position: absolute; left: 0; right: 0; top: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; align-items: center;
  padding: 16px 18px; background: rgba(16, 18, 20, .96); border: 1px solid var(--line-strong);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  transition: transform .6s cubic-bezier(.2, .8, .2, 1), opacity .6s; transform-origin: top center; }
.lp-card .ico { grid-row: span 2; width: 44px; height: 44px; display: grid; place-items: center; background: var(--lime); color: var(--void); font: 700 1.05rem var(--font-head);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.lp-card .ttl { font: 700 1.08rem/1.2 var(--font-head); }
.lp-card .ttl b { color: var(--lime); }
.lp-card .msg { font-size: .88rem; color: var(--muted); min-height: 1.2em; }
.lp-card[data-pos="0"] { transform: translateY(0); }
.lp-card[data-pos="1"] { transform: translateY(96px) scale(.96); opacity: .7; }
.lp-card[data-pos="2"] { transform: translateY(178px) scale(.92); opacity: .45; }
.lp-card[data-pos="3"] { transform: translateY(240px) scale(.88); opacity: 0; }
.lp-card.enter { animation: lp-card-in .55s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes lp-card-in { from { clip-path: polygon(14px 0, 14px 0, 0 100%, 0 100%); translate: -24px 0; } }
/* Puhehälytys: pieni aaltomuoto kortissa */
.lp-wave { display: inline-flex; gap: 2px; height: 12px; margin-left: 8px; vertical-align: middle; }
.lp-wave i { width: 3px; height: 100%; background: var(--lime); animation: lp-wave .8s ease-in-out infinite; animation-delay: calc(var(--d) * -.1s); }
@keyframes lp-wave { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

/* ---------- Tapahtumanauha ---------- */
.lp-ticker { position: relative; overflow: hidden; border-block: 1px solid var(--line); background: var(--surface); padding: 12px 0; }
.lp-ticker-track { display: flex; width: max-content; }
.js .lp-ticker-track { animation: lp-ticker 46s linear infinite; }
.lp-ticker:hover .lp-ticker-track { animation-play-state: paused; }
.lp-ticker span { display: inline-flex; align-items: center; gap: 14px; padding-right: 14px; white-space: nowrap; font: 400 .82rem var(--font-mono); letter-spacing: .04em; color: var(--muted); }
.lp-ticker span::after { content: "//"; color: var(--lime); font-weight: 700; }
.lp-ticker b { color: var(--offwhite); font-weight: 400; }
@keyframes lp-ticker { to { transform: translateX(-50%); } }

/* ---------- Ominaisuudet: kiinnitetty esikatselu vaihtuu vierittäessä ---------- */
.lp-tour { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 72px); }
.lp-step { padding: clamp(28px, 6vh, 56px) 0 clamp(28px, 6vh, 56px) 22px; border-left: 2px solid var(--line); transition: border-color .4s, opacity .4s; }
.js .lp-step { opacity: .45; }
.js .lp-step.on { opacity: 1; border-left-color: var(--lime); }
.lp-step .kicker { display: block; color: var(--lime); font: 600 .95rem var(--font-head); margin-bottom: 8px; }
.lp-step h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.08; letter-spacing: -.025em; margin-bottom: .45em; }
.lp-step p { color: var(--muted); max-width: 46ch; }
.lp-step ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; font-size: .92rem; }
.lp-step li { display: flex; gap: 10px; }
.lp-step li::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: .5em; background: var(--lime); transform: rotate(45deg); }
.lp-step .lp-demo { display: none; margin-top: 22px; }

.lp-pin { position: sticky; top: 96px; align-self: start; }
.lp-pin-stage { position: relative; }
.lp-demo { position: relative; min-height: 380px; display: grid; place-items: center; padding: 28px; background: var(--surface); border: 1px solid var(--line); overflow: hidden;
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px); }
.lp-pin .lp-demo { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; }
.lp-pin .lp-demo.on { position: relative; opacity: 1; visibility: visible; }
.lp-pin .lp-demo.on > * { animation: lp-up .5s cubic-bezier(.2, .8, .2, 1) both; }
.lp-pin-bar { display: flex; gap: 6px; margin-top: 14px; }
.lp-pin-bar i { flex: 1; height: 3px; background: var(--line-strong); transition: background .3s; }
.lp-pin-bar i.on { background: var(--lime); }
@media (max-width: 900px) {
  .lp-tour { grid-template-columns: minmax(0, 1fr); }
  .lp-pin { display: none; }
  .lp-step .lp-demo { display: grid; min-height: 240px; }
  .js .lp-step { opacity: 1; }
}

/* Lahjoitussivu-demo */
.d-tip { width: min(360px, 100%); background: var(--void); border: 1px solid var(--line-strong); border-top: 3px solid var(--lime); padding: 18px; display: grid; gap: 12px; }
.d-tip header { display: flex; gap: 12px; align-items: center; }
.d-tip header i { width: 36px; height: 36px; background: var(--lime); clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.d-tip header b { font: 700 1rem var(--font-head); display: block; }
.d-tip header span { font-size: .78rem; color: var(--muted); }
.d-chips { display: flex; gap: 6px; }
.d-chips span { flex: 1; text-align: center; padding: 6px 0; border: 1px solid var(--line-strong); font: 600 .85rem var(--font-head); animation: d-chip 8s infinite; animation-delay: calc(var(--i) * 2s); }
@keyframes d-chip { 0%, 22% { background: var(--lime); color: var(--void); border-color: var(--lime); } 25%, 100% { background: transparent; color: var(--offwhite); } }
.d-field { height: 34px; border: 1px solid var(--line-strong); display: flex; align-items: center; padding: 0 10px; font-size: .82rem; color: var(--muted); }
.d-pay { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.d-pay span { padding: 9px 0; text-align: center; font: 600 .78rem var(--font-head); letter-spacing: .05em; text-transform: uppercase; background: var(--graphite); }
.d-pay span:first-child { background: var(--lime); color: var(--void); }

/* Hälytys-demo: neljä hälytystä vuorotellen */
.d-alerts { position: relative; width: min(420px, 100%); height: 150px; }
.d-alerts .lp-alert-mini { position: absolute; inset: 0; background: rgba(16, 18, 20, .95); padding: 18px 22px 18px 28px; opacity: 0;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); animation: d-cycle 12s infinite; animation-delay: calc(var(--i) * 3s); }
.d-alerts .lp-alert-mini::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 0; width: 5px; background: var(--lime); }
.lp-alert-mini .amt { font: 700 2.1rem/1 var(--font-head); color: var(--lime); }
.lp-alert-mini .ttl { font: 700 1.15rem var(--font-head); margin-top: 8px; }
.lp-alert-mini .msg { font-size: .9rem; color: var(--muted); margin-top: 4px; }
@keyframes d-cycle { 0% { opacity: 0; translate: 0 14px; } 3%, 22% { opacity: 1; translate: 0 0; } 25%, 100% { opacity: 0; translate: 0 -10px; } }

/* Chat-demo */
.d-chat { width: min(440px, 100%); display: grid; gap: 8px; }
.d-chat p { margin: 0; padding: 9px 12px; background: rgba(242, 244, 239, .035); border-left: 3px solid var(--line-strong); font-size: .9rem; color: #dfe3dc; opacity: 0;
  animation: d-line 12s infinite; animation-delay: calc(var(--i) * .9s); }
.d-chat p b { margin-right: .4em; }
.d-chat p.bot { border-left-color: var(--lime); background: rgba(155, 255, 135, .06); }
.d-chat p.bot b { color: var(--lime); }
.d-chat p.mod { border-left-color: var(--danger); background: rgba(255, 107, 107, .05); }
.d-chat .u1 { color: #8fd0ff; } .d-chat .u2 { color: #ffb86b; } .d-chat .u3 { color: #e39bff; }
@keyframes d-line { 0% { opacity: 0; translate: 0 8px; } 4%, 88% { opacity: 1; translate: 0 0; } 94%, 100% { opacity: 0; } }

/* Puhe-demo */
.d-tts { width: min(440px, 100%); display: grid; gap: 18px; }
.d-wave { display: flex; align-items: center; justify-content: center; gap: 5px; height: 70px; }
.d-wave i { width: 6px; height: 100%; background: var(--lime); animation: lp-wave 1.1s ease-in-out infinite; animation-delay: calc(var(--d) * -.09s); }
.d-say { font: 600 1.15rem/1.45 var(--font-head); text-align: center; }
.d-say span { background: linear-gradient(90deg, var(--offwhite) 50%, var(--subtle) 50%) right / 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: d-read 6s linear infinite; }
@keyframes d-read { 0% { background-position: right; } 75%, 100% { background-position: left; } }
.d-fx { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.d-fx span { font: 400 .72rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; border: 1px solid var(--line-strong); color: var(--muted); }
.d-fx span.on { border-color: var(--lime); color: var(--lime); }

/* Subathon-demo */
.d-sath { display: grid; gap: 18px; justify-items: center; }
.d-sath .clock { background: rgba(16, 18, 20, .95); padding: 14px 30px 16px; text-align: center; position: relative;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); }
.d-sath .clock::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--lime); }
.d-sath .clock small { font: 400 .72rem var(--font-mono); letter-spacing: .16em; color: var(--muted); }
.d-sath .clock strong { display: block; font: 700 clamp(2.4rem, 5vw, 3.2rem)/1.05 var(--font-head); font-variant-numeric: tabular-nums; }
.d-rules { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.d-rules span { font: 400 .75rem var(--font-mono); padding: 5px 9px; border: 1px solid var(--line-strong); transition: background .3s, border-color .3s; }
.d-rules span b { color: var(--lime); font-weight: 400; margin-left: .4em; }
.d-rules span.hit { border-color: var(--lime); background: rgba(155, 255, 135, .1); }

/* ---------- Osioiden sisääntulo: vino viistepyyhkäisy ---------- */
.js .reveal { clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); transition: clip-path .9s cubic-bezier(.7, 0, .2, 1); transition-delay: calc(var(--i, 0) * 90ms); }
.js .reveal.in { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.js .section-head.reveal { clip-path: none; opacity: 0; translate: -18px 0; transition: opacity .6s, translate .6s cubic-bezier(.2, .8, .2, 1); }
.js .section-head.reveal.in { opacity: 1; translate: 0 0; }

/* ---------- Vähemmän liikettä ---------- */
@media (prefers-reduced-motion: reduce) {
  .lp *, .lp *::before, .lp *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .reveal.in { clip-path: none; opacity: 1; translate: none; }
  .d-alerts .lp-alert-mini:first-child, .d-chat p { opacity: 1; }
  .d-say span { color: var(--offwhite); background: none; }
}
