/* ============================================================
   Psykiatrisk Rådgivning — design system
   Simple static HTML + CSS. Change values in :root only.
   Brand fonts are self-hosted as Latin-subset WOFF2 files.
   Psykiatrisk Rådgivning "Designsystem · v2".
   ============================================================ */

@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("/assets/fonts/hanken-grotesk/hanken-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("/assets/fonts/newsreader/newsreader-latin-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/newsreader/newsreader-latin-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* ---- Colours --------------------------------------------- */
  --paper:      #f4f2ec;  /* page background             */
  --paper-2:    #ece9df;  /* subtle alt background       */
  --ink:        #1b262b;  /* headlines & body text       */
  --ink-strong: #12191d;  /* hover / pressed ink         */
  --ink-soft:   #3c3f39;  /* secondary text              */
  --muted:      #6a6455;  /* labels, captions — AA on paper/paper-2 */
  --sage:       #84a59d;  /* accent / lines / underlines */
  --sage-deep:  #4b6b62;  /* links, accent text          */
  --clay:       #c9c2b4;  /* borders, dividers           */
  --line:       #e2ddd0;  /* hairline borders            */

  /* ---- Type ------------------------------------------------ */
  --font-head:  "Newsreader", Georgia, serif;
  --font-body:  "Hanken Grotesk", system-ui, sans-serif;

  /* ---- Scale (h1/h2 fluid so they never overflow on phones) */
  --step-label: 0.75rem;                    /* 12px  uppercase labels */
  --step-body:  1.0625rem;                  /* 17px  body             */
  --step-lead:  1.375rem;                   /* 22px  intro text       */
  --step-h3:    1.5rem;                     /* 24px                   */
  --step-h2:    clamp(2rem, 5vw, 2.5rem);   /* 32 → 40px              */
  --step-h1:    clamp(2.5rem, 7vw, 4rem);   /* 40 → 64px              */

  /* ---- Containers ------------------------------------------
     Tailwind-inspired standard sizes, implemented in plain CSS:
     max-w-6xl (72rem) for the page shell and max-w-3xl (48rem)
     for every content page. One content width = one visual axis. */
  --page-width: 72rem;  /* 1152px · header, footer, page shell */
  --measure:    48rem;  /* 768px  · headings, prose, components */

  /* ---- Space & shape --------------------------------------- */
  --space-xs:  0.5rem;
  --space-sm:  0.75rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  --gutter:  clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(var(--space-3xl), 8vw, var(--space-4xl));
  --radius:  4px;
}

/* ---- Base --------------------------------------------------- */
* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
main { flex: 1 0 auto; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.08;
  margin: 0 0 0.4em;
  overflow-wrap: anywhere;
  hyphens: auto;
  text-wrap: balance;
}
h1 { font-size: var(--step-h1); }
h2 { font-size: var(--step-h2); }
h3 { font-size: var(--step-h3); line-height: 1.2; }

p  { margin: 0 0 1em; }            /* reading width lives on .prose, not the element */
em { font-style: italic; color: var(--sage-deep); }

a {
  color: var(--sage-deep);
  text-decoration: underline;
  text-decoration-color: var(--sage);
  text-underline-offset: 3px;
}
a:hover { color: var(--ink); text-decoration-color: var(--ink); }

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

:focus-visible { outline: 2px solid var(--sage-deep); outline-offset: 3px; border-radius: 2px; }

/* Uppercase label / eyebrow */
.label {
  font-size: var(--step-label);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Intro / lead paragraph */
.lead { font-size: var(--step-lead); line-height: 1.5; color: var(--ink-soft); }

/* ---- Buttons and action links ------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.8em 1.5em;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary       { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--ink-strong); color: var(--paper); }
.btn-secondary       { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--paper); }

.text-link {
  display: inline;
  color: var(--ink);
  font-weight: 500;
  text-decoration-line: underline;
  text-decoration-color: var(--sage);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.text-link::after {
  content: "→";
  display: inline-block;
  margin-left: 0.45em;
  color: var(--sage-deep);
  text-decoration: none;
  transition: transform 0.15s ease;
}
.text-link:hover::after { transform: translateX(0.2rem); }

/* ---- Layout helpers ---------------------------------------- */
.wrap    { width: min(calc(100% - (2 * var(--gutter))), var(--page-width)); margin-inline: auto; }
.section { padding: var(--section) 0; }
.prose   { max-width: var(--measure); }   /* readable line length for text blocks */
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ============================================================
   Site-specific — page pieces beyond the core system.
   Add components here as the site grows.
   ============================================================ */

/* Short sage accent rule */
.rule {
  display: block;
  width: 3rem;
  height: 3px;
  margin: 1.75rem 0;
  background: var(--sage);
  border-radius: 999px;
}

/* ---- Skip link (a11y) -------------------------------------- */
.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3.5rem;
  z-index: 100;
  padding: 0.5rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0.5rem; color: var(--paper); }

