/* Hypnos Therapeutics — one-page site
   Palette is taken from the logo: plum #5C3472 and gray #A6A8AB. */

@font-face {
  font-family: "Bodoni Moda";
  src: url("assets/fonts/bodoni-moda-latin-standard-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("assets/fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --page: #fbf9fd;
  --mist: #f1ebf6;
  --lilac: #e7ddf0;
  --line: #d9cde5;
  --ink: #2a1738;
  --text: #3a2d45;
  --muted: #645872;
  --plum: #5c3472;
  --plum-soft: #8b6fa6;
  --gray: #a6a8ab;
  --night: #2a1738;

  --serif: "Bodoni Moda", "Bodoni 72", Didot, "Playfair Display", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --space: clamp(4rem, 9vw, 7.5rem);
}

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

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

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  overflow: hidden;
}

.logo { height: clamp(84px, 9vw, 112px); width: auto; }

.hero h1 {
  margin-top: clamp(2.5rem, 7vw, 5.5rem);
  max-width: 15em;
  font: 500 clamp(2.5rem, 7vw, 5.5rem) / 1.04 var(--serif);
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}

.hero .tagline {
  margin-top: clamp(1.25rem, 2.5vw, 2rem);
  max-width: 36em;
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  line-height: 1.5;
}

.wave {
  width: 100%;
  height: clamp(70px, 11vw, 150px);
  margin-top: clamp(2rem, 5vw, 4rem);
  animation: draw 2.4s cubic-bezier(0.35, 0.1, 0.2, 1) 0.25s both;
}

@keyframes draw {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

/* ---------- Shared section pieces ---------- */

.nb { white-space: nowrap; }

.sec { padding-block: var(--space); scroll-margin-top: 1rem; }
.sec--band { background: var(--mist); }

.sec-title {
  max-width: 17em;
  font: 500 clamp(2rem, 4.4vw, 3.5rem) / 1.08 var(--serif);
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}

.lead {
  max-width: 32em;
  margin-top: 1.25rem;
  font-size: clamp(1.15rem, 1.7vw, 1.4rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.sub {
  font: 600 1.0625rem/1.3 var(--sans);
  color: var(--plum);
}

.center { text-align: center; }
.center .sec-title, .center .lead { margin-inline: auto; }
.center .lead { text-wrap: balance; }

/* ---------- In the headlines: a staggered press wall ---------- */

.press {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 1.5rem;
  row-gap: clamp(2rem, 4vw, 3.25rem);
  margin-top: clamp(2.25rem, 5vw, 4rem);
}
.press li { padding-top: 1.1rem; border-top: 2px solid var(--plum); }
.press li:nth-child(1) { grid-column: 1 / 8; }
.press li:nth-child(2) { grid-column: 4 / 11; }
.press li:nth-child(3) { grid-column: 6 / 13; }

.hl {
  font: 500 clamp(1.6rem, 3vw, 2.4rem) / 1.18 var(--serif);
  color: var(--ink);
  text-wrap: balance;
}
.src { margin-top: 0.9rem; font-size: 0.9375rem; color: var(--muted); }
.src strong { margin-right: 0.75rem; font-weight: 700; color: var(--plum); }

/* ---------- Near-term ---------- */

.near { padding-bottom: 0; }

.stage { margin-top: clamp(2.5rem, 5vw, 4rem); }
.stage .sub { margin-bottom: 1.75rem; }

/* A status track: solid = validated, dashed and hollow = in development */
.track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.track li { position: relative; padding: 2.4rem 1.75rem 0 0; }
.track li::before {            /* the line */
  content: "";
  position: absolute;
  top: calc(0.6rem - 1px);
  left: 0;
  right: 0;
  height: 2px;
  background: var(--plum);
}
.track li::after {             /* the dot */
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--plum);
}
.track .dev::before {
  height: 0;
  background: none;
  border-top: 2px dashed var(--plum-soft);
}
.track .dev::after {
  background: var(--page);
  border: 2px solid var(--plum);
}
.track h4 {
  margin-bottom: 0.5rem;
  font: 500 clamp(1.5rem, 2.4vw, 1.9rem) / 1.15 var(--serif);
  color: var(--ink);
}

.gap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: 0.75rem clamp(1rem, 4vw, 3rem);
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.gap p {
  max-width: 24em;
  font: 500 clamp(1.5rem, 2.8vw, 2.3rem) / 1.2 var(--serif);
  color: var(--ink);
  text-wrap: balance;
}

.ours {
  margin-top: var(--space);
  padding-block: var(--space);
  background: var(--plum);
  color: #f3ecf8;
}
.ours-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: 2rem clamp(1rem, 4vw, 3rem);
  align-items: start;
}
.ours h3 {
  font: 500 clamp(2rem, 4vw, 3.2rem) / 1.08 var(--serif);
  color: #fff;
}
.pillars > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 0.5rem 2rem;
  padding-block: 1.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}
.pillars > div:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.3); }
.pillars dt { font: 500 clamp(1.5rem, 2.4vw, 1.85rem) / 1.15 var(--serif); color: #fff; }
.pillars dd { font-size: 1.125rem; }

/* ---------- Long-term ---------- */

.longterm {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 400px) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: stretch;
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
}

