/* Alphion Therapeutics — alphion.de
   Logo, colours and typefaces follow the company slides exactly:
   colours   #0A3A6C (background), #19BEBE (wordmark, accents), #FFFFFF (text)
   display   "Avenir Next LT Pro Light", bold as set in the slides
             (wordmark, headings; @font-face is emitted by inc/layout.php)
   body      Montserrat regular */

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #0A3A6C;
  --teal: #19BEBE;
  --white: #FFFFFF;

  /* network illustration: the logo's navy→teal gradient, with white
     standing in for navy because navy is the page background */
  --brain-a: var(--white);
  --brain-b: var(--teal);

  --font-display: "Avenir Next LT Pro Light", "Montserrat", sans-serif;
  --font-body: "Montserrat", sans-serif;

  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --measure: 34rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.6;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

main { flex: 1 0 auto; }

/* The slides set every headline in Avenir Next LT Pro Light with "bold" on.
   That family has no bold member, so the weight is synthesised — as in PowerPoint. */
h1, h2, h3,
.display {
  margin: 0;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-synthesis: weight;
  line-height: 1.15;
  letter-spacing: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--white); }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

::selection { background: var(--teal); color: var(--navy); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  padding: 0.5rem 0.9rem;
  background: var(--white);
  color: var(--navy);
  z-index: 10;
}
.skip-link:focus { top: 0.75rem; }

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

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.5rem, 4vw, 2.75rem) var(--gutter) 0;
}

/* Wordmark as on the slides: "alphion" 36 pt bold, teal;
   "therapeutics" 12 pt, small caps, 4 pt tracking, white. */
.wordmark {
  --wordmark: clamp(1.875rem, 1.5rem + 1.2vw, 2.5rem);
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.2;
  font-family: var(--font-display);
  font-synthesis: weight;
}
.wordmark__name {
  color: var(--teal);
  font-size: var(--wordmark);
  font-weight: 700;
}
.wordmark__suffix {
  color: var(--white);
  font-size: calc(var(--wordmark) / 3);
  font-weight: 400;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.3333em;
}

.site-nav { padding-top: 0.6rem; }
.site-nav a {
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid var(--teal);
  padding-bottom: 0.15em;
}
.site-nav a:hover { color: var(--teal); }

/* ---------- Hero (mirrors slide 1) ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
  min-height: min(48rem, calc(100svh - 8rem));
  padding: clamp(2rem, 6vh, 5rem) var(--gutter) clamp(3rem, 8vh, 6rem);
}

.hero h1 {
  max-width: 14ch;
  font-size: clamp(2.25rem, 1rem + 4vw, 4.5rem);
  line-height: 1.1;
}

.hero__lead {
  max-width: var(--measure);
  margin: clamp(1.5rem, 3vw, 2.25rem) 0 0;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.55;
}

.hero__figure {
  width: 100%;
  max-width: 44rem;
  justify-self: end;
}

/* ---------- Brain network (traced from the logo, draws itself once) ---------- */

.brain {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  --pace: 1.35;
  --start: 0.25s;
}

.brain__links path {
  fill: none;
  stroke-width: 6.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: brain-link calc(var(--d) * var(--pace)) linear calc(var(--start) + var(--t) * var(--pace)) both;
}

.brain__nodes circle {
  stroke: var(--navy);
  stroke-width: 7;
  paint-order: stroke;
  transform-box: fill-box;
  transform-origin: center;
  animation: brain-node 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) calc(var(--start) + var(--t) * var(--pace)) both;
}

@keyframes brain-link {
  from { stroke-dashoffset: 1; opacity: 0; }
  1%   { opacity: 1; }
  to   { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes brain-node {
  from { transform: scale(0.2); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ---------- Content bands ---------- */

.band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(1rem, 3vw, 3rem);
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter);
}

.band h2 {
  font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem);
}

.band__body { max-width: 38rem; }
.band__body > p:last-of-type { margin-bottom: 0; }

.fn-ref {
  margin-left: 0.1em;
  font-size: 0.7em;
  vertical-align: super;
  line-height: 0;
  text-decoration: none;
}

.footnotes {
  margin-top: 2rem;
  font-size: 0.875rem;
  line-height: 1.55;
}
.footnotes::before {
  content: "";
  display: block;
  width: 3rem;
  margin-bottom: 1rem;
  border-top: 1px solid var(--teal);
}
.footnotes ol { margin: 0; padding-left: 1.1rem; }
.footnotes li::marker { color: var(--teal); }
.footnotes cite { font-style: italic; }

.contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 2rem;
}
.contact__mail {
  grid-column: 1 / -1;
  justify-self: start;
  color: var(--white);
  font-size: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  line-height: 1.2;
  text-decoration: none;
  border-bottom: 2px solid var(--teal);
}
.contact__mail:hover { color: var(--teal); }
.contact__address,
.contact__person {
  margin: 0;
  font-style: normal;
}

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

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  margin: 0 var(--gutter);
  padding: 1.75rem 0;
  border-top: 1px solid var(--teal);
  font-size: 0.875rem;
}
.site-footer p { margin: 0; }
.site-footer nav { display: flex; gap: 1.75rem; }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--teal); }

/* ---------- Legal pages (eRecht24 HTML) ---------- */

.legal {
  padding: clamp(2.5rem, 7vw, 5rem) var(--gutter) clamp(3rem, 8vw, 6rem);
}

.legal__body {
  max-width: 44rem;
  overflow-wrap: break-word;
  hyphens: auto;
}
.legal__body h1 {
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  font-size: clamp(2.25rem, 1.4rem + 3vw, 3.5rem);
}
.legal__body h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.5rem;
}
.legal__body h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.125rem;
}
.legal__body strong { font-weight: 700; }
.legal__body ul { padding-left: 1.2rem; }
.legal__body li { margin-bottom: 0.35em; }

.legal__notice {
  max-width: 44rem;
  margin-bottom: 2rem;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 3px solid var(--teal);
  font-size: 0.9375rem;
}

/* ---------- Small screens ---------- */

@media (max-width: 52rem) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .hero__figure {
    order: -1;
    max-width: 26rem;
  }
  .band { grid-template-columns: 1fr; }
}

@media (max-width: 30rem) {
  .contact { grid-template-columns: 1fr; }
}

/* ---------- Motion & print ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .brain__links path,
  .brain__nodes circle { animation: none; stroke-dashoffset: 0; opacity: 1; }
}

@media print {
  body { background: var(--white); color: var(--navy); }
  h1, h2, h3, .wordmark__suffix, a { color: var(--navy); }
  .wordmark__name { color: var(--teal); }
  .hero__figure, .skip-link, .site-nav { display: none; }
}