/* ---- Site header + primary nav ----------------------------- */
.site-header {
  --header-pad-y: 1.1rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.site-header .wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
  padding-top: var(--header-pad-y);
  padding-bottom: var(--header-pad-y);
}
.brand {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-head);
  font-size: clamp(1.1rem, 5vw, 1.3rem);
  line-height: 1.1;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }

.site-nav--desktop { display: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.nav-list { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 1.3rem; }
.nav-list > li { position: relative; }
.nav-list a {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0;
  color: var(--ink-soft);
  font-size: 1rem;
  text-decoration: none;
}
.nav-list a:hover { color: var(--ink); }
.nav-list a[aria-current="page"] { color: var(--ink); font-weight: 500; }

.mobile-nav {
  margin-left: auto;
}
.mobile-nav-toggle {
  position: relative;
  z-index: 30;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 0.15rem 0 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}
.mobile-nav-toggle::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  margin-top: -0.25rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease, margin-top 0.15s ease;
}
.mobile-nav-toggle[aria-expanded="true"]::after {
  margin-top: 0.25rem;
  transform: rotate(225deg);
}
.mobile-nav-panel[hidden] { display: none; }
.mobile-nav-panel {
  position: absolute;
  top: 100%;
  right: calc(-1 * var(--gutter));
  left: auto;
  z-index: 20;
  width: 100vw;
  padding: 0 var(--gutter) var(--space-sm);
  border-top: 1px solid var(--clay);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 0.75rem 1.5rem rgb(27 38 43 / 8%);
}
.mobile-nav-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.mobile-nav-list li + li { border-top: 1px solid var(--line); }
.mobile-nav-list a {
  display: block;
  min-height: 2.75rem;
  padding: 0.72rem 0;
  color: var(--ink-soft);
  line-height: 1.35;
  text-decoration: none;
}
.mobile-nav-list a:hover { color: var(--ink); }
.mobile-nav-list a[aria-current="page"] { color: var(--ink); font-weight: 500; }

@media (min-width: 64rem) {
  .mobile-nav { display: none; }
  .site-nav--desktop { display: block; width: auto; }
}

/* ---- Breadcrumb -------------------------------------------- */
.breadcrumb-wrap {
  padding-top: clamp(var(--space-md), 2.5vw, var(--space-lg));
}
.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.breadcrumb li { display: flex; align-items: center; gap: 0.4rem; }
.breadcrumb li + li::before { content: "/"; color: var(--clay); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--ink-soft); }

