/* ============================================================
   Fomu Medical — site styles
   Multi-page static site. No framework, no build step.
   Design language: Norwegian nature — deep pine greens, soft
   moss surfaces, warm paper, serif display type (Marcellus)
   paired with Inter for body/UI.
   ============================================================ */

:root {
  /* palette */
  --pine-950: #0b2a20;
  --pine-900: #0f3a2b;
  --pine-800: #11503a;
  --pine-700: #166a4a;   /* brand green (logo, buttons, accents) */
  --pine-600: #1e7d57;
  --moss-200: #d7e8da;
  --moss-100: #e9f2ea;
  --moss-50:  #f4f8f4;
  --paper:    #fbfaf7;
  --ink:      #16241d;
  --ink-soft: #51645a;
  --line:     #dee8e0;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Marcellus", Georgia, "Times New Roman", serif;

  --radius: 18px;
  --shadow: 0 18px 44px rgba(11, 42, 32, 0.10);
  --header-h: 78px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--moss-50);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

/* ---------- layout primitives ---------- */

.container {
  width: min(1180px, 100% - 48px);
  margin-inline: auto;
}

.container.narrow { max-width: 780px; }

.section {
  padding: clamp(4.5rem, 9vw, 7.5rem) 0;
  scroll-margin-top: var(--header-h);
}

.section-paper { background: var(--paper); }
.section-moss  { background: var(--moss-100); }

/* ---------- typography ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0.005em;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 { font-size: clamp(2.5rem, 5.6vw, 4.1rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

.lede { font-size: clamp(1.06rem, 1.5vw, 1.2rem); max-width: 38em; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pine-700);
  margin: 0 0 18px;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--pine-700);
  flex: none;
}

.eyebrow.centered { justify-content: center; }
.eyebrow.centered::after {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--pine-700);
  flex: none;
}

/* the little eyebrow rule draws itself in when the block reveals */
.js .eyebrow::before,
.js .eyebrow.centered::after {
  transform: scaleX(0);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}
.js .eyebrow::before { transform-origin: left; }
.js .eyebrow.centered::after { transform-origin: right; }
.js .eyebrow.is-visible::before,
.js .is-visible .eyebrow::before,
.js .eyebrow.is-visible.centered::after,
.js .is-visible .eyebrow.centered::after { transform: scaleX(1); }

.section-head { max-width: 660px; margin-bottom: clamp(2.2rem, 5vw, 3.5rem); }
.section-head.centered { margin-inline: auto; text-align: center; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease,
              transform 0.2s ease, box-shadow 0.25s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-solid {
  background: var(--pine-700);
  color: #fff;
  border-color: var(--pine-700);
}
.btn-solid:hover {
  background: var(--pine-800);
  border-color: var(--pine-800);
  box-shadow: 0 12px 26px rgba(17, 80, 58, 0.28);
}

.btn-ghost {
  background: transparent;
  color: var(--pine-700);
  border-color: var(--moss-200);
}
.btn-ghost:hover { border-color: var(--pine-700); }

/* light variants for dark / photo backgrounds */
.btn-light {
  background: #fff;
  color: var(--pine-900);
  border-color: #fff;
}
.btn-light:hover { box-shadow: 0 12px 26px rgba(0, 0, 0, 0.25); }

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}
.btn-outline-light:hover { border-color: #fff; }

.btn-small { padding: 10px 22px; font-size: 0.875rem; }

/* arrow links ("Les mer →") */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--pine-700);
  text-decoration: none;
}

.arrow-link svg {
  width: 18px;
  height: 18px;
  transition: transform 0.25s ease;
}

.arrow-link:hover svg { transform: translateX(5px); }

/* ---------- header ---------- */

.site-header {
  --head-ink: var(--ink);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(11, 42, 32, 0.06);
}

/* over the photo hero the header starts transparent with white ink */
.site-header.on-hero:not(.scrolled) {
  --head-ink: #fff;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--head-ink);
  transition: color 0.35s ease;
}

/* the brand renders in the logo's exact green (sampled from the
   original mark) — over the photo hero it flips to white */
