/* =========================================================================
   Levi Henriksen
   Grunnfarge #0A0F0D, lys #E8E4DA, messing #B79A5B.
   Newsreader til brødtekst og titler, Libre Franklin til kapiteler.
   ========================================================================= */

:root {
  --g: #0A0F0D;          /* grunn   */
  --l: #E8E4DA;          /* lys     */
  --m: #B79A5B;          /* messing */
  --dyp: #141B17;        /* litt lysere enn grunn, til flater */
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;
  --mjuk: cubic-bezier(.2, .7, .2, 1);
  --kant: color-mix(in srgb, currentColor 22%, transparent);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--g);
  color: var(--l);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-underline-offset: .3em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

img { max-width: 100%; }

/* Rota er en container slik at alle cqw-mål følger sidens faktiske bredde. */
.rot {
  container-type: inline-size;
  overflow-x: clip;
  min-height: 100vh;
}

/* --- Typografi ------------------------------------------------------- */

.caps {
  font-family: var(--sans); font-weight: 500; font-size: 12px;
  line-height: 1.5; letter-spacing: .16em; text-transform: uppercase;
}
.mini {
  font-family: var(--sans); font-weight: 600; font-size: 10px;
  line-height: 1.5; letter-spacing: .14em; text-transform: uppercase;
}
.sm { font-family: var(--sans); font-size: 14px; line-height: 1.5; }
.dempet { opacity: .72; }
.messing { color: var(--m); }

.h1 {
  margin: 0; font-weight: 300; font-size: clamp(64px, 11.5cqw, 176px);
  line-height: .88; letter-spacing: -.035em;
}
.h2 {
  margin: 0; font-weight: 300; font-size: clamp(32px, 4.2cqw, 60px);
  line-height: 1.04; letter-spacing: -.02em;
}
.sitat {
  margin: 0; font-style: italic; font-weight: 300;
  font-size: clamp(30px, 4.8cqw, 70px); line-height: 1.08;
  letter-spacing: -.02em; text-wrap: balance;
}

