/* ---------- Typsnitt (självhostade, SIL Open Font License) ---------- */
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/atkinson-hyperlegible-next-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Färger ---------- */
:root {
  --bg: #f2eadf;
  --band: #d6e6e9;
  --card: #ffffff;
  --ink: #1d2a2e;
  --muted: #4a5552;
  --accent: #1f5f6b;
  --accent-strong: #164852;
  --accent-soft: #ddebee;
  --accent-ink: #ffffff;
  --warm: #c4694a;        /* från Sabbatsbergs fasad, används sparsamt */
  --warm-soft: #f6e4dc;
  --line: #ddd2c2;
  --focus: #b3541e;
  --shadow: 0 1px 2px rgb(27 39 45 / .05), 0 4px 16px rgb(27 39 45 / .06);

  --sans: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11181b;
    --band: #162024;
    --card: #1b272c;
    --ink: #eaf0f0;
    --muted: #b4c3c6;
    --accent: #7cc4d1;
    --accent-strong: #a3d8e1;
    --accent-soft: #1f3a40;
    --accent-ink: #0c1417;
    --warm: #e39a7c;
    --warm-soft: #3a2a24;
    --line: #2c3b40;
    --focus: #f0a06c;
    --shadow: none;
  }
}

/* ---------- Bas ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.65;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); line-height: 1.1; margin: 0 0 20px; }
h2 { font-size: clamp(1.65rem, 3.6vw, 2.3rem); line-height: 1.2; margin: 0 0 18px; }
h3 { font-size: 1.25rem; line-height: 1.3; margin: 0 0 8px; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 760px) { .wrap { padding: 0 32px; } }
.narrow { max-width: 760px; }
.center { text-align: center; }
section { padding: 72px 0; scroll-margin-top: 84px; }

/* Blågröna "öar" i stället för band över hela bredden */
.band, .contact-band { padding: 24px 0; }
.band > .wrap, .contact-band > .wrap {
  background: var(--band); border-radius: 28px; padding: 56px 56px;
}
@media (min-width: 1184px) {
  .band > .wrap, .contact-band > .wrap { max-width: 1120px; }
}
/* Varannan ö förskjuts lite för att bryta symmetrin */
#om > .wrap { border-top-left-radius: 8px; }
#reumatologi > .wrap { border-bottom-right-radius: 8px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .85rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 12px;
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--warm); border-radius: 2px; }
.intro { font-size: 1.2rem; max-width: 38em; color: var(--muted); }

.skip {
  position: absolute; left: 8px; top: -100px; z-index: 10;
  background: var(--accent); color: var(--accent-ink); padding: 12px 16px; border-radius: 6px;
}
.skip:focus { top: 8px; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 80px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-size: 1.6rem; font-weight: 500; letter-spacing: -.005em; line-height: 1; }
.brand b, .foot-brand b { font-weight: 800; color: var(--accent); }
.mark { width: 44px; height: 44px; flex: none; }
.mark-bg { fill: var(--accent); }
.mark-fg { fill: var(--accent-ink); }
.mark-joint { fill: var(--warm); }
.contact-nav { display: flex; gap: 8px; }

/* ---------- Knappar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 20px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none;
  font-weight: 700; font-size: 1rem; border: 2px solid var(--accent); white-space: nowrap;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-ink); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--accent); color: var(--accent-ink); }
.btn.small { padding: 8px 14px; min-width: 48px; }
.btn .icon { width: 20px; height: 20px; }
.btn .long { display: none; }
@media (min-width: 900px) {
  .btn .short { display: none; }
  .btn .long { display: inline; }
}

/* ---------- Hero ---------- */
.hero { padding: 80px 0 72px; position: relative; overflow: hidden; }
.hero { isolation: isolate; }
.hero::before {
  content: ""; position: absolute; z-index: -1; left: -220px; bottom: -260px; width: 560px; height: 560px;
  border-radius: 50%; background: radial-gradient(circle, var(--warm-soft) 0%, transparent 68%);
}
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 56px; align-items: center; }
.accent { color: var(--accent); }
.lead { font-size: 1.25rem; max-width: 34em; color: var(--muted); }

