/* ==========================================================================
   PULS FØRDE — base layer + primitives
   A 1:1 port of the approved mockup's base rules (build/artifact/mockup.css),
   with the `puls-` prefix. tokens.css owns every value; components.css owns
   the composed sections. Nothing below is a raw hex.

   Rebuilt 2026-09-18 from the artifact after the first build drifted — see
   docs/DESIGN-DRIFT.md for what went wrong and why the layer below exists.
   ========================================================================== */

/* --- Elementor shell neutralisation ---------------------------------------
   Every band on the site is ONE shortcode inside ONE Elementor container that
   carries the class `puls-shell`. The container exists so the page stays
   editable (reorder / remove / re-head a section in the editor); it must not
   contribute any padding, gap, width or background of its own — the section
   renders its own <section class="puls-band …"> and owns all of that.

   The first build let the container own the ground colour and padding, which
   is exactly how twenty `.puls-band--ink …` rules ended up dead and how the
   header became 345 px tall. The class is set in build/scripts/rebuild-pages.php
   and these rules make the neutralisation hold even if someone edits the
   container in the editor.                                                  */

.puls-shell.e-con,
.puls-shell.e-con.e-flex {
  --padding-block-start: 0;
  --padding-block-end: 0;
  --padding-inline-start: 0;
  --padding-inline-end: 0;
  --margin-block-start: 0;
  --margin-block-end: 0;
  --margin-inline-start: 0;
  --margin-inline-end: 0;
  --gap: 0;
  --row-gap: 0;
  --column-gap: 0;
  --content-width: 100%;
  --width: 100%;
  --min-height: 0;
  padding: 0;
  max-width: 100%;
  width: 100%;
}

.puls-shell > .elementor-widget,
.puls-shell > .e-con-inner > .elementor-widget {
  width: 100%;
  margin: 0;
}

.puls-shell .elementor-widget-container { margin: 0; }

/* [hidden] must beat every component's own display rule. The UA sheet sets it
   at the lowest possible specificity, so `.puls-mcard__p{display:flex}` won
   and both price panes rendered stacked on every card. Once, globally. */
[hidden] { display: none !important; }

/* --- Base ----------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Sticky header clearance so an in-page anchor does not land under it. */
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-800);
  font-family: var(--fb);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--fd);
  font-variation-settings: 'wdth' var(--wd);
  line-height: .98;
  letter-spacing: -.02em;
  margin: 0;
  text-wrap: balance;
  color: inherit;
}

p { margin: 0 0 1em; max-width: 62ch; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }
/* Hello Elementor's reset.css sets `a:hover, a:focus { color: #336 }` — a navy
   that reads as black on the ink bands (client: "hover color is too dark and
   almost not showing" on the class cards, 2026-09-22). Links keep their own
   colour on hover; the components decide what changes. */
a:hover, a:focus { color: inherit; }
/* …and `button:hover, button:focus { background-color: #c36 }` — a pink that
   bled through every button whose hover only sets a gradient or a border
   (the video play buttons, client 2026-10-07). Components set their own. */
button:hover, button:focus,
[type="button"]:hover, [type="button"]:focus,
[type="submit"]:hover, [type="submit"]:focus { background-color: transparent; }

img, svg, video { max-width: 100%; display: block; }
img[width][height] { height: auto; }

/* The <main> landmark Elementor's header-footer template does not provide. */
.puls-main { display: block; }

/* --- Container ------------------------------------------------------------ */

.puls-container {
  width: min(100% - (var(--pad) * 2), 1220px);
  margin-inline: auto;
}

.puls-narrow { max-width: 760px; }

/* --- Bands ----------------------------------------------------------------
   The whole design is the alternation of ink and paper bands. A band is
   rendered by its section (inc/sections.php → puls_band_open), never by an
   Elementor container, so the ground class can never go missing again.      */

.puls-band { padding-block: var(--band); position: relative; }
.puls-band--ink   { background: var(--ink-900); color: var(--paper); }
.puls-band--paper { background: var(--paper);   color: var(--ink-800); }
.puls-band--alt   { background: var(--paper-2); color: var(--ink-800); }

/* Grain on ink only, at 4 %, on a pseudo-element so it never takes a click. */
.puls-band--ink::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

.puls-band > .puls-container,
.puls-band > .puls-rail { position: relative; z-index: 1; }

/* --- Eyebrow + pulse line -------------------------------------------------
   The recurring label above every section heading. Its underline is one of
   the five sanctioned uses of the PULSEN motif: it draws itself once when the
   section scrolls in (puls.js adds .is-beat).                               */

.puls-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin: 0 0 18px;
}

