/* =========================================================
   Nordvik Advokatbyrå / cinematic scroll site
   Palette tuned to the warm-office footage. Charcoal base,
   cream text, a single restrained brass accent.
   ========================================================= */

:root {
  --bg:        #0E0E0D;   /* near-black charcoal: page + stage base */
  --bg-soft:   #18170F;   /* alternating section tone (warmer, readable delta) */
  --bg-deep:   #0A0A09;   /* footer / deepest */
  --cream:     #F5F0E8;   /* warm off-white text */
  --cream-dim: rgba(245, 240, 232, 0.70);
  --cream-mut: rgba(245, 240, 232, 0.56);  /* fine print (passes AA on charcoal) */
  --brass:     #B8963E;   /* the single accent: numbers, rule, CTA */
  --brass-soft:rgba(184, 150, 62, 0.5);
  --line:      rgba(245, 240, 232, 0.16);
  --line-soft: rgba(245, 240, 232, 0.09);
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);   /* expo-like out */
  --ease-io:   cubic-bezier(0.65, 0, 0.35, 1);   /* power in-out */
  --container: 1320px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.is-loading { overflow: hidden; height: 100vh; }

h1, h2, h3 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 500; line-height: 1.02; }

::selection { background: var(--brass); color: var(--bg); }

a { color: inherit; }

/* Accessibility helpers */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 0; left: 50%; transform: translate(-50%, -120%);
  z-index: 200; background: var(--brass); color: var(--bg);
  padding: 0.7rem 1.3rem; font-size: 0.82rem; letter-spacing: 0.06em; text-decoration: none;
  border-radius: 0 0 3px 3px; transition: transform 0.25s var(--ease);
}
.skip-link:focus-visible { transform: translate(-50%, 0); outline: 2px solid var(--cream); outline-offset: 2px; }

/* Global visible focus (replaces the old outline:none) */
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 1px; }

/* Scroll progress hairline */
.scrollprog { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 90; pointer-events: none; background: transparent; }
.scrollprog__bar { display: block; height: 100%; width: 100%; background: var(--brass);
  transform: scaleX(0); transform-origin: left center; will-change: transform; }

/* Film-grain texture (very subtle). A plain alpha tint, NOT mix-blend-mode: a
   non-normal blend would force a whole-viewport recomposite on every scrub frame.
   On the near-black charcoal base, 0.05 normal reads the same as 0.04 overlay. */
.grain {
  position: fixed; inset: 0; z-index: 95; pointer-events: none; opacity: 0.05;
  will-change: opacity; transform: translateZ(0); /* isolate as a stable composited layer */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.4rem;
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}
#loader.is-done { opacity: 0; visibility: hidden; }
/* No-JS fallback: never trap the page behind the loader, and collapse the
   JS-painted beats so they don't become ~1800vh of empty black scroll. */
html:not(.js) #loader { display: none; }
html:not(.js) body.is-loading { overflow: visible; height: auto; }
html:not(.js) .beat,
html:not(.js) #prosessen,
html:not(.js) [aria-labelledby^="beat"] { height: auto; min-height: 60vh; }
html:not(.js) .beat__stage { position: relative; }
html:not(.js) .beat__overlay { position: absolute; opacity: 1; }
.loader__brand {
  font-family: "Cormorant Garamond", serif; font-size: 1.7rem; letter-spacing: 0.06em;
  color: var(--cream);
}
.loader__track { width: min(260px, 60vw); height: 1px; background: var(--line); overflow: hidden; }
.loader__bar { height: 100%; width: 100%; background: var(--brass); transform: scaleX(0); transform-origin: left center; transition: transform 0.2s linear; }
.loader__pct { font-size: 0.7rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--cream-dim); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem clamp(1.2rem, 4vw, 3rem);
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(14, 14, 13, 0.80);                /* more solid -> needs less blur */
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); /* was 12px; cost scales with radius */
  border-bottom-color: var(--line);
  padding-top: 1rem; padding-bottom: 1rem;
  will-change: backdrop-filter;                      /* keep the blur source on a stable layer */
}
.nav__brand { font-family: "Cormorant Garamond", serif; font-size: 1.45rem; letter-spacing: 0.04em; color: var(--cream); text-decoration: none; }
.nav__brand small { display: block; font-family: "DM Sans", sans-serif; font-size: 0.6rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--brass); margin-top: 2px; }
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.2rem); }
.nav__links a { position: relative; color: var(--cream-dim); text-decoration: none; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; transition: color 0.3s; }
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--brass); transform: scaleX(0); transform-origin: center; transition: transform 0.35s var(--ease);
}
.nav__links a:not(.nav__cta):hover { color: var(--cream); }
.nav__links a:not(.nav__cta):hover::after { transform: scaleX(1); }
.nav__cta {
  border: 1px solid var(--brass); color: var(--cream) !important;
  padding: 0.65rem 1.2rem; border-radius: 1px;
  transition: background 0.3s, color 0.3s !important;
}
.nav__cta:hover { background: var(--brass); color: var(--bg) !important; }
.nav__right { display: flex; align-items: center; gap: 1rem; }

