/* ---------- Fonts (stored locally in /fonts) ---------- */
@font-face {
  font-family: "Commissioner";
  src: url("fonts/commissioner-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Colours and sizes: change these to restyle the whole site ---------- */
:root {
  --white: #ffffff;
  --cream: #f8f4ed;
  --sage: #647a5c;
  --sage-dark: #4f6549;
  --sage-soft: #c9d8c1;
  --sage-line: #b4c6ab;
  --sand: #dcc3a0;
  --sand-line: #c2a67f;
  --text: #2b2b2b;
  --text-soft: #55514c;
  --line: #dedad3;
  --red: #cf665c;
  --blue: #4a7fa8;

  --heading: "Commissioner", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 20px;
  --radius-large: 32px;
  --radius-small: 12px;
  --shadow: 0 20px 40px -20px rgba(60, 60, 45, 0.3), 0 2px 6px rgba(60, 60, 45, 0.06);
  --width: 1100px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --section: clamp(2.5rem, 6vw, 4rem);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

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

h1,
h2,
h3 {
  font-family: var(--heading);
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-weight: 500;
  font-size: clamp(2.2rem, 5.5vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2 {
  font-weight: 300;
  font-size: clamp(1.7rem, 3.6vw, 2.3rem);
  letter-spacing: -0.015em;
}

h3 {
  font-weight: 600;
  font-size: 1.1rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--sage-dark);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--text);
}

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

.container {
  width: 100%;
  max-width: var(--width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.narrow {
  max-width: 760px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--sage-dark);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-small);
}

.skip-link:focus {
  top: 1rem;
  color: #fff;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-block;
  background: var(--sage);
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  box-shadow: 0 12px 24px -12px rgba(60, 80, 55, 0.6);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.button:hover {
  background: var(--sage-dark);
  color: #fff;
  transform: translateY(-1px);
}

.button-outline {
  background: transparent;
  color: var(--sage-dark);
  box-shadow: inset 0 0 0 2px var(--sage);
}

.button-outline:hover {
  box-shadow: inset 0 0 0 2px var(--sage-dark);
}

.button-small {
  font-size: 0.9rem;
  padding: 0.55rem 1.1rem;
  white-space: nowrap;
  box-shadow: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 244, 237, 0.94);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4.5rem;
}

.brand {
  font-family: var(--heading);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.6rem;
  align-items: center;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.4rem 0;
}

.site-nav a:hover {
  color: var(--sage-dark);
}

.site-nav .lang-link {
  border: 1px solid var(--sage-line);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  color: var(--sage-dark);
}

/* Small flags in front of the language link: Norway for "Norsk", UK and USA for "English" */
.site-nav .lang-link::before {
  content: "";
  display: inline-block;
  height: 0.75em;
  margin-right: 0.45em;
  border-radius: 2px;
  background-repeat: no-repeat;
  background-size: auto 100%;
}

.site-nav .lang-link[data-lang="no"]::before {
  width: 1.03em;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 16'><rect width='22' height='16' fill='%23ba0c2f'/><path d='M0 8h22M8 0v16' stroke='%23fff' stroke-width='4'/><path d='M0 8h22M8 0v16' stroke='%2300205b' stroke-width='2'/></svg>");
}

.site-nav .lang-link[data-lang="en"]::before {
  width: 3.2em;
  background-image:
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'><clipPath id='t'><path d='M30,15 h30 v15 z v15 h-30 z h-30 v-15 z v-15 h30 z'/></clipPath><path d='M0,0 v30 h60 v-30 z' fill='%23012169'/><path d='M0,0 L60,30 M60,0 L0,30' stroke='%23fff' stroke-width='6'/><path d='M0,0 L60,30 M60,0 L0,30' clip-path='url(%23t)' stroke='%23c8102e' stroke-width='4'/><path d='M30,0 v30 M0,15 h60' stroke='%23fff' stroke-width='10'/><path d='M30,0 v30 M0,15 h60' stroke='%23c8102e' stroke-width='6'/></svg>"),
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 19 10'><rect width='19' height='10' fill='%23b22234'/><path d='M0 1.154h19M0 2.692h19M0 4.231h19M0 5.769h19M0 7.308h19M0 8.846h19' stroke='%23fff' stroke-width='0.769'/><rect width='7.6' height='5.385' fill='%233c3b6e'/></svg>");
  background-position: left center, right center;
}

.menu-button {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--sage-line);
  border-radius: var(--radius-small);
  color: var(--sage-dark);
  cursor: pointer;
}

.menu-button svg {
  width: 1.4rem;
  height: 1.4rem;
}

@media (min-width: 1040px) {
  .header-inner .button {
    order: 3;
    margin-left: 0.75rem;
  }
}

/* Keeps the menu on one line in narrower desktop windows */
@media (min-width: 1040px) and (max-width: 1179px) {
  .site-nav ul {
    gap: 0.25rem 0.9rem;
  }

  .site-nav a {
    font-size: 0.875rem;
  }

  .header-inner .button {
    margin-left: 0.25rem;
  }
}

@media (max-width: 1039px) {
  .header-inner {
    flex-wrap: wrap;
  }

  /* Lets a long name shorten with "…" instead of pushing the menu button onto a second row */
  .brand {
    flex: 1 1 0;
  }

  .site-nav {
    order: 5;
    width: 100%;
    padding-bottom: 1rem;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .site-nav a {
    display: inline-block;
    padding: 0.55rem 0;
    font-size: 1.05rem;
  }

  .site-nav .lang-link {
    margin-top: 0.5rem;
    padding: 0.4rem 1rem;
  }

  /* The menu only collapses when the script has loaded, so it still works without it */
  .js .menu-button {
    display: inline-flex;
  }

  .js .site-nav {
    display: none;
  }

  .js .site-nav.is-open {
    display: block;
  }
}

/* ---------- Sections ---------- */
.section {
  padding-block: var(--section);
}

.section-tint {
  background: var(--cream);
}

.section-band {
  background: var(--sage-soft);
}

.section-intro {
  max-width: 44rem;
  margin-bottom: 2rem;
  color: var(--text-soft);
  font-size: 1.1rem;
}

.section-intro h2 {
  margin-bottom: 0.4em;
}

.section-intro.centered {
  margin-inline: auto;
  text-align: center;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--cream);
  padding-block: clamp(2rem, 5vw, 3.5rem) var(--section);
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 6.5vw, 3.75rem);
}

.headline-line {
  white-space: nowrap;
}

.rotator {
  display: inline-block;
  white-space: nowrap;
  color: var(--red);
  transition: opacity 0.7s ease, width 0.9s ease-in-out 0.2s;
}

.headline-live {
  color: var(--blue);
}

.rotator.is-out {
  opacity: 0;
}

.eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: 1rem;
}