.skjult {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* Hopp til innhold – synlig først ved tastaturfokus. */
.hopp {
  position: absolute; left: 16px; top: -100px; z-index: 50;
  padding: 12px 20px; background: var(--l); color: var(--g);
  font-family: var(--sans); font-size: 13px; text-decoration: none;
  transition: top .2s ease;
}
.hopp:focus { top: 16px; }

/* --- Flater og skillelinjer ------------------------------------------ */

.wrap {
  max-width: 1280px; margin: 0 auto;
  padding: clamp(56px, 7.2cqw, 104px) clamp(20px, 4.4cqw, 64px);
}
.wrap-brei { max-width: 1440px; }
.hr   { border-top: 1px solid var(--kant); }
.hr-m { border-top: 1px solid color-mix(in srgb, var(--m) 60%, transparent); }
.lys  { background: var(--l); color: var(--g); }

/* --- Topp og meny ----------------------------------------------------- */

.topp {
  position: relative; z-index: 20;
  max-width: 1440px; margin: 0 auto;
  padding: 16px clamp(20px, 4.4cqw, 64px) 0;
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 0 32px;
}
.merke {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 22px; letter-spacing: -.01em; text-decoration: none;
}
.meny { display: flex; flex-wrap: wrap; gap: 0 clamp(18px, 2.6cqw, 40px); }
.meny a {
  display: inline-flex; align-items: center; min-height: 44px;
  text-decoration: none;
}
.meny a[aria-current] {
  text-decoration: underline; text-decoration-color: var(--m);
  text-underline-offset: 8px;
}

/* Menyknappen vises bare på smale skjermer. */
.menyknapp {
  display: none; align-items: center; gap: 12px;
  min-height: 44px; padding: 0 4px; margin: 0;
  border: 0; background: transparent; color: inherit; cursor: pointer;
}
.menyknapp-strek {
  display: block; width: 26px; height: 9px;
  border-top: 1px solid currentColor; border-bottom: 1px solid currentColor;
  transition: transform .4s var(--mjuk);
}
.menyknapp[aria-expanded='true'] .menyknapp-strek { transform: rotate(90deg); }

.mobilmeny {
  position: fixed; inset: 0; z-index: 40;
  background: var(--g);
  display: flex; flex-direction: column;
  padding: 16px clamp(20px, 6vw, 40px) 40px;
  opacity: 0; visibility: hidden; transform: translateY(-12px);
  transition: opacity .35s ease, transform .45s var(--mjuk), visibility .35s;
}
.mobilmeny[data-apen='true'] { opacity: 1; visibility: visible; transform: none; }
.mobilmeny-topp {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 44px; margin-bottom: 8px;
}
.mobilmeny nav {
  flex: 1 1 auto; display: flex; flex-direction: column;
  justify-content: center; gap: 4px;
}
.mobilmeny nav a {
  display: block; padding: 10px 0;
  font-weight: 300; font-size: clamp(34px, 11vw, 54px);
  line-height: 1.1; letter-spacing: -.02em; text-decoration: none;
  opacity: 0; transform: translateY(18px);
}
.mobilmeny[data-apen='true'] nav a {
  animation: menyinn .5s var(--mjuk) forwards;
}
.mobilmeny nav a[aria-current] { color: var(--m); }
@keyframes menyinn { to { opacity: 1; transform: none; } }

.lukkeknapp {
  min-height: 44px; min-width: 44px; padding: 0; margin: 0;
  border: 0; background: transparent; color: inherit; cursor: pointer;
}

body[data-meny='apen'] { overflow: hidden; }

@media (max-width: 880px) {
  .meny { display: none; }
  .menyknapp { display: inline-flex; }
}

/* --- Knapper og lenker ------------------------------------------------ */

.knapp {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid currentColor; background: transparent; color: inherit;
  font-family: var(--sans); font-weight: 500; font-size: 12px;
  letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background-color .25s ease, color .25s ease;
}
.knapp:hover, .knapp:focus-visible { background-color: var(--l); color: var(--g); }
.lys .knapp:hover, .lys .knapp:focus-visible { background-color: var(--g); color: var(--l); }

.knapp-fylt { background: var(--l); color: var(--g); border-color: var(--l); }
.knapp-fylt:hover, .knapp-fylt:focus-visible { background: transparent; color: var(--l); }

.lenke {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 44px; text-decoration: none;
}
.pille {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border: 1px solid color-mix(in srgb, currentColor 45%, transparent);
  border-radius: 999px; text-decoration: none;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.pille:hover, .pille:focus-visible {
  background-color: var(--l); color: var(--g); border-color: var(--l);
}
.tagg {
  display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px;
  background: var(--m); color: var(--g);
}

/* Pila som skyter fram når lenken får pekeren. */
.pil { flex: 0 0 auto; transition: transform .5s var(--mjuk); }
a:hover .pil, a:focus-visible .pil { transform: translateX(12px); }

.ring {
  flex: 0 0 auto; border: 1px solid currentColor; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: transform .4s var(--mjuk), background-color .3s ease, color .3s ease;
}
a:hover .ring, a:focus-visible .ring {
  transform: scale(1.16); background-color: var(--l); color: var(--g);
}

.ikon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
  border-radius: 50%;
  transition: transform .35s var(--mjuk), background-color .25s ease,
              color .25s ease, border-color .25s ease;
}
.ikon:hover, .ikon:focus-visible {
  transform: translateY(-4px);
  background-color: var(--l); color: var(--g); border-color: var(--l);
}

/* --- Bilder ----------------------------------------------------------- */

/* Gråtone som henter fargen tilbake når du holder pekeren over. */
.foto, .flis { position: relative; display: block; overflow: hidden; }
.foto img, .flis img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.15) brightness(.78);
  transform: scale(1.02);
  transition: transform 1.1s var(--mjuk), filter .7s ease;
}
.flis img { filter: grayscale(1) contrast(1.15) brightness(.72); }
.foto:hover img, .foto:focus-visible img,
.flis:hover img, .flis:focus-visible img,
a:hover .foto img, a:focus-visible .foto img {
  filter: grayscale(0) contrast(1.05) brightness(.9);
  transform: scale(1.08);
}
.flis:hover img, .flis:focus-visible img {
  filter: grayscale(0) contrast(1.05) brightness(.88);
}

