/* Moka Medical — site styles
   Palette taken from the Moka logo: blue + red halves, navy wordmark. */

:root {
  --ink: #0b1f33;
  --ink-soft: #3d5168;
  --blue: #0a66c2;
  --blue-deep: #083d73;
  --blue-night: #062a50;
  --red: #da1e28;
  --paper: #ffffff;
  --mist: #eef3f8;
  --line: #d5dfea;
  --focus: #ffb000;

  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius-sm: 6px;
  --radius-lg: 18px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--blue); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-deep); }

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

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

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

h1, h2, h3 { font-family: var(--sans); line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.25rem); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.5rem; }
.brand { display: inline-flex; color: inherit; }
.brand svg { height: 38px; width: auto; }

.nav { display: flex; align-items: center; gap: 0.25rem; }
.nav a {
  color: var(--ink); text-decoration: none; font-weight: 500;
  padding: 0.55rem 0.85rem; border-radius: 999px;
}
.nav a:hover { background: var(--mist); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--blue); }
.nav .btn { margin-left: 0.5rem; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; }
.nav a.btn-primary:hover { background: var(--blue-deep); }

.menu { display: none; }
.menu summary {
  list-style: none; cursor: pointer; font-weight: 600;
  padding: 0.55rem 0.95rem; border: 1px solid var(--line); border-radius: 999px;
}
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--mist); }
.menu-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 0.75rem var(--gutter) 1.25rem;
  display: grid; gap: 0.25rem;
}
.menu-panel a { color: var(--ink); text-decoration: none; font-weight: 550; padding: 0.75rem 0.5rem; border-radius: var(--radius-sm); }
.menu-panel a:hover { background: var(--mist); }
.menu-panel .btn { margin-top: 0.5rem; justify-content: center; }

@media (max-width: 52rem) {
  .nav { display: none; }
  .menu { display: block; }
  .brand svg { height: 32px; }
}

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

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font: 600 1rem/1 var(--sans);
  padding: 0.95rem 1.4rem; border-radius: 999px;
  text-decoration: none; border: 1.5px solid transparent;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); color: #fff; }
.btn-light { background: #fff; color: var(--blue-deep); }
.btn-light:hover { background: var(--mist); color: var(--blue-deep); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); color: #fff; }
.btn-outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.btn-small { padding: 0.7rem 1.1rem; font-size: 0.95rem; }

/* ---------- Hero: the one bold moment ---------- */

.hero {
  position: relative; overflow: hidden;
  background: var(--blue-deep);
  color: #fff;
}
.hero::after {
  /* the Moka cross, oversized and cropped at the right edge */
  content: "";
  position: absolute; right: -9rem; top: 50%;
  width: 34rem; height: 34rem; transform: translateY(-50%);
  background:
    linear-gradient(#fff, #fff) center / 30% 100% no-repeat,
    linear-gradient(#fff, #fff) center / 100% 30% no-repeat;
  opacity: 0.07;
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; padding-block: clamp(4.5rem, 11vw, 8.5rem); }
.hero h1 { max-width: 16ch; }
.hero .lede {
  margin-top: 1.5rem; max-width: 36rem;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem); line-height: 1.5;
  color: rgba(255, 255, 255, 0.86);
}
.hero .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }
.status {
  display: inline-flex; align-items: center; gap: 0.6rem;
  margin-bottom: 1.75rem; font-weight: 550; font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.9);
}
.status::before {
  content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%;
  background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.22);
}

@media (max-width: 40rem) {
  .hero::after { width: 22rem; height: 22rem; right: -8rem; top: 30%; }
}

/* Affiliation strip */
.where {
  background: var(--blue-night); color: rgba(255, 255, 255, 0.85);
  font-size: 0.97rem;
}
.where .wrap { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; justify-content: space-between; padding-block: 1rem; }
.where a { color: #fff; }

/* ---------- Sections ---------- */

.section { padding-block: clamp(4rem, 9vw, 7rem); }
.section-tint { background: var(--mist); }
.section-head { max-width: 40rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { margin-top: 0.9rem; color: var(--ink-soft); font-size: 1.1rem; }

/* Doctors */
.doctors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.5rem); }
@media (max-width: 44rem) { .doctors { grid-template-columns: 1fr; } }