.lead {
  font-size: clamp(1.05rem, 2vw, 1.15rem);
  color: var(--text-soft);
  max-width: 32rem;
  margin-bottom: 1.8rem;
}

.reassure {
  margin: 1.1rem 0 0;
  font-size: 0.95rem;
  color: var(--text-soft);
}

.hero-photo {
  max-width: 520px;
  margin-inline: auto;
  width: 100%;
}

.hero-photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-large);
  background: var(--sage-soft);
  box-shadow: var(--shadow);
}

@media (min-width: 800px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
  }
}

/* ---------- Who I help ---------- */
.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.card {
  flex: 1 1 17rem;
  background: var(--sage-soft);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  text-align: center;
  box-shadow: var(--shadow);
}

/* One soft shade per card; a sixth card would fall back to sage */
.card:nth-child(1) {
  background: #d6e3ee;
}

.card:nth-child(2) {
  background: #ecdfc8;
}

.card:nth-child(3) {
  background: var(--sage-soft);
}

.card:nth-child(4) {
  background: #f0d9d3;
}

.card:nth-child(5) {
  background: #dfdbea;
}

.card-icon {
  width: 2.75rem;
  height: 2.75rem;
  margin: 0 auto 1rem;
  display: block;
  color: var(--text);
}

.card h3 {
  margin-bottom: 0.5em;
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-soft);
}

@media (min-width: 600px) {
  .card {
    max-width: 20rem;
  }
}

/* ---------- Approach ---------- */
.approach-grid {
  display: grid;
  gap: 2.5rem;
}

.approach-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.approach-list li {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow);
}

.approach-list h3 {
  margin-bottom: 0.3em;
}

.approach-list p {
  margin: 0;
  color: var(--text-soft);
}

