/* PixLook by PixDream.net — omistajan esiaste.
 *
 * TÄRKEÄ PERIAATE: tämä tiedosto EI määrittele omaa design-järjestelmää.
 * style.css ladataan ensin ja se tuo tokenit (--bg, --card, --line, --text,
 * --muted, --accent, --accent2, --radius), typografian, .nav:in ja .btn-mini:n.
 * Täällä on VAIN PixLook-kohtaiset komponentit samoilla tokeneilla, jotta sivu
 * näyttää samalta kuin muu PixDream.
 *
 * Nimeäminen: kaikki luokat .sl-*. Body on .sl-page — EI .sl-body, koska
 * <p class="sl-body"> jakoi aiemmin saman luokan ja peri min-height:100vh:n.
 */

/* Kaikki näkyvyys ohjataan JS:stä hidden-attribuutilla. Selaimen oma
   [hidden]{display:none} on käyttäjäagentin tyyliä, joten MIKÄ TAHANSA
   author-sääntö joka asettaa displayn (esim. .sl-ownerflag{display:inline-flex})
   voittaa sen ja piilotettu elementti jää näkyviin. Tämä yksi rivi estää koko
   bugiluokan — samasta syystä PixLook-nappi vuoti aiemmin kaikille. */
[hidden] { display: none !important; }

/* ── sivupohja ──────────────────────────────────────────────────────── */
.sl-page { min-height: 100vh; }

.sl-skip {
  position: fixed; top: 10px; left: 10px; z-index: 200;
  padding: 10px 14px; border-radius: 12px; color: #0a0610; background: #fff;
  transform: translateY(-160%); transition: transform .18s ease; text-decoration: none;
}
.sl-skip:focus { transform: translateY(0); }

/* ── omistajaportti ─────────────────────────────────────────────────── */
.sl-gate {
  position: fixed; inset: 0; z-index: 300; display: grid; place-items: center;
  background: var(--bg);
}
.sl-gate[hidden] { display: none; }
.sl-gate-box { text-align: center; padding: 24px; }
.sl-gate-mark { font-size: 34px; color: var(--accent); margin-bottom: 10px; }
.sl-gate-txt { color: var(--muted); font-size: 15px; }

/* ── navi (perii sivuston .nav:in; vain PixLook-lisät) ──────────────── */
.nav[hidden] { display: none; }
.sl-pill {
  display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing: .04em;
  color: #140a1f; background: linear-gradient(90deg, var(--accent), var(--accent2));
}
.sl-ownerflag {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px;
  border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap;
  color: #ffd166; border: 1px solid rgba(255, 209, 102, .38); background: rgba(255, 209, 102, .10);
}
.sl-langwrap { position: relative; display: inline-block; }
.sl-langmenu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 1000;
  display: none; flex-direction: column; min-width: 150px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .5); overflow: hidden;
}
.sl-langmenu.open { display: flex; }
.sl-langmenu button {
  all: unset; box-sizing: border-box; display: flex; align-items: center; width: 100%;
  padding: 11px 14px; font-size: 14px; cursor: pointer; min-height: 44px; color: var(--text);
}
.sl-langmenu button:hover, .sl-langmenu button:focus-visible { background: rgba(181, 123, 255, .16); }

/* ── sisältöalue ────────────────────────────────────────────────────── */
.sl-main {
  width: min(1160px, 100%); margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) clamp(20px, 5vw, 64px) calc(170px + env(safe-area-inset-bottom));
}
.sl-main[hidden] { display: none; }

/* ── näyttämö: vasen palsta vaihtuu, oikea pitää esimerkin näkyvissä ── */
.sl-stage { display: grid; gap: clamp(28px, 5vw, 56px); align-items: start; }
.sl-col-left { min-width: 0; }
.sl-col-right { min-width: 0; }
.sl-hero-copy[hidden], .sl-hero-demo[hidden] { display: none; }

/* ── esittely muille kuin omistajalle ───────────────────────────────── */
/* Yksi kapea palsta: tämä on luettava sivu, ei työkalu, joten kahta
   palstaa ei tarvita ja teksti pysyy mukavan mittaisilla riveillä. */