@media (max-width: 47.999rem) {
  .breadcrumb ol {
    flex-wrap: nowrap;
    overflow: hidden;
  }
  .breadcrumb li {
    min-width: 0;
    flex: 0 0 auto;
  }
  .breadcrumb li:last-child {
    min-width: 0;
    flex: 1 1 auto;
  }
  .breadcrumb li:last-child [aria-current="page"] {
    min-width: 0;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* ---- Content page / article -------------------------------- */
.page {
  padding-top: clamp(2.5rem, 5vw, var(--space-3xl));
  padding-bottom: var(--section);
}
.article { max-width: var(--measure); margin-inline: auto; }
.article > h1 { margin-top: 0.8rem; }
.article h2 { margin-top: 2.75rem; }
.article ul { margin: 0 0 1em; padding-left: 1.25rem; }
.article li { margin: 0.35rem 0; }
.article-meta {
  margin: -0.25rem 0 var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}
.price {
  font-family: var(--font-head);
  font-size: var(--step-h3);
  line-height: 1.2;
  color: var(--ink);
}
.code-inline {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}

/* Knowledge-hub link groups */
.article .link-list {
  list-style: none;
  margin-top: var(--space-md);
  padding: 0;
  border-top: 1px solid var(--line);
}
.article .link-list li {
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.link-list a {
  display: block;
  padding: var(--space-md) 0;
  font-family: var(--font-head);
  font-size: 1.25rem;
  line-height: 1.25;
  color: var(--ink);
  text-decoration: none;
}
.link-list a:hover {
  color: var(--sage-deep);
  text-decoration: underline;
}
.source-list { font-size: 0.9375rem; color: var(--ink-soft); }

/* Prominent single contact line (e.g. Kontakt page) */
.contact-email { margin: 1.5rem 0; font-size: var(--step-lead); }

/* Kristina profile introduction */
.profile-hero {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}
.profile-hero-copy > h1 { margin-top: 0.8rem; }
.profile-hero-copy > :last-child { margin-bottom: 0; }
.profile-portrait {
  display: block;
  width: min(100%, 22rem);
  height: auto;
  aspect-ratio: 4 / 5;
  margin: 0;
  border-radius: var(--radius);
  object-fit: cover;
}
@media (min-width: 48rem) {
  .profile-hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
    gap: var(--space-2xl);
  }
}

/* ---- FAQ --------------------------------------------------- */
.faq { margin-top: 1rem; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-q {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-md);
  padding: 1.25rem 0;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 1.2rem;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::marker { content: ""; }
.faq-q::after {
  content: "+";
  color: var(--sage-deep);
  font-family: var(--font-body);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
}
.faq-item[open] .faq-q::after { content: "−"; }
.faq-q:hover { color: var(--sage-deep); }
.faq-answer {
  padding: 0 3rem 1.25rem 0;
  color: var(--ink-soft);
}
.faq-answer > :last-child { margin-bottom: 0; }
.faq-a { margin: 0 0 var(--space-sm); }

/* ---- Callout / safety note --------------------------------- */
.note {
  padding: 1.1rem 1.25rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.note :last-child { margin-bottom: 0; }
.note strong { color: var(--ink); }
.article > .medical-disclaimer { margin-top: var(--space-2xl); }

/* ---- Homepage rhythm + editorial split -------------------- */
.home-page > .home-section,
.home-page > .home-feature-grid {
  margin-top: clamp(var(--space-3xl), 9vw, 7rem);
}
.home-section > h2,
.home-feature > h2 { margin-top: 0; }
.home-help {
  padding: clamp(var(--space-xl), 5vw, var(--space-2xl));
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.article .home-help-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: var(--space-xl) 0;
  padding: 0;
  list-style: none;
}
.article .home-help-list li {
  margin: 0;
  color: var(--ink-soft);
}
.article .home-help-list li + li {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--line);
}
.home-help-icon {
  display: block;
  width: 1.4rem;
  height: 1.4rem;
  margin-bottom: var(--space-md);
  background: var(--ink);
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}
.home-help-icon--search-check {
  -webkit-mask-image: url("/assets/icons/lucide/search-check.svg");
  mask-image: url("/assets/icons/lucide/search-check.svg");
}
.home-help-icon--route {
  -webkit-mask-image: url("/assets/icons/lucide/route.svg");
  mask-image: url("/assets/icons/lucide/route.svg");
}
.home-help-icon--refresh-cw {
  -webkit-mask-image: url("/assets/icons/lucide/refresh-cw.svg");
  mask-image: url("/assets/icons/lucide/refresh-cw.svg");
}
.home-help-list strong {
  display: block;
  margin-bottom: var(--space-xs);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}
.home-help > :last-child { margin-bottom: 0; }
.home-feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.home-feature + .home-feature {
  padding-top: var(--space-xl);
  border-top: 1px solid var(--line);
}
@media (min-width: 48rem) {
  .article .home-help-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-xl);
  }
  .article .home-help-list li + li {
    margin-top: 0;
    padding-top: 0;
    padding-left: var(--space-xl);
    border-top: 0;
    border-left: 1px solid var(--line);
  }
  .home-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2xl);
  }
  .home-feature + .home-feature {
    padding-top: 0;
    padding-left: var(--space-2xl);
    border-top: 0;
    border-left: 1px solid var(--line);
  }
}

/* ---- CTA band ---------------------------------------------- */
.cta {
  margin-top: 3rem;
  padding: 2.25rem 1.5rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}
.cta h2 { margin-top: 0; }
.cta .lead { max-width: 34rem; margin-inline: auto; }
.cta .btn { margin-top: 0.75rem; }

/* ---- Entry cards (hub) ------------------------------------- */
.cards { display: grid; grid-template-columns: 1fr; gap: var(--space-md); margin-top: var(--space-xl); }
@media (min-width: 40em) { .cards { grid-template-columns: 1fr 1fr; } }
.card {
  display: block;
  padding: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.card:hover { border-color: var(--sage); color: var(--ink); }
.card .label { display: block; margin-bottom: 0.5rem; }
.card h3 { margin: 0 0 0.4rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.card--soon { opacity: 0.72; }

/* ---- Site footer ------------------------------------------- */
.site-footer { margin-top: var(--section); border-top: 1px solid var(--line); background: var(--paper-2); }
.site-footer .wrap { display: grid; gap: 1.25rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
.footer-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; }
.footer-nav a { color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; }
.footer-nav a:hover { color: var(--ink); text-decoration: underline; }
.site-footer .footer-safety { max-width: var(--measure); margin: 0; font-size: 0.875rem; color: var(--ink-soft); }
.site-footer .footer-note { margin: 0; font-size: 0.8125rem; color: var(--muted); }