.puls-band--ink .puls-eyebrow { color: var(--grey-lo); }

.puls-eyebrow__n { font-variant-numeric: tabular-nums; color: var(--ink-400); }
.puls-band--ink .puls-eyebrow__n { color: var(--grey-lo); }
.puls-eyebrow__n:empty { display: none; }

.puls-eyeline { width: 46px; height: 12px; overflow: visible; flex: none; }

.puls-eyeline path {
  fill: none;
  stroke: var(--oransje);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--puls-line-length, 70);
  stroke-dashoffset: var(--puls-line-length, 70);
  transition: stroke-dashoffset var(--dur-slow) var(--ease);
}

.puls-band--ink .puls-eyeline path,
.puls-hero .puls-eyeline path { stroke: var(--gul); }

.puls-eyebrow.is-beat .puls-eyeline path { stroke-dashoffset: 0; }

/* --- Section head ---------------------------------------------------------- */

.puls-secthead {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 34px;
}

.puls-secthead h2 { font-size: clamp(28px, 4vw, 46px); font-weight: 800; }

.puls-lnk {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--oransje);
  padding-bottom: 2px;
  white-space: nowrap;
}

.puls-band--ink .puls-lnk { border-bottom-color: var(--gul); }
.puls-lnk { transition: border-color .18s var(--ease), color .18s var(--ease); }
.puls-lnk:hover, .puls-lnk:focus-visible { border-bottom-color: currentColor; }

.puls-muted { color: var(--ink-400); font-size: 15px; }
.puls-band--ink .puls-muted { color: var(--grey); }

/* --- Buttons --------------------------------------------------------------- */

.puls-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 28px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--fb);
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}

.puls-btn--sm { min-height: 42px; padding: 9px 20px; font-size: 15px; }

/* Yellow is a surface, never text: ink on gul is 14.03:1. */
.puls-btn--primary { background: var(--gul); color: var(--ink-900); }
.puls-btn--primary:hover,
.puls-btn--primary:focus-visible { background: var(--oransje); color: var(--ink-900); transform: translateY(-1px); }

/* Hover colours are explicit per ground. The mockup's `background: currentColor`
   plus a colour change on the same hover resolves the background against the
   NEW colour — an ink button with ink text on the hero (client, 2026-09-21). */
.puls-btn--ghost { background: transparent; color: currentColor; border-color: currentColor; }
.puls-btn--ghost:hover,
.puls-btn--ghost:focus-visible { background: var(--paper); color: var(--ink-900); border-color: var(--paper); }
.puls-band--paper .puls-btn--ghost:hover,
.puls-band--paper .puls-btn--ghost:focus-visible,
.puls-band--alt .puls-btn--ghost:hover,
.puls-band--alt .puls-btn--ghost:focus-visible { background: var(--ink-900); color: var(--paper); border-color: var(--ink-900); }

/* --- Intensity chips ------------------------------------------------------- */

.puls-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-900);
}

/* No opacity on the small label: ink on the red chip is 4.91:1, which passes,
   but at the mockup's opacity .8 it drops to 4.02 and fails. Weight carries
   the hierarchy instead. The one deliberate deviation from the mockup. */
.puls-chip small { font-weight: 500; letter-spacing: .02em; text-transform: none; }
.puls-chip--bla  { background: var(--int-bla); }
.puls-chip--gron { background: var(--int-gron); }
.puls-chip--gul  { background: var(--int-gul); }
.puls-chip--raud { background: var(--int-raud); }
.puls-chip--na   { background: var(--ink-100); color: var(--ink-800); }

/* --- The blob mask ---------------------------------------------------------
   The logo's letters are organic blobs; this is that shape as a media mask.
   `display:block` is load-bearing: an <a> is inline and an inline box ignores
   overflow, aspect-ratio and clipping to border-radius.                    */

.puls-blob { border-radius: var(--blob); overflow: hidden; display: block; }

/* --- Placeholder marker ---------------------------------------------------- */

.puls-ph {
  background: #FBDDD5;
  color: #8E250E;
  font-weight: 700;
  font-size: 13px;
  padding: 2px 8px;
  border-radius: 5px;
  letter-spacing: .02em;
}

/* --- Focus ------------------------------------------------------------------ */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--bla);
  outline-offset: 3px;
  border-radius: 6px;
}

.puls-skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10000;
  padding: 12px 24px;
  background: var(--ink-900);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: top .2s var(--ease);
}

.puls-skip-link:focus { top: 16px; }

/* --- Utilities ---------------------------------------------------------------- */

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .puls-eyeline path { stroke-dashoffset: 0; transition: none; }
  * { transition-duration: .01ms !important; }
}