.sl-teaser {
  width: min(720px, 100%); margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) clamp(20px, 5vw, 40px) clamp(48px, 8vw, 88px);
}
.sl-teaser[hidden] { display: none; }
.sl-teaser h1 { font-size: clamp(28px, 5vw, 42px); letter-spacing: -.03em; }
.sl-teaser .sl-lead { max-width: none; }
.sl-ba-teaser { margin-top: 28px; }
.sl-teaser-cap { text-align: center; margin-top: 10px; }
.sl-teaser-list {
  list-style: none; margin: 26px 0 0; padding: 0;
  display: grid; gap: 10px;
}
.sl-teaser-list li {
  position: relative; padding: 12px 16px 12px 42px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); font-size: 15px; line-height: 1.5;
}
.sl-teaser-list li::before {
  content: '✦'; position: absolute; left: 16px; top: 12px;
  color: var(--accent); font-size: 14px;
}
.sl-teaser-back { text-decoration: none; }

/* ── hero ───────────────────────────────────────────────────────────── */
.sl-eyebrow {
  color: #dfc9ff; font-size: 12px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase; margin-bottom: 12px;
}
.sl-hero-copy h1 { font-size: clamp(30px, 5.2vw, 50px); letter-spacing: -.03em; }
.sl-promise {
  margin-top: 14px; font-size: clamp(17px, 2.4vw, 22px); font-weight: 700;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sl-lead { margin-top: 14px; color: var(--muted); font-size: 16px; max-width: 52ch; }
.sl-free { margin-top: 12px; color: #5bd6a0; font-size: 13.5px; font-weight: 700; }
.sl-trust { margin-top: 5px; color: var(--muted); font-size: 12.5px; }
.sl-hero-demo { display: block; }
.sl-demo-cap { margin: 10px auto 0; color: var(--muted); font-size: 12px; text-align: center; max-width: 40ch; }

/* ── napit (sivuston hengessä) ──────────────────────────────────────── */
.sl-cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; margin-top: 22px; padding: 0 26px;
  border: none; border-radius: 14px; cursor: pointer;
  color: #140a1f; font-weight: 800; font-size: 16px; font-family: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: transform .15s, filter .2s;
}
.sl-cta:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.08); }
.sl-cta:disabled { opacity: .45; cursor: not-allowed; }
.sl-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg2); color: var(--text); cursor: pointer;
  font-weight: 700; font-size: 14.5px; font-family: inherit;
  transition: border-color .2s;
}
.sl-btn:hover, .sl-btn:focus-visible { border-color: var(--accent); }
.sl-btn-primary {
  border-color: transparent; color: #140a1f;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}
.sl-btn-sm { min-height: 40px; padding: 0 13px; font-size: 13.5px; }
/* display:inline-flex voittaa selaimen oman [hidden]-säännön (luokkavalitsin on
   vahvempi), joten hidden-attribuutti pitää huomioida erikseen. */
.sl-btn[hidden], .sl-cta[hidden], .sl-link[hidden], .sl-chip[hidden], .sl-opt[hidden] { display: none; }
.sl-btn-quiet { color: var(--muted); }
.sl-link {
  min-height: 44px; padding: 0 4px; border: none; background: none;
  color: var(--accent); cursor: pointer; font-size: 14px; font-family: inherit;
  text-decoration: underline; text-underline-offset: 4px;
}

/* ── before/after ───────────────────────────────────────────────────── */
.sl-ba {
  position: relative; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--bg2);
  aspect-ratio: 4 / 5; width: 100%; max-width: 380px; margin-inline: auto;
  touch-action: pan-y;
}
.sl-ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.sl-ba-beforewrap { position: absolute; inset: 0; width: 50%; overflow: hidden; }
.sl-ba-beforewrap img { width: auto; height: 100%; min-width: 100%; max-width: none; }
.sl-ba-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 2px;
  background: rgba(255, 255, 255, .92); transform: translateX(-1px); pointer-events: none;
}
.sl-ba-handle span {
  position: absolute; top: 50%; left: 50%; width: 36px; height: 36px;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: rgba(11, 10, 16, .85); border: 2px solid #fff;
}
.sl-ba-handle span::before {
  content: "‹ ›"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 14px; color: #fff; letter-spacing: 2px;
}
.sl-ba-range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; background: none;
}
.sl-ba-range::-webkit-slider-thumb { -webkit-appearance: none; width: 44px; height: 100%; }
.sl-ba-range:focus-visible { outline: 3px solid var(--accent2); outline-offset: 2px; }
.sl-ba-tag {
  position: absolute; top: 10px; padding: 4px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; color: var(--text);
  background: rgba(11, 10, 16, .78); pointer-events: none;
}
.sl-ba-tag-l { left: 10px; }
.sl-ba-tag-r { right: 10px; }
.sl-wm {
  position: absolute; left: 10px; bottom: 10px; padding: 3px 8px; border-radius: 8px;
  font-size: 10.5px; font-weight: 700; color: var(--text);
  background: rgba(11, 10, 16, .72); pointer-events: none;
}
.sl-batoggle { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }

