/* PuppLit v2, shared by every page (fonts, colours, buttons, top bar, menu, footer). The stage. One violet, one night ink, one warm stage-light yellow on a cool chalk floor.
   Big Shoulders (built from Chicago's industrial signage) for the big type, Schibsted Grotesk for reading.
   Phone first; wider screens add to it. */

@font-face { font-family: "Big Shoulders"; src: url("../fonts/big-shoulders.woff2") format("woff2"); font-weight: 500 900; font-display: swap; }
@font-face { font-family: "Schibsted"; src: url("../fonts/schibsted.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

:root {
  --violet: #5b3df5;
  --violet-deep: #3f22d6;
  --night: #150c2e;
  --chalk: #eceaf3;
  --paper: #f8f7fc;
  --bulb: #ffd43b;
  --beam: #ffe27a;
  --haze: #b9aef8;
  --slate: #5a5570;
  --display: "Big Shoulders", "Arial Narrow", Impact, sans-serif;
  --text: "Schibsted", "Segoe UI", system-ui, -apple-system, sans-serif;
  --gutter: clamp(16px, 4.2vw, 64px);
  --bar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--night); font-family: var(--text); font-size: 17px; line-height: 1.5; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--bulb); color: var(--night); padding: 10px 14px; font-weight: 700; }