.skygge {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, var(--g) 0%, transparent 62%);
}
.flis-tekst {
  position: absolute; left: 0; right: 0; bottom: 9%;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center; transition: transform .6s var(--mjuk);
}
.flis:hover .flis-tekst, .flis:focus-visible .flis-tekst { transform: translateY(-14px); }
.flis-t {
  font-weight: 300; font-size: clamp(36px, 3.8cqw, 56px);
  line-height: 1; letter-spacing: -.02em;
}

/* --- Hero ------------------------------------------------------------- */

.hero {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  min-height: clamp(560px, 62cqw, 900px);
}
.hero-bilde { position: absolute; top: 0; right: 0; bottom: 0; width: min(56%, 820px); }
.hero-bilde img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 16%;
  filter: grayscale(1) contrast(1.18) brightness(.92);
}
.hero-fade-v {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--g) 0%, var(--g) 8%, transparent 62%);
}
.hero-fade-h {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, var(--g) 0%, transparent 44%),
              linear-gradient(180deg, var(--g) 0%, transparent 18%);
}
.hero-tekst {
  position: relative; z-index: 2; margin-top: auto;
  padding: clamp(40px, 6cqw, 96px) clamp(20px, 4.4cqw, 64px) clamp(36px, 5cqw, 72px);
}
.hero-strek {
  width: 72px; height: 1px; background: var(--m);
  margin-bottom: clamp(20px, 2.4cqw, 32px);
}
.hero-kreditt {
  position: absolute; right: clamp(20px, 4.4cqw, 64px); bottom: 18px; font-size: 11px;
}

@container (width < 760px) {
  .hero { min-height: 0; }
  .hero-bilde { position: relative; width: 100%; aspect-ratio: 4 / 5; }
  .hero-fade-v { display: none; }
  .hero-tekst { margin-top: -18cqw; }
}

/* --- Filmflate med drivende bakgrunn ---------------------------------- */

.film { position: relative; overflow: hidden; }
.film-b {
  position: absolute; left: -6%; top: -6%; width: 112%; height: 112%;
  object-fit: cover; filter: grayscale(1) contrast(1.2) brightness(.46);
  animation: driv 26s ease-in-out infinite alternate;
}
@keyframes driv {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.14) translate(-3%, -2%); }
}

/* --- Bok: permen som glir av arket ------------------------------------ */

.bok { position: relative; display: block; aspect-ratio: 1.06 / 1; }

/* Permen og arket får bredden satt i prosent av .bok, ikke av aspect-ratio.
   Med både top og bottom satt kan innholdet ellers presse boksen bredere,
   og da regner nettleseren ut en høyde som flyter ut av rammen. */
.bok-perm {
  position: absolute; left: 0; top: 0; bottom: 0; width: 62.9%; z-index: 2;
  padding: 9% 9% 8%;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .7s var(--mjuk), box-shadow .7s ease;
}
.bok-ark {
  position: absolute; left: 0; top: 2.5%; bottom: 2.5%; width: 80%; z-index: 1;
  padding: 9% 7% 8% 52%;
  display: flex; flex-direction: column; justify-content: space-between;
  background: #D8D3C5; color: var(--g);
  transform: translateX(7%);
  transition: transform .8s var(--mjuk);
}
/* Omslagsbildet dekker hele permen; arket bak glir ut som før. */
.bok-bilde {
  position: absolute; inset: 0; display: block;
  width: 100%; height: 100%; object-fit: cover;
}
.bok-perm:has(.bok-bilde)::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(232, 228, 218, .16);
}
.bok:hover .bok-ark, .bok:focus-visible .bok-ark { transform: translateX(57%); }
.bok:hover .bok-perm, .bok:focus-visible .bok-perm {
  transform: translateX(-2%); box-shadow: 14px 18px 36px rgba(0, 0, 0, .5);
}
.bok-t {
  font-style: italic; font-weight: 300;
  font-size: clamp(24px, 2.5cqw, 34px); line-height: 1.02; letter-spacing: -.02em;
}