/* ── wizard (sivuston .gen-panel-hengessä) ──────────────────────────── */
/* täyttää vasemman palstan — ei omaa keskitystä, jotta se korvaa hero-tekstin
   täsmälleen samassa kohdassa eikä hyppää sivun alalaitaan */
.sl-wizard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 4vw, 28px);
}
.sl-wizard[hidden], .sl-pane[hidden], .sl-gen[hidden], .sl-result[hidden],
.sl-sticky[hidden], .sl-custom[hidden], .sl-err[hidden], .sl-ok[hidden],
.sl-drop-empty[hidden], .sl-drop-preview[hidden] { display: none; }
.sl-steps { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.sl-step-label { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.sl-step-track { display: flex; gap: 5px; }
.sl-step-track i { width: 26px; height: 4px; border-radius: 3px; background: var(--line); }
.sl-step-track i.on { background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.sl-pane h2 { font-size: clamp(20px, 3.4vw, 25px); margin-bottom: 8px; }
.sl-sub {
  margin: 22px 0 10px; font-size: 12px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.sl-help { color: var(--muted); font-size: 14.5px; margin-bottom: 18px; }
.sl-note { margin-top: 10px; color: var(--muted); font-size: 12.5px; }
.sl-mocknote { color: #ffd166; }
.sl-ok { margin-top: 10px; color: #5bd6a0; font-size: 13.5px; font-weight: 700; }
.sl-err { margin-top: 10px; color: #ff8a8a; font-size: 13.5px; font-weight: 700; }

.sl-drop {
  display: grid; place-items: center; min-height: 240px; padding: 22px;
  border: 1px dashed var(--line); border-radius: 12px; background: var(--bg2);
}
.sl-drop-ico { font-size: 38px; text-align: center; margin-bottom: 14px; opacity: .6; }
.sl-drop-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.sl-drop-preview { width: 100%; text-align: center; }
.sl-drop-preview img { max-width: 100%; max-height: 320px; border-radius: 12px; display: block; margin: 0 auto; }
.sl-drop-actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }

.sl-consent {
  display: flex; gap: 11px; align-items: flex-start; margin-top: 18px;
  font-size: 13.5px; color: var(--text); cursor: pointer;
}
.sl-consent input { width: 21px; height: 21px; margin-top: 1px; flex-shrink: 0; accent-color: var(--accent); }

.sl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sl-opt {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px;
  min-height: 62px; padding: 12px 14px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg2);
  color: var(--text); font-weight: 700; font-size: 15px; font-family: inherit; text-align: left;
  transition: border-color .2s;
}
.sl-opt:hover { border-color: var(--accent); }
.sl-opt small { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.sl-opt.on {
  border-color: transparent; color: #140a1f;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}
.sl-opt.on small { color: rgba(20, 10, 31, .75); }

.sl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sl-chip {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 42px; padding: 0 13px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg2);
  color: var(--text); font-size: 14px; font-weight: 600; font-family: inherit;
}
.sl-chip .sw { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); }
.sl-chip .tick { opacity: 0; font-size: 12px; }
.sl-chip.on { border-color: var(--accent); background: rgba(181, 123, 255, .16); }
.sl-chip.on .tick { opacity: 1; }

.sl-custom { display: block; margin-top: 14px; }
.sl-lbl {
  display: block; margin-bottom: 8px; font-size: 12px; color: var(--muted);
  font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.sl-custom input {
  width: 100%; min-height: 46px; padding: 0 14px; font-size: 16px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); color: var(--text);
}

.sl-summary { margin-top: 26px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
.sl-sumlist { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; }
.sl-sumlist dt { color: var(--muted); }
.sl-sumlist dd { font-weight: 700; overflow-wrap: anywhere; }
.sl-navrow { margin-top: 20px; }

/* ── generointi ─────────────────────────────────────────────────────── */
.sl-gen { margin: 32px 0; text-align: center; }
.sl-spinner { display: grid; place-items: center; margin-bottom: 20px; }
.sl-spinner i {
  width: 44px; height: 44px; border-radius: 50%; display: block;
  border: 3px solid var(--line); border-top-color: var(--accent);
  animation: sl-spin 1s linear infinite;
}
@keyframes sl-spin { to { transform: rotate(360deg); } }
.sl-genstate { font-size: clamp(18px, 3.4vw, 23px); }

/* ── tulos ──────────────────────────────────────────────────────────── */
.sl-result { width: 100%; text-align: center; }
.sl-result h2 { font-size: clamp(22px, 4.4vw, 30px); margin-bottom: 10px; }
.sl-result .sl-ba { margin: 0 auto; }
.sl-aibadge {
  display: inline-block; margin-bottom: 18px; padding: 4px 11px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; color: #dfc9ff;
  background: rgba(181, 123, 255, .14); border: 1px solid rgba(181, 123, 255, .32);
}
.sl-styletext { margin-top: 20px; color: var(--text); font-size: 15px; text-align: left; }
.sl-why { margin-top: 14px; text-align: left; }
.sl-why summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; color: var(--accent); }
.sl-why p { margin-top: 4px; color: var(--muted); font-size: 14px; }
.sl-identity { margin-top: 24px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.sl-identity p { margin-bottom: 12px; font-weight: 700; font-size: 15px; }
.sl-idbtns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.sl-resactions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 24px; }
.sl-disclaimer { font-size: 11.5px; opacity: .8; }
.sl-foot { max-width: 720px; margin: 44px auto 0; border-top: 1px solid var(--line); padding-top: 20px; }

/* ── sticky CTA ─────────────────────────────────────────────────────── */
.sl-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  padding: 14px clamp(20px, 5vw, 64px) calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(11, 10, 16, 0) 0%, rgba(11, 10, 16, .94) 24%, var(--bg) 52%);
}
.sl-sticky .sl-cta { display: flex; width: min(620px, 100%); margin: 0 auto; }

/* ── opastus (bottom sheet, ei lukitse sivua) ───────────────────────── */
.sl-scrim { position: fixed; inset: 0; z-index: 90; background: rgba(6, 5, 10, .5); }
.sl-scrim[hidden] { display: none; }
.sl-sheet {
  position: fixed; z-index: 100; left: 12px; right: 12px; bottom: 12px;
  width: calc(100% - 24px); max-width: 640px; margin-inline: auto;
  max-height: 78dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: 24px 20px calc(22px + env(safe-area-inset-bottom));
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); box-shadow: 0 -18px 60px rgba(0, 0, 0, .55);
  animation: sl-rise .22s ease;
}
.sl-sheet[hidden] { display: none; }
@keyframes sl-rise { from { transform: translateY(18px); opacity: 0; } }
.sl-sheet h2 { font-size: 21px; padding-right: 46px; margin-bottom: 16px; }
.sl-sheet-x {
  position: absolute; top: 14px; right: 14px; width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg2);
  color: var(--text); cursor: pointer; font-size: 16px; font-family: inherit;
}
.sl-introsteps { margin-top: 18px; padding-left: 0; list-style: none; color: var(--text); font-size: 14.5px; }
.sl-introsteps li { margin-bottom: 8px; }
.sl-sheet-btns { display: flex; flex-direction: column; gap: 10px; align-items: center; margin-top: 18px; }
.sl-ba-intro { max-width: min(200px, 44vw); margin: 0 auto; }
@media (min-height: 800px) { .sl-ba-intro { max-width: min(250px, 50vw); } }

/* ── modaali + toast ────────────────────────────────────────────────── */
.sl-modal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 16px; background: rgba(6, 5, 10, .66); }
.sl-modal[hidden] { display: none; }
.sl-modal-box {
  position: relative; width: 100%; max-width: 440px; padding: 26px 22px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
}
.sl-modal-box h2 { font-size: 20px; padding-right: 46px; margin-bottom: 10px; }
.sl-modal-box p { color: var(--muted); font-size: 14.5px; }
.sl-toast {
  position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(14px); z-index: 200;
  padding: 12px 18px; border-radius: 12px; background: var(--card); border: 1px solid var(--line);
  color: var(--text); font-size: 14px; font-weight: 600; max-width: calc(100% - 32px); text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.sl-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.sl-page :focus-visible { outline: 3px solid var(--accent2); outline-offset: 3px; }

/* ── desktop: kaksipalstainen hero ──────────────────────────────────── */
@media (min-width: 900px) {
  .sl-stage { grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr); }
  /* esimerkki/tulos pysyy näkyvissä kun vasen palsta vierii */
  .sl-col-right { position: sticky; top: 92px; }
  .sl-grid { grid-template-columns: repeat(3, 1fr); }
  .sl-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .sl-sticky { padding-bottom: 22px; }
  .sl-sheet { bottom: auto; top: 50%; transform: translateY(-50%); animation: none; }
}

/* ── puhelin ────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .sl-main { padding-left: 16px; padding-right: 16px; }
  .sl-cta { width: 100%; }
  .sl-ownerflag { font-size: 11px; padding: 4px 8px; }
}
@media (max-width: 380px) {
  .sl-grid { grid-template-columns: 1fr; }
  .sl-pill { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sl-page *, .sl-page *::before, .sl-page *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