.contact-cards { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.center .contact-cards { justify-content: center; text-align: left; }
.contact-card {
  flex: 1 1 auto; max-width: 100%;
  display: flex; align-items: center; gap: 14px; min-height: 48px;
  padding: 16px 18px; border-radius: 12px; text-decoration: none;
  background: var(--card); border: 2px solid var(--accent); color: var(--ink); box-shadow: var(--shadow);
}
.contact-card > .icon { width: 28px; height: 28px; color: var(--accent); }
.contact-card:hover { background: var(--accent); color: var(--accent-ink); text-decoration: none; }
.contact-card:hover > .icon { color: var(--accent-ink); }
.contact-card .label { display: block; font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; opacity: .8; }
.contact-card .value { display: block; font-size: 1.2rem; font-weight: 700; overflow-wrap: anywhere; line-height: 1.3; }

.keyfacts {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px 24px;
  box-shadow: var(--shadow);
}
.keyfacts ul { list-style: none; margin: 0; padding: 0; }
.keyfacts li { display: flex; gap: 16px; align-items: flex-start; padding: 18px 0; }
.keyfacts li + li { border-top: 1px solid var(--line); }
.keyfacts strong { display: block; font-size: 1.1rem; }
.keyfacts li > span:last-child { color: var(--muted); font-size: 1.02rem; line-height: 1.5; }
.kf-icon, .card-icon, .sym-icon, .step-icon {
  display: inline-grid; place-items: center; flex: none; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
}
.kf-icon { width: 48px; height: 48px; }

/* ---------- Om / tidslinje ---------- */
.timeline {
  list-style: none; margin: 40px 0 0; padding: 0;
  display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 0;
}
.timeline li { display: flex; flex-direction: column; }
.timeline strong { font-family: var(--serif); font-weight: 600; font-size: 2rem; line-height: 1.1; color: var(--ink); }
.timeline span:not(.tl-dot) { color: var(--muted); }
.tl-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 4px solid var(--band); box-shadow: 0 0 0 2px var(--accent); margin-bottom: 14px; }
.tl-end .tl-dot { background: var(--warm); box-shadow: 0 0 0 2px var(--warm); }
.tl-mid {
  align-items: center; text-align: center; padding: 0 24px;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 8px / 100% 3px;
  padding-top: 30px;
}
.tl-mid strong { font-size: 1.5rem; color: var(--accent); }
.tl-end { text-align: right; align-items: flex-end; }

/* ---------- Kort ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 12px; }
.cards article {
  border: 1px solid var(--line); border-radius: 16px; padding: 28px; background: var(--card); box-shadow: var(--shadow);
}
.card-icon { width: 52px; height: 52px; margin-bottom: 18px; }
.card-icon .icon { width: 26px; height: 26px; }
.cards p { margin: 0; color: var(--muted); }

/* ---------- Reumatologi ---------- */
.symptoms { list-style: none; padding: 0; margin: 28px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.symptoms li {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line); font-weight: 700; line-height: 1.35;
}
.sym-icon { width: 56px; height: 56px; background: var(--warm-soft); color: var(--warm); }
.sym-icon .icon { width: 30px; height: 30px; }
.chips-title { font-family: var(--sans); font-size: .9rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 32px; }
.chips { list-style: none; padding: 0; margin: 12px 0 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { padding: 8px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-size: 1rem; }
.more { color: var(--muted); }

/* ---------- Steg ---------- */
.steps { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 31px; left: 32px; right: calc(33.33% - 32px); height: 2px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 14px);
}
.steps li { position: relative; display: flex; flex-direction: column; }
.step-icon {
  width: 64px; height: 64px; border-radius: 50%; margin-bottom: 18px;
  background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 8px var(--bg);
}
.step-icon .icon { width: 28px; height: 28px; }
.steps strong { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; margin-bottom: 6px; }
.steps li > span:last-child { color: var(--muted); }