/* Hamburger */
.nav__burger { display: none; width: 40px; height: 40px; background: none; border: 0; cursor: pointer; position: relative; }
.nav__burger-box { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.nav__burger-line, .nav__burger-line::before, .nav__burger-line::after {
  content: ""; display: block; position: absolute; width: 22px; height: 1.5px; background: var(--cream);
  transition: transform 0.35s var(--ease), opacity 0.2s;
}
.nav__burger-line::before { transform: translateY(-6px); }
.nav__burger-line::after  { transform: translateY(6px); }
.nav__burger[aria-expanded="true"] .nav__burger-line { background: transparent; }
.nav__burger[aria-expanded="true"] .nav__burger-line::before { transform: translateY(0) rotate(45deg); background: var(--brass); }
.nav__burger[aria-expanded="true"] .nav__burger-line::after  { transform: translateY(0) rotate(-45deg); background: var(--brass); }

/* Mobile drawer */
.mobnav {
  position: fixed; inset: 0; z-index: 49; display: flex; align-items: center; justify-content: center;
  background: rgba(10, 10, 9, 0.97); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden; transition: opacity 0.45s var(--ease), visibility 0.45s;
}
.mobnav.is-open { opacity: 1; visibility: visible; }
.mobnav__links { display: flex; flex-direction: column; align-items: center; gap: 1.8rem; text-align: center; }
.mobnav__links a { color: var(--cream); text-decoration: none; font-family: "Cormorant Garamond", serif; font-size: 2rem; letter-spacing: 0.02em;
  opacity: 0; transform: translateY(14px); transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), color 0.3s; }
.mobnav.is-open .mobnav__links a { opacity: 1; transform: translateY(0); }
.mobnav__links a:nth-child(1) { transition-delay: 0.08s; }
.mobnav__links a:nth-child(2) { transition-delay: 0.13s; }
.mobnav__links a:nth-child(3) { transition-delay: 0.18s; }
.mobnav__links a:nth-child(4) { transition-delay: 0.23s; }
.mobnav__links a:nth-child(5) { transition-delay: 0.28s; }
.mobnav__links a:nth-child(6) { transition-delay: 0.33s; }
.mobnav__cta { margin-top: 0.6rem; border: 1px solid var(--brass); color: var(--cream); padding: 0.85rem 2rem !important;
  font-family: "DM Sans", sans-serif !important; font-size: 0.82rem !important; letter-spacing: 0.18em; text-transform: uppercase; border-radius: 1px; }
.mobnav__cta:hover { background: var(--brass); color: var(--bg); }
.mobnav__close { position: absolute; top: 1.4rem; right: clamp(1.2rem, 4vw, 3rem); width: 44px; height: 44px;
  background: none; border: 0; color: var(--cream-dim); font-size: 2rem; line-height: 1; cursor: pointer; transition: color 0.3s; }
.mobnav__close:hover { color: var(--brass); }

