/* Go Visual – scrollstyrd upplevelse (prototyp).
   Scenen är sticky över en lång scrollyta; inget ändrar webbläsarens scroll. */

:root {
  --ink: #0b0b0b;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --pad: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  /* Banans längd i vh – sätts från segmenten i upplevelse.js */
  --track: 2100;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: #fff; font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, p { margin: 0; }
:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: #fff; color: var(--ink); border-radius: 8px; }
.skip:focus { top: 12px; }

.top { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; justify-content: space-between; height: 68px; padding: 0 var(--pad); pointer-events: none; }
.top > * { pointer-events: auto; }
.top__brand { display: inline-flex; align-items: center; }
.top__brand img { display: block; height: 22px; width: auto; }
.top__actions { display: flex; align-items: center; gap: 8px; }
.top__btn { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap; transition: background-color .2s, transform .2s var(--ease); }
.top__btn:hover { transform: translateY(-1px); }
.top__btn--light { background: #fff; color: var(--ink); }
.top__btn--light:hover { background: #ececec; }
.top__btn--dark { background: var(--ink); color: #fff; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .16); }
.top__btn--dark:hover { background: #262626; }

.track { position: relative; height: calc(var(--track) * 1vh + 100vh); height: calc(var(--track) * 1svh + 100svh); }
.scene { position: sticky; top: 0; height: 100vh; height: 100svh; height: 100dvh; overflow: hidden; background: #0b0b0b; }
.scene__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scene__bg { display: none; }
/* Stående skärm: bilden i en ruta upptill, suddig och mörkad bakgrund bakom */
.scene.is-portrait .scene__bg { display: block; position: absolute; inset: -6%; width: 112%; height: 112%; filter: blur(22px) brightness(.58); }
.scene.is-portrait .scene__canvas { top: var(--frame-top); bottom: auto; height: var(--frame-h);
  -webkit-mask-image: linear-gradient(transparent, #000 10%, #000 80%, transparent); mask-image: linear-gradient(transparent, #000 10%, #000 80%, transparent); }
.scene__shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, rgb(0 0 0 / .55), rgb(0 0 0 / 0) 42%), linear-gradient(180deg, rgb(0 0 0 / .35), rgb(0 0 0 / 0) 22%); }

.layer { position: absolute; z-index: 5; opacity: 0; transition: opacity .2s linear; will-change: opacity, transform; }

.intro { left: var(--pad); bottom: clamp(56px, 12vh, 140px); }
.intro__kicker { font-size: 13px; color: rgb(255 255 255 / .7); }
.intro { max-width: min(820px, calc(100vw - 2 * var(--pad))); }
.intro__title { margin-top: 12px; font-family: var(--sans); font-weight: 700; font-size: clamp(32px, 4.2vw, 62px); line-height: 1.02; letter-spacing: -0.035em; text-wrap: balance; }
.intro__lead { margin-top: 18px; max-width: 520px; font-size: clamp(15px, 1.3vw, 18px); line-height: 1.5; color: rgb(255 255 255 / .82); }
.intro__hint { display: flex; align-items: center; gap: 12px; margin-top: 22px; font-size: 13px; color: rgb(255 255 255 / .75); }
.intro__line { display: block; width: 1px; height: 28px; background: linear-gradient(rgb(255 255 255 / .9), rgb(255 255 255 / 0)); animation: hint 2.4s var(--ease) infinite; transform-origin: top; }
@keyframes hint { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

.stop { left: var(--pad); bottom: clamp(40px, 9vh, 96px); max-width: min(760px, calc(100vw - 2 * var(--pad))); }
.stop__kicker { font-size: 14px; font-weight: 600; letter-spacing: .02em; color: rgb(255 255 255 / .85); }
.stop__title { margin-top: 8px; font-family: var(--sans); font-weight: 700; font-size: clamp(24px, 2.8vw, 42px); line-height: 1.04; letter-spacing: -0.03em; text-shadow: 0 1px 18px rgb(0 0 0 / .3); }
.stop__note { margin-top: 12px; font-size: 12px; color: rgb(255 255 255 / .6); }

/* Produktval: runda prover i en frostad panel, vald med vit ring och bock */
.opts { display: inline-flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 16px; padding: 12px 14px 10px; border-radius: 16px;
  background: rgb(20 18 16 / .42); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08); }
.opts button { display: flex; flex-direction: column; align-items: center; gap: 7px; width: 66px; font-size: 12.5px; font-weight: 500; line-height: 1.2; text-align: center; color: rgb(255 255 255 / .82); transition: color .2s; }
.opts button:hover, .opts button[aria-checked="true"] { color: #fff; }
.sw { position: relative; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; overflow: visible;
  background: var(--c, #777); box-shadow: 0 0 0 1.5px rgb(255 255 255 / .55); transition: box-shadow .25s, transform .25s var(--ease); }
.sw img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.opts button:hover .sw { transform: scale(1.04); }
.opts button[aria-checked="true"] .sw { box-shadow: 0 0 0 3px rgb(20 18 16 / .55), 0 0 0 5px #fff; }
.opts button[aria-checked="true"] .sw::after { content: ""; position: absolute; right: -5px; bottom: -3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%230b0b0b' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
  box-shadow: 0 0 0 2px rgb(20 18 16 / .7); }
.opts button:focus-visible { outline: none; }
.opts button:focus-visible .sw { box-shadow: 0 0 0 3px rgb(20 18 16 / .55), 0 0 0 5px #8fd3ff; }
/* Poolform som ikon i en vattenblå rund */
.sw--pool { background: radial-gradient(circle at 35% 30%, #6fd0ea, #1e7fa8 70%); }
.shape { display: block; width: 30px; height: 16px; background: rgb(255 255 255 / .9); }
.shape--rekt { border-radius: 3px; }
.shape--oval { border-radius: 50%; }
.shape--njure { border-radius: 60% 40% 45% 55% / 70% 55% 45% 30%; }

.honest { left: var(--pad); bottom: clamp(40px, 9vh, 96px); max-width: 420px; font-size: 13px; color: rgb(255 255 255 / .8); }

.outro { left: 50%; top: 50%; translate: -50% -50%; width: min(760px, calc(100vw - 2 * var(--pad))); text-align: center; }
.outro__title { font-family: var(--sans); font-weight: 700; font-size: clamp(28px, 3.4vw, 50px); line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; }
.outro__lead { margin: 18px auto 0; max-width: 560px; font-size: clamp(15px, 1.3vw, 18px); line-height: 1.5; color: rgb(255 255 255 / .86); }
.outro__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; height: 46px; padding: 0 22px; border-radius: 999px; font-size: 15px; font-weight: 500; transition: background-color .2s, box-shadow .2s; }
.btn--light { background: #fff; color: var(--ink); }
.btn--ghost { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .55); }
.btn--ghost:hover { background: rgb(255 255 255 / .12); }

.rail { position: absolute; z-index: 6; right: calc(var(--pad) / 2); top: 50%; height: 140px; width: 1px; translate: 0 -50%; background: rgb(255 255 255 / .22); }
.rail__fill { position: absolute; inset: 0 0 auto; height: 0; background: #fff; }
.rail b { position: absolute; left: 50%; top: var(--at); width: 5px; height: 5px; translate: -50% -50%; border-radius: 50%; background: #fff; }

.loading { position: absolute; z-index: 7; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px; opacity: 0; transition: opacity .3s; }
.loading.is-on { opacity: 1; }
.loading i { display: block; width: 100%; height: 100%; border-radius: 50%; border: 1.5px solid rgb(255 255 255 / .25); border-top-color: #fff; animation: spin .9s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }

.after { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; padding: 28px var(--pad) 40px; font-size: 13px; color: rgb(255 255 255 / .6); }
.after a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 700px) {
  .top__btn { height: 34px; padding: 0 13px; font-size: 13px; }
  .top__actions { gap: 6px; }
  .stop, .honest { bottom: 28px; }
  .opts { gap: 8px 6px; padding: 10px 8px 8px; margin-top: 12px; }
  .opts button { width: 60px; font-size: 11.5px; gap: 6px; }
  .sw { width: 42px; height: 42px; }
  .opts button[aria-checked="true"] .sw::after { width: 17px; height: 17px; background-size: 10px; }
  .shape { width: 24px; height: 13px; }
  .stop__title { font-size: 23px; }
  .rail { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .intro__line { animation: none; }
  .loading i { animation-duration: 3s; }
}