/* --- Bokrygg som svinger ut i rommet ---------------------------------- */

.rygg { position: relative; display: block; perspective: 1400px; text-decoration: none; }
.rygg:hover, .rygg:focus-visible { z-index: 5; }
.rygg-i {
  position: absolute; left: 0; top: 0; bottom: 0; pointer-events: none;
  transform-style: preserve-3d; transform-origin: 0 50%;
  transition: transform .8s var(--mjuk);
}
.rygg-r {
  position: absolute; left: 0; top: 0; bottom: 0; pointer-events: auto;
  display: flex; flex-direction: column; align-items: center;
  justify-content: space-between; padding: 16px 0 12px;
  box-shadow: inset 0 0 0 1px rgba(232, 228, 218, .12);
}
.rygg-rt { writing-mode: vertical-rl; line-height: 1; white-space: nowrap; }
.rygg-p {
  position: absolute; top: 0; bottom: 0; pointer-events: auto;
  transform-origin: 0 50%; transform: rotateY(90deg);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 26px 24px 22px;
  box-shadow: inset 0 0 0 1px rgba(232, 228, 218, .12),
              18px 24px 44px rgba(0, 0, 0, .55);
}
.rygg-pt {
  font-style: italic; font-weight: 300; font-size: 30px;
  line-height: 1.04; letter-spacing: -.015em;
}
.rygg:hover .rygg-i, .rygg:focus-visible .rygg-i {
  transform: translate3d(-50%, -12px, 70px) rotateY(-82deg);
}

.hylle {
  display: inline-flex; align-items: flex-end; vertical-align: bottom;
  height: 470px; padding: 0 3px; margin-bottom: 40px;
  border-bottom: 1px solid color-mix(in srgb, currentColor 34%, transparent);
}
.hyllerad { padding-top: 30px; font-size: 0; line-height: 0; }

/* --- Plate: skiva som sklir ut av omslaget ---------------------------- */