/* ---------- Beat (one cinematic step) ---------- */
.beat { position: relative; height: 300vh; }
/* Narrative pacing arc (varied heights read as film editing, not a metronome) */
#prosessen { height: 360vh; }                          /* intro: slow, reverent open */
[aria-labelledby="beat01-title"] { height: 230vh; }
[aria-labelledby="beat02-title"] { height: 250vh; }
[aria-labelledby="beat03-title"] { height: 270vh; }
[aria-labelledby="beat04-title"] { height: 300vh; }    /* tension peak */
[aria-labelledby="beat05-title"] { height: 210vh; }    /* decisive close */

.beat__stage {
  position: sticky; top: 0;
  height: 100vh; width: 100%;
  overflow: hidden; background: var(--bg);
}
.beat__canvas { display: block; width: 100%; height: 100%; will-change: transform; transform: translateZ(0); }

/* Scrim: keeps overlay text readable over bright footage */
.beat__scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(8, 8, 7, 0.82) 0%, rgba(8, 8, 7, 0.30) 38%, rgba(8, 8, 7, 0) 64%),
    linear-gradient(to right, rgba(8, 8, 7, 0.55) 0%, rgba(8, 8, 7, 0) 52%);
}
.beat__scrim--right {
  background:
    linear-gradient(to top, rgba(8, 8, 7, 0.82) 0%, rgba(8, 8, 7, 0.30) 38%, rgba(8, 8, 7, 0) 64%),
    linear-gradient(to left, rgba(8, 8, 7, 0.55) 0%, rgba(8, 8, 7, 0) 52%);
}

/* Overlay text group */
.beat__overlay {
  position: absolute; left: 0; bottom: 0;
  width: 100%;
  padding: 0 clamp(1.2rem, 4vw, 3rem) clamp(3rem, 9vh, 6rem);
  z-index: 2; /* will-change set by JS only while the beat is active (FIX 8) */
}
.beat__inner { max-width: var(--container); margin: 0 auto; position: relative; padding-right: clamp(0rem, 18vw, 16rem); }
.beat--right .beat__inner { margin-left: auto; padding-right: 0; padding-left: clamp(0rem, 18vw, 16rem); text-align: right; }
.beat--right .beat__lead { margin-left: auto; }

/* Ghost process numeral becomes a cinematic background watermark (distinct from the small area index) */
.beat__num {
  position: absolute; right: -0.5rem; bottom: 100%; z-index: 0;
  font-family: "Cormorant Garamond", serif; font-weight: 400;
  font-size: clamp(8rem, 30vw, 26rem); line-height: 0.7;
  color: transparent; -webkit-text-stroke: 1px rgba(184, 150, 62, 0.22);
  letter-spacing: -0.02em; pointer-events: none; user-select: none;
}
.beat--right .beat__num { right: auto; left: -0.5rem; }
.beat__eyebrow {
  font-size: 0.72rem; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--brass); margin-bottom: 1.1rem;
}
.beat__title {
  position: relative; z-index: 1;
  font-size: clamp(2.6rem, 8vw, 6.4rem); font-weight: 400;
  color: var(--cream); margin-bottom: 1.1rem;
}
.beat__lead {
  position: relative; z-index: 1;
  font-size: clamp(1.02rem, 1.5vw, 1.4rem);
  color: var(--cream-dim); max-width: 46ch; font-weight: 300;
}

/* Line-mask reveal scaffold (built by JS for [data-splitlines]) */
.line-mask { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.line-mask > span { display: block; } /* one-shot intro reveal; GSAP promotes it transiently */

/* Scroll hint on the intro */
.scroll-hint {
  position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%);
  z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  color: var(--cream-mut); font-size: 0.62rem; letter-spacing: 0.3em; text-transform: uppercase;
}
.scroll-hint::after {
  content: ""; width: 1px; height: 46px;
  background: linear-gradient(to bottom, var(--brass), transparent);
  animation: hintPulse 2.2s var(--ease) infinite;
}
@keyframes hintPulse { 0%, 100% { opacity: 0.25; transform: scaleY(0.5) translateY(-6px); } 50% { opacity: 1; transform: scaleY(1) translateY(0); } }