.skip:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: transform .2s ease, background-color .2s ease;
}
.btn-bulb { background: var(--bulb); color: var(--night); }
.btn-bulb:hover { background: #ffe066; }
.btn-bulb:active { transform: scale(.97); }
.btn-night { background: var(--night); color: var(--paper); }
.btn-night:hover { background: #24184a; }
.btn-line { box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-line:hover { background: rgba(21, 12, 46, .06); }
[data-book].is-loading { opacity: .7; cursor: progress; }
.link { font-weight: 700; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.link:hover { text-decoration-thickness: 3px; }

/* ---------- top bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--bar-h);
  display: flex; align-items: center; gap: 10px; padding: 0 var(--gutter);
  transition: background-color .3s ease, color .3s ease;
}
/* solid, not frosted: a blur behind the bar would be redrawn every frame over the videos and the 3D */
.bar.solid { background: rgba(248, 247, 252, .97); box-shadow: 0 1px 0 rgba(21, 12, 46, .08); }
.bar.on-dark { color: var(--paper); }
.bar.on-dark.solid { background: rgba(21, 12, 46, .9); }
.bar-logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -.01em; margin-right: auto; }
.bar-logo svg { width: 34px; height: 34px; }
.bar-links { display: none; }
.bar-book { min-height: 40px; padding: 0 16px; font-size: 15px; }
.bar-menu { min-height: 40px; padding: 0 6px 0 10px; font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; }
.burger { display: grid; gap: 5px; width: 20px; }
.burger::before, .burger::after { content: ""; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s ease; }
.menu-open .burger::before { transform: translateY(3.5px) rotate(45deg); }
.menu-open .burger::after { transform: translateY(-3.5px) rotate(-45deg); }
@media (max-width: 359px) { .bar-logo span { display: none; } }

/* the full-screen menu */
.menu {
  position: fixed; inset: 0; z-index: 45; background: var(--night); color: var(--paper);
  padding: calc(var(--bar-h) + 12px) var(--gutter) 28px; overflow-y: auto; overscroll-behavior: contain;
  visibility: hidden; opacity: 0; transition: opacity .3s ease, visibility 0s linear .3s;
}
.menu-open .menu { visibility: visible; opacity: 1; transition: opacity .3s ease; }
.menu-open .bar { color: var(--paper); background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.menu-main a { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(44px, 13vw, 96px); line-height: .98; text-decoration: none; padding: 2px 0; }
.menu-main a:hover { color: var(--bulb); }
.menu-cols { display: grid; gap: 26px; margin-top: 34px; padding-top: 26px; border-top: 1px solid rgba(248, 247, 252, .16); }
.menu-cols h2 { font-size: 14px; font-weight: 700; color: var(--haze); margin-bottom: 8px; }
.menu-cols a { display: block; padding: 7px 0; text-decoration: none; font-size: 17px; }
.menu-cols a:hover { color: var(--bulb); }
.menu .btn { margin-top: 30px; width: 100%; }
@media (min-width: 1024px) {
  :root { --bar-h: 76px; }
  .bar-links { display: flex; gap: 26px; margin-right: 18px; }
  .bar-links a { text-decoration: none; font-weight: 600; font-size: 16px; }
  .bar-links a:hover { text-decoration: underline; text-underline-offset: 5px; }
  .bar-book { min-height: 44px; padding: 0 20px; font-size: 16px; }
  .menu { padding-top: calc(var(--bar-h) + 30px); }
  .menu-inner { display: grid; grid-template-columns: 1.1fr 1.4fr; gap: 6vw; align-items: start; }
  .menu-cols { margin-top: 10px; padding-top: 0; border-top: 0; grid-template-columns: repeat(3, 1fr); }
  .menu .btn { width: auto; }
}
/* inner pages: the bar takes its own room at the top instead of floating over a stage */
.bar.bar-flow { position: sticky; top: 0; background: rgba(248, 247, 252, .97); box-shadow: 0 1px 0 rgba(21, 12, 46, .08); }
.menu-open .bar.bar-flow { background: transparent; box-shadow: none; }

/* ---------- footer ---------- */
.foot { background: var(--night); color: #d9d4f2; padding: 12vh var(--gutter) 28px; overflow: hidden; }
.foot-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 20px; }
.foot h2 { font-size: 14px; font-weight: 700; color: var(--haze); margin-bottom: 10px; }
.foot-cols a { display: block; padding: 6px 0; text-decoration: none; font-size: 16px; }
.foot-cols a:hover { color: var(--bulb); }
.foot-social { display: grid; grid-template-columns: repeat(4, 44px); gap: 12px 14px; margin-top: 40px; }
.foot-social a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(217, 212, 242, .3); }
.foot-social a:hover { background: var(--bulb); color: var(--night); box-shadow: none; }
.foot-social svg { width: 19px; height: 19px; }
.foot-word { font-family: var(--display); font-weight: 900; text-transform: uppercase; color: var(--violet); line-height: .74; font-size: 27vw; text-align: center; margin: 9vh calc(var(--gutter) * -1) 3vh; white-space: nowrap; user-select: none; }
.foot-legal { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: #a9a3c8; }
.foot-legal a { text-decoration: none; }
.foot-legal a:hover { color: var(--paper); }
@media (min-width: 1024px) {
  .foot-top { display: grid; grid-template-columns: 1fr auto; gap: 6vw; align-items: start; }
  .foot-cols { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
  .foot-social { grid-template-columns: repeat(8, 44px); margin-top: 0; }
}

/* ---------- Ask PuppLit: the assistant (js/v2/chat.js) ---------- */
.plc { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 70; font-family: var(--text); color: var(--night); }
/* no "contain: layout" on .plc: it would make the corner box the frame of the full-screen window and squash it */
/* while the cookie notice covers the corner, the button waits out of sight (moving it would count as a layout shift) */
.plc.plc-raise .plc-launch, .plc.plc-raise .plc-hint { opacity: 0; pointer-events: none; }
.menu-open .plc { display: none; }
.plc-launch { display: flex; align-items: center; gap: 0; padding: 0; border-radius: 999px; background: #fff; box-shadow: 0 10px 30px rgba(21, 12, 46, .22), 0 0 0 1px rgba(21, 12, 46, .06); transition: transform .2s ease; }
.plc-launch:hover { transform: translateY(-2px); }
.plc-face { width: 56px; height: 56px; display: grid; place-items: center; }
.plc-face svg { width: 38px; height: 38px; }
.plc-launch-label { display: none; }
.plc-eyes { transform-box: fill-box; transform-origin: center; animation: plc-blink 5.5s infinite; }
.plc-thinking .plc-eyes { animation: plc-think 1.2s ease-in-out infinite alternate; }
@keyframes plc-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes plc-think { from { transform: translate(-1.2px, -1.4px); } to { transform: translate(1.4px, -1.4px); } }
.plc-hint { position: absolute; right: 0; bottom: 70px; width: 236px; display: none; background: var(--night); color: var(--paper); border-radius: 16px 16px 4px 16px; box-shadow: 0 12px 30px rgba(21, 12, 46, .25); }
.plc-hinting .plc-hint { display: block; animation: plc-pop .35s ease; }
.plc-hint-text { display: block; width: 100%; text-align: left; padding: 14px 34px 14px 16px; font-size: 15px; line-height: 1.35; color: inherit; }
.plc-hint-close { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border-radius: 50%; }
.plc-hint-close::before, .plc-close::before, .plc-hint-close::after, .plc-close::after { content: ""; position: absolute; left: 50%; top: 50%; width: 13px; height: 2px; margin: -1px 0 0 -6.5px; background: currentColor; transform: rotate(45deg); }
.plc-hint-close::after, .plc-close::after { transform: rotate(-45deg); }
@keyframes plc-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.plc-panel { position: fixed; inset: 0; display: none; flex-direction: column; background: var(--paper); height: 100vh; height: 100dvh; }
.plc-open .plc-panel { display: flex; animation: plc-pop .25s ease; }
.plc-open .plc-launch, .plc-open .plc-hint { display: none; }
html.plc-locked, html.plc-locked body { overflow: hidden; }
.plc-head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; padding-top: calc(12px + env(safe-area-inset-top)); background: var(--night); color: var(--paper); }
.plc-avatar { width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; }
.plc-avatar svg { width: 30px; height: 30px; }
.plc-who { display: grid; line-height: 1.25; margin-right: auto; }
.plc-who strong { font-size: 17px; }
.plc-who span { font-size: 13px; color: #c9c3e6; }
.plc-close { position: relative; width: 44px; height: 44px; border-radius: 50%; color: var(--paper); flex: none; }
.plc-close:hover { background: rgba(248, 247, 252, .12); }
.plc-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 14px 8px; display: flex; flex-direction: column; gap: 10px; }
.plc-msg { max-width: 86%; padding: 11px 14px; border-radius: 16px; font-size: 15.5px; line-height: 1.45; }
.plc-msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.plc-bot { align-self: flex-start; background: var(--chalk); border-bottom-left-radius: 4px; }
.plc-me { align-self: flex-end; background: var(--violet); color: #fff; border-bottom-right-radius: 4px; }
.plc-act { display: block; width: 100%; margin-top: 10px; min-height: 42px; padding: 0 14px; border-radius: 999px; background: var(--bulb); color: var(--night); font-weight: 700; font-size: 15px; }
.plc-act:hover { background: #ffe066; }
.plc-act-ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--night); }
.plc-act-ghost:hover { background: rgba(21, 12, 46, .06); }
.plc-act:disabled { opacity: .6; }
.plc-done { margin-top: 8px !important; font-size: 13.5px; font-weight: 700; color: var(--violet); }
.plc-typing { display: flex; gap: 5px; padding: 15px 16px; }
.plc-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--slate); animation: plc-dot 1s infinite ease-in-out; }
.plc-typing span:nth-child(2) { animation-delay: .15s; } .plc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes plc-dot { 0%, 80%, 100% { opacity: .3; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }
.plc-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 14px 10px; }
.plc-chips[hidden] { display: none; }
.plc-chip { min-height: 38px; padding: 0 14px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px rgba(21, 12, 46, .25); font-size: 14.5px; font-weight: 600; background: #fff; }
.plc-chip:hover { box-shadow: inset 0 0 0 1.5px var(--violet); color: var(--violet); }
.plc-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid rgba(21, 12, 46, .1); background: #fff; }
.plc-input { flex: 1; resize: none; border: 1.5px solid rgba(21, 12, 46, .2); border-radius: 20px; padding: 10px 14px; font: inherit; font-size: 16px; line-height: 1.35; max-height: 120px; background: var(--paper); color: var(--night); }
.plc-input:focus { outline: none; border-color: var(--violet); }
.plc-send { position: relative; width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--violet); }
.plc-send::before { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -3px 0 0 -6px; border-top: 2.5px solid #fff; border-right: 2.5px solid #fff; transform: rotate(-45deg); }
.plc-send:hover { background: var(--violet-deep); }
.plc-foot { margin: 0; padding: 0 14px calc(8px + env(safe-area-inset-bottom)); background: #fff; font-size: 12px; color: var(--slate); }
.plc-ticket { display: grid; gap: 8px; margin-top: 10px; }
.plc-ticket strong { font-size: 15px; }
.plc-ticket input, .plc-ticket textarea { width: 100%; border: 1.5px solid rgba(21, 12, 46, .2); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 16px; background: #fff; color: var(--night); }
.plc-ticket input:focus, .plc-ticket textarea:focus { outline: none; border-color: var(--violet); }
.plc-trap { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.plc-err { margin: 0 !important; font-size: 13.5px; color: #b42318; }
.plc-err:empty { display: none; }
@media (min-width: 641px) {
  .plc { right: 22px; bottom: 22px; }
  .plc.plc-raise .plc-launch, .plc.plc-raise .plc-hint { opacity: 1; pointer-events: auto; }
  .plc-launch { padding-right: 18px; }
  .plc-launch-label { display: inline; font-weight: 700; font-size: 15.5px; }
  .plc-panel { inset: auto 22px 22px auto; width: 390px; height: min(640px, calc(100vh - 44px)); border-radius: 20px; overflow: hidden; box-shadow: 0 24px 60px rgba(21, 12, 46, .28), 0 0 0 1px rgba(21, 12, 46, .08); }
  .plc-head { padding-top: 12px; }
  .plc-foot { padding-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { .plc-eyes, .plc-thinking .plc-eyes, .plc-typing span { animation: none; } }

@media (prefers-reduced-motion: reduce) { * { transition-duration: .01ms !important; } }
