/* Filmsida: samme stil for /filmer/<slug>/ og forhaandsvisninga i Freysta Publisering.
   Global med vilje - markeringa settes inn med set:html og faar ikke Astros scope-attributt. */
:root { --bg: #0a0a0b; --fg: #f2f0ea; --mute: #9a9891; --accent: #e04b2f; --gut: clamp(1rem, 3vw, 2.5rem); --ease: cubic-bezier(.2,.8,.2,1); }
body { background: var(--bg); color: var(--fg); font: 400 1.05rem/1.6 Inter, system-ui, sans-serif; }
.serif { font-family: Fraunces, Georgia, serif; font-weight: 300; line-height: 0.95; letter-spacing: -0.02em; }
.kicker { font: 500 0.72rem/1 Inter, sans-serif; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mute); }


/* ---------- Stage ---------- */
.stage { position: relative; height: 100svh; min-height: 30rem; overflow: hidden; background: #000; }
.stage__ambient { position: absolute; inset: 0; view-transition-name: film-stage; }
.stage__ambient > img, .stage__ambient > video { will-change: transform; }
.stage__ambient.is-still > img { animation: drift 24s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.12) translate(-1.5%, -1%); } }
.stage__shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(10,10,11,0.9) 0%, rgba(10,10,11,0.35) 42%, rgba(10,10,11,0) 68%), linear-gradient(to bottom, rgba(10,10,11,0.55), rgba(10,10,11,0) 22%); transition: opacity 0.8s ease; }
.stage__drift { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.stage__t > * { pointer-events: auto; }
.stage__t { position: absolute; z-index: 2; left: var(--gut); right: var(--gut); bottom: clamp(2rem, 7vh, 4.5rem); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem 3rem; transition: opacity 0.6s ease, transform 0.8s var(--ease); }
.stage__client { margin-bottom: 1.2rem; color: rgba(242,240,234,0.75); }
.stage h1 { font-size: clamp(2.8rem, 8vw, 8.5rem); max-width: 13ch; margin-left: -0.03em; text-shadow: 0 2px 40px rgba(0,0,0,0.35); }
.stage h1 .wd { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.04em 0.02em 0.12em; margin: -0.04em -0.02em -0.12em; }
.stage h1 .wd > span { display: inline-block; animation: rise 1.1s var(--ease) both; animation-delay: calc(0.25s + var(--i) * 0.07s); }
@keyframes rise { from { transform: translateY(105%); } }
.stage__client, .play { animation: fade 1s ease 0.7s both; }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } }

