/* Nettsnakk landing – "Kom som du er"
   Blue-hour fjord, Norwegian folklore cast, one 3D mascot. */

:root {
  --fjordnatt: #130F3A;
  --skumring: #2A1C6E;
  --fjordbla: #4D8DFF;     /* brand + CTAs */
  --fjordbla-dyp: #2458C8; /* button depth */
  --multe: #FFB23E;        /* warmth: sun, stars, highlights */
  --nordlys: #42F5B3;      /* "live" / talking signals only */
  --sno: #F5F4FF;
  --ink: #17153A;
  --ink-soft: #4A4772;

  --font-display: 'Bagel Fat One', 'Arial Black', system-ui, sans-serif;
  --font-body: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --page: 1240px;          /* widest content column (the cast cards) */
  --radius: 22px;
  --ease-pop: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(16px, 1.05vw + 10px, 19px);
  line-height: 1.6;
  color: var(--ink);
  background: var(--fjordnatt);
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: .95; margin: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(40px, 6vw, 84px); }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--multe); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--sno); color: var(--ink); padding: 10px 14px; border-radius: 10px;
}
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  --lift: 0px;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px;
  font: 700 17px/1 var(--font-body);
  text-decoration: none;
  transform: translateY(var(--lift));
  transition: transform .25s var(--ease-pop), box-shadow .25s, background .2s;
}
.btn--primary {
  background: var(--fjordbla); color: #fff;
  box-shadow: 0 6px 0 var(--fjordbla-dyp), 0 14px 30px -8px rgba(77, 141, 255, .6);
}
.btn--primary:hover { --lift: -3px; box-shadow: 0 9px 0 var(--fjordbla-dyp), 0 20px 36px -8px rgba(77, 141, 255, .7); }
.btn--primary:active { --lift: 4px; box-shadow: 0 2px 0 var(--fjordbla-dyp); }
.btn--ghost { color: var(--sno); background: rgba(245, 244, 255, .1); box-shadow: inset 0 0 0 2px rgba(245, 244, 255, .45); }
.btn--ghost:hover { background: rgba(245, 244, 255, .2); --lift: -2px; }
.btn--light {
  border: 0; cursor: pointer;
  color: var(--fjordbla-dyp); background: rgba(77, 141, 255, .14);
  box-shadow: inset 0 0 0 2px rgba(77, 141, 255, .22);
}
.btn--light:hover { --lift: -2px; background: rgba(77, 141, 255, .22); }
.btn--light:active { --lift: 2px; }
.btn:focus-visible { outline: 3px solid var(--fjordbla); outline-offset: 3px; }
.btn--small { min-height: 42px; padding: 0 18px; font-size: 15px; }
.btn--big { min-height: 64px; padding: 0 38px; font-size: 20px; }