.lp { position: relative; display: block; aspect-ratio: 1.42 / 1; }
.lp-omslag {
  position: absolute; left: 0; top: 0; bottom: 0; aspect-ratio: 1 / 1; z-index: 2;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .7s var(--mjuk);
}
/* Omslagsbildet dekker hele fronten; skiva bak sklir ut som før. */
.lp-bilde {
  position: absolute; inset: 0; display: block;
  width: 100%; height: 100%; object-fit: cover;
}
.lp-skive {
  position: absolute; left: 0; top: 3%; bottom: 3%; aspect-ratio: 1 / 1; z-index: 1;
  border-radius: 50%;
  background:
    conic-gradient(from 30deg, rgba(255,255,255,0) 0 8%, rgba(255,255,255,.1) 12%,
      rgba(255,255,255,0) 17% 58%, rgba(255,255,255,.07) 62%, rgba(255,255,255,0) 67%),
    repeating-radial-gradient(circle, #1a1a1a 0 1px, #0b0b0b 1px 3px);
  box-shadow: 0 0 0 1px rgba(232, 228, 218, .16);
  transform: translateX(17%) rotate(0deg);
  transition: transform .9s var(--mjuk);
}
.lp-etikett { position: absolute; inset: 34%; border-radius: 50%; background: var(--m); }
.lp-hull    { position: absolute; inset: 48.4%; border-radius: 50%; background: #0b0b0b; }
.lp:hover .lp-skive, .lp:focus-visible .lp-skive {
  transform: translateX(47%) rotate(110deg);
}
.lp:hover .lp-omslag, .lp:focus-visible .lp-omslag { transform: translateX(-2%); }
.lp-t {
  font-style: italic; font-weight: 300; font-size: 22px;
  line-height: 1.04; letter-spacing: -.015em;
}
.kant { box-shadow: inset 0 0 0 1px rgba(232, 228, 218, .16); }
/* Hårstreken må ligge over omslagsbildet, ikke under det. */
.lp-omslag.kant::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(232, 228, 218, .16);
}

/* CD-en er sølv i stedet for svart. */
.cd {
  top: 15%; bottom: 15%;
  background: conic-gradient(from 0deg, #cfd3d6, #868d92, #f1f3f4, #979ea3,
                             #dfe3e6, #868d92, #cfd3d6);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .45);
  transform: translateX(50%) rotate(0deg);
}
.cd .lp-hull { inset: 40%; background: var(--g); box-shadow: 0 0 0 5px rgba(255,255,255,.35); }

/* --- Plata som er åpnet: skiva blir stående og snurre ----------------- */

button.lp {
  width: 100%; margin: 0; padding: 0; border: 0;
  background: transparent; color: inherit; font: inherit;
  text-align: left; cursor: pointer;
}
.lp.paa .lp-omslag { transform: translateX(-2%); }
.lp.paa .lp-skive {
  transform: translateX(47%) rotate(110deg);
  animation: snurr 1.8s linear infinite;
}
.lp.paa .cd {
  transform: translateX(92%) rotate(150deg);
  animation-name: snurr-cd;
}
@keyframes snurr {
  from { transform: translateX(47%) rotate(110deg); }
  to   { transform: translateX(47%) rotate(470deg); }
}
@keyframes snurr-cd {
  from { transform: translateX(92%) rotate(150deg); }
  to   { transform: translateX(92%) rotate(510deg); }
}

/* Snora som faller fra plata ned til arket. */
.snor {
  position: absolute; left: 0; top: 100%;
  width: 1px; height: 48px;
  background: var(--m); transform-origin: 50% 0;
}
.snor { display: none; }
.paa > .snor { display: block; animation: fall .35s var(--mjuk) both; }
@keyframes fall { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* --- Bøker: boka som står på skrå og vipper mot deg ------------------- */

.bokkort {
  display: block; width: 100%; box-sizing: border-box;
  margin: 0; padding: 0; border: 0; background: transparent;
  color: inherit; font: inherit; text-align: left;
  text-decoration: none; cursor: pointer;
}
.vippebok {
  position: relative; display: block; width: 100%;
  transform-style: preserve-3d;
  transform: perspective(1400px) rotateY(-24deg);
  transition: transform .8s var(--mjuk);
}
.vippebok.rolig { transform: perspective(1400px) rotateY(-14deg); }
.vippebok-flate {
  display: block; width: 100%; height: auto;
  background-color: var(--dyp);
  box-shadow: -18px 26px 44px -20px rgba(0, 0, 0, .9);
  outline: 1px solid rgba(232, 228, 218, .14); outline-offset: -1px;
}
/* Bøkene uten omslagsbilde får tittelen satt på en fargeflate. */
.vippebok-tom {
  aspect-ratio: 16 / 25; box-sizing: border-box; padding: 11% 10%;
  display: flex; flex-direction: column; justify-content: space-between;
}
.vippebok-t {
  font-style: italic; font-weight: 300;
  font-size: clamp(17px, 1.7cqw, 24px); line-height: 1.06; letter-spacing: -.015em;
}
/* Snittflaten: de hvite sidekantene, stilt opp på høykant. */
.vippebok-snitt {
  position: absolute; top: 1.2%; bottom: 1.2%; left: 100%; width: 20px;
  transform-origin: 0 50%; transform: rotateY(90deg);
  background: repeating-linear-gradient(90deg, #ded8c8 0 1px, #b4ad9b 1px 2px);
}
.bokkort:hover .vippebok, .bokkort:focus-visible .vippebok {
  animation: none;
  transform: perspective(1400px) rotateY(0deg) translateZ(46px);
}
.bokkort.paa .vippebok {
  animation: none;
  transform: perspective(1400px) rotateY(0deg) translateZ(24px);
}
.vugge .vippebok { animation: vugge 7s ease-in-out infinite alternate; }
@keyframes vugge {
  from { transform: perspective(1400px) rotateY(-28deg); }
  to   { transform: perspective(1400px) rotateY(-15deg); }
}

.bokhylle {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 44%), 1fr));
  grid-auto-flow: dense; align-items: end;
  gap: 56px clamp(24px, 3cqw, 40px); padding-top: 12px;
}
.bokcelle { position: relative; min-width: 0; }
.bokcelle .plate-m { margin-top: 18px; }
.snor-bok { height: 56px; }

/* Skogli-romanene på rekke, med messingmerke over hver. */
.skogli-rekke {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 44%), 1fr));
  gap: 48px clamp(24px, 3cqw, 40px); align-items: end;
  border-top: 1px solid color-mix(in srgb, var(--m) 60%, transparent);
}
.skogli-rekke li { position: relative; min-width: 0; padding-top: 44px; }
.skogli-rekke li::before {
  content: ''; position: absolute; left: 0; top: 0;
  width: 1px; height: 26px; background: var(--m);
}

