@font-face { font-family: "Archivo"; src: url("/fonts/archivo.woff2") format("woff2"); font-weight: 500 900; font-stretch: 112% 125%; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/fonts/public-sans.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/fonts/source-serif-4-italic.woff2") format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }

/* Layout: mørk "nattklinikk"-flate fra PULS-forsiden. Hjerteslag-linje i hero, deretter tjenester → matchmaking-prosess → prisberegner → prisliste → kontakt. Én bevisst mørk profil. */
:root {
  color-scheme: dark;
  --ink: #0f0f18;          /* bakgrunn, fra forsiden */
  --ink-2: #171724;        /* flater */
  --ink-3: #22222f;        /* linjer, input */
  --paper: #f2eeee;        /* tekst */
  --muted: #a7a1ab;        /* sekundærtekst */
  --pulse: #d9473a;        /* PULS-rød, litt lysere enn C0392B for kontrast på mørkt */
  --pulse-deep: #8f2a22;
  --pulse-soft: rgba(217, 71, 58, .14);
  --ok: #6fbf8e;

  --display: "Archivo", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --body: "Public Sans", "Segoe UI", Calibri, Arial, sans-serif;
  --quote: "Source Serif 4", Georgia, "Times New Roman", serif;

  --step--1: .875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  --step-3: clamp(2rem, 1.4rem + 2.6vw, 3.2rem);
  --step-hero: clamp(4.2rem, 2rem + 11vw, 10rem);
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 40px); }
h1, h2, h3 { font-family: var(--display); font-stretch: 118%; line-height: 1.08; margin: 0; text-wrap: balance; }
h2 { font-size: var(--step-3); font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--pulse); outline-offset: 3px; border-radius: 4px; }
.eyebrow {
  font-family: var(--display); font-weight: 700; font-stretch: 125%;
  font-size: .78rem; letter-spacing: .32em; text-transform: uppercase; color: var(--pulse);
}
.lede { color: var(--muted); max-width: 60ch; font-size: 1.075rem; }
.num { font-variant-numeric: tabular-nums; }

