/* «Fra idé til avtrykk» – historiesiden */

@font-face { font-family: "Cormorant"; src: url("../assets/fonts/cormorant.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../assets/fonts/nunito.woff2") format("woff2"); font-weight: 600 900; font-display: swap; }

.historie { background: var(--papir); }
.h-tilbake { margin-left: 8px; }
.h-hopp { margin-left: auto; color: #C9C9D0; font-size: 14px; text-decoration: none; white-space: nowrap; }
.h-hopp:hover { color: #fff; }
@media (max-width: 520px) { .h-hopp { display: none; } .h-tilbake { margin-left: auto; } }

.h { position: relative; }

/* ---------- scenen ---------- */
.h-scene {
  position: sticky; top: 0; z-index: 2;
  height: 58svh; padding: 82px 12px 10px;
  background: var(--papir);
}
.h-scene__ramme {
  --scene-bg: #0D0D0F; --scene-fg: #F2F1EE; --scene-dempet: rgba(242, 241, 238, .55);
  position: relative; height: 100%; border-radius: 24px; overflow: hidden;
  border: 1px solid var(--scene-kant, transparent);
  background: var(--scene-bg); color: var(--scene-fg);
  display: grid; grid-template-rows: auto 1fr auto;
}
.h-scene__topp { display: flex; align-items: center; gap: 12px; padding: 14px 16px 0; font-size: 12.5px; }
.h-merkelapp {
  font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 99px; border: 1px solid currentColor; opacity: .55;
}
.h-uke { font-weight: 600; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.h-tid { margin-left: auto; color: var(--scene-dempet); }
.h-tid strong { color: var(--scene-fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.h-svg { width: 100%; height: 100%; min-height: 0; display: block; touch-action: pan-y; }
.h-fremdrift { display: flex; align-items: center; gap: 10px; padding: 0 16px 14px; font-size: 11.5px; font-weight: 600; letter-spacing: .12em; color: var(--scene-dempet); font-variant-numeric: tabular-nums; }
.h-fremdrift__linje { flex: 1; height: 2px; background: color-mix(in srgb, var(--scene-fg) 18%, transparent); border-radius: 2px; overflow: hidden; }
.h-fremdrift__linje i { display: block; height: 100%; width: 0; background: var(--accent); }

/* ---------- svg: felles ---------- */
.h-liten-etikett, .h-fe-etikett { fill: var(--scene-dempet); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; text-anchor: middle; }
.h-fe-etikett { text-anchor: start; fill: #6C6C73; }
.h-ring { fill: none; stroke: var(--scene-fg); stroke-width: 1.4; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: .5; }
.h-prikk { fill: #E4492B; }
.h-puls { fill: none; stroke: #E4492B; stroke-width: 1.6; transform-origin: 300px 300px; animation: h-puls 3.3s cubic-bezier(.2,.6,.3,1) infinite; }
@keyframes h-puls { from { transform: scale(1); opacity: .85; } to { transform: scale(9); opacity: 0; } }
.h-lys { transform-origin: 300px 300px; animation: h-lys 3.3s ease-in-out infinite; }
@keyframes h-lys { 0%, 100% { transform: scale(.85); opacity: .75; } 50% { transform: scale(1.08); opacity: 1; } }
.h-ord text { fill: var(--scene-fg); font-size: 22px; font-weight: 500; text-anchor: middle; letter-spacing: -0.01em; opacity: 0; }

/* 03 */
.h-rutenett line, .h-rutenett circle { fill: none; stroke: #E4492B; stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: .35; }
.h-strek { fill: #1E3550; fill-opacity: 0; stroke: #1E3550; stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; }
.h-strek--aksent { fill: #B8743A; stroke: #B8743A; }
.h-maal path { fill: none; stroke: #6C6C73; stroke-width: 1; }
.h-maal text { fill: #6C6C73; font-size: 13px; font-style: italic; text-anchor: middle; }
.h-stygg { font-family: "Times New Roman", Times, serif !important; font-size: 40px; fill: #8A8A90; text-anchor: middle; letter-spacing: 3px; opacity: 0; }
.h-pen { font-size: 38px; font-weight: 400; text-anchor: middle; opacity: 0; }
[data-farge3] text { fill: #6C6C73; font-size: 13px; text-anchor: middle; }

/* 04 */
.h-kort4 { cursor: pointer; }
.h-kort4__flate { fill: #fff; stroke: #E4E2DD; stroke-width: 1.5; filter: drop-shadow(0 10px 22px rgba(13,13,15,.07)); transition: stroke .3s ease; }
.h-kort4:hover .h-kort4__flate { stroke: #0D0D0F; }
.h-kort4.er-valgt .h-kort4__flate { stroke: #0D0D0F; stroke-width: 2.2; }
.h-kort4__etikett { fill: #6C6C73; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-anchor: middle; }
.h-kort4.er-valgt .h-kort4__etikett { fill: #E4492B; }

/* 05 */
.h-boble { fill: #0D0D0F; }
.h-boble__tekst { fill: #fff; font-size: 15px; font-weight: 500; text-anchor: middle; }

/* 06–07 */
.h-bruk-etikett { fill: #6C6C73; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-anchor: middle; }
.h-mini-tekst { font-size: 12px; }
.h-mini-navn { font-size: 16px; font-weight: 650; letter-spacing: -0.02em; }
.h-skygge { filter: drop-shadow(0 8px 18px rgba(13,13,15,.08)); }
.h-mappe-tekst { fill: #fff; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.h-fil-tekst { fill: #1C1C21; font-size: 12px; font-weight: 500; }

/* 08 */
.h-nett-ramme { fill: #fff; fill-opacity: 0; stroke: #CFCBC3; stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; }
.h-nett-tittel { fill: #fff; font-size: 24px; font-weight: 600; letter-spacing: -0.03em; }
.h-live { fill: #fff; font-size: 14px; font-weight: 600; text-anchor: middle; }

/* 09 */
.h-hv-sporsmal { fill: #1C1C21; font-size: 28px; font-weight: 600; letter-spacing: -0.03em; text-anchor: middle; }
.h-hv-valg { cursor: pointer; }
.h-hv-valg rect { fill: #F6F5F1; stroke: #E4E2DD; stroke-width: 1.5; transition: fill .3s ease, stroke .3s ease; }
.h-hv-valg text { fill: #1C1C21; font-size: 16px; font-weight: 600; text-anchor: middle; transition: fill .3s ease; }
.h-hv-valg:hover rect { stroke: #0D0D0F; }
.h-hv-valg.er-valgt rect { fill: #0D0D0F; stroke: #0D0D0F; }
.h-hv-valg.er-valgt text { fill: #fff; }
.h-hv-kort { fill: #fff; stroke: #0D0D0F; stroke-width: 1.8; filter: drop-shadow(4px 4px 0 #0D0D0F); }
.h-hv-etikett { fill: #E4492B; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.h-hv-navn { fill: #1C1C21; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.h-hv-pris { fill: #1C1C21; font-size: 15px; font-weight: 600; text-anchor: end; }
.h-hv-tekst { fill: #6C6C73; font-size: 12.5px; }

/* 10 */
.h-tall { fill: var(--scene-fg); font-size: 56px; font-weight: 600; letter-spacing: -0.04em; text-anchor: middle; font-variant-numeric: tabular-nums; }
.h-tall--aksent { fill: var(--accent); }
.h-tall-under { fill: var(--scene-dempet); font-size: 16px; text-anchor: middle; }

/* 11 */
.h-etter-tittel { fill: #fff; font-size: 26px; font-weight: 600; letter-spacing: -0.03em; }
.h-glider { cursor: ew-resize; }
.h-glider line { stroke: #0D0D0F; stroke-width: 2; }
.h-glider circle { fill: #0D0D0F; }
.h-glider path { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* start-skjult: skriptet viser det som skal synes */
[data-ringer], .h-ord text, [data-rutenett], [data-konstruksjon], [data-maal], [data-farge3],
[data-hovedlogo], [data-boble], [data-hake], [data-nett], [data-hvanaa], [data-tall], [data-foer-etter] { opacity: 0; }
[data-ringer] { opacity: 1; }
[data-radar-lys], [data-prikk], [data-velg-tittel], [data-markoer], [data-trykk] { opacity: 0; }
.h-scene-tittel { fill: #1C1C21; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; text-anchor: middle; }
.h-scene-tittel--liten { fill: #E4492B; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.h-markoer circle:first-child { fill: rgba(13,13,15,.88); stroke: #fff; stroke-width: 3; filter: drop-shadow(0 6px 12px rgba(13,13,15,.25)); }
.h-markoer__kjerne { fill: #E4492B; }
.h-trykk { fill: none; stroke: #E4492B; stroke-width: 2; }
.h-sprut { fill: #fff; }
.h-kort4__inn { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.h-kort4:hover .h-kort4__inn, .h-kort4.loftet .h-kort4__inn { transform: translateY(-8px); }
.h-kort4.loftet .h-kort4__flate { stroke: #0D0D0F; }

/* ---------- teksten ---------- */
.h-tekst { position: relative; z-index: 1; padding: 0 var(--kant); }
.h-kap { min-height: 90svh; padding: 6svh 0 20svh; display: flex; flex-direction: column; justify-content: flex-start; max-width: 34em; }
.h-kap h1 { font-size: clamp(32px, 4.6vw, 60px); margin: 16px 0 18px; }
.h-kap h2 { font-size: clamp(30px, 4.2vw, 54px); margin: 16px 0 18px; }
.h-kap .ingress { color: var(--dempet); }
.h-kap .ingress strong { color: var(--grafitt); font-weight: 600; }
.h-liste { margin: 20px 0 0; padding: 0; list-style: none; counter-reset: h; }
.h-liste li { counter-increment: h; display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--linje); font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }
.h-liste li:last-child { border-bottom: 1px solid var(--linje); }
.h-liste li::before { content: counter(h); color: var(--accent); font-weight: 600; font-size: 14px; padding-top: 3px; }
.h-scroll { margin-top: 28px; font-size: 14px; font-weight: 600; color: var(--dempet); }
.h-scroll span { display: inline-block; color: var(--accent); animation: h-hopp 1.8s ease-in-out infinite; }
@keyframes h-hopp { 50% { transform: translateY(4px); } }
.h-kap--slutt { min-height: 75svh; }
.h-knapper { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* valgknapper */
.h-valg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 24px; }
.h-valg--liste { grid-template-columns: 1fr; max-width: 360px; }
.h-valg button {
  appearance: none; cursor: pointer; text-align: left; display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--linje); background: #fff;
  font: inherit; font-size: 16px; font-weight: 600; color: var(--grafitt);
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.h-valg button span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--stein); }
.h-valg button:hover { border-color: var(--blekk); }
.h-valg button[aria-checked="true"] { background: var(--blekk); border-color: var(--blekk); color: #fff; }
.h-valg button[aria-checked="true"] span { background: var(--accent); color: #fff; }
.h-hint { margin-top: 12px; font-size: 13.5px; color: var(--dempet); }
.h-anbefaling { margin-top: 18px; font-size: 16px; color: var(--dempet); max-width: 30em; }
.h-anbefaling strong { color: var(--grafitt); }

/* ---------- stor skjerm: tekst venstre, scene høyre ---------- */
@media (min-width: 960px) {
  .h { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); max-width: 1360px; margin: 0 auto; }
  .h-scene { order: 2; height: 100svh; padding: 100px 32px 32px 0; background: none; }
  .h-tekst { order: 1; padding: 0 56px 0 var(--kant); }
  .h-kap { min-height: 105svh; padding: 0; justify-content: center; }
  .h-kap--start { padding-top: 40px; }
  .h-scene__topp { padding: 20px 24px 0; font-size: 13.5px; }
  .h-fremdrift { padding: 0 24px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .h-puls, .h-scroll span { animation: none !important; opacity: 0; }
}
