/* Santi ElectroLabs – samme formspråk som appene:
   blå flate (#1867FF), lyse blue-50-bakgrunner, hvite kort med rounded-2xl,
   grå tekst (Tailwind gray-skala) og oransje som aksent (kald-ende / folie). */

:root {
  --blue: #1867ff;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --orange: #ff8a3d;
  --orange-500: #f97316;
  --green: #16a34a;
  --red: #dc2626;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;

  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-3xl: 24px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(17, 24, 39, 0.08), 0 2px 4px -2px rgba(17, 24, 39, 0.06);
  --shadow-lg: 0 20px 40px -12px rgba(24, 103, 255, 0.25);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --container: 1120px;
  --gutter: 24px;
  --header-h: 68px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--gray-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--gray-900); line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--blue-600); color: #fff; padding: 8px 14px; border-radius: var(--radius-xl);
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--blue-500); outline-offset: 3px; border-radius: 6px; }

/* ---------- Header ---------- */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background-color .35s var(--ease), box-shadow .35s var(--ease), color .35s;
  color: #fff;
}
.site-header.is-solid,
.site-header.is-light {
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 1px 0 var(--gray-200);
  color: var(--gray-900);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: flex; align-items: center; gap: 10px; color: inherit; font-weight: 700; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; background: var(--blue);
  display: grid; place-items: center; flex: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.brand-mark img { width: 24px; height: auto; }
.brand-name { font-size: 17px; line-height: 1.05; }
.brand-name small { display: block; font-weight: 500; font-size: 12px; opacity: .7; letter-spacing: 0.02em; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: inherit; font-weight: 500; font-size: 15px;
  padding: 8px 14px; border-radius: 999px; opacity: .9;
  transition: background-color .2s, opacity .2s;
}
.nav a:hover { text-decoration: none; opacity: 1; background: rgba(127, 127, 127, 0.12); }
.nav a.is-active { opacity: 1; background: rgba(127,127,127,.14); }
.nav .nav-cta { background: var(--blue-600); color: #fff; opacity: 1; margin-left: 6px; }
.nav .nav-cta:hover { background: var(--blue-700); }
.site-header:not(.is-solid):not(.is-light) .nav .nav-cta { background: #fff; color: var(--blue-600); }

.nav-toggle {
  display: none; background: none; border: 0; color: inherit; padding: 8px; margin-right: -8px; cursor: pointer;
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; top: var(--header-h); left: 12px; right: 12px;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; color: var(--gray-900);
    border-radius: var(--radius-2xl); padding: 8px; box-shadow: 0 20px 40px rgba(17,24,39,.18);
    opacity: 0; transform: translateY(-8px) scale(.98); pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 12px 14px; font-size: 16px; }
  .nav .nav-cta { margin: 6px 0 0; text-align: center; }
  .site-header:not(.is-solid):not(.is-light) .nav .nav-cta { background: var(--blue-600); color: #fff; }
}

/* ---------- Buttons (som appens "Start nytt prosjekt" / "Åpne eksisterende") ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 24px; border-radius: var(--radius-2xl);
  font: inherit; font-weight: 600; font-size: 17px; cursor: pointer; border: 2px solid transparent;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s, opacity .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); opacity: .85; }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn-primary { background: var(--blue-600); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { box-shadow: var(--shadow-lg); }
.btn-outline { background: #fff; color: var(--blue-600); border-color: var(--blue-600); box-shadow: var(--shadow-sm); }
.btn-white { background: #fff; color: var(--blue-600); box-shadow: 0 10px 30px rgba(0, 20, 80, .25); }
.btn-ghost-light { color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost-light:hover { background: rgba(255,255,255,.1); }

/* ---------- Hero ---------- */

.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 40px) 0 96px;
  background: radial-gradient(120% 90% at 85% 10%, #3a85ff 0%, var(--blue) 45%, #0f55e6 100%);
  color: #fff;
}
.hero-traces {
  position: absolute; inset: -10% -5%; z-index: -1; width: 110%; height: 120%;
  opacity: .9; will-change: transform;
}
.hero-traces path, .hero-traces circle {
  fill: none; stroke: rgba(255,255,255,.22); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
}
.hero-traces .t-strong { stroke: rgba(255,255,255,.4); }
.hero-traces .pulse { stroke: #fff; stroke-width: 3.5; opacity: .9; filter: drop-shadow(0 0 6px rgba(255,255,255,.8)); }

.hero-inner { position: relative; text-align: center; max-width: 820px; margin: 0 auto; will-change: transform, opacity; }
.hero-logo { width: min(340px, 72vw); margin: 0 auto 40px; }
.hero h1 { color: #fff; font-size: clamp(38px, 6.4vw, 68px); font-weight: 800; letter-spacing: -0.035em; }
.hero h1 .line { display: block; }
.hero-lead { font-size: clamp(18px, 2.2vw, 21px); color: rgba(255,255,255,.88); max-width: 600px; margin: 22px auto 36px; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 76px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255,255,255,.75); font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
}
@media (max-height: 760px) { .scroll-cue { display: none; } }
.scroll-cue span.mouse {
  width: 24px; height: 38px; border: 2px solid rgba(255,255,255,.6); border-radius: 14px; position: relative;
}
.scroll-cue span.mouse::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px;
  background: #fff; border-radius: 2px; animation: wheel 1.8s var(--ease) infinite;
}
@keyframes wheel { 0% { opacity: 0; transform: translateY(-2px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* Intro-animasjon ved innlasting */
.intro { opacity: 0; transform: translateY(24px); animation: intro .9s var(--ease) forwards; }
.intro.d1 { animation-delay: .15s; } .intro.d2 { animation-delay: .3s; } .intro.d3 { animation-delay: .45s; } .intro.d4 { animation-delay: .6s; }
@keyframes intro { to { opacity: 1; transform: none; } }

/* Bølgekant fra blå hero til hvit */
.hero-edge { position: absolute; left: 0; right: 0; bottom: -1px; height: 70px; color: #fff; }
.hero-edge svg { width: 100%; height: 100%; }

/* ---------- Seksjoner ---------- */

.section { padding: 120px 0; position: relative; }
.section-tint { background: var(--blue-50); }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gray-400); margin-bottom: 14px;
}
.eyebrow.blue { color: var(--blue-600); }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head h2 { font-size: clamp(32px, 4.6vw, 50px); font-weight: 800; letter-spacing: -0.03em; }
.section-head p { font-size: 19px; color: var(--gray-500); margin-top: 18px; }

/* Avsløring ved scroll */
[data-reveal] {
  opacity: 0; transform: translateY(40px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--delay, 0s);
}
[data-reveal="left"] { transform: translateX(-48px); }
[data-reveal="right"] { transform: translateX(48px); }
[data-reveal="zoom"] { transform: scale(.92); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* Tekst som tones inn ord for ord etter scroll */
.scrub-text { font-size: clamp(26px, 3.6vw, 42px); font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; color: var(--gray-900); max-width: 900px; }
.scrub-text .w { opacity: .14; transition: opacity .25s linear; }
.scrub-text .w.on { opacity: 1; }
.scrub-text .hl { color: var(--blue-600); }

/* ---------- Prosjektkort ---------- */

.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 960px) { .projects-grid { grid-template-columns: 1fr; } }

.project-card {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius-3xl);
  padding: 28px; box-shadow: var(--shadow-sm); color: inherit;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
}
a.project-card:hover { text-decoration: none; transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--blue-100); }
.app-icon {
  width: 72px; height: 72px; border-radius: 18px; overflow: hidden; flex: none;
  box-shadow: 0 8px 20px rgba(24,103,255,.3);
}
.app-icon img { width: 100%; height: 100%; }
.app-icon.blank { background: var(--blue); display: grid; place-items: center; }
.app-icon.blank img { width: 70%; height: auto; }
.project-card h3 { font-size: 23px; margin: 22px 0 6px; }
.project-card .tagline { color: var(--gray-500); font-size: 16px; margin: 0 0 18px; }
.project-card ul { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.project-card li { display: flex; gap: 10px; align-items: flex-start; }
.project-card li svg { width: 18px; height: 18px; color: var(--blue-600); flex: none; margin-top: 3px; }
.project-card .more { margin-top: auto; font-weight: 600; color: var(--blue-600); display: inline-flex; align-items: center; gap: 6px; }
.project-card .more svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
a.project-card:hover .more svg { transform: translateX(4px); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: .02em; padding: 4px 10px; border-radius: 999px;
  background: var(--blue-50); color: var(--blue-600);
}
.badge.orange { background: #fff4ec; color: #c2410c; }
.badge.green { background: #ecfdf3; color: #15803d; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge .dot.live { animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }
.project-card .badge { position: absolute; top: 28px; right: 28px; }

/* ---------- Scrollytelling: telefon som står fast mens stegene scroller ---------- */

.story { position: relative; }
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.story.reverse .story-grid { direction: rtl; }
.story.reverse .story-grid > * { direction: ltr; }
.story-sticky {
  position: sticky; top: calc(var(--header-h) + max(12px, (100vh - var(--header-h) - 640px) / 2));
  display: flex; justify-content: center;
}
.story-steps { padding: 18vh 0 24vh; }
.story-intro { margin-bottom: 18vh; }
.story-intro .app-head { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.story-intro h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -0.03em; }
.story-intro p { font-size: 19px; color: var(--gray-500); }

.step {
  min-height: 62vh; display: flex; flex-direction: column; justify-content: center;
  opacity: .25; transform: translateX(-10px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.story.reverse .step { transform: translateX(10px); }
.step.is-active { opacity: 1; transform: none; }
.step-num {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--blue-50); color: var(--blue-600); font-weight: 700; margin-bottom: 18px;
  transition: background-color .4s, color .4s;
}
.step.is-active .step-num { background: var(--blue-600); color: #fff; }
.step h3 { font-size: clamp(24px, 2.8vw, 32px); margin-bottom: 12px; }
.step p { color: var(--gray-500); font-size: 18px; max-width: 460px; }
.step .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--gray-200); color: var(--gray-600); }

.store-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 14px; border-radius: 14px;
  background: var(--gray-900); color: #fff; font-size: 12px; line-height: 1.2;
  transition: transform .2s var(--ease), opacity .2s;
}
.store-btn:hover { text-decoration: none; transform: translateY(-2px); }
.store-btn strong { display: block; font-size: 16px; font-weight: 600; }
.store-btn svg { width: 24px; height: 24px; }
.store-btn.is-pending { background: var(--gray-200); color: var(--gray-500); pointer-events: none; }

@media (max-width: 900px) {
  .story-grid { grid-template-columns: 1fr; gap: 0; }
  .story.reverse .story-grid { direction: ltr; }
  .story-steps { display: contents; }
  .story-intro { order: -2; margin-bottom: 32px; }
  /* Telefonen ligger i et fast vindu øverst; stegkortene glir inn under det */
  .story-sticky {
    top: var(--header-h); z-index: 4; order: -1;
    margin: 0 calc(var(--gutter) * -1) 24px; padding: 12px 0 20px;
    background: var(--white);
  }
  .section-tint .story-sticky { background: var(--blue-50); }
  .story-sticky::after {
    content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 28px;
    background: linear-gradient(var(--white), rgba(255,255,255,0));
  }
  .section-tint .story-sticky::after { background: linear-gradient(var(--blue-50), rgba(239,246,255,0)); }
  /* Stegene glir som kort over telefonen */
  .step, .story.reverse .step {
    min-height: 0; margin: 0 -8px 34vh; padding: 22px 20px;
    position: relative; z-index: 3; opacity: 1; transform: none;
    background: #fff; border-radius: var(--radius-2xl); box-shadow: 0 8px 30px rgba(17,24,39,.08); border: 1px solid var(--gray-100);
  }
  .step:last-child { margin-bottom: 30vh; }
  .step > * { opacity: .45; transition: opacity .4s var(--ease); }
  .step.is-active > * { opacity: 1; }

}

/* ---------- Telefon-mockup (tegnet i appens stil) ---------- */

.phone {
  --pw: 300px;
  width: var(--pw); aspect-ratio: 300 / 620; position: relative;
  background: #0b1220; border-radius: 48px; padding: 11px;
  box-shadow: 0 40px 80px -20px rgba(17, 40, 100, 0.45), 0 0 0 1.5px #2b3446 inset;
}
.phone::before { /* Dynamic Island */
  content: ""; position: absolute; top: 20px; left: 50%; width: 90px; height: 26px; margin-left: -45px;
  background: #0b1220; border-radius: 20px; z-index: 5;
}
.screen {
  position: relative; width: 100%; height: 100%; border-radius: 38px; overflow: hidden;
  background: var(--blue-50); font-size: 12px; color: var(--gray-700);
}
/* På små skjermer skaleres hele telefonen (inkl. tekst) i stedet for å bryte layouten */
@media (max-width: 900px) { .phone { transform: scale(.62); transform-origin: top center; margin-bottom: calc(620px * -.38); } }
@media (max-width: 900px) and (max-height: 700px) { .phone { transform: scale(.5); margin-bottom: -310px; } }

.app-bar {
  position: absolute; top: 0; left: 0; right: 0; padding: 52px 16px 10px;
  background: #fff; border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between; z-index: 2;
}
.app-bar b { font-size: 13px; color: var(--gray-900); }
.app-bar .pill { font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--blue-50); color: var(--blue-600); }
.canvas { position: absolute; top: 92px; left: 0; right: 0; bottom: 0; }
.canvas svg { width: 100%; height: 100%; }

.tool-rail {
  position: absolute; right: 10px; top: 104px; display: flex; flex-direction: column; gap: 8px; z-index: 2;
}
.tool-rail span {
  width: 34px; height: 34px; border-radius: 12px; background: #fff; box-shadow: var(--shadow-md);
  display: grid; place-items: center; transition: background-color .3s, transform .3s var(--ease);
}
.tool-rail span svg { width: 18px; height: 18px; color: var(--gray-600); }
.tool-rail span.hot { background: var(--red); transform: scale(1.08); }
.tool-rail span.hot svg { color: #fff; }

.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  background: #fff; border-radius: 22px 22px 0 0; padding: 14px 16px 26px;
  box-shadow: 0 -10px 30px rgba(17,24,39,.12);
  transform: translateY(105%); transition: transform .6s var(--ease);
}
.sheet.show { transform: none; }
.sheet::before { content: ""; display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--gray-300); margin: 0 auto 12px; }
.sheet h5 { margin: 0 0 10px; font-size: 13px; color: var(--gray-900); }
.cable-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 10px; border-radius: 12px; border: 1px solid var(--gray-100); margin-bottom: 6px; font-size: 11px;
}
.cable-row b { display: block; color: var(--gray-900); font-size: 12px; }
.cable-row.rec { border: 2px solid var(--blue-600); background: var(--blue-50); }
.cable-row .tag { font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--blue-600); color: #fff; white-space: nowrap; }
.sheet .app-btn {
  margin-top: 8px; height: 38px; border-radius: 12px; background: var(--blue-600); color: #fff;
  display: grid; place-items: center; font-weight: 600; font-size: 12px;
}

.info-panel {
  position: absolute; left: 12px; right: 12px; bottom: 14px; z-index: 2;
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-md); padding: 10px 12px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; text-align: center;
  opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.info-panel.show { opacity: 1; transform: none; }
.info-panel small { display: block; font-size: 8.5px; color: var(--gray-400); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.info-panel strong { font-size: 13px; color: var(--gray-900); font-variant-numeric: tabular-nums; }

.check-list { display: grid; gap: 6px; }
.check-item { display: flex; align-items: center; gap: 8px; font-size: 11px; padding: 7px 8px; border-radius: 10px; background: var(--gray-50); }
.check-item .box {
  width: 18px; height: 18px; border-radius: 6px; border: 2px solid var(--gray-300); flex: none;
  display: grid; place-items: center; transition: background-color .3s, border-color .3s;
}
.check-item .box svg { width: 12px; height: 12px; color: #fff; opacity: 0; transform: scale(.4); transition: opacity .3s, transform .4s var(--ease); }
.check-item.done .box { background: var(--green); border-color: var(--green); }
.check-item.done .box svg { opacity: 1; transform: none; }
.check-item .val { margin-left: auto; font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .3s; }
.check-item.done .val { opacity: 1; }

/* Kabelens stier i mockupen */
.room-fill { fill: rgba(59, 130, 246, 0.1); stroke: var(--gray-900); stroke-width: 2.5; }
.cable { fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cold-lead { fill: none; stroke: var(--orange); stroke-width: 3.5; stroke-linecap: round; }
.drain { fill: #fff; stroke: var(--gray-600); stroke-width: 2; }
.dim { stroke: var(--gray-500); stroke-width: 1; }
.dim-text { font-size: 10px; font-weight: 700; fill: var(--gray-500); font-family: inherit; }
.foil { fill: rgba(249, 115, 22, 0.15); stroke: var(--orange-500); stroke-width: 1.5; }
.foil.s2 { fill: rgba(158, 230, 184, 0.6); stroke: #059669; }
.foil-label { font-size: 8px; font-weight: 700; fill: #c2410c; font-family: inherit; }
.foil.s2 + .foil-label { fill: #065f46; }
.fade-el { transition: opacity .5s var(--ease); }

/* ---------- Personvern ---------- */

.privacy-hero {
  background: linear-gradient(180deg, #0f55e6 0%, var(--blue) 100%); color: #fff; overflow: clip;
}
.privacy-hero .eyebrow { color: rgba(255,255,255,.7); }
.privacy-hero h2 { color: #fff; }
.privacy-hero .section-head p { color: rgba(255,255,255,.82); }

.vault { position: relative; height: 230vh; }
.vault-stage {
  position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h));
  display: grid; place-items: center;
}
.vault-svg { width: min(940px, 100%); height: auto; max-height: 72vh; overflow: visible; }
@media (max-width: 699px) { .vault-svg { max-height: 64vh; margin-top: -8vh; } }
.vault-caption {
  position: absolute; bottom: 6vh; left: 0; right: 0; text-align: center; padding: 0 var(--gutter);
}
.vault-caption p {
  margin: 0 auto; max-width: 620px; font-size: clamp(18px, 2.3vw, 24px); font-weight: 600; color: #fff;
  position: absolute; left: 0; right: 0; padding: 0 var(--gutter);
  opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.vault-caption p.on { opacity: 1; transform: none; }
.vault-caption { height: 4em; }

.v-line { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 2.5; stroke-dasharray: 2 9; stroke-linecap: round; }
.v-node rect { fill: rgba(255,255,255,.1); stroke: rgba(255,255,255,.45); stroke-width: 2; }
.v-node text { fill: #fff; font-size: 15px; font-weight: 600; font-family: inherit; }
.v-node .ico { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.v-cross { stroke: #ffb4a8; stroke-width: 4; stroke-linecap: round; fill: none; }
.v-shield { fill: #fff; }
.v-glow { fill: rgba(255,255,255,.18); }
.v-ok { fill: none; stroke: var(--blue); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }

.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 960px) { .principles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .principles { grid-template-columns: 1fr; } }
.principle {
  background: #fff; border-radius: var(--radius-2xl); padding: 24px; border: 1px solid var(--gray-100); box-shadow: var(--shadow-sm);
}
.principle .ico {
  width: 48px; height: 48px; border-radius: 14px; background: var(--blue-50); color: var(--blue-600);
  display: grid; place-items: center; margin-bottom: 16px;
}
.principle .ico svg { width: 24px; height: 24px; }
.principle h3 { font-size: 18px; margin-bottom: 6px; }
.principle p { font-size: 15px; color: var(--gray-500); margin: 0; }

.data-card {
  margin-top: 56px; background: #fff; border-radius: var(--radius-3xl); border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.data-card-head { padding: 28px 28px 8px; }
.data-card-head h3 { font-size: 24px; }
.data-card-head p { color: var(--gray-500); margin: 8px 0 0; font-size: 16px; }
.table-wrap { overflow-x: auto; padding: 16px 28px 8px; }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 620px; }
table.data th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-400); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--gray-200); }
table.data td { padding: 14px 12px; border-bottom: 1px solid var(--gray-100); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data td:first-child { font-weight: 600; color: var(--gray-900); }
.yes { color: var(--blue-600); font-weight: 600; }
.no { color: var(--green); font-weight: 600; }
.local { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-weight: 600; }
.local svg { width: 16px; height: 16px; }

.legal-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--gray-100); }
@media (max-width: 700px) { .legal-links { grid-template-columns: 1fr; } }
.legal-app { padding: 24px 28px; display: flex; gap: 16px; align-items: center; }
.legal-app + .legal-app { border-left: 1px solid var(--gray-100); }
@media (max-width: 700px) { .legal-app + .legal-app { border-left: 0; border-top: 1px solid var(--gray-100); } }
.legal-app .app-icon { width: 52px; height: 52px; border-radius: 14px; box-shadow: none; }
.legal-app b { display: block; color: var(--gray-900); }
.legal-app nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; font-weight: 600; }

/* ---------- Om oss / kontakt ---------- */

.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 40px; } }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 32px; }
.stat { background: var(--blue-50); border-radius: var(--radius-2xl); padding: 18px; }
.stat strong { display: block; font-size: 32px; color: var(--blue-600); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 14px; color: var(--gray-500); }
.about-art {
  aspect-ratio: 1; border-radius: 32px; background: radial-gradient(100% 100% at 30% 20%, #3a85ff, var(--blue) 55%, #0f55e6);
  display: grid; place-items: center; position: relative; overflow: hidden; box-shadow: var(--shadow-lg);
}
.about-art img { width: 46%; position: relative; z-index: 1; }
.about-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.about-art .ring { fill: none; stroke: rgba(255,255,255,.18); stroke-width: 2; }

.contact-card {
  background: var(--blue); color: #fff; border-radius: 32px; padding: clamp(32px, 6vw, 72px);
  position: relative; overflow: hidden; text-align: center; isolation: isolate;
}
.contact-card h2 { color: #fff; font-size: clamp(30px, 4.4vw, 48px); font-weight: 800; letter-spacing: -0.03em; }
.contact-card p { color: rgba(255,255,255,.85); font-size: 19px; max-width: 560px; margin: 16px auto 32px; }
.contact-card .cable-bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.contact-card .cable-bg path { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 22; stroke-linecap: round; stroke-linejoin: round; }
.contact-card .cable-bg .lead { stroke: rgba(255,138,61,.55); }

/* ---------- Footer ---------- */

.site-footer { background: var(--gray-900); color: var(--gray-400); padding: 64px 0 40px; font-size: 15px; }
.site-footer .brand { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { color: #fff; font-size: 14px; margin-bottom: 14px; letter-spacing: 0; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--gray-300); }
.site-footer a:hover { color: #fff; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid #1f2937; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; }

/* ---------- Lese-fremdrift (juridiske sider) ---------- */

.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--blue), var(--orange));
}

/* ---------- Juridiske sider ---------- */

.legal-hero {
  background: radial-gradient(120% 120% at 90% 0%, #3a85ff 0%, var(--blue) 50%, #0f55e6 100%);
  color: #fff; padding: calc(var(--header-h) + 56px) 0 72px; position: relative; overflow: hidden;
}
.legal-hero .crumbs { font-size: 14px; color: rgba(255,255,255,.75); margin-bottom: 22px; }
.legal-hero .crumbs a { color: #fff; }
.legal-hero .app-head { display: flex; align-items: center; gap: 18px; }
@media (max-width: 560px) { .legal-hero .app-head { flex-direction: column; align-items: flex-start; } }
.legal-hero h1 { color: #fff; font-size: clamp(28px, 4.6vw, 48px); hyphens: auto; overflow-wrap: anywhere; font-weight: 800; letter-spacing: -0.03em; }
.legal-hero .meta { color: rgba(255,255,255,.8); margin-top: 6px; font-size: 16px; }
.legal-tabs { display: inline-flex; gap: 4px; padding: 4px; margin-top: 32px; border-radius: 999px; background: rgba(255,255,255,.15); }
.legal-tabs a { color: #fff; padding: 8px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; }
.legal-tabs a:hover { text-decoration: none; background: rgba(255,255,255,.12); }
.legal-tabs a[aria-current="page"] { background: #fff; color: var(--blue-600); }

.legal-layout { display: grid; grid-template-columns: 260px 1fr; gap: 48px; padding: 56px 0 120px; align-items: start; }
@media (max-width: 900px) { .legal-layout { grid-template-columns: 1fr; gap: 24px; } }
.toc { position: sticky; top: calc(var(--header-h) + 24px); }
.toc h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--gray-400); margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--gray-100); }
.toc a {
  display: block; padding: 6px 0 6px 16px; margin-left: -2px; border-left: 2px solid transparent;
  color: var(--gray-500); font-size: 14px; line-height: 1.4; transition: color .2s, border-color .2s;
}
.toc a:hover { color: var(--gray-900); text-decoration: none; }
.toc a.is-active { color: var(--blue-600); border-left-color: var(--blue-600); font-weight: 600; }
@media (max-width: 900px) { .toc { display: none; } }

.legal-summary {
  background: var(--blue-50); border-radius: var(--radius-2xl); padding: 22px 24px; margin-bottom: 40px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
@media (max-width: 700px) { .legal-summary { grid-template-columns: 1fr; } }
.legal-summary div { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.legal-summary svg { width: 22px; height: 22px; color: var(--blue-600); flex: none; margin-top: 2px; }
.legal-summary b { display: block; color: var(--gray-900); }

.prose { max-width: 720px; font-size: 17px; }
.prose h2 { font-size: 24px; margin: 48px 0 14px; padding-top: 8px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 19px; margin: 32px 0 10px; }
.prose ul { padding-left: 22px; margin: 0 0 1em; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--blue-600); }
.prose strong { color: var(--gray-900); }
.prose a { word-break: break-word; }
.prose .lead-p { font-size: 19px; color: var(--gray-600); }
.prose section { scroll-margin-top: calc(var(--header-h) + 24px); }

/* ---------- Redusert bevegelse ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal], .intro, .step { opacity: 1 !important; transform: none !important; }
  .scrub-text .w { opacity: 1 !important; }
}

/* Data som «strømmer» ut fra telefonen i personvern-animasjonen */
.v-line { animation: flow 1.1s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -22; } }