/* ---------- Generic content sections ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 3rem); }
.section { padding: clamp(5rem, 12vh, 9rem) 0; position: relative; }
.section--om      { background: var(--bg-soft); }
.section--areas   { background: var(--bg); }
.section--erfaring{ background: var(--bg-soft); }
.section--priser  { background: var(--bg); }
.section--team    { background: var(--bg-soft); }
.section--omtaler { background: var(--bg); }
.section--kontakt { background: var(--bg); }
.section--legal   { background: var(--bg-soft); }
/* Architectural seam: a brass hairline introduces each content section that follows a beat */
.beat + .section::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(var(--container), calc(100% - 2.4rem)); height: 1px;
  background: linear-gradient(to right, transparent, var(--brass-soft) 18%, var(--brass-soft) 82%, transparent);
  opacity: 0.5;
}
/* Quieter hairline on section-to-section boundaries so every seam is intentional */
.section + .section::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(var(--container), calc(100% - 2.4rem)); height: 1px; background: var(--line-soft);
}
.section__eyebrow { font-size: 0.68rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--brass); opacity: 0.85; margin-bottom: 1rem; }
.section__title   { font-size: clamp(2.2rem, 5vw, 4.2rem); color: var(--cream); margin-bottom: 1.2rem; max-width: 20ch; }
.section__lead    { font-size: clamp(1rem, 1.4vw, 1.3rem); color: var(--cream-dim); max-width: 54ch; }

/* Buttons */
.btn { display: inline-block; border: 1px solid var(--brass); color: var(--cream); text-decoration: none;
  padding: 0.9rem 1.9rem; font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase;
  border-radius: 1px; transition: background 0.3s var(--ease), color 0.3s var(--ease); cursor: pointer; font-family: inherit; }
.btn:hover { background: var(--brass); color: var(--bg); }
.btn--solid { background: var(--brass); color: var(--bg); }
.btn--solid:hover { background: transparent; color: var(--cream); }

/* ---------- Bridge: the cinematic climax ("Verdict Bridge") ---------- */
.bridge { position: relative; min-height: 92vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 7rem clamp(1.2rem, 4vw, 3rem); overflow: hidden;
  background: var(--bg); }
.bridge::before { /* aurora glow */
  content: ""; position: absolute; left: 50%; top: 46%; width: 120vw; height: 120vh; transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(184, 150, 62, 0.10), transparent 58%);
  pointer-events: none;
}
.bridge__mark {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -52%);
  font-family: "Cormorant Garamond", serif; font-weight: 500; line-height: 1;
  font-size: 46vw; color: var(--cream); opacity: 0.045; pointer-events: none; user-select: none; z-index: 0;
}
.bridge__inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 2rem; max-width: min(92vw, 860px); }
.bridge__rule { display: block; width: clamp(80px, 16vw, 200px); height: 1px; background: var(--brass); transform: scaleX(0); transform-origin: center; }
.bridge__title { font-size: clamp(2.2rem, 6vw, 5rem); font-weight: 400; color: var(--cream); line-height: 1.08; }
.bridge__title .word { display: inline-block; white-space: nowrap; }
.bridge__title .char { display: inline-block; } /* one-shot reveal; no permanent layer needed */
.bridge__btn { margin-top: 0.5rem; }

/* Rettsområder grid (crisp single-hairline borders, DPR-safe) */
.areas { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 3rem;
  border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.area { position: relative; background: var(--bg); padding: clamp(1.6rem, 3vw, 2.6rem); display: flex; flex-direction: column;
  gap: 0.7rem; min-height: 220px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transition: background 0.4s var(--ease), transform 0.4s var(--ease); }
.area::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: var(--brass);
  transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease); }