/* Round play button with a rotating text ring */
.play { all: unset; box-sizing: border-box; position: relative; flex: none; width: clamp(7.5rem, 11vw, 9.5rem); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--fg); }
.play__ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 18s linear infinite; }
.play__ring text { fill: currentColor; font: 500 10.5px Inter, sans-serif; letter-spacing: 0.24em; text-transform: uppercase; }
@keyframes spin { to { transform: rotate(360deg); } }
.play__core { width: 58%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--fg); color: #000; transition: transform 0.5s cubic-bezier(.3,1.6,.5,1), background-color 0.3s, color 0.3s; }
.play__core svg { width: 26%; margin-left: 8%; }
.play:hover .play__core, .play:focus-visible .play__core { transform: scale(1.12); background: var(--accent); color: #fff; }
.play:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.play__time { position: absolute; bottom: -1.8rem; left: 0; right: 0; text-align: center; font: 500 0.72rem/1 Inter, sans-serif; letter-spacing: 0.16em; color: rgba(242,240,234,0.75); }

/* Full film, revealed with a growing circle from the play button */
.stage__film { position: absolute; inset: 0; z-index: 3; background: #000; visibility: hidden; clip-path: circle(0% at var(--cx, 80%) var(--cy, 80%)); transition: clip-path 0.9s var(--ease), visibility 0s 0.9s; }
.stage__film video { width: 100%; height: 100%; object-fit: contain; }
.stage__film iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage__close { position: absolute; top: 1rem; right: 1rem; z-index: 40; display: flex; align-items: center; gap: 0.6rem; padding: 0.65rem 1rem; border-radius: 999px; border: 1px solid rgba(255,255,255,0.3); background: rgba(0,0,0,0.55); backdrop-filter: blur(6px); color: #fff; font: 500 0.7rem/1 Inter, sans-serif; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }
.stage.is-playing .stage__film { visibility: visible; clip-path: circle(150% at var(--cx, 80%) var(--cy, 80%)); transition: clip-path 1.1s var(--ease), visibility 0s; }
.stage.is-playing .stage__t { opacity: 0; transform: translateY(20px); pointer-events: none; }
.stage.is-playing .stage__close { opacity: 1; pointer-events: auto; transition-delay: 0.8s; }
.stage__unavailable { position: absolute; inset: 0; display: none; place-items: center; text-align: center; padding: 2rem; color: var(--mute); }
.stage.is-unavailable .stage__unavailable { display: grid; }

/* ---------- About ---------- */
.about { display: grid; gap: 2.5rem clamp(2rem, 6vw, 7rem); padding: clamp(5rem, 13vh, 9rem) var(--gut); align-items: start; }
@media (min-width: 60rem) { .about { grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr); } .facts { position: sticky; top: 6rem; } }
.facts dl { display: grid; gap: 1.4rem; margin: 0 0 1.8rem; }
.facts dl > div { display: grid; gap: 0.45rem; padding-bottom: 1.2rem; border-bottom: 1px solid #1f1f22; }
.facts dt { font: 500 0.68rem/1 Inter, sans-serif; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mute); }
.facts dd { margin: 0; font: 400 1.25rem/1.25 Fraunces, Georgia, serif; }
.facts__actions { display: flex; flex-wrap: wrap; gap: 0.7rem; padding-top: 0.4rem; }
.pill { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.8rem 1.3rem; border-radius: 999px; border: 1px solid rgba(255,255,255,0.3); font: 500 0.7rem/1 Inter, sans-serif; letter-spacing: 0.14em; text-transform: uppercase; transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
.pill:hover, .pill:focus-visible { background: var(--fg); color: #000; border-color: var(--fg); }
.pill--solid { background: var(--fg); color: #000; border-color: var(--fg); }
.pill--solid:hover, .pill--solid:focus-visible { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill svg { width: 0.9rem; height: 0.9rem; }
.about__lead { font: 300 clamp(1.7rem, 3vw, 2.9rem)/1.18 Fraunces, Georgia, serif; letter-spacing: -0.015em; max-width: 30ch; margin-bottom: 2.2rem; }
.about__lead::first-letter { color: var(--accent); }
.about__rest { columns: 2 22rem; column-gap: 3rem; color: rgba(242,240,234,0.78); max-width: 60rem; }
.about__rest p { margin: 0 0 1.1em; break-inside: avoid; }
.about__rest p:last-child { font: italic 300 1.3rem/1.4 Fraunces, Georgia, serif; color: var(--fg); }
.about__empty { font: italic 300 clamp(1.5rem, 2.4vw, 2.2rem)/1.3 Fraunces, Georgia, serif; color: var(--mute); max-width: 26ch; }

/* ---------- Quote ---------- */
.quote { position: relative; padding: clamp(4.5rem, 12vh, 8rem) var(--gut); border-top: 1px solid #1f1f22; overflow: hidden; }
.quote blockquote::before { content: ''; display: block; width: 2.5rem; height: 2px; background: var(--accent); margin-bottom: 1.6rem; }
.quote blockquote { position: relative; margin: 0; max-width: 56rem; font: 300 clamp(1.5rem, 2.6vw, 2.5rem)/1.28 Fraunces, Georgia, serif; letter-spacing: -0.01em; color: rgba(242,240,234,0.74); }
.quote__kicker { margin-bottom: 2.4rem; }
.quote blockquote p { margin: 0 0 0.55em; }
.quote__hl { font-style: italic; font-weight: 400; color: #fff; }
.quote figcaption { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 1rem; }
.quote figcaption strong { font: italic 400 1.4rem/1.2 Fraunces, Georgia, serif; }
.quote figcaption span { font-size: 0.9rem; color: var(--mute); }

/* «Flere filmer» og «Neste film» er erstattet av det delte galleriet
   (/styles/galleri.css). */

[data-rise] { opacity: 0; transform: translateY(28px); transition: opacity 1s ease, transform 1.1s var(--ease); }
[data-rise].is-in { opacity: 1; transform: none; }
html:not(.js) [data-rise] { opacity: 1; transform: none; }

@media (max-width: 40rem) {
  .stage__t { flex-direction: column; align-items: flex-start; }
  .play { width: 6.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .stage h1 .wd > span, .stage__client, .play { animation: none; }
  .play__ring, .stage__ambient.is-still > img { animation: none; }
  [data-rise] { opacity: 1; transform: none; transition: none; }
  .stage__film { transition: none !important; }
}