.site-header .brand { color: #15803d; }
.site-header.on-hero:not(.scrolled) .brand { color: #fff; }

.brand-mark { width: 38px; height: 38px; flex: none; }

.brand-word {
  font-family: var(--font-display);
  font-size: 1.08rem;
  letter-spacing: 0.14em;
}

.brand-word em {
  font-style: normal;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.site-nav a {
  position: relative;
  text-decoration: none;
  color: var(--head-ink);
  font-weight: 500;
  font-size: 0.93rem;
  transition: color 0.35s ease, opacity 0.2s ease;
  opacity: 0.86;
}

.site-nav a:hover { opacity: 1; }

/* animated underline on nav links */
.site-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.site-nav a:not(.btn):hover::after,
.site-nav a:not(.btn)[aria-current="page"]::after { transform: scaleX(1); }

.site-nav a[aria-current="page"] { opacity: 1; }

.site-nav .btn { color: #fff; opacity: 1; }
.site-header.on-hero:not(.scrolled) .site-nav .btn-solid {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.6);
}
.site-header.on-hero:not(.scrolled) .site-nav .btn-solid:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* hamburger — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5.5px;
  width: 46px;
  height: 46px;
  padding: 12px;
  background: none;
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
  border-radius: 12px;
  color: var(--head-ink);
  cursor: pointer;
  z-index: 95;
  transition: color 0.3s ease;
}

.nav-toggle span {
  display: block;
  height: 1.8px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.3px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.3px) rotate(-45deg); }

/* ---------- full-bleed photo hero (front page) ---------- */

.hero {
  position: relative;
  min-height: 94vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
}

/* Image drops in at assets/hero.jpg — until then the pine gradient
   underneath carries the design. The overlay keeps text readable. */
.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    url("../assets/hero.jpg"),
    linear-gradient(168deg, #2e7d5b 0%, #14573f 45%, #0b2a20 100%);
  background-size: cover, cover;
  background-position: center, center;
  animation: heroZoom 16s ease-out forwards;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(11, 42, 32, 0.38) 0%,
    rgba(11, 42, 32, 0.10) 38%,
    rgba(11, 42, 32, 0.62) 100%);
}

@keyframes heroZoom {
  from { transform: scale(1.07); }
  to   { transform: scale(1); }
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: calc(var(--header-h) + 56px) 0 110px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--moss-200);
  margin-bottom: 22px;
}

.hero-eyebrow::before {
  content: "";
  width: 38px;
  height: 1px;
  background: var(--moss-200);
}

.hero-title {
  color: #fff;
  margin-bottom: 24px;
  text-shadow: 0 2px 30px rgba(11, 42, 32, 0.35);
}

/* each line slides up from behind a mask, staggered on load */
.hero-line { display: block; overflow: hidden; }

.hero-line > span {
  display: block;
  transform: translateY(112%);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

body.loaded .hero-line:nth-child(1) > span { transition-delay: 0.15s; transform: none; }
body.loaded .hero-line:nth-child(2) > span { transition-delay: 0.3s;  transform: none; }
body.loaded .hero-line:nth-child(3) > span { transition-delay: 0.45s; transform: none; }

.hero-lede {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  max-width: 36em;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.8s ease 0.75s, transform 0.8s ease 0.75s;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.8s ease 0.95s, transform 0.8s ease 0.95s;
}

body.loaded .hero-lede,
body.loaded .hero-actions { opacity: 1; transform: none; }

/* scroll cue: a thin line with a dot travelling down it */
.hero-scrollcue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: 1.5px;
  height: 52px;
  background: rgba(255, 255, 255, 0.28);
  overflow: hidden;
  z-index: 2;
}

.hero-scrollcue::after {
  content: "";
  position: absolute;
  left: 0;
  top: -40%;
  width: 100%;
  height: 40%;
  background: #fff;
  animation: cueDrop 2.2s ease-in-out infinite;
}

@keyframes cueDrop {
  0%   { top: -40%; }
  60%, 100% { top: 110%; }
}

/* ---------- compact page hero (subpages) ---------- */

.page-hero {
  background:
    radial-gradient(900px 420px at 88% -20%, rgba(22, 106, 74, 0.14), transparent 65%),
    var(--moss-100);
  padding: calc(var(--header-h) + clamp(3rem, 7vw, 5.5rem)) 0 clamp(3rem, 6vw, 4.5rem);
}