.area:hover { background: var(--bg-soft); transform: translateY(-3px); z-index: 1; }
.area:hover::after { transform: scaleX(1); }
.area__num { font-family: "Cormorant Garamond", serif; font-size: 1.6rem; color: var(--brass); }
.area__title { font-size: clamp(1.4rem, 2vw, 1.9rem); color: var(--cream); font-weight: 500; }
.area__text { font-size: 0.96rem; color: var(--cream-dim); }
@media (max-width: 900px) { .areas { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .areas { grid-template-columns: 1fr; } }

/* Priser */
.priser__intro { max-width: 60ch; }
.priser__list { list-style: none; margin: 2.6rem 0 1.4rem; border-top: 1px solid var(--line); }
.priser__list li { display: flex; justify-content: space-between; gap: 1.5rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.priser__k { color: var(--cream); font-size: 1.02rem; }
.priser__v { color: var(--cream-dim); text-align: right; }
.priser__note { font-size: 0.85rem; color: var(--cream-mut); max-width: 62ch; }
/* In-text links: underlined so they're distinguishable by more than colour (WCAG 1.4.1) */
.priser__note a, .priser a, .kontakt__consent a, .legal a, .prose a, .footer__credit a {
  color: var(--brass); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px;
}
.priser__note a:hover, .priser a:hover, .kontakt__consent a:hover, .legal a:hover, .footer__credit a:hover { color: var(--cream); }

/* ---------- Shared prose + fine print ---------- */
.prose { font-size: clamp(0.98rem, 1.3vw, 1.12rem); color: var(--cream-dim); max-width: 56ch; margin-top: 1.3rem; }
.section__fine { margin-top: 2rem; font-size: 0.78rem; letter-spacing: 0.04em; color: var(--cream-mut); }

/* ---------- Image frames + clip-wipe reveal ---------- */
.media-ph {
  position: relative; width: 100%; overflow: hidden;
  background: linear-gradient(135deg, var(--bg-soft) 0%, #100F0B 100%);
  border: 1px solid var(--line);
}
.media-ph::after { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(184, 150, 62, 0.18); pointer-events: none; z-index: 2; }
.media-ph--portrait { aspect-ratio: 4 / 5; }
.media-ph--wide { aspect-ratio: 16 / 6; margin-top: 3rem; }
.media-ph__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* JS adds .is-clip then animates clip-path; CSS provides the start state only when JS is on */
.js [data-clip] .media-ph__img,
.js [data-clip].media-ph .media-ph__img,
.js .member__photo[data-clip] .member__img { clip-path: inset(0 100% 0 0); }

/* ---------- Split layout (text + media) ---------- */
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split__media { order: -1; max-width: 460px; } }

/* Proof points (authority section) */
.proof { list-style: none; margin-top: 2.2rem; display: grid; gap: 1.2rem; max-width: 56ch; }
.proof li { position: relative; padding-left: 1.6rem; color: var(--cream-dim); font-size: 0.98rem; }
.proof li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 9px; height: 9px; border: 1px solid var(--brass); transform: rotate(45deg); }
.proof strong { color: var(--cream); font-weight: 500; }

/* ---------- Stats band (credibility) ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 3rem;
  border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.stat { background: var(--bg); padding: clamp(1.6rem, 3vw, 2.6rem) 1rem; text-align: center;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--erfaring .stat { background: var(--bg-soft); }
.stat__num { display: block; font-family: "Cormorant Garamond", serif; font-weight: 500; font-size: clamp(2.4rem, 4.5vw, 3.8rem); line-height: 1; color: var(--brass); font-variant-numeric: tabular-nums; }
.stat__label { display: block; margin-top: 0.7rem; font-size: 0.82rem; color: var(--cream-dim); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Team / spesialister ---------- */
.team { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.2rem, 2.5vw, 2rem); margin-top: 3rem; }
.member__photo {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; margin-bottom: 1.1rem;
  background: linear-gradient(160deg, var(--bg-soft) 0%, #100F0B 100%); border: 1px solid var(--line);
}
.member__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--op, 50% 30%); display: block; transition: transform 0.6s var(--ease); }
.member:hover .member__img { transform: scale(1.04); }
.member__name { font-size: clamp(1.3rem, 1.8vw, 1.65rem); color: var(--cream); }
.member__role { margin-top: 0.25rem; font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--brass); }
.member__meta { margin-top: 0.5rem; font-size: 0.9rem; color: var(--cream-dim); }
@media (max-width: 900px) { .team { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .team { grid-template-columns: 1fr; max-width: 360px; } }

/* ---------- Omtaler / testimonials (distinct brass-edged treatment) ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.2rem, 2.5vw, 2rem); margin-top: 3rem; }
.quote { position: relative; margin: 0; background: rgba(184, 150, 62, 0.035); border: 1px solid var(--line);
  padding: clamp(1.8rem, 3vw, 2.6rem); display: flex; flex-direction: column; gap: 1.3rem;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease); }
.quote::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: var(--brass);
  transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease); }
.quote:hover { transform: translateY(-3px); border-color: var(--brass-soft); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28); }
.quote:hover::after { transform: scaleX(1); }
.quote__mark { font-family: "Cormorant Garamond", serif; font-size: 3.4rem; line-height: 0.5; height: 1.1rem; color: rgba(184, 150, 62, 0.55); }
.quote__text { margin: 0; font-family: "Cormorant Garamond", serif; font-weight: 500; font-style: italic; font-size: clamp(1.2rem, 1.6vw, 1.5rem); line-height: 1.4; color: var(--cream); }
.quote__by { display: flex; align-items: center; gap: 0.85rem; margin-top: auto; }
.quote__avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); object-fit: cover; overflow: hidden; }
.quote__who strong { display: block; color: var(--cream); font-size: 0.92rem; font-weight: 500; }
.quote__who span { font-size: 0.82rem; color: var(--cream-dim); }
@media (max-width: 900px) { .quotes { grid-template-columns: 1fr; max-width: 520px; } }

/* ---------- Legal placeholders ---------- */
.legal { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); }
.legal__title { font-size: clamp(1.5rem, 2.6vw, 2.2rem); color: var(--cream); margin-bottom: 1rem; font-weight: 500; }
.legal__text { font-size: 0.98rem; color: var(--cream-dim); max-width: 52ch; }
.legal__demo { grid-column: 1 / -1; margin-top: 1rem; font-size: 0.76rem; color: var(--cream-mut); }
@media (max-width: 760px) { .legal { grid-template-columns: 1fr; } }