@media (min-width: 800px) {
  .approach-grid {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 4rem;
    align-items: center;
  }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  gap: 2rem;
  justify-items: start;
  align-items: center;
}

.about-photo {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-large);
  object-fit: cover;
  object-position: center top;
  background: var(--sage-soft);
  box-shadow: var(--shadow);
}

.about-role {
  color: var(--sage-dark);
  font-weight: 600;
  margin-bottom: 1.2rem;
}

@media (min-width: 700px) {
  .about-grid {
    grid-template-columns: minmax(200px, 300px) 1fr;
    gap: 4rem;
  }
}

/* ---------- How it works ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2.5rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  counter-reset: step;
  text-align: center;
}

.steps li {
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  background: var(--white);
  color: var(--sage-dark);
  font-size: 1.35rem;
  box-shadow: 0 8px 18px -10px rgba(60, 60, 45, 0.45);
}

.steps p {
  margin: 0 auto;
  max-width: 19rem;
  font-size: 0.95rem;
  color: var(--text-soft);
}

/* ---------- Booking and pricing ---------- */
.booking-grid {
  display: grid;
  gap: 1.5rem;
  max-width: 52rem;
  margin-inline: auto;
}

@media (min-width: 560px) {
  .booking-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 560px) and (max-width: 799px) {
  .booking-grid .price-card {
    padding: 1.5rem 1.25rem;
  }
}

.price-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 5vw, 2.5rem);
  width: 100%;
  max-width: 27rem;
  margin-inline: auto;
  text-align: center;
  box-shadow: var(--shadow), 0 0 0 1px rgba(60, 60, 45, 0.05);
}

.price-card h3 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

/* Keeps the buttons level when one card has more text than the other */
.price-card .button {
  margin-top: auto;
}

.price {
  font-size: clamp(2rem, 5vw, 2.6rem);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 0.2em;
}

.price-unit {
  color: var(--text-soft);
  margin-bottom: 1.5rem;
}

.price-list {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
}

.price-list li {
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}

.price-list li:last-child {
  border-bottom: 1px solid var(--line);
}

/* ---------- FAQ ---------- */
.faq details {
  border-bottom: 1px solid var(--line);
}

.faq details:first-of-type {
  border-top: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.15rem 0 1.15rem 0.35rem;
  font-size: 1.05rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before {
  content: "";
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  margin-top: -0.25rem;
  border-right: 2px solid var(--sage);
  border-bottom: 2px solid var(--sage);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.faq details[open] summary::before {
  margin-top: 0.25rem;
  transform: rotate(-135deg);
}

.faq .answer {
  padding: 0 0 1.4rem 2rem;
  max-width: 42rem;
  color: var(--text-soft);
}

.faq .answer p:last-child {
  margin-bottom: 0;
}

/* ---------- Final call to action ---------- */
.cta {
  background: var(--cream);
  text-align: center;
}

.cta p {
  max-width: 36rem;
  margin-inline: auto;
  color: var(--text-soft);
}

.cta .button {
  margin-top: 1rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--sand);
  padding-block: 3.5rem 2.5rem;
  font-size: 0.95rem;
  color: var(--text);
}

.site-footer a {
  color: var(--text);
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

.site-footer h2 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0;
  margin-bottom: 0.6em;
}

.site-footer p {
  margin-bottom: 0.5em;
}

a[href^="tel:"] {
  white-space: nowrap;
}

@media (max-width: 479px) {
  .button-small {
    font-size: 0.82rem;
    padding: 0.5rem 0.8rem;
  }

  /* On narrow phones a long name wraps onto two lines instead of being cut off */
  .brand {
    white-space: normal;
    font-size: 1rem;
    line-height: 1.15;
  }
}

.crisis ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--sand-line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

/* Privacy pages have no columns above the bottom row, so no divider is needed there */
.footer-bottom:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

@media (min-width: 800px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr 1.5fr;
    gap: 3rem;
  }
}

/* ---------- Privacy page ---------- */
.prose h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
}

.prose h2 {
  font-size: 1.4rem;
  font-weight: 500;
  margin-top: 2em;
}

.prose ul {
  padding-left: 1.2rem;
}

.prose li {
  margin-bottom: 0.4em;
}

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

  .button,
  .faq summary::before {
    transition: none;
  }

  .button:hover {
    transform: none;
  }
}