/* Filmplakaten. */
.plakat {
  display: flex; flex-direction: column; justify-content: space-between;
  aspect-ratio: 2 / 3; box-sizing: border-box; padding: 9%;
  background: var(--dyp); color: var(--l); text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(232, 228, 218, .16), 0 30px 50px -26px rgba(0, 0, 0, .9);
  transition: transform .7s var(--mjuk);
}
.plakat:hover, .plakat:focus-visible { transform: translateY(-10px); }

.scenerad {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 6px 32px; padding: 22px 0;
}

.lenke-i {
  font-style: italic; text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: .3em;
}

/* --- Toppflatene på bokssida ------------------------------------------ */

.hero-bok { position: relative; overflow: hidden; margin-top: 16px; }
.hero-bok-b { position: absolute; top: 0; right: 0; bottom: 0; width: 62%; }
.hero-bok-b img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 30%;
  filter: grayscale(1) contrast(1.12) brightness(.8);
}
.hero-bok-slor-v {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--g) 0%, var(--g) 5%, transparent 60%);
}
.hero-bok-slor-h {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, var(--g) 0%, transparent 42%),
              linear-gradient(180deg, var(--g) 0%, transparent 16%);
}
.hero-bok-foto {
  position: absolute; right: clamp(20px, 4.4cqw, 64px); bottom: 18px; font-size: 11px;
}
.hero-bok-inn {
  position: relative; max-width: 1280px; margin: 0 auto; box-sizing: border-box;
  min-height: clamp(420px, 44cqw, 640px);
  padding: clamp(40px, 5cqw, 72px) clamp(20px, 4.4cqw, 64px);
  display: flex; flex-direction: column; align-items: flex-start;
  justify-content: flex-end; gap: clamp(14px, 1.8cqw, 26px);
}
@container (max-width: 760px) { .hero-bok-b { width: 100%; } }

.bygdebilde { position: relative; overflow: hidden; }
.bygdebilde img {
  position: absolute; left: -5%; top: -5%; width: 110%; height: 110%;
  object-fit: cover; object-position: 50% 70%;
  filter: grayscale(1) contrast(1.15) brightness(.6);
  animation: driv 32s ease-in-out infinite alternate;
  transition: filter 1.4s ease;
}
.bygdebilde:hover img { filter: grayscale(0) contrast(1.05) brightness(.82); }
.bygdebilde-slor {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, var(--g) 0%, transparent 58%),
              linear-gradient(180deg, var(--g) 0%, transparent 34%);
}
.bygdebilde-inn {
  position: relative; max-width: 1280px; margin: 0 auto; box-sizing: border-box;
  min-height: clamp(460px, 52cqw, 760px);
  padding: clamp(40px, 5cqw, 72px) clamp(20px, 4.4cqw, 64px);
  display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: 16px 56px;
}

/* --- Arket med sporliste og lenker ------------------------------------ */