/* Kontakt */
.kontakt { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.kontakt__info { list-style: none; margin-top: 2.2rem; display: grid; gap: 1.1rem; }
.kontakt__info li { color: var(--cream); font-size: 1rem; }
.kontakt__info span { display: block; font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cream-mut); margin-bottom: 0.2rem; }
.kontakt__form { display: grid; gap: 1.1rem; }
.kontakt__form label { display: grid; gap: 0.45rem; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cream-dim); }
.kontakt__form input, .kontakt__form textarea { background: transparent; border: 1px solid var(--line); color: var(--cream);
  padding: 0.8rem 0.9rem; font-family: inherit; font-size: 1rem; border-radius: 1px; transition: border-color 0.3s, box-shadow 0.3s; }
.kontakt__form input:hover, .kontakt__form textarea:hover { border-color: rgba(245,240,232,0.3); }
.kontakt__form input:focus-visible, .kontakt__form textarea:focus-visible { outline: none; border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass); }
.kontakt__form input:valid:not(:placeholder-shown), .kontakt__form textarea:valid:not(:placeholder-shown) { border-color: rgba(184,150,62,0.45); }
.kontakt__form input[aria-invalid="true"], .kontakt__form textarea[aria-invalid="true"] { border-color: #d98c8c; }
.kontakt__consent { display: flex; flex-direction: row; align-items: flex-start; gap: 0.6rem;
  text-transform: none; letter-spacing: 0; font-size: 0.82rem; color: var(--cream-dim); }
.kontakt__consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brass); flex: none; }
.kontakt__consent input[aria-invalid="true"] { outline: 2px solid #d98c8c; outline-offset: 2px; }
.kontakt__consent a { color: var(--brass); }
/* Per-field error text (non-colour cue paired with the red border) */
.field-err { font-size: 0.78rem; letter-spacing: 0; text-transform: none; color: #e0a0a0; }
.field-err::before { content: "! "; font-weight: 600; }
.field-err--consent { display: block; margin-top: -0.4rem; }
.kontakt__status { font-size: 0.92rem; color: var(--brass); }
.kontakt__status.is-error { color: #d98c8c; }
@media (max-width: 760px) { .kontakt { grid-template-columns: 1fr; } }

/* Footer */
.footer { background: var(--bg-deep); padding: clamp(3rem, 7vh, 5rem) 0 2rem; border-top: 1px solid var(--line); }
.footer__grid { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 2rem; align-items: start; }
.footer__brand { font-family: "Cormorant Garamond", serif; font-size: 1.5rem; color: var(--cream); }
.footer__brand small { display: block; font-family: "DM Sans", sans-serif; font-size: 0.6rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--brass); margin-top: 2px; }
.footer__legal { font-size: 0.82rem; color: var(--cream-dim); line-height: 1.7; }
.footer__links { display: grid; gap: 0.6rem; justify-items: start; }
.footer__links a { color: var(--cream-dim); text-decoration: none; font-size: 0.84rem; transition: color 0.3s; }
.footer__links a:hover { color: var(--cream); }
.footer__base { margin-top: 2.8rem; padding-top: 1.6rem; border-top: 1px solid var(--line-soft); text-align: center; display: grid; gap: 0.4rem; }
.footer__copy { font-size: 0.78rem; color: var(--cream-mut); letter-spacing: 0.04em; }
.footer__credit { font-size: 0.78rem; color: var(--cream-mut); }
.footer__credit a { color: var(--brass); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; transition: color 0.3s; }
.footer__credit a:hover { color: var(--cream); }
.footer__note { font-size: 0.72rem; letter-spacing: 0.14em; color: var(--cream-mut); }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; gap: 1.4rem; } }