.areas {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 1.5rem;
  align-items: center;
}

.area {
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 4px solid var(--c);
  transition: background-color 0.2s;
}
.area h3 { font: 500 1.55rem / 1.15 var(--serif); color: var(--ink); }
.conds { margin: 0.45rem 0 0.35rem; font-weight: 700; color: var(--plum); }

.a-tl { --c: #4a2760; }
.a-tr { --c: #65497c; }
.a-br { --c: #7c649a; }
.a-bl { --c: #9a88ae; }

.ring { width: 100%; height: auto; align-self: center; }

.seg { transition: filter 0.2s; stroke: var(--mist); stroke-width: 8; stroke-linejoin: round; }
.seg-tl { fill: #4a2760; }
.seg-tr { fill: #65497c; }
.seg-br { fill: #7c649a; }
.seg-bl { fill: #9a88ae; }

.ico {
  fill: none;
  stroke: #fff;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.core { fill: var(--lilac); }
.moon { fill: var(--plum-soft); stroke: var(--plum-soft); stroke-width: 1; stroke-linejoin: round; }
.core-title { font: 600 23px var(--serif); fill: var(--ink); }
.core-sub { font: 500 14px var(--sans); fill: var(--plum); }

@media (hover: hover) {
  .longterm:has(.seg-tl:hover) .a-tl,
  .longterm:has(.seg-tr:hover) .a-tr,
  .longterm:has(.seg-br:hover) .a-br,
  .longterm:has(.seg-bl:hover) .a-bl,
  .area:hover { background: var(--lilac); }

  .longterm:has(.a-tl:hover) .seg-tl,
  .longterm:has(.a-tr:hover) .seg-tr,
  .longterm:has(.a-br:hover) .seg-br,
  .longterm:has(.a-bl:hover) .seg-bl,
  .seg:hover { filter: brightness(1.18); }
}

/* ---------- The science ---------- */

.sci-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.profile { container-type: inline-size; }
.profile h3 {
  font: 500 clamp(1.35rem, 3vw, 2rem) / 1.15 var(--serif);
  color: var(--ink);
  white-space: nowrap;           /* name, MD and PhD stay on one line */
}
@supports (width: 1cqi) {
  .profile h3 { font-size: min(2.6rem, 6.9cqi); }
}
.link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--plum);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  transition: color 0.2s;
}
.link:hover { color: var(--plum); }

.known { margin-top: 0.6rem; font-weight: 700; color: var(--plum); }

.awards { margin-top: 1.75rem; border-top: 2px solid var(--plum); }
.awards p {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.125rem;
}
.yr { min-width: 4.4ch; font: 500 2.25rem / 1 var(--serif); color: var(--plum); }

.sci-text p + p { margin-top: 1.25rem; }
.sci-text .big {
  font: 500 clamp(1.45rem, 2.4vw, 1.95rem) / 1.3 var(--serif);
  color: var(--ink);
  text-wrap: pretty;
}
.sci-text .big + p { margin-top: 1.75rem; }

.affil {
  display: flex;
  align-items: center;
  gap: 1.5rem clamp(1.5rem, 3vw, 2.5rem);
  margin-top: 2.5rem;
}
.affil > * { flex: 0 1 230px; min-width: 0; }
.affil a { display: block; }
.affil img { width: 100%; max-width: 230px; height: auto; }

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

.foot {
  background: var(--night);
  color: #d7cce0;
  padding-block: 2rem;
  font-size: 0.9375rem;
}
.foot p { max-width: 62ch; }

/* Sturdier hairlines than the font's automatic large-size setting */
.sec-title, .hl, .track h4, .gap p, .ours h3, .pillars dt, .area h3,
.profile h3, .yr, .sci-text .big, .core-title {
  font-variation-settings: "opsz" 18;
}
.hero h1 { font-variation-settings: "opsz" 22; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .longterm { grid-template-columns: 1fr 1fr; }
  .ring { grid-column: 1 / -1; grid-row: 1; width: min(400px, 100%); margin-inline: auto; }
  .areas { grid-template-rows: none; align-items: start; }
}

@media (max-width: 820px) {
  .gap, .ours-grid, .sci-grid { grid-template-columns: 1fr; }
  .pillars > div { grid-template-columns: 1fr; }
  .press li:nth-child(n) { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  /* Track runs vertically on narrow screens */
  .track { grid-template-columns: 1fr; gap: 1.75rem; }
  .track li { padding: 0 0 0 2.5rem; }
  .track li::before {
    top: 0.4rem;
    bottom: -1.75rem;
    left: calc(0.6rem - 1px);
    right: auto;
    width: 2px;
    height: auto;
  }
  .track li:last-child::before { bottom: 0; }
  .track li::after { top: 0.1rem; }
  .track .dev::before {
    width: 0;
    height: auto;
    background: none;
    border-top: 0;
    border-left: 2px dashed var(--plum-soft);
  }
}

@media (max-width: 640px) {
  .longterm { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .wave { animation: none; }
  .area, .seg, .link { transition: none; }
}