.plateark, .bokark {
  grid-column: 1 / -1; min-width: 0; box-sizing: border-box;
  padding: 8px 0 clamp(32px, 3.8cqw, 56px);
  border-top: 1px solid var(--m);
  border-bottom: 1px solid var(--kant);
  animation: plateark-inn .55s var(--mjuk) .1s both;
}
@keyframes plateark-inn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: none; }
}
.plateark-spor {
  display: flex; align-items: center; gap: 14px;
  min-height: 44px; box-sizing: border-box; padding: 4px 0;
  color: inherit; text-decoration: none;
}
.plateark-spor-t { transition: transform .4s var(--mjuk); }
.plateark-spor-v:hover .plateark-spor-t,
.plateark-spor-v:focus-visible .plateark-spor-t { transform: translateX(8px); }

.plate { position: relative; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.plate-m {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; font-size: 11px;
}

/* --- Kalenderrader ---------------------------------------------------- */

.rad {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px;
  padding: 18px 12px; transition: background-color .3s ease;
}
.rad:hover { background-color: rgba(232, 228, 218, .045); }
.dag {
  flex: 0 0 84px; height: 84px;
  background: var(--l); color: var(--g);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 4px;
  transition: transform .45s var(--mjuk);
}
.rad:hover .dag { transform: scale(1.07) rotate(-3deg); }
.dag-n { font-size: 36px; line-height: .9; }
.rad-t { flex: 999 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rad-n { font-size: clamp(22px, 2.2cqw, 30px); line-height: 1.12; letter-spacing: -.01em; }

.tidligere {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 2px 24px; padding: 13px 12px;
}

/* --- Kort (Nytt) ------------------------------------------------------ */

.kort {
  display: flex; flex-direction: column; gap: 16px; min-width: 0;
  text-decoration: none; transition: transform .5s var(--mjuk);
}
.kort:hover, .kort:focus-visible { transform: translateY(-10px); }
.kort-b { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3; }
.kort-t { font-size: clamp(24px, 2.3cqw, 30px); line-height: 1.12; letter-spacing: -.01em; }
.kort-meta { display: flex; justify-content: space-between; gap: 16px; }

/* Novelle- og snuttkort settes som en bokside. */
.ark {
  padding: 9% 10%; background: var(--l); color: var(--g);
  display: flex; flex-direction: column; justify-content: space-between;
}
.ark-t { font-style: italic; font-size: clamp(19px, 1.7cqw, 23px); line-height: 1.35; }

/* Omslagsattrapp – brukes til bøker og plater uten opplastet bilde. */
.attrapp {
  background: var(--dyp); display: flex; align-items: center; justify-content: center;
}
.attrapp-bok {
  width: 34%; aspect-ratio: 2 / 3; padding: 5% 5% 4%;
  background: var(--l); color: var(--g);
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 10px 14px 28px rgba(0, 0, 0, .5);
}

/* --- Filterknapper ---------------------------------------------------- */

.filtre { display: flex; flex-wrap: wrap; }
.filter {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; margin: 0 clamp(18px, 2.4cqw, 34px) 0 0; padding: 0;
  border: 0; border-bottom: 1px solid transparent;
  background: transparent; color: inherit; opacity: .66; cursor: pointer;
  text-decoration: none;
  transition: opacity .25s ease, border-color .25s ease;
}
.filter:hover { opacity: .9; text-decoration: none; }
.filter[aria-current] { opacity: 1; border-bottom-color: var(--m); }
.filter-antall { opacity: .6; }

/* --- Videospiller ----------------------------------------------------- */

.spiller { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: #050807; }
.spiller-b {
  position: absolute; left: -4%; top: -4%; width: 108%; height: 108%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.15) brightness(.6);
  transition: filter .8s ease;
}
.spiller[data-spiller='true'] .spiller-b {
  filter: grayscale(0) contrast(1.05) brightness(.9);
  animation: driv 26s ease-in-out infinite alternate;
}
.spiller-tittel {
  position: absolute; inset: 0; padding: 8% 8% 22%;
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.spiller-tittel span {
  font-style: italic; font-weight: 300;
  font-size: clamp(30px, 4.4cqw, 64px); line-height: 1.04;
  letter-spacing: -.02em; opacity: .5;
}
.spiller-fade {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(5,8,7,.92) 0%, rgba(5,8,7,0) 48%);
}
.spiller-bunn {
  position: absolute; left: clamp(16px, 2.2cqw, 28px); right: clamp(16px, 2.2cqw, 28px);
  bottom: clamp(18px, 2.2cqw, 28px);
  display: flex; align-items: center; gap: 18px;
}
.spiller-naa {
  font-style: italic; font-weight: 300;
  font-size: clamp(24px, 2.6cqw, 38px); line-height: 1.05; letter-spacing: -.015em;
}
.ringknapp {
  flex: 0 0 64px; width: 64px; height: 64px; padding: 0;
  border: 1px solid var(--l); border-radius: 50%;
  background: transparent; color: var(--l);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: transform .4s var(--mjuk), background-color .3s ease, color .3s ease;
}
.ringknapp:hover, .ringknapp:focus-visible {
  transform: scale(1.12); background-color: var(--l); color: var(--g);
}
.fremdrift-spor {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: rgba(232, 228, 218, .18);
}
.fremdrift { height: 100%; width: 0; background: var(--m); }
.spiller[data-spiller='true'] .fremdrift { animation: spill 30s linear infinite; }
@keyframes spill { from { width: 0; } to { width: 100%; } }

.spor {
  display: flex; align-items: center; gap: 16px; width: 100%;
  min-height: 56px; margin: 0; padding: 0;
  border: 0; background: transparent; color: inherit;
  font: inherit; text-align: left; cursor: pointer;
}
.spor-t {
  flex: 1 1 auto; min-width: 0;
  font-style: italic; font-size: 22px; line-height: 1.2; opacity: .72;
  transition: transform .4s var(--mjuk), opacity .25s ease;
}
.spor:hover .spor-t, .spor:focus-visible .spor-t { transform: translateX(8px); }
.spor[aria-pressed='true'] .spor-t { opacity: 1; }
.spor-nr { flex: 0 0 24px; }
.spor[aria-pressed='true'] .spor-nr { color: var(--m); }
.spor-merke { flex: 0 0 auto; opacity: 0; transition: opacity .3s ease; }
.spor[aria-pressed='true'][data-spiller='true'] .spor-merke { opacity: 1; }

/* --- Skjema ----------------------------------------------------------- */

.felt { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.felt > label { font-family: var(--sans); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; opacity: .78; }
.felt input, .felt textarea, .felt select {
  width: 100%; min-height: 52px; padding: 12px 14px;
  border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
  background: rgba(232, 228, 218, .04); color: inherit;
  font-family: var(--serif); font-size: 18px; line-height: 1.4;
  transition: border-color .25s ease, background-color .25s ease;
}
.felt textarea { min-height: 140px; resize: vertical; }
.felt input:focus, .felt textarea:focus, .felt select:focus {
  border-color: var(--m); background: rgba(232, 228, 218, .07);
  outline: none;
}
.felt-feil input, .felt-feil textarea { border-color: #E08A7A; }
.feilmelding { font-family: var(--sans); font-size: 13px; color: #E08A7A; }

.varsel {
  padding: 18px 22px; border-left: 2px solid var(--m);
  background: rgba(183, 154, 91, .1);
}
.varsel-ok { border-left-color: #7FB98B; background: rgba(127, 185, 139, .1); }
.varsel-feil { border-left-color: #E08A7A; background: rgba(224, 138, 122, .1); }

/* Honningkrukke mot roboter – skal aldri vises. */
.krukke { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* --- Bevegelse inn i bildet ------------------------------------------- */

.inn { opacity: 0; transform: translateY(24px); }
.inn-synlig {
  opacity: 1; transform: none;
  transition: opacity .8s ease, transform .9s var(--mjuk);
}

/* Mjuk overgang mellom sider. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: ut .25s ease both; }
::view-transition-new(root) { animation: innton .4s ease both; }
@keyframes ut      { to   { opacity: 0; } }
@keyframes innton  { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rot *, .mobilmeny * {
    transition-duration: .01ms !important;
    animation: none !important;
  }
  .inn { opacity: 1; transform: none; }
  @view-transition { navigation: none; }
}