/* ---------- Hitta hit ---------- */
.two { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.address-card { display: flex; gap: 16px; align-items: flex-start; margin: 8px 0 24px; }
.address-card .card-icon { margin: 0; }
address { font-style: normal; line-height: 1.6; }
figure { margin: 0; }
figure img { width: 100%; height: auto; border-radius: 16px; display: block; box-shadow: var(--shadow); }
figcaption { color: var(--muted); font-size: 1rem; margin-top: 10px; }

/* ---------- Kontakt ---------- */
.contact-band { padding-bottom: 56px; }
.contact-band > .wrap {
  background: var(--accent); color: var(--accent-ink); max-width: 1120px; text-align: center;
  background-image: radial-gradient(circle at 100% 0%, rgb(255 255 255 / .10), transparent 45%),
                    radial-gradient(circle at 0% 100%, color-mix(in srgb, var(--warm) 35%, transparent), transparent 50%);
}
.contact-band h2 { color: var(--accent-ink); }
.contact-band .contact-card { border-color: transparent; }
.contact-band .contact-card:hover { border-color: var(--accent-ink); }
.contact-band .note { color: var(--accent-ink); opacity: .88; max-width: 34em; margin-left: auto; margin-right: auto; }
.note { color: var(--muted); margin-top: 24px; }

/* ---------- Sidfot ---------- */
footer { padding: 40px 0 32px; color: var(--muted); font-size: 1rem; border-top: 1px solid var(--line); }
footer p { margin: 0 0 4px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; margin-bottom: 20px; }
.foot-brand { font-size: 1.2rem; color: var(--ink); }
.small { font-size: .95rem; }

/* ---------- Mobil ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .symptoms { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  section { padding: 52px 0; }
  .band, .contact-band { padding: 12px 0; }
  .contact-band { padding-bottom: 32px; }
  .band > .wrap, .contact-band > .wrap { margin: 0 12px; padding: 40px 20px; border-radius: 20px; }
  .hero { padding: 40px 0 52px; }
  .lead { font-size: 1.15rem; }
  .two, .cards, .steps { grid-template-columns: 1fr; }
  .two { gap: 32px; }
  .contact-cards { flex-direction: column; margin-top: 22px; }
  .cards article { padding: 24px; }

  .timeline { grid-template-columns: 1fr; gap: 0; border-left: 3px solid var(--accent); margin-left: 8px; }
  .timeline li { padding: 0 0 24px 24px; position: relative; text-align: left; align-items: flex-start; }
  .timeline li:last-child { padding-bottom: 0; }
  .tl-dot { position: absolute; left: -11px; top: 8px; margin: 0; }
  .tl-mid { background: none; padding: 0 0 24px 24px; }
  .tl-mid strong { font-size: 1.5rem; }

  .steps { gap: 0; }
  .steps::before { top: 32px; bottom: 32px; left: 31px; right: auto; width: 2px; height: auto;
    background: repeating-linear-gradient(180deg, var(--accent) 0 8px, transparent 8px 14px); }
  .steps li { display: grid; grid-template-columns: 64px 1fr; column-gap: 18px; padding-bottom: 28px; }
  .steps li:last-child { padding-bottom: 0; }
  .step-icon { grid-row: span 2; margin: 0; }
}
@media (max-width: 420px) {
  .bar { gap: 8px; }
  .brand { font-size: 1.2rem; gap: 8px; }
  .mark { width: 34px; height: 34px; }
  .contact-nav { gap: 6px; }
  .btn.small { padding: 8px 10px; gap: 6px; }
  .btn .icon { width: 18px; height: 18px; }
}
@media (max-width: 380px) {
  .brand { font-size: 1.08rem; gap: 7px; }
  .mark { width: 30px; height: 30px; }
  .btn.small { padding: 8px 9px; gap: 5px; }
}