.page-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.8fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.page-hero-img {
  aspect-ratio: 4 / 3;
  border-radius: 22px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.page-hero-img.img-kollega { background-image: url("../assets/for-leger.jpg"); }
.page-hero-img.img-klinikk { background-image: url("../assets/for-arbeidsgivere.jpg"); }

/* ---------- scroll-drawn flowing line (fjord ridge) ---------- */

.flow-divider {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}

.flow-divider svg { width: 100%; height: auto; overflow: visible; }

.flow-divider path,
.steps-wire path,
.cta-ridge path {
  fill: none;
  stroke-linecap: round;
  /* dasharray/dashoffset are set from JS (path length), then driven by scroll */
}

/* ---------- pillar cards (front page) with trail ----------
   .trail-field wraps any dotted layout; the .trail-wire svg is the
   thread JS pulls through every [data-trail-dot] in order, and the
   scroll position draws it (buildWires in main.js). */

.trail-field { position: relative; }

.trail-wire {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: visible;
  pointer-events: none;
}

.trail-wire path {
  fill: none;
  stroke: var(--pine-700);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  padding-top: 26px; /* headroom — the number dots float over the card edge */
}

.pillar {
  position: relative;
  z-index: 1;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--pine-700);
  border-radius: var(--radius);
  padding: 44px 32px 36px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* stagger the middle card so the thread gets a real wave */
.pillar:nth-child(2) { margin-top: 56px; }

.pillar:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

/* the dot sits half over the card's top edge — a point on the trail */
.pillar-num {
  position: absolute;
  top: -23px;
  left: 30px;
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1.5px solid var(--pine-700);
  border-radius: 50%;
  background: #fff;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--pine-700);
  z-index: 2;
  transition: background 0.45s ease, color 0.45s ease, box-shadow 0.45s ease;
}

/* lit = the scroll-drawn trail has reached this dot */
.pillar.lit .pillar-num {
  background: var(--pine-700);
  color: #fff;
  box-shadow: 0 8px 20px rgba(17, 80, 58, 0.3);
}

.pillar p { margin: 0; font-size: 0.96rem; }

/* ---------- audience split panels (front page) ---------- */

.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.split-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 480px;
  border-radius: 22px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
}

.split-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* photos drop in at these filenames; gradients carry it until then */
.split-card.is-leger .split-bg {
  background-image:
    url("../assets/for-leger.jpg"),
    linear-gradient(155deg, #267a55 0%, #11503a 60%, #0b2a20 100%);
}

.split-card.is-arbeidsgivere .split-bg {
  background-image:
    url("../assets/for-arbeidsgivere.jpg"),
    linear-gradient(200deg, #1e7d57 0%, #0f3a2b 55%, #0b2a20 100%);
}

.split-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 42, 32, 0) 30%, rgba(11, 42, 32, 0.78) 100%);
  transition: background 0.4s ease;
}

.split-card:hover .split-bg { transform: scale(1.05); }

.split-content {
  position: relative;
  z-index: 2;
  padding: 40px 36px;
}

.split-content h3 {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  color: #fff;
  margin-bottom: 10px;
}

.split-content p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 30em;
  margin-bottom: 16px;
  font-size: 0.97rem;
}