/* Reveal-on-scroll (set visible by GSAP; see main.js) */
.js [data-reveal] { opacity: 0; transform: translateY(28px); }

/* ---------- Responsive nav ---------- */
@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__burger { display: block; }
  .scroll-hint { display: none; }              /* avoid overlap with lead on small screens */
  .beat__inner { padding-right: 0; }
  .beat--right .beat__inner { padding-left: 0; text-align: left; }
  .beat--right .beat__scrim { background:
    linear-gradient(to top, rgba(8,8,7,0.82) 0%, rgba(8,8,7,0.30) 38%, rgba(8,8,7,0) 64%),
    linear-gradient(to right, rgba(8,8,7,0.55) 0%, rgba(8,8,7,0) 52%); }
}
body.menu-open { overflow: hidden; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .beat, #prosessen,
  [aria-labelledby="beat01-title"], [aria-labelledby="beat02-title"],
  [aria-labelledby="beat03-title"], [aria-labelledby="beat04-title"],
  [aria-labelledby="beat05-title"] { height: auto; min-height: 100vh; }
  .beat__stage { position: relative; }
  .beat__overlay { opacity: 1 !important; visibility: visible !important; transform: none !important; position: absolute; }
  .scroll-hint::after { animation: none; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .js [data-clip] .media-ph__img, .js .member__photo[data-clip] .member__img { clip-path: none !important; }
  .bridge__rule { transform: scaleX(1) !important; }
  .bridge__title .char { opacity: 1 !important; transform: none !important; }
  .line-mask > span { transform: none !important; }
  * { scroll-behavior: auto !important; }
}

/* ---------- Language toggle (NO / EN) ---------- */
.lang { display: inline-flex; align-items: center; gap: 0.4rem; }
.lang__btn {
  background: none; border: 0; padding: 0.2rem 0.15rem; cursor: pointer;
  font-family: "DM Sans", sans-serif; font-size: 0.78rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--cream-dim); transition: color 0.3s;
}
.lang__btn:hover { color: var(--cream); }
.lang__btn[aria-pressed="true"] { color: var(--brass); }
.lang__sep { color: var(--line); font-size: 0.78rem; user-select: none; }