/* nav */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: rgba(15, 15, 24, .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--ink-3); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.logo { font-family: var(--display); font-weight: 900; font-stretch: 125%; letter-spacing: .14em; font-size: 1.15rem; text-decoration: none; }
.nav ul { display: flex; gap: clamp(12px, 3vw, 28px); list-style: none; margin: 0; padding: 0; font-size: var(--step--1); }
.nav ul a { text-decoration: none; color: var(--muted); }
.nav ul a:hover { color: var(--paper); }
@media (max-width: 560px) { .nav ul li:not(:last-child) { display: none; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5em; font: 600 .95rem/1 var(--body);
  padding: .95em 1.4em; border-radius: 999px; border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background .2s, border-color .2s, transform .2s;
}
.btn-primary { background: var(--pulse); color: #fff; }
.btn-primary:hover { background: #e55a4d; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--paper); border-color: #3a3a4a; }
.btn-ghost:hover { border-color: var(--paper); }

/* hero */
.hero { position: relative; overflow: hidden; padding-block: clamp(56px, 10vw, 120px) clamp(48px, 8vw, 96px);
  background:
    radial-gradient(60% 70% at 85% 10%, rgba(143, 42, 34, .45), transparent 70%),
    radial-gradient(40% 50% at 5% 95%, rgba(143, 42, 34, .25), transparent 70%),
    var(--ink); }
.hero .wrap { position: relative; display: grid; gap: 28px; }
.hero h1 { font-size: var(--step-hero); font-weight: 900; font-stretch: 125%; letter-spacing: .08em; text-shadow: 0 0 40px rgba(217, 71, 58, .35); }
.hero blockquote { margin: 0; padding-left: 20px; border-left: 2px solid var(--pulse-deep); font-family: var(--quote); font-style: italic; font-size: var(--step-2); line-height: 1.35; max-width: 26ch; color: #ddd6d8; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.ecg { width: 100%; height: 90px; display: block; margin-top: clamp(8px, 3vw, 24px); }
.ecg path { fill: none; stroke: var(--pulse); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(217, 71, 58, .7)); }
.ecg .base { stroke: var(--ink-3); filter: none; stroke-width: 1; }
@media (prefers-reduced-motion: no-preference) {
  .ecg .beat { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: draw 2.4s .3s cubic-bezier(.6, .1, .3, 1) forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.rings { position: absolute; right: -60px; top: 40px; width: 420px; max-width: 70%; pointer-events: none; opacity: .5; }
.rings circle { fill: none; stroke: var(--pulse-deep); stroke-width: 1.2; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; color: var(--muted); font-size: var(--step--1); margin-top: 6px; }
.facts b { color: var(--paper); font-weight: 600; }

section { padding-block: clamp(56px, 9vw, 104px); }
.sec-head { display: grid; gap: 14px; margin-bottom: 40px; }

/* services */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.svc { background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: var(--radius); padding: 28px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.svc.feature { background: linear-gradient(160deg, #2a1418, var(--ink-2) 65%); border-color: #4a2026; }
.svc .tag { justify-self: start; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: .35em .8em; border-radius: 999px; background: var(--pulse-soft); color: #ff9184; }
.svc .price { font-family: var(--display); font-weight: 800; font-stretch: 112%; font-size: 2rem; line-height: 1; }
.svc .price small { font-family: var(--body); font-weight: 400; font-size: .85rem; color: var(--muted); margin-left: .3em; }
.svc ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; color: #d4ced2; font-size: .95rem; }
.svc li { padding-left: 1.4em; position: relative; }
.svc li::before { content: "→"; position: absolute; left: 0; color: var(--pulse); }

/* matchmaking */
.match { background: var(--ink-2); border-block: 1px solid var(--ink-3); }
.sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-bottom: 48px; }
.side { border: 1px solid var(--ink-3); border-radius: var(--radius); padding: 26px; display: grid; gap: 10px; background: var(--ink); }
.side p { color: var(--muted); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0; counter-reset: s; }
.steps li { counter-increment: s; padding: 22px 20px 22px 0; border-top: 1px solid var(--ink-3); position: relative; display: grid; gap: 6px; }
.steps li::before { content: counter(s); font-family: var(--display); font-weight: 800; font-stretch: 125%; color: var(--pulse); font-size: .9rem; }
.steps li::after { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--pulse); box-shadow: 0 0 10px var(--pulse); }
.steps b { font-weight: 600; }
.steps span { color: var(--muted); font-size: .92rem; }

/* calculator */
.calc { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }
.panel { background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: var(--radius); padding: clamp(20px, 3vw, 30px); display: grid; gap: 26px; min-width: 0; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 500 .88rem/1 var(--body); padding: .7em 1em; border-radius: 999px; border: 1px solid #3a3a4a; background: transparent; color: var(--paper); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--pulse-soft); border-color: var(--pulse); color: #ffb3aa; }
.field { display: grid; gap: 10px; }
.field-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field label { font-weight: 600; }
.field .hint { color: var(--muted); font-size: .85rem; }
.field output { font-family: var(--display); font-stretch: 112%; font-weight: 700; font-size: 1.15rem; white-space: nowrap; }
input[type=range] { width: 100%; accent-color: var(--pulse); height: 28px; }
.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: .95rem; }
.toggle input { accent-color: var(--pulse); width: 18px; height: 18px; }
.result { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 76px); background: linear-gradient(170deg, #2a1418, var(--ink-2) 55%); border-color: #4a2026; }
.total { display: grid; gap: 4px; }
.total .big { font-family: var(--display); font-weight: 900; font-stretch: 112%; font-size: clamp(2.2rem, 1.6rem + 2.5vw, 3.2rem); line-height: 1; }
.total .sub { color: var(--muted); font-size: .92rem; }
.lines { display: grid; gap: 0; font-size: .93rem; }
.lines div { display: flex; justify-content: space-between; gap: 12px; padding-block: 9px; border-bottom: 1px dashed var(--ink-3); }
.lines div span:first-child { color: #d4ced2; min-width: 0; }
.lines div span:last-child { white-space: nowrap; }
.timeline { display: grid; gap: 12px; }
.timeline h3 { font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-stretch: 125%; }
.tl { list-style: none; margin: 0; padding: 0 0 0 18px; display: grid; gap: 12px; border-left: 1px solid var(--pulse-deep); }
.tl li { position: relative; display: grid; gap: 2px; font-size: .92rem; }
.tl li::before { content: ""; position: absolute; left: -23px; top: .55em; width: 9px; height: 9px; border-radius: 50%; background: var(--ink-2); border: 2px solid var(--pulse); }
.tl li b { font-weight: 600; }
.tl li span { color: var(--muted); }
.note { color: var(--muted); font-size: .82rem; }
.empty { color: var(--muted); font-size: .95rem; }
.copyrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.status { font-size: .85rem; color: var(--ok); }
textarea.out { width: 100%; min-height: 160px; background: var(--ink); color: var(--paper); border: 1px solid var(--ink-3); border-radius: 10px; padding: 12px; font: .85rem/1.5 var(--body); }

/* pricelist */
.table-wrap { overflow-x: auto; border: 1px solid var(--ink-3); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--ink-3); vertical-align: top; }
th { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; background: var(--ink-2); }
tr:last-child td { border-bottom: 0; }
td.p { font-family: var(--display); font-stretch: 112%; font-weight: 700; white-space: nowrap; }
td small { display: block; color: var(--muted); font-size: .85rem; margin-top: 4px; }

/* contact form */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; align-items: start; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
form { display: grid; gap: 16px; }
.seg { display: inline-flex; border: 1px solid #3a3a4a; border-radius: 999px; padding: 4px; gap: 4px; justify-self: start; flex-wrap: wrap; }
.seg button { font: 600 .88rem/1 var(--body); padding: .7em 1.1em; border-radius: 999px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--pulse); color: #fff; }
.row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.in { display: grid; gap: 6px; font-size: .9rem; font-weight: 600; }
.in input, .in textarea, .in select { font: 400 1rem/1.4 var(--body); color: var(--paper); background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: 10px; padding: 12px 14px; width: 100%; }
.in textarea { min-height: 110px; resize: vertical; }
.in input:focus, .in textarea:focus, .in select:focus { outline: none; border-color: var(--pulse); }
.contact-card { display: grid; gap: 10px; color: var(--muted); }
.contact-card strong { color: var(--paper); font-weight: 600; }

footer { border-top: 1px solid var(--ink-3); padding-block: 32px; color: var(--muted); font-size: .85rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* AI-forslag */
.ai { display: grid; gap: 10px; padding-bottom: 24px; border-bottom: 1px solid var(--ink-3); }
.ai label { font-weight: 600; }
.ai textarea { font: 400 1rem/1.5 var(--body); color: var(--paper); background: var(--ink); border: 1px solid var(--ink-3); border-radius: 10px; padding: 12px 14px; width: 100%; min-height: 96px; resize: vertical; }
.ai textarea:focus { outline: none; border-color: var(--pulse); }
.ai button[disabled] { opacity: .6; cursor: progress; }
.ai-answer { background: var(--pulse-soft); border-radius: 10px; padding: 12px 14px; font-size: .95rem; }
.ai-answer.err { background: transparent; border: 1px solid var(--ink-3); color: var(--muted); }