.doctor { display: block; color: inherit; text-decoration: none; }
.doctor .portrait { border-radius: var(--radius-lg); }
.doctor h3 { margin-top: 1.25rem; font-size: 1.5rem; letter-spacing: -0.02em; }
.doctor .creds { margin-top: 0.3rem; color: var(--ink-soft); }
.doctor .langs { margin-top: 0.85rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.doctor .more { display: inline-block; margin-top: 1.1rem; color: var(--blue); font-weight: 600; text-decoration: underline; text-decoration-color: transparent; transition: text-decoration-color 150ms; }
.doctor:hover .more { text-decoration-color: currentColor; }
.doctor:hover .portrait img { transform: scale(1.02); }

.portrait {
  position: relative; overflow: hidden; aspect-ratio: 4 / 4.4;
  background: linear-gradient(160deg, #dce8f4, #c7d9ec);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transition: transform 400ms ease; }
@media (prefers-reduced-motion: reduce) { .portrait img { transition: none; } }
.portrait .initials {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: clamp(3.5rem, 9vw, 6rem); font-weight: 700; letter-spacing: -0.04em;
  color: var(--blue-deep); opacity: 0.35;
}

.tag {
  display: inline-block; font-size: 0.88rem; font-weight: 550;
  padding: 0.3rem 0.7rem; border-radius: 999px;
  background: var(--mist); color: var(--ink);
}
.section-tint .tag { background: #fff; }

/* Care list */
.care { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; list-style: none; padding: 0; margin: 0; }
@media (max-width: 60rem) { .care { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 34rem) { .care { grid-template-columns: 1fr; gap: 1.5rem; } }
.care li { border-top: 2px solid var(--ink); padding-top: 1.1rem; }
.care p { margin-top: 0.45rem; color: var(--ink-soft); }

/* Steps (a real sequence, so numbered) */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; counter-reset: step; }
.steps > li {
  counter-increment: step;
  display: grid; grid-template-columns: 3.25rem 1fr; gap: 1.25rem; align-items: start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.steps > li::before {
  content: counter(step);
  display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 50%;
  background: var(--blue); color: #fff; font-weight: 700; font-size: 1.25rem;
}
.steps h3 { margin-top: 0.35rem; }
.steps p { margin-top: 0.4rem; color: var(--ink-soft); }

.split { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
@media (max-width: 52rem) { .split { grid-template-columns: 1fr; } }
.split .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* Blog teaser / list */
.posts { display: grid; gap: 0; border-top: 1px solid var(--line); }
.post-row { display: grid; grid-template-columns: 9rem 1fr; gap: 1.5rem; padding-block: 1.5rem; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.post-row time { color: var(--ink-soft); font-size: 0.95rem; padding-top: 0.2rem; }
.post-row h3 { font-size: 1.3rem; }
.post-row p { margin-top: 0.4rem; color: var(--ink-soft); }
.post-row:hover h3 { color: var(--blue); }
@media (max-width: 36rem) { .post-row { grid-template-columns: 1fr; gap: 0.4rem; } }

.empty {
  border: 1.5px dashed var(--line); border-radius: var(--radius-lg);
  padding: 2rem; color: var(--ink-soft); max-width: 40rem;
}
.empty strong { display: block; color: var(--ink); font-size: 1.15rem; margin-bottom: 0.35rem; }

/* ---------- Inner pages ---------- */

.page-head { background: var(--mist); border-bottom: 1px solid var(--line); }
.page-head .wrap { padding-block: clamp(3rem, 7vw, 5rem); }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); max-width: 18ch; }
.page-head p { margin-top: 1rem; max-width: 40rem; color: var(--ink-soft); font-size: 1.15rem; }
.crumbs { font-size: 0.95rem; margin-bottom: 1rem; }
.crumbs a { color: var(--ink-soft); }

.profile { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
@media (max-width: 52rem) { .profile { grid-template-columns: 1fr; } .profile .portrait { max-width: 22rem; } }
.profile .portrait { border-radius: var(--radius-lg); }
.profile aside { position: sticky; top: 6rem; }
@media (max-width: 52rem) { .profile aside { position: static; } }
.facts { margin: 1.5rem 0 0; display: grid; gap: 1rem; }
.facts dt { font-size: 0.9rem; color: var(--ink-soft); }
.facts dd { margin: 0.15rem 0 0; font-weight: 550; }
.profile aside .btn { margin-top: 1.75rem; }

.prose { font-family: var(--serif); font-size: 1.15rem; line-height: 1.7; max-width: 38rem; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-family: var(--sans); font-size: 1.55rem; margin-top: 2.2em; }
.prose h3 { font-family: var(--sans); font-size: 1.2rem; margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 0.4em; }
.prose .lead { font-size: 1.3rem; line-height: 1.55; color: var(--ink); }

.prose .timeline { list-style: none; padding: 0; margin-top: 1.5rem; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1.4rem 1.5rem; font-family: var(--sans); font-size: 1.02rem; line-height: 1.5; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 0.4rem; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--blue); }
.timeline strong { display: block; }
.timeline span { color: var(--ink-soft); }

.note {
  border-left: 3px solid var(--red); background: #fff5f5;
  padding: 1rem 1.25rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--sans); font-size: 1rem;
}

/* ---------- Footer ---------- */

.site-footer { background: var(--ink); color: rgba(255, 255, 255, 0.78); font-size: 0.97rem; }
.site-footer .wrap { padding-block: 3.5rem 2.5rem; display: grid; gap: 2.5rem; grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 48rem) { .site-footer .wrap { grid-template-columns: 1fr; } }
.site-footer a { color: #fff; }
.site-footer h2 { font-size: 1rem; font-weight: 650; color: #fff; letter-spacing: 0; margin-bottom: 0.75rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.site-footer .brand svg { height: 34px; }
.site-footer .brand .wordmark { fill: #fff; }
.site-footer .fine { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, 0.14); padding-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; font-size: 0.9rem; }
.emergency { color: #fff; font-weight: 600; }

/* Smaller portraits: half the previous size */
.doctor .portrait { width: 50%; max-width: 16rem; }
.profile { grid-template-columns: minmax(0, 16rem) minmax(0, 1fr); }
.profile .portrait { width: 70%; max-width: 11rem; }
@media (max-width: 52rem) { .profile .portrait { max-width: 11rem; } }

/* Photos keep their original white backgrounds; a thin border keeps the frame visible */
.portrait:has(img) { background: #fff; border: 1px solid var(--line); }