.split-content .arrow-link { color: #fff; }

/* ---------- full-bleed art band with parallax ----------
   The .parallax-img layer is oversized and shifted by scroll
   (updateScrollFx in main.js) so the artwork drifts gently. */

.art-band {
  position: relative;
  overflow: hidden;
  padding: clamp(5rem, 12vw, 9rem) 0;
}

.parallax-img {
  position: absolute;
  left: 0;
  right: 0;
  top: -14%;
  height: 128%;
  background-size: cover;
  background-position: center;
  will-change: transform;
}

.art-band .parallax-img {
  background-image: url("../assets/illustrasjon.jpg");
}

.art-card {
  position: relative;
  z-index: 1;
  max-width: 470px;
  background: rgba(251, 250, 247, 0.93);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 22px;
  padding: clamp(28px, 4vw, 44px);
  box-shadow: var(--shadow);
}

.art-card h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.art-card p { font-size: 0.97rem; }

/* ---------- CTA band ---------- */

.cta-band {
  position: relative;
  background: var(--pine-950);
  color: #fff;
  padding: clamp(4.5rem, 9vw, 7rem) 0;
  overflow: hidden;
  text-align: center;
}

.cta-band h2 { color: #fff; }

.cta-band p {
  color: var(--moss-200);
  max-width: 42em;
  margin-inline: auto;
}

.cta-band .btn { margin-top: 18px; }

/* the ridge line drawn by scroll, sitting faintly behind the content */
.cta-ridge {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 0;
  opacity: 0.5;
}

.cta-ridge svg { width: 100%; height: auto; display: block; }

.cta-band .container { position: relative; z-index: 2; }

/* ---------- feature rows (om oss) ---------- */

.feature-row {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.feature-row + .feature-row { margin-top: clamp(4rem, 8vw, 6.5rem); }

.feature-row.reverse .feature-media { order: 2; }

.feature-media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 22px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

/* Om oss: kollegabildet (Utviklet av leger, for leger) */
.feature-media.img-om-leger {
  background-image:
    url("../assets/om-oss-leger.jpg"),
    linear-gradient(155deg, #267a55, #0f3a2b);
}

/* ---------- Om oss: fullbredde flytebånd (For arbeidsgivere) ----------
   De abstrakte bølgene dekker hele seksjonen i fullbredde (parallax via
   .parallax-img), og et venstrestilt slør holder teksten lesbar mens
   bølgene flyter fritt mot høyre. Ingen boks — bildet er integrert i siden. */
.flow-band {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  padding: clamp(4.5rem, 12vw, 9rem) 0;
}

.flow-band .parallax-img {
  background-image: url("../assets/om-oss-drift.jpg");
}

/* slør som (1) gjør teksten lesbar til venstre og (2) toner bølgene mykt
   ut i papirfargen langs alle kantene, så bildet ikke ser «klippet» ut */
.flow-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    /* venstre tekst-slør */
    linear-gradient(90deg, var(--paper) 0%, rgba(251, 250, 247, 0.92) 26%, rgba(251, 250, 247, 0.5) 48%, rgba(251, 250, 247, 0) 72%),
    /* myk uttoning i høyre kant */
    linear-gradient(270deg, var(--paper) 0%, rgba(251, 250, 247, 0) 12%),
    /* myk uttoning i topp */
    linear-gradient(180deg, var(--paper) 0%, rgba(251, 250, 247, 0) 18%),
    /* myk uttoning i bunn */
    linear-gradient(0deg, var(--paper) 0%, rgba(251, 250, 247, 0) 16%);
}

.flow-band .container { position: relative; z-index: 2; }

.flow-band-text { max-width: 30em; }
.flow-band-text h2 { font-size: clamp(1.7rem, 2.8vw, 2.3rem); }

@media (max-width: 720px) {
  /* smal skjerm: bølgene blir et svakt bakteppe under teksten, og kantene
     tones ut på sidene også */
  .flow-band::after {
    background:
      linear-gradient(180deg, rgba(251, 250, 247, 0.95) 0%, rgba(251, 250, 247, 0.8) 55%, rgba(251, 250, 247, 0.62) 100%),
      linear-gradient(270deg, var(--paper) 0%, rgba(251, 250, 247, 0) 10%),
      linear-gradient(90deg, var(--paper) 0%, rgba(251, 250, 247, 0) 8%);
  }
  .flow-band-text { max-width: none; }
}

.feature-text h2 { font-size: clamp(1.7rem, 2.8vw, 2.3rem); }

/* ---------- benefit list (subpages) ---------- */

.benefit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.benefit {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
}

.benefit-icon {
  flex: none;
  width: 26px;
  height: 26px;
  margin-top: 2px;
  color: var(--pine-700);
}

/* the check mark draws itself when the row reveals */
.benefit-icon .tick {
  stroke-dasharray: 22;
  stroke-dashoffset: 22;
  transition: stroke-dashoffset 0.55s ease 0.25s;
}

.benefit.is-visible .benefit-icon .tick { stroke-dashoffset: 0; }

.benefit p { margin: 0; font-size: 0.97rem; color: var(--ink); }

/* ---------- process steps: zigzag trail through the dots ----------
   The steps alternate left/right down the page. The .steps-wire svg
   sits behind them; JS measures each .step-num circle and threads one
   smooth path through the centers in order (buildWires in main.js),
   and scrolling draws it. A dot "lights up" the moment the drawn line
   reaches it. */

.steps-path {
  position: relative;
  padding: 10px 0;
}

.steps-wire {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.steps-wire path {
  stroke: var(--pine-700);
  stroke-width: 2.5;
}

.step {
  position: relative;
  z-index: 1;
  width: min(46%, 460px);
  text-align: center;
}

.step + .step { margin-top: clamp(40px, 7vw, 76px); }

.step:nth-of-type(even) { margin-left: auto; }

.step-num {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid var(--pine-700);
  background: var(--moss-50);
  color: var(--pine-700);
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 16px;
  transition: background 0.45s ease, color 0.45s ease, box-shadow 0.45s ease;
}

.section-paper .step-num { background: var(--paper); }

/* lit = the scroll-drawn trail has reached this dot */
.step.lit .step-num {
  background: var(--pine-700);
  color: #fff;
  box-shadow: 0 8px 20px rgba(17, 80, 58, 0.3);
}

.step h3 { font-size: 1.2rem; margin-bottom: 6px; }
.step p { margin: 0 auto; font-size: 0.97rem; max-width: 34em; }

/* ---------- contact page: step-by-step wizard ----------
   One question at a time; main.js controls the sequence per role,
   animates each step in, and fills the progress line on top. */

.wiz-wrap { max-width: 760px; margin-inline: auto; }

.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(28px, 4vw, 44px);
  box-shadow: var(--shadow);
}

.wiz-top {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 34px;
}

.wiz-count {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* the progress line fills as you answer — same drawn-line motif */
.wiz-progress {
  flex: 1;
  height: 2px;
  background: var(--moss-200);
  border-radius: 2px;
  overflow: hidden;
}

.wiz-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--pine-700);
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.wiz-step { display: none; }

.wiz-step.active {
  display: block;
  animation: wizIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes wizIn {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

.wiz-q {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  margin-bottom: 10px;
}

.wiz-sub {
  font-size: 0.95rem;
  margin: -2px 0 22px;
}

.wiz-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.wiz-choice {
  padding: 24px 26px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--moss-50);
  font-family: var(--font-body);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease,
              transform 0.2s ease, box-shadow 0.25s ease;
}

.wiz-choice:hover {
  border-color: var(--pine-700);
  background: #fff;
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.wiz-choice strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: 4px;
}

.wiz-choice span { color: var(--ink-soft); font-size: 0.9rem; }

.wiz-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
}

.wiz-back {
  background: none;
  border: 0;
  padding: 8px 4px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.2s ease;
}

.wiz-back:hover { color: var(--pine-700); }

.wiz-hint {
  margin-left: auto;
  font-size: 0.78rem;
  color: #93a69b;
}

.wiz-summary {
  display: grid;
  gap: 10px;
  margin: 0 0 24px;
}

.wiz-summary div { display: flex; gap: 12px; font-size: 0.95rem; }
.wiz-summary dt { font-weight: 600; color: var(--ink); min-width: 130px; }
.wiz-summary dd { margin: 0; color: var(--ink-soft); }

/* honeypot: off-screen, never shown to people */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* submit error */
.wiz-error {
  margin: 16px 0 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fdecec;
  border: 1px solid #f3c2c2;
  color: #8f2d2d;
  font-size: 0.9rem;
}
.wiz-error a { color: inherit; font-weight: 600; }

/* success step */
.wiz-done { text-align: center; padding: 12px 0; }

.wiz-check {
  width: 72px;
  height: 72px;
  color: var(--pine-700);
  margin: 0 auto 18px;
}

/* the check draws itself in when the success step appears */
.wiz-check circle {
  stroke-dasharray: 189;
  stroke-dashoffset: 189;
  animation: wizCheckCircle 0.6s ease forwards;
}
.wiz-check path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: wizCheckTick 0.4s ease 0.45s forwards;
}

@keyframes wizCheckCircle { to { stroke-dashoffset: 0; } }
@keyframes wizCheckTick { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .wiz-check circle, .wiz-check path { animation: none; stroke-dashoffset: 0; }
}

.contact-direct {
  text-align: center;
  margin: 26px 0 0;
  font-size: 0.95rem;
}

.contact-direct a {
  color: var(--pine-700);
  font-weight: 600;
  text-decoration: none;
}

.contact-direct a:hover { text-decoration: underline; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.field { display: grid; gap: 7px; }

.wiz .field input,
.wiz .field textarea {
  font-size: 1.05rem;
  padding: 15px 16px;
}

.field > span {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}

.field input,
.field textarea,
.field select {
  font: inherit;
  color: var(--ink);
  background: var(--moss-50);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 13px 15px;
  resize: vertical;
  transition: border-color 0.2s ease, background 0.2s ease;
  width: 100%;
}

.field input::placeholder,
.field textarea::placeholder { color: #93a69b; }

.field input:focus,
.field textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--pine-600);
}

/* checkbox chips (ønsket oppdrag) */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip { position: relative; }

.chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.chip span {
  display: inline-block;
  padding: 9px 18px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--moss-50);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.chip input:hover + span { border-color: var(--pine-600); }

.chip input:checked + span {
  background: var(--pine-700);
  border-color: var(--pine-700);
  color: #fff;
}

.chip input:focus-visible + span {
  outline: 2px solid var(--pine-600);
  outline-offset: 2px;
}

.form-note {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin: 4px 0 0;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--pine-950);
  color: var(--moss-200);
  padding: clamp(3.5rem, 7vw, 5rem) 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand .brand { color: #fff; margin-bottom: 16px; }

.footer-brand p {
  color: #8fad9d;
  font-size: 0.95rem;
  max-width: 26em;
  margin: 0;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8fad9d;
  margin: 6px 0 16px;
}

.footer-col a {
  display: block;
  color: var(--moss-200);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 5px 0;
  transition: color 0.2s ease;
}

.footer-col a:hover { color: #fff; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 22px;
}

.footer-legal p { color: #6f8d7d; font-size: 0.84rem; margin: 0; }

/* ---------- scroll reveal ----------
   Hidden state only applies when JS runs (html.js),
   so everything stays visible without JS. */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .js [data-reveal],
  .hero-line > span,
  .hero-lede,
  .hero-actions {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .hero-bg { animation: none; }
  .hero-scrollcue { display: none; }
  .benefit-icon .tick { stroke-dashoffset: 0 !important; transition: none; }

  .js .eyebrow::before,
  .js .eyebrow.centered::after { transform: scaleX(1); transition: none; }

  .wiz-step.active { animation: none; }
  .parallax-img { transform: none !important; }
}

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .split-grid { grid-template-columns: 1fr; }
  .split-card { min-height: 380px; }
  .feature-row { grid-template-columns: 1fr; }
  .feature-row.reverse .feature-media { order: 0; }
  .page-hero-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  body.nav-open { overflow: hidden; }
  body.nav-open .nav-toggle { color: #fff; }

  /* full-screen overlay menu */
  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 90;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    padding: 96px 36px;
    background: var(--pine-950);
    transform: translateY(-103%);
    transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1);
  }

  .site-nav.open { transform: none; }

  .site-nav a:not(.btn) {
    font-family: var(--font-display);
    font-size: 2rem;
    color: #fff;
    padding: 8px 0;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }

  .site-nav a:not(.btn)::after { display: none; }

  .site-nav.open a:not(.btn) {
    opacity: 1;
    transform: none;
  }

  /* stagger the menu items as the panel opens */
  .site-nav.open a:nth-child(1) { transition-delay: 0.18s; }
  .site-nav.open a:nth-child(2) { transition-delay: 0.26s; }
  .site-nav.open a:nth-child(3) { transition-delay: 0.34s; }
  .site-nav.open a:nth-child(4) { transition-delay: 0.42s; }
  .site-nav.open a:nth-child(5) { transition-delay: 0.5s; }

  .site-nav .btn {
    margin-top: 22px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }

  .site-nav.open .btn {
    opacity: 1;
    transform: none;
    background: #fff;
    border-color: #fff;
    color: var(--pine-900);
  }

  .hero { min-height: 88vh; }

  /* the doctor stands in the right part of the photo — keep him in
     frame when narrow screens crop the wide image */
  .hero-bg { background-position: 74% center, center; }

  /* the stagger only makes sense with cards side by side */
  .pillar:nth-child(2) { margin-top: 0; }

  /* narrow screens: steps stack full-width with the dot on the left,
     so the JS-generated trail becomes a near-straight line through
     the dots — same system, calmer shape */
  .step,
  .step:nth-of-type(even) {
    width: 100%;
    margin-left: 0;
    padding-left: 72px;
    text-align: left;
  }

  .step-num {
    position: absolute;
    left: 1px;
    top: -2px;
    margin: 0;
  }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .wiz-choices { grid-template-columns: 1fr; }
  .wiz-hint { display: none; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}