/* ---------- Nav ---------- */
.nav {
  position: absolute; inset: 0 0 auto; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--gutter);
}
.wordmark {
  font-family: var(--font-display); font-size: 30px; line-height: 1;
  color: var(--sno); text-decoration: none;
  text-shadow: 0 3px 0 var(--fjordbla);
}
.wordmark--small { font-size: 24px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: max(100svh, 680px);
  display: grid; place-items: start center;
  /* Bottom room: at least the boat (width x .86 tall, plus its offset), so text and buttons
     always end above the fisherman, also when the welcome notice makes the content taller. */
  padding: clamp(78px, 10vh, 120px) var(--gutter)
    max(clamp(200px, 30vh, 300px), calc(clamp(220px, 26vw, 360px) * .86 + clamp(40px, 6vh, 70px) + 24px));
  overflow: hidden;
  color: var(--sno);
  background: linear-gradient(180deg, #120E3A 0%, #2A1C6E 30%, #6E2A84 55%, #D9467A 74%, #FF8A5B 86%, #FFC46B 100%);
}
.sky { position: absolute; inset: 0; z-index: -2; }
.stars {
  position: absolute; inset: 0 0 45%;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 18%, #fff 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 28% 8%, #fff 50%, transparent 52%),
    radial-gradient(2px 2px at 46% 22%, #FFE6B0 50%, transparent 52%),
    radial-gradient(1.3px 1.3px at 62% 12%, #fff 50%, transparent 52%),
    radial-gradient(1.8px 1.8px at 78% 26%, #fff 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 88% 9%, #FFE6B0 50%, transparent 52%),
    radial-gradient(1.4px 1.4px at 7% 40%, #fff 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 94% 44%, #fff 50%, transparent 52%),
    radial-gradient(1.5px 1.5px at 36% 36%, #fff 50%, transparent 52%),
    radial-gradient(1.1px 1.1px at 70% 40%, #fff 50%, transparent 52%);
  pointer-events: none;
}
.sunglow {
  position: absolute; left: 50%; bottom: 14%;
  width: min(1100px, 140vw); aspect-ratio: 2 / 1;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 220, 140, .95), rgba(255, 160, 90, .45) 45%, transparent 75%);
  filter: blur(6px);
}
.landscape {
  position: absolute; inset: auto 0 0; z-index: -1;
  width: 100%; height: clamp(260px, 44vh, 540px);
}
.glints rect { animation: glint 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.glints rect:nth-child(2) { animation-delay: .6s; }
.glints rect:nth-child(3) { animation-delay: 1.2s; }

.hero__content {
  position: relative; z-index: 5;
  max-width: 960px; text-align: center;
  display: grid; justify-items: center; gap: 18px;
}
.hero__title {
  font-size: clamp(60px, min(12vw, 14vh), 150px);
  line-height: .9;
  letter-spacing: -.01em;
  color: var(--sno);
  /* Sticker-like stacked shadow: the only place we go big on type effects. */
  text-shadow:
    0 6px 0 #2F6BFF,
    0 22px 36px rgba(19, 15, 58, .5);
  transition: opacity .7s ease-out .1s, transform .9s var(--ease-pop) .1s;
}
.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(26px, min(3.6vw, 4.4vh), 44px);
  line-height: 1;
  color: rgba(245, 244, 255, .9);
  text-shadow: 0 8px 24px rgba(19, 15, 58, .45);
  margin-top: -6px;
  transition: opacity .7s ease-out .35s, transform .8s ease-out .35s;
}
.hero__lead {
  max-width: 44ch;
  font-size: clamp(18px, 1.1vw + 10px, 22px);
  color: rgba(245, 244, 255, .92);
  text-shadow: 0 2px 12px rgba(19, 15, 58, .5);
  transition: opacity .7s ease-out .5s, transform .8s ease-out .5s;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; transition: opacity .7s ease-out .65s, transform .8s ease-out .65s; }

.prate {
  --tx: 0; --ty: 0;
  position: relative;
  width: clamp(150px, min(20vw, 24vh), 260px);
  aspect-ratio: 1;
  margin-bottom: -14px;
  padding: 0; border: 0; background: none; cursor: pointer;
  border-radius: 28px;
  transition: opacity .7s ease-out, transform .9s var(--ease-pop);
}
.prate__canvas, .prate__fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.prate__fallback { object-fit: contain; animation: bob 3.6s ease-in-out infinite; }
/* Taller than the button so the hop never clips the head; prate.js compensates the camera. */
.prate__canvas { top: -45%; height: 145%; opacity: 0; transition: opacity .4s ease-out; pointer-events: none; }
.prate.is-3d .prate__canvas { opacity: 1; }
.prate.is-3d .prate__fallback { opacity: 0; animation: none; transition: opacity .4s ease-out; }

/* Entrance states. Transitions instead of animations, so a frozen or throttled
   tab still ends up showing everything. */
html:not(.is-ready) .hero__title { opacity: 0; transform: scale(.6) rotate(-4deg); }
html:not(.is-ready) .hero__tagline,
html:not(.is-ready) .hero__lead,
html:not(.is-ready) .hero__actions,
html:not(.is-ready) .prate { opacity: 0; transform: translateY(24px); }

/* ---------- Characters (shared) ---------- */
.char { --px: 0; --py: 0; position: relative; }
.char svg { width: 100%; height: auto; overflow: visible; }
.char .pupil {
  transform: translate(calc(var(--px) * 3.2px), calc(var(--py) * 2.6px));
  transition: transform .18s ease-out;
}
.char .eye {
  transform-box: fill-box; transform-origin: center;
  animation: blink 6s infinite var(--blink-delay, 0s);
}
.char .arm--wave { transform-box: fill-box; transform-origin: 10% 90%; animation: wave 2.6s ease-in-out infinite var(--blink-delay, 0s); }
.char .steam { animation: steam 2.4s ease-in-out infinite; }
.char .line { transform-box: fill-box; transform-origin: 50% 0; animation: sway 4s ease-in-out infinite alternate; }
.char .bobber { transform-box: fill-box; transform-origin: center; animation: bob 2.2s ease-in-out infinite; }

/* Hero placements */
.char--hero-left {
  position: absolute; z-index: 2;
  /* Anchored to the page column, not the window, so wide screens don't push them to the corners. */
  left: max(clamp(-30px, 2vw, 60px), calc(50% - var(--page) / 2)); bottom: clamp(70px, 13vh, 150px);
  width: clamp(170px, 19vw, 290px);
}
.char--hero-right {
  position: absolute; z-index: 2;
  right: max(clamp(-10px, 4vw, 90px), calc(50% - var(--page) / 2)); bottom: clamp(80px, 14vh, 160px);
  width: clamp(130px, 13vw, 210px);
}
.char--hero-boat {
  position: absolute; z-index: 3;
  left: 50%; bottom: clamp(40px, 6vh, 70px);
  width: clamp(220px, 26vw, 360px);
  transform: translateX(-120%);
  animation: drift 22s ease-in-out infinite alternate;
}

/* ---------- Rooms ---------- */
.rooms {
  position: relative;
  background: var(--sno);
  padding: clamp(80px, 12vw, 160px) var(--gutter);
  display: grid; gap: clamp(40px, 6vw, 80px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  border-radius: 40px 40px 0 0;
  margin-top: -40px;
}
.rooms__text { max-width: 30ch; justify-self: end; display: grid; gap: 20px; }
.rooms__text p, .cast__intro p { color: var(--ink-soft); }
.rooms__cloud {
  position: relative;
  display: flex; flex-wrap: wrap; gap: 14px 12px; align-content: center;
  max-width: 560px; min-height: 340px;
  padding-bottom: 120px;
}
.room {
  --bg: #fff; --fg: var(--ink);
  display: inline-block;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--bg); color: var(--fg);
  font-weight: 700; font-size: clamp(16px, 1.2vw + 8px, 21px);
  box-shadow: 0 4px 0 rgba(23, 21, 58, .12), 0 0 0 2px rgba(23, 21, 58, .08);
  transform: rotate(var(--r));
  animation: float 5s ease-in-out infinite var(--d);
}
/* The rooms look lived in: a pulsing "online" dot, and now and then someone typing (app.js).
   Illustrative only, no numbers: these are example rooms, not live data. */
.room { position: relative; }
.room::before {
  content: ""; display: inline-block; vertical-align: .08em;
  width: .42em; height: .42em; margin-right: .5em; border-radius: 50%;
  background: #22C55E;
  animation: live-pulse 2.4s ease-out infinite var(--d);
}
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); }
  70%, 100% { box-shadow: 0 0 0 .55em rgba(34, 197, 94, 0); }
}
.room__typing {
  position: absolute; right: -4px; top: -16px;
  display: flex; gap: 3px; padding: 6px 8px;
  border-radius: 999px 999px 999px 4px;
  background: #fff; box-shadow: 0 3px 10px rgba(23, 21, 58, .18);
  animation: typing-in .25s var(--ease-pop);
}
.room__typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink); opacity: .35; animation: typing-dot 1s ease-in-out infinite; }
.room__typing i:nth-child(2) { animation-delay: .15s; }
.room__typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing-dot { 30% { opacity: 1; transform: translateY(-2px); } }
@keyframes typing-in { from { transform: scale(.4); opacity: 0; } }
.room--blue { --bg: var(--fjordbla); --fg: #fff; box-shadow: 0 4px 0 var(--fjordbla-dyp); }
.room--gold { --bg: var(--multe); box-shadow: 0 4px 0 #C67F10; }
.room--mint { --bg: #BDF7E1; box-shadow: 0 4px 0 #6FCFAB; }
.char--rooms {
  position: absolute; right: 2%; bottom: -10px;
  width: clamp(120px, 12vw, 170px);
}

/* ---------- Video ---------- */
.video {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 80% 10%, #3B2496 0%, var(--skumring) 45%, var(--fjordnatt) 100%);
  color: var(--sno);
  padding: clamp(90px, 12vw, 170px) var(--gutter);
  display: grid; gap: clamp(40px, 6vw, 80px);
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
}
.video__text { display: grid; gap: 20px; max-width: 30ch; order: 2; }
.video__text p { color: rgba(245, 244, 255, .8); }
.call {
  position: relative;
  width: min(100%, 620px); aspect-ratio: 1.1;
  justify-self: center;
}
.tile {
  --size: 34%; --ring: rgba(245, 244, 255, .2);
  position: absolute;
  width: var(--size); aspect-ratio: 1;
  border-radius: 50%;
  background: var(--tile, #6A2D86);
  box-shadow: 0 0 0 6px var(--ring), 0 24px 40px -14px rgba(0, 0, 0, .5);
  animation: float 6s ease-in-out infinite var(--d, 0s);
}
.tile .char { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; }
.tile .char svg { width: 100%; height: 100%; }
.tile--a { --size: 46%; --tile: #FFB23E; left: 27%; top: 22%; }
.tile--b { --tile: #2FB5A8; left: 0; top: 2%; --d: .8s; }
.tile--c { --size: 28%; --tile: #FF8FA3; right: 4%; top: 0; --d: 1.6s; }
.tile--d { --size: 30%; --tile: #3FA9F5; left: 4%; bottom: 0; --d: 2.2s; }
.tile--e { --size: 32%; --tile: #A88BFF; right: 0; bottom: 6%; --d: 1.1s; }
.tile.talking { --ring: var(--nordlys); animation: float 6s ease-in-out infinite, talk 1.4s ease-in-out infinite; }
.tag {
  position: absolute; left: 50%; bottom: -6px;
  transform: translateX(-50%);
  padding: 5px 12px; border-radius: 999px;
  background: var(--fjordnatt); color: var(--sno);
  font-size: 13px; font-weight: 700; white-space: nowrap;
  display: inline-flex; gap: 6px; align-items: center;
}
.tag--icon { padding: 6px; }
.muted {
  width: 14px; height: 14px; border-radius: 50%; background: #FF5C5C;
  -webkit-mask: linear-gradient(45deg, transparent 44%, #000 44% 56%, transparent 56%), radial-gradient(#000 0 0);
}
.live {
  position: absolute; left: 50%; top: -4%;
  transform: translateX(-50%);
  padding: 6px 14px 6px 28px; border-radius: 999px;
  background: var(--sno); color: var(--ink);
  font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
}
.live::before {
  content: ''; position: absolute; left: 12px; top: 50%;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--nordlys); box-shadow: 0 0 0 4px rgba(66, 245, 179, .3);
  transform: translateY(-50%);
  animation: pulse 1.4s ease-in-out infinite;
}

/* ---------- Cast ---------- */
.cast {
  background: var(--sno);
  padding: clamp(90px, 12vw, 160px) var(--gutter) clamp(70px, 9vw, 120px);
}
.cast__intro { max-width: 760px; margin: 0 auto clamp(48px, 6vw, 80px); text-align: center; display: grid; gap: 18px; }
.cast__list {
  list-style: none; margin: 0 auto; padding: 0;
  max-width: 1240px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 18px;
}
.card {
  --bg: #fff;
  flex: 1 1 210px; max-width: 260px;
  position: relative;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 22px 22px 26px;
  display: grid; gap: 8px; align-content: start;
  box-shadow: 0 6px 0 rgba(23, 21, 58, .1);
}
.cast__list .card:hover { translate: 0 -8px; rotate: -1.2deg; }
.cast__list .card:nth-child(even):hover { rotate: 1.2deg; }
.card .char { height: 190px; display: flex; justify-content: center; align-items: flex-end; margin-bottom: 14px; }
.card .char svg { height: 190px; width: auto; max-width: 100%; }
.card h3 { font-size: 30px; }
.card p { color: var(--ink-soft); font-size: 16px; line-height: 1.5; }
.card--moss { --bg: #DDEBCB; }
.card--teal { --bg: #CCEFEB; }
.card--rose { --bg: #FFD9E3; }
.card--violet { --bg: #E1D8FF; }
.card--sky { --bg: #D2ECFF; }

/* ---------- Footer: evening camp under drifting lights ---------- */
.footer {
  --fire-h: clamp(118px, 12vw, 176px);
  position: relative; isolation: isolate; overflow: hidden;
  margin-top: -40px;
  border-radius: 40px 40px 0 0;
  color: var(--sno);
  /* Deep night at the top, a touch lighter toward the horizon behind the people. */
  background:
    radial-gradient(120% 60% at 50% 100%, #2B2178 0%, transparent 70%),
    linear-gradient(180deg, #0D0930 0%, #16104A 55%, #1F1860 100%);
}
.footer__sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
/* Soft lights drifting slowly; screen blending lets them glow into each other. */
.orb {
  position: absolute;
  width: var(--s); aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--c) 0%, color-mix(in srgb, var(--c) 45%, transparent) 45%, transparent 100%);
  mix-blend-mode: screen;
  opacity: .5;
  animation: orb-drift var(--t) ease-in-out infinite alternate;
  will-change: transform;
}
.orb--blue   { --s: max(900px, 95vw);  --c: #4D8DFF; --t: 48s; left: -45%; top: -35%; opacity: .55; }
.orb--violet { --s: max(820px, 85vw);  --c: #8A4DFF; --t: 56s; right: -40%; top: -45%; opacity: .5; animation-delay: -18s; }
.orb--mint   { --s: max(700px, 70vw);  --c: #42F5B3; --t: 62s; right: -30%; top: 20%; opacity: .26; animation-delay: -30s; }
.orb--gold   { --s: max(600px, 60vw);  --c: #FFB23E; --t: 52s; left: 15%; top: 35%; opacity: .2; animation-delay: -9s; }
.orb--pink   { --s: max(560px, 55vw);  --c: #FF7FA8; --t: 58s; left: -25%; top: 30%; opacity: .18; animation-delay: -40s; }
@keyframes orb-drift {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(8vw, 5vh) scale(1.1); }
  66%  { transform: translate(-6vw, 10vh) scale(.92); }
  100% { transform: translate(5vw, -6vh) scale(1.05); }
}
.footer__stars {
  position: absolute; inset: 0 0 28%;
  background-image:
    radial-gradient(1.4px 1.4px at 8% 22%, #fff 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 22% 10%, #fff 50%, transparent 52%),
    radial-gradient(1.6px 1.6px at 41% 30%, #FFE6B0 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 58% 12%, #fff 50%, transparent 52%),
    radial-gradient(1.5px 1.5px at 73% 26%, #fff 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 91% 16%, #FFE6B0 50%, transparent 52%),
    radial-gradient(1.3px 1.3px at 84% 42%, #fff 50%, transparent 52%),
    radial-gradient(1.1px 1.1px at 30% 46%, #fff 50%, transparent 52%);
  pointer-events: none;
  opacity: .8;
}

.footer__cta {
  position: relative;
  display: grid; justify-items: center; gap: 22px; text-align: center;
  padding: clamp(90px, 11vw, 150px) var(--gutter) clamp(30px, 4vw, 50px);
}
.footer__cta h2 {
  font-size: clamp(44px, 7vw, 104px);
  color: var(--sno);
  text-shadow: 0 6px 0 #2F6BFF, 0 22px 36px rgba(0, 0, 0, .4);
}
.footer__cta p { max-width: 38ch; color: rgba(245, 244, 255, .78); font-size: clamp(17px, 1.1vw + 10px, 20px); }

.footer__crowd {
  position: relative;
  height: calc(var(--fire-h) + clamp(60px, 7vw, 100px));
}
.footer__ridge { position: absolute; inset: auto 0 0; width: 100%; height: 72%; filter: drop-shadow(0 -10px 30px rgba(77, 141, 255, .35)); }
/* Two soft lights wander slowly along the hill, so it never reads as a flat band. */
.ridge-light { animation: ridge-drift 26s ease-in-out infinite alternate; }
.ridge-light--b { animation-duration: 34s; animation-delay: -12s; animation-direction: alternate-reverse; }
@keyframes ridge-drift {
  from { transform: translateX(-160px); opacity: .55; }
  50%  { opacity: 1; }
  to   { transform: translateX(200px); opacity: .7; }
}
/* Canvas reaches 130px above the crowd so message arcs have sky to fly in (ABOVE in horizon.js). */
.footer__horizon { position: absolute; left: 0; top: -130px; width: 100%; height: calc(100% + 130px); pointer-events: none; }
.footer__crowd .char { position: absolute; bottom: 10%; z-index: 1; transform: translateX(-50%); }
/* A soft contact shadow so the figures stand on the hill instead of floating. */
.footer__crowd .char::after {
  content: ""; position: absolute; z-index: -1;
  left: 50%; bottom: -5px; width: 74%; height: 14px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(14, 9, 52, .5), rgba(14, 9, 52, 0));
}
.footer__crowd .char--img img {
  height: var(--fire-h); width: auto; max-width: none;
  filter: drop-shadow(0 0 18px rgba(77, 141, 255, .25));
}
/* Five people evenly spaced and mirror-symmetric. */
.char--fire-1 { left: 20%; }
.char--fire-2 { left: 35%; }
.char--fire-3 { left: 50%; }
.char--fire-4 { left: 65%; }
.char--fire-5 { left: 80%; }

.footer__bar {
  position: relative;
  display: grid; align-items: center; gap: 24px 40px;
  grid-template-columns: 1fr auto 1fr;
  padding: 28px var(--gutter) 34px;
  background: #160E44;
  border-top: 1px solid rgba(245, 244, 255, .1);
}
/* Logo lockup (nav + footer): Prate in a white tile + wordmark. */
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--sno); }
.footer__bar .brand { justify-self: start; }
.brand__mark {
  --mark: 64px;
  display: grid; place-items: center;
  width: var(--mark); height: var(--mark);
  transition: transform .4s var(--ease-pop);
}
/* No tile: Prate stands on its own with a soft blue glow. */
.brand__mark img {
  height: var(--mark); width: auto;
  filter: drop-shadow(0 0 14px rgba(77, 141, 255, .75)) drop-shadow(0 8px 12px rgba(0, 0, 0, .4));
}
.brand:hover .brand__mark { transform: translateY(-3px) rotate(-6deg); }
.brand__name { display: grid; gap: 4px; line-height: 1; }
.brand__name .wordmark { font-size: 28px; }
.brand__tagline { font-size: 14px; color: rgba(245, 244, 255, .78); }
.brand--nav { gap: 12px; }
.brand--nav .brand__mark { --mark: 46px; }
.brand--nav .wordmark { font-size: 26px; }
.footer__nav { display: flex; gap: 8px; justify-self: center; }
.footer__nav a {
  padding: 10px 16px; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: 15px;
  color: rgba(245, 244, 255, .85);
  transition: background .2s, color .2s;
}
.footer__nav a:hover { background: rgba(245, 244, 255, .14); color: #fff; }
.footer__legal { justify-self: end; font-size: 13px; color: rgba(245, 244, 255, .7); display: grid; gap: 6px; justify-items: end; }
.footer__links { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: flex-end; }
.footer__links a, .footer__links .link-button { color: rgba(245, 244, 255, .85); text-decoration: none; font-size: 13px; }
.footer__links a:hover, .footer__links .link-button:hover { color: #fff; text-decoration: underline; }

/* ---------- Reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .7s ease-out, transform .8s var(--ease-pop); }
[data-reveal].in { opacity: 1; transform: none; }
.cast__list .card[data-reveal] { transition: opacity .7s ease-out, transform .8s var(--ease-pop), translate .35s var(--ease-pop), rotate .35s var(--ease-pop); }
/* Stagger only the reveal; the hover lift (translate/rotate) always reacts at once. */
.cast__list [data-reveal]:nth-child(2) { transition-delay: .08s, .08s, 0s, 0s; }
.cast__list [data-reveal]:nth-child(3) { transition-delay: .16s, .16s, 0s, 0s; }
.cast__list [data-reveal]:nth-child(4) { transition-delay: .24s, .24s, 0s, 0s; }
.cast__list [data-reveal]:nth-child(5) { transition-delay: .32s, .32s, 0s, 0s; }

/* ---------- Keyframes ---------- */
.star {
  position: absolute;
  width: var(--size); height: var(--size);
  border-radius: 50%;
  background: var(--c, #fff);
  box-shadow: 0 0 calc(var(--size) * 2.5) rgba(255, 255, 255, .7);
  animation: star-blink var(--dur) ease-in-out var(--delay) infinite;
}
.star--warm { background: #FFE6B0; box-shadow: 0 0 calc(var(--size) * 2.5) rgba(255, 210, 140, .7); }
/* Mostly dim, a short bright moment, then back down: reads as twinkling, not pulsing. */
@keyframes star-blink {
  0%, 100% { opacity: var(--low); transform: scale(.8); }
  45%      { opacity: var(--low); transform: scale(.8); }
  60%      { opacity: var(--peak, 1); transform: scale(1.25); }
  75%      { opacity: calc(var(--low) + .2); transform: scale(1); }
}
@keyframes glint { 0%, 100% { opacity: .4; transform: scaleX(.7); } 50% { opacity: 1; transform: scaleX(1.1); } }
@keyframes drift { from { transform: translateX(-85%) rotate(-1deg); } to { transform: translateX(15%) rotate(1.5deg); } }
@keyframes drift-sm { from { transform: translateX(-8%) rotate(-1deg); } to { transform: translateX(8%) rotate(1.5deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes hop { 0% { transform: translateY(0) scale(1, 1); } 20% { transform: translateY(4px) scale(1.08, .9); } 55% { transform: translateY(-46px) scale(.95, 1.06); } 80% { transform: translateY(0) scale(1.06, .94); } 100% { transform: translateY(0) scale(1, 1); } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-14deg); } 80% { transform: rotate(10deg); } 90% { transform: rotate(-8deg); } }
@keyframes steam { 0% { opacity: 0; transform: translateY(6px); } 40% { opacity: .8; } 100% { opacity: 0; transform: translateY(-10px); } }
@keyframes sway { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }
@keyframes talk { 0%, 100% { box-shadow: 0 0 0 6px var(--nordlys), 0 24px 40px -14px rgba(0, 0, 0, .5); } 50% { box-shadow: 0 0 0 12px rgba(66, 245, 179, .45), 0 24px 40px -14px rgba(0, 0, 0, .5); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(66, 245, 179, 0); } }
@keyframes glow { 50% { opacity: .75; transform: translate(-50%, -50%) scale(.94); } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .rooms, .video { grid-template-columns: 1fr; }
  .rooms__text, .video__text { justify-self: start; order: 0; }
  .rooms__cloud { max-width: none; }
  .char--hero-right { display: none; }
  .char--hero-boat { left: 56%; width: clamp(200px, 30vw, 280px); animation-name: drift-sm; }
  .char--fire-1, .char--fire-5 { display: none; }
  .char--fire-2 { left: 20%; }
  .char--fire-3 { left: 50%; }
  .char--fire-4 { left: 80%; }
  .footer__bar { grid-template-columns: 1fr; justify-items: start; }
  .footer__nav, .footer__legal { justify-self: start; justify-items: start; }
  .footer__links { justify-content: flex-start; }
  .footer__nav { margin-left: -16px; }
}
@media (max-width: 560px) {
  .hero { padding-bottom: 200px; }
  .char--hero-left { width: 128px; left: 10px; bottom: 60px; }
  /* Leave room under the text for the figures, so no button sits on a face. */
  .hero { padding-bottom: 300px; }
  .char--hero-boat { left: 50%; width: 180px; }
  .hero__actions .btn { width: 100%; }
  .card .char, .card .char svg { height: 160px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .char--hero-boat { transform: translateX(-60%); }
}

/* ---------- Rendered characters (img mode) ---------- */
.char--img img { width: 100%; height: auto; display: block; filter: drop-shadow(0 18px 24px rgba(19, 15, 58, .45)); }
/* Moving irises (gaze.js): the iris layer slides inside a mask of the eye openings. */
.gaze__window {
  position: absolute; overflow: hidden; pointer-events: none;
  -webkit-mask: var(--gaze-mask) center / 100% 100% no-repeat;
  mask: var(--gaze-mask) center / 100% 100% no-repeat;
}
.gaze__sclera { position: absolute; background-size: 100% 100%; background-repeat: no-repeat; }
.char--img .gaze__window img.gaze__iris { width: 100%; height: 100%; filter: none; will-change: transform; }
/* Blink: a lid in the skin colour above the eye sweeps down and up inside the eye opening. */
.gaze__lid {
  position: absolute;
  transform: scaleY(0); transform-origin: 50% 0;
  background: linear-gradient(var(--shade), var(--skin) 60%);
  border-bottom: 1.5px solid rgba(48, 24, 14, .85);
  border-radius: 0 0 50% 50% / 0 0 18% 18%;
}
.gaze__lid--lower { transform-origin: 50% 100%; background: var(--skin); border: 0; border-radius: 0; }
.gaze__window.is-blinking .gaze__lid { animation: lid-blink .19s ease-in-out; }
@keyframes lid-blink {
  0%, 100% { transform: scaleY(0); }
  42%, 58% { transform: scaleY(1); }
}
/* Images lean slightly toward the pointer instead of moving their pupils. */
.tile .char--img img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 12%); transform: scale(1.35); transform-origin: var(--focus, 50% 12%); filter: none; }
.card .char--img img { height: 190px; width: auto; max-width: 100%; margin: 0 auto; }

/* ---------- Sign-up / sign-in modal ---------- */
.auth-modal {
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 16px; border: 0;
  display: grid; place-items: center;
  background: transparent;
  overflow-y: auto;
}
.auth-modal:not([open]) { display: none; }
.auth-modal::backdrop {
  background: rgba(10, 7, 34, .72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.auth-modal[open], .auth-modal[open]::backdrop { animation: modal-fade .25s ease-out; }
.auth-modal[open] .auth-modal__panel { animation: modal-rise .35s var(--ease-pop); }
@keyframes modal-fade { from { opacity: 0; } }
@keyframes modal-rise { from { opacity: 0; transform: translateY(18px) scale(.97); } }
html:has(.auth-modal[open]) { overflow: hidden; }
.auth-modal__panel {
  position: relative;
  width: min(440px, 100%);
  min-height: 200px;
}
.auth-modal iframe {
  display: block; width: 100%; height: 600px; border: 0;
  border-radius: 14px;
  background: transparent;
  color-scheme: normal;
  transition: opacity .2s;
}
.auth-modal.is-loading iframe { opacity: 0; }
/* Prate peeks over the top edge of the card (from behind it) and pops up when the modal opens. */
.auth-modal iframe { position: relative; z-index: 1; }
.auth-modal__prate {
  position: absolute; z-index: 0; left: 30px; top: -66px;
  width: 78px; height: auto;
  filter: drop-shadow(0 0 14px rgba(77, 141, 255, .6));
  animation: prate-bob 2.8s ease-in-out infinite;
}
.auth-modal[open] .auth-modal__prate { animation: prate-peek .6s var(--ease-pop) .15s backwards, prate-bob 2.8s ease-in-out .75s infinite; }
@keyframes prate-peek { from { transform: translateY(60px) rotate(-8deg); } }
@keyframes prate-bob { 50% { transform: translateY(-5px) rotate(2deg); } }
/* The footer logo's little hop when a message lands on the horizon (horizon.js). */
.brand__mark.is-hopping img { animation: mark-hop .55s var(--ease-pop); }
@keyframes mark-hop { 40% { transform: translateY(-9px) rotate(-6deg); } 70% { transform: translateY(1px) scaleY(.94); } }
.auth-modal__spinner {
  position: absolute; left: 50%; top: 90px; width: 34px; height: 34px; margin-left: -17px;
  border-radius: 50%; border: 3px solid rgba(245, 244, 255, .25); border-top-color: var(--sno);
  animation: spin .8s linear infinite;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.auth-modal.is-loading .auth-modal__spinner { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-modal__close {
  position: absolute; z-index: 2; top: -14px; right: -14px;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 0; cursor: pointer;
  color: #1A1252; background: var(--sno);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  transition: transform .2s var(--ease-pop);
}
.auth-modal__close:hover { transform: rotate(90deg) scale(1.06); }
.auth-modal__close:focus-visible { outline: 3px solid #4D8DFF; outline-offset: 2px; }
@media (max-width: 520px) {
  .auth-modal { padding: 16px 10px; place-items: start center; }
  /* Inside the card corner, where the card title leaves room. */
  .auth-modal { padding-top: 64px; }
  .auth-modal__prate { width: 64px; top: -54px; left: 22px; }
  .auth-modal__close { top: 10px; right: 10px; width: 36px; height: 36px; box-shadow: none; background: rgba(26, 18, 82, .08); }
}

/* ---------- Signed-out notice (signed-out.js) ---------- */
.notice-modal {
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 16px; border: 0;
  display: grid; place-items: center;
  background: transparent;
}
.notice-modal:not([open]) { display: none; }
.notice-modal::backdrop {
  background: rgba(10, 7, 34, .72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.notice-modal[open], .notice-modal[open]::backdrop { animation: modal-fade .25s ease-out; }
html:has(.notice-modal[open]) { overflow: hidden; }
.notice-modal__panel {
  position: relative;
  width: min(420px, 100%);
  padding: 44px 24px 26px;
  border-radius: var(--radius);
  background: var(--sno); color: var(--ink);
  text-align: center;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6);
}
.notice-modal[open] .notice-modal__panel { animation: modal-rise .35s var(--ease-pop); }
.notice-modal__prate {
  position: absolute; left: 50%; top: -58px; margin-left: -34px;
  width: 68px; height: auto;
  filter: drop-shadow(0 0 14px rgba(77, 141, 255, .6));
  animation: prate-peek .6s var(--ease-pop) .15s backwards, prate-bob 2.8s ease-in-out .75s infinite;
}
.notice-modal h2 { font-family: var(--font-display); font-size: clamp(28px, 6vw, 34px); color: var(--fjordnatt); margin: 0 0 8px; }
.notice-modal p { color: var(--ink-soft); margin: 0 0 24px; }
.notice-modal__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.notice-modal__actions .btn { flex: 1 1 150px; padding: 0 16px; white-space: nowrap; }

/* ---------- Text pages (regler/, personvern/) ---------- */
.doc-page { background: var(--sno); }
.nav--solid { position: sticky; top: 0; background: var(--fjordnatt); }
.doc {
  max-width: 720px; margin: 0 auto;
  padding: clamp(40px, 7vw, 80px) var(--gutter) 64px;
  color: var(--ink);
}
.doc h1 { font-size: clamp(44px, 7vw, 72px); color: var(--fjordnatt); margin-bottom: 20px; }
.doc h2 { font-size: clamp(24px, 3vw, 30px); color: var(--fjordnatt); margin: 40px 0 12px; }
.doc p, .doc li { font-size: 17px; line-height: 1.65; }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 1.2em; display: grid; gap: 6px; margin: 10px 0; }
.doc a { color: #2F6BFF; }
.doc__lead { font-size: 19px; color: var(--ink-soft); }
.doc__meta { font-size: 14px; color: var(--ink-soft); }
.doc__rules { counter-reset: rule; list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 12px; }
.doc__rules li {
  counter-increment: rule;
  position: relative; padding: 16px 18px 16px 62px;
  background: #fff; border-radius: 16px;
  box-shadow: 0 2px 0 rgba(23, 21, 58, .06), 0 0 0 1px rgba(23, 21, 58, .06);
}
.doc__rules li::before {
  content: counter(rule);
  position: absolute; left: 16px; top: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px;
  background: var(--fjordnatt); color: var(--sno);
}
.doc__closing { margin-top: 28px; font-size: 20px; }
.doc__todo { background: #FFF4D6; border-radius: 6px; padding: 0 4px; }
.doc-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  padding: 24px var(--gutter) 32px;
  background: #160E44; color: rgba(245, 244, 255, .7); font-size: 14px;
}
.doc-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.doc-footer a, .link-button { color: rgba(245, 244, 255, .85); text-decoration: none; font: inherit; }
.doc-footer a:hover, .link-button:hover { color: #fff; text-decoration: underline; }
.doc-footer a[aria-current="page"] { color: #fff; font-weight: 700; }
.link-button { background: none; border: 0; padding: 0; cursor: pointer; }

/* ---------- Cookie notice (consent.js) ---------- */
.cookie-notice {
  position: fixed; z-index: 50; left: 16px; right: 16px; bottom: 16px;
  max-width: 560px; margin: 0 auto;
  display: grid; gap: 12px;
  padding: 18px 20px;
  border-radius: 18px;
  background: #fff; color: var(--ink);
  box-shadow: 0 18px 50px rgba(10, 7, 34, .35), 0 0 0 1px rgba(23, 21, 58, .08);
  animation: modal-rise .4s var(--ease-pop);
}
.cookie-notice p { font-size: 15px; line-height: 1.5; margin: 0; }
.cookie-notice a { color: #2F6BFF; }
.cookie-notice__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.cookie-notice__ok {
  padding: 7px 18px; border: 0; border-radius: 10px; cursor: pointer;
  font: 700 14px/1 var(--font-body);
  background: var(--fjordnatt); color: var(--sno);
  transition: background .15s;
}
.cookie-notice__ok:hover { background: #2A1C6E; }
.cookie-notice__ok:focus-visible { outline: 3px solid #4D8DFF; outline-offset: 2px; }
.doc code { font-size: .9em; background: rgba(23, 21, 58, .06); padding: 1px 5px; border-radius: 5px; }
.doc__inline-button { color: #2F6BFF; text-decoration: underline; }

/* ---------- Contact form (kontakt/, contact.js) ---------- */
.contact { display: grid; gap: 18px; margin-top: 28px; }
.contact__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact__field { display: grid; gap: 6px; font-weight: 700; font-size: 15px; }
.contact__field input, .contact__field textarea {
  font: 400 16px/1.5 var(--font-body); color: var(--ink);
  padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid rgba(23, 21, 58, .15); background: #fff;
}
.contact__field textarea { resize: vertical; min-height: 150px; }
.contact__field input:focus, .contact__field textarea:focus { outline: none; border-color: #4D8DFF; box-shadow: 0 0 0 3px rgba(77, 141, 255, .2); }
.contact__topics { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.contact__topics legend { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.contact__topics label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
  background: #fff; box-shadow: 0 0 0 1.5px rgba(23, 21, 58, .12); font-size: 15px;
}
.contact__topics label:has(input:checked) { box-shadow: 0 0 0 2px #4D8DFF; background: #EEF3FF; }
.contact__topics input { accent-color: #2F6BFF; }
.contact__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact__status { min-height: 1.4em; margin: 0; font-size: 15px; color: var(--ink-soft); }
.contact__status.is-error { color: #C2304A; }
.contact__send {
  justify-self: start;
  padding: 11px 28px; border: 0; border-radius: 12px; cursor: pointer;
  font: 700 16px/1 var(--font-body);
  background: var(--fjordnatt); color: var(--sno);
  transition: background .15s;
}
.contact__send:hover { background: #2A1C6E; }
.contact__send:focus-visible { outline: 3px solid #4D8DFF; outline-offset: 2px; }
.contact__send:disabled { opacity: .6; cursor: default; }
.contact__note { font-size: 14px !important; color: var(--ink-soft); }
.contact__done { margin-top: 28px; padding: 24px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px rgba(23, 21, 58, .08); }
.contact__done h2 { margin-top: 0; }
@media (max-width: 560px) { .contact__row { grid-template-columns: 1fr; } }
.contact[hidden], .contact__done[hidden] { display: none; }

/* ---------- Welcome notice in caution-tape frame (hero) ---------- */
.welcome {
  position: relative;
  max-width: 640px; margin: 0 auto 6px;
  padding: 16px 46px 16px 20px;
  border: 9px solid transparent; border-radius: 16px;
  background:
    linear-gradient(#272074, #272074) padding-box,
    repeating-linear-gradient(-45deg, #FFC61A 0 14px, #17153A 14px 28px) border-box;
  box-shadow: 0 14px 34px rgba(8, 5, 30, .45);
  text-align: left;
}
.welcome p { margin: 0; font-size: 16px; line-height: 1.55; color: rgba(245, 244, 255, .9); }
.welcome strong { display: block; margin-bottom: 4px; font-size: 18px; color: #FFC61A; }
.welcome a { color: #FFC61A; font-weight: 700; }
.welcome__close {
  position: absolute; top: 8px; right: 8px;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  border: 0; cursor: pointer;
  color: rgba(245, 244, 255, .8); background: rgba(245, 244, 255, .08);
}
.welcome__close:hover { color: #fff; background: rgba(245, 244, 255, .16); }
.welcome__close:focus-visible { outline: 3px solid #FFC61A; outline-offset: 2px; }
.welcome-closed .welcome { display: none; }
/* Closed: a slim caution-tape tab that brings the notice back. */
.welcome-tab {
  display: none;
  align-items: center; gap: 8px;
  margin: 0 auto 6px; padding: 6px 16px 6px 8px;
  border: 4px solid transparent; border-radius: 999px; cursor: pointer;
  font: 700 14px/1.2 var(--font-body); color: rgba(245, 244, 255, .92);
  background:
    linear-gradient(#272074, #272074) padding-box,
    repeating-linear-gradient(-45deg, #FFC61A 0 8px, #17153A 8px 16px) border-box;
  transition: transform .2s var(--ease-pop);
}
.welcome-tab span {
  display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: #FFC61A; color: #17153A; font-size: 13px;
}
.welcome-tab:hover { transform: translateY(-2px); }
.welcome-tab:focus-visible { outline: 3px solid #FFC61A; outline-offset: 2px; }
.welcome-closed .welcome-tab { display: inline-flex; }
@media (max-width: 520px) {
  .welcome { padding: 14px 40px 14px 16px; border-width: 7px; }
  .welcome p { font-size: 15px; }
}
