/* The hero: a timber house builds itself at blue hour as you scroll. js/hero.js draws the film on the canvas. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--natt); color: var(--tekst); font-family: var(--skrift); font-size: 1.125rem; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---- menu, on the film ---- */
.meny { position: fixed; z-index: 30; left: 0; right: 0; top: 0; height: var(--meny-h); display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 0 var(--kant); color: var(--tekst-lys); transition: background-color 0.25s ease; }
.meny.fast { background: var(--petrol-dyp); }
.meny-logo { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; font-weight: 600; font-size: 1.0625rem; line-height: 1.12; letter-spacing: -0.01em; }
.meny-logo svg { width: 2.25rem; height: 2.25rem; flex: none; }
.meny-punkter { display: flex; gap: clamp(1.25rem, 2.4vw, 2.5rem); }
.meny-punkter a { text-decoration: none; font-size: 1.0625rem; padding: 0.4rem 0; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.25s ease; }
.meny-punkter a:hover, .meny-punkter a:focus-visible { background-size: 100% 1px; }
.meny-hoyre { display: flex; align-items: center; gap: 1.25rem; }
.sprak { background: none; border: 0; color: inherit; font: inherit; font-size: 0.9375rem; padding: 0.3rem 0; cursor: pointer; }
.sprak span { opacity: 0.62; } .sprak .pa { opacity: 1; font-weight: 600; }
.meny-ring { text-decoration: none; font-weight: 600; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--eik); outline-offset: 3px; }

/* ---- the scene ---- */
.hero { position: relative; background: var(--natt); }
.hero-scene { position: relative; height: 100svh; min-height: 34rem; overflow: hidden; background: var(--natt); }
html.js-anim .hero { height: calc(100svh * (1 + var(--hero-reise))); }
html.js-anim .hero-scene { position: sticky; top: 0; }

/* The film fills the scene. The plane has the film's own shape (1.85 : 1) and is cut like a cover image, mostly on the right and at
   the top, so the gable of the house never slides in under the text. */
.hero-film { position: absolute; inset: 0; }
.hero-flate { position: absolute; width: max(100%, calc(100svh * 1.85)); height: max(100%, calc(100vw / 1.85)); left: calc((100% - max(100%, 100svh * 1.85)) * 0.3); top: calc((100% - max(100%, 100vw / 1.85)) * 0.72); }
.hero-flate canvas, .hero-flate .plakat, .hero-flate .plakat img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-flate canvas { opacity: 0; }
.hero-film.klar canvas { opacity: 1; }
/* the frames a reader rests on, in full sharpness over the canvas while the film stands still (js/hero.js) */
.hero-skarp { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.hero-skarp.vis { opacity: 1; transition: opacity 0.35s ease; }

/* the text column, in the sky to the left of the house */
.hero-tekst { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: space-between; height: 100%; width: min(34.5vw, 33rem); margin-left: var(--kant); padding: calc(var(--meny-h) + clamp(0.75rem, 5vh, 3.25rem)) 0 clamp(1.25rem, 4.5vh, 2.75rem); color: var(--tekst-lys); text-shadow: 0 1px 26px rgba(8, 24, 32, 0.45); }
.hero-tekst h1 { margin: 0; font-size: clamp(2.25rem, 1.2rem + 3.1vw, 4.5rem); line-height: 1.03; letter-spacing: -0.03em; font-weight: 500; text-wrap: balance; }
.hero-ingress { margin: clamp(0.9rem, 2.6vh, 1.6rem) 0 0; font-size: clamp(1.125rem, 1.02rem + 0.28vw, 1.3125rem); line-height: 1.45; color: rgba(244, 241, 234, 0.9); }
.hero-knapper { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: clamp(1.1rem, 3.2vh, 2rem); text-shadow: none; }
.knapp { display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; min-height: 3.375rem; padding: 0 1.5rem; border-radius: 3px; font-weight: 600; font-size: 1.0625rem; text-decoration: none; transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.knapp-lys { background: var(--kalk); color: var(--petrol-dyp); }
.knapp-lys:hover, .knapp-lys:focus-visible { background: var(--eik); }
.knapp-kant { border: 1px solid rgba(244, 241, 234, 0.5); color: var(--tekst-lys); font-variant-numeric: tabular-nums; background: rgba(12, 34, 44, 0.28); }
.knapp-kant:hover, .knapp-kant:focus-visible { border-color: var(--tekst-lys); }
.knapp svg { width: 1.05rem; height: 1.05rem; }

.hero-bevis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.75rem, 1.6vw, 1.5rem); border-top: 1px solid var(--linje-lys); padding-top: 0.95rem; font-size: 1rem; line-height: 1.3; }
.hero-bevis li { color: var(--tekst-lys-dempet); }
.hero-bevis b { display: block; color: var(--tekst-lys); font-weight: 600; }

/* low windows on a computer: less air first, then the proof line goes before the title gets too small */
@media (min-width: 900px) and (max-height: 720px) {
  .hero-tekst { padding-top: calc(var(--meny-h) + 0.5rem); padding-bottom: 1rem; }
  .hero-bevis { font-size: 0.9375rem; padding-top: 0.7rem; }
}
@media (min-width: 900px) and (max-height: 640px) {
  .hero-bevis { display: none; }
  .hero-tekst { justify-content: flex-start; }
}

/* standing screens: the text on top on the flat night, the house under it */
@media (max-width: 899px), (max-aspect-ratio: 13/10) {
  .hero-scene { display: flex; flex-direction: column; min-height: 0; }
  .hero-tekst { order: 1; flex: none; height: auto; width: auto; margin: 0 var(--kant); padding: calc(var(--meny-h) + 0.6rem) 0 0; justify-content: flex-start; text-shadow: none; }
  .hero-film { order: 2; position: relative; inset: auto; flex: 1 1 0; min-height: 0; margin-top: 0.4rem; }
  .hero-flate { left: 0; top: 0; width: 100%; height: 100%; }
  .hero-flate canvas, .hero-flate .plakat img { object-fit: contain; object-position: 50% 100%; }
  .hero-bevis { display: none; }
  .meny-punkter { display: none; }
}
@media (max-width: 767px) {
  .hero-tekst h1 { font-size: clamp(2.25rem, 10.4vw, 3rem); }
  .hero-ingress { font-size: 1.0625rem; }
  .knapp { min-height: 3.125rem; padding: 0 1.1rem; font-size: 1rem; flex: 1 1 auto; }
  .meny-logo { font-size: 0.9375rem; }
  .meny-logo svg { width: 1.9rem; height: 1.9rem; }
  .sprak { display: none; }
}
