:root {
  --paper: #f3f0ea;
  --paper-2: #faf8f5;
  --ink: #1c1916;
  --ink-soft: #3c3833;
  --muted: #5e584f;
  --line: rgba(28, 25, 22, 0.12);
  --sand: #9a8872;
  --sand-deep: #6f624f;
  --header: 4.5rem;
  --measure: 38rem;
  --wide: 76rem;
  --serif: "Fraunces", "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 1rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

figure {
  margin: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--sand-deep);
}

:focus-visible {
  outline: 2px solid var(--sand-deep);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  background: var(--ink);
  color: var(--paper-2);
  padding: 0.7rem 1rem;
}

.skip:focus {
  top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.wrap {
  width: min(var(--wide), calc(100% - 2.5rem));
  margin-inline: auto;
}

.kicker {
  margin: 0 0 1.1rem;
  color: var(--sand-deep);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
.serif {
  font-family: var(--serif);
  font-weight: 460;
  letter-spacing: -0.03em;
}

h1 {
  margin: 0;
  font-size: clamp(2.7rem, 6.6vw, 5.6rem);
  line-height: 0.94;
  font-optical-sizing: auto;
}

h1 span {
  display: block;
}

h2 {
  margin: 0;
  font-size: clamp(2.15rem, 4.4vw, 3.7rem);
  line-height: 1.02;
}

.lead {
  max-width: var(--measure);
  margin: 1.4rem 0 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
  font-weight: 300;
}

.section {
  padding: clamp(4.5rem, 9vw, 8rem) 0;
}

.section-head {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(2.2rem, 4vw, 3.4rem);
}

.section-head p {
  max-width: 36rem;
  margin: 0;
  color: var(--muted);
  font-weight: 300;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header);
  display: flex;
  align-items: center;
  background: rgba(243, 240, 234, 0.96);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}

.site-header.is-solid {
  border-bottom-color: var(--line);
  background: rgba(250, 248, 245, 0.94);
}

.header-bar {
  width: min(var(--wide), calc(100% - 2.5rem));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1;
  margin-right: auto;
}

.brand strong {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.brand span {
  margin-top: 0.28rem;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 1.25rem;
  height: 1px;
  background: var(--ink);
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.nav-list a:hover {
  color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper-2);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), transform 0.35s var(--ease);
}

.btn:hover {
  background: transparent;
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper-2);
}

.header-cta {
  min-height: 2.5rem;
  padding-inline: 0.95rem;
  white-space: nowrap;
}

.nav-cta {
  display: none;
}

/* Hero */

.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.85fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
}

.hero-copy .lead {
  font-size: 1.12rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero-note {
  margin: 1.75rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 300;
}

.frame {
  position: relative;
  overflow: hidden;
  background: #e7e1d8;
}

.frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform 1.4s var(--ease);
}

.frame.is-in img {
  transform: scale(1);
}

.hero-frame {
  aspect-ratio: 4 / 5;
  max-height: 78vh;
}

.hero-frame img {
  object-position: 62% 28%;
}

.caption {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

/* Credentials */

.credentials {
  border-block: 1px solid var(--line);
  padding: 0;
}

.cred-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 0;
}

.cred-list li {
  padding: 1.6rem 1.4rem 1.5rem 0;
  border-left: 1px solid var(--line);
  padding-left: 1.4rem;
}

.cred-list li:first-child {
  border-left: 0;
  padding-left: 0;
}

.cred-list strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.cred-list span {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 300;
  letter-spacing: 0.02em;
}

/* Split sections */

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 5.5rem);
  align-items: center;
}

.split.reverse {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.split.reverse .copy {
  order: 2;
}

.portrait {
  aspect-ratio: 5 / 4;
}

.portrait img {
  object-position: center 40%;
}

.portrait.tall {
  aspect-ratio: 4 / 5;
}

.portrait.tall img {
  object-position: 68% 35%;
}

.portrait.person img {
  object-position: center 18%;
}

.link-arrow {
  display: inline-flex;
  margin-top: 1.6rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--sand);
  padding-bottom: 0.2rem;
}

.link-arrow:hover {
  border-bottom-color: var(--ink);
}

/* Treatments */

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.rows li {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.55rem 0;
  border-bottom: 1px solid var(--line);
}

.rows .num {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--sand-deep);
}

.rows h3 {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 2.5vw, 2.15rem);
  font-weight: 460;
  letter-spacing: -0.03em;
}

.rows p {
  margin: 0;
  max-width: 38rem;
  color: var(--muted);
  font-weight: 300;
}

.rows a.more {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

/* Diseases */

.disease-grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 4rem;
  margin: 0;
  padding: 0;
}

.disease-grid a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-size: 1.15rem;
}

.disease-grid a span:last-child {
  color: var(--sand-deep);
}

/* Tech */

.tech-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin: 2rem 0 0;
  padding: 0;
}

.tech-list h3 {
  margin: 0 0 0.7rem;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 480;
  letter-spacing: -0.03em;
}

.tech-list p {
  margin: 0;
  color: var(--muted);
  font-weight: 300;
}

/* Articles */

.articles {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.articles a {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  text-decoration: none;
  padding-top: 1.2rem;
  border-top: 1px solid var(--ink);
}

.articles time {
  color: var(--sand-deep);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.articles h3 {
  margin: 0.9rem 0 0.8rem;
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 480;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.articles p {
  margin: 0;
  color: var(--muted);
  font-weight: 300;
  font-size: 0.98rem;
}

/* Places */

.places {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
  margin-top: 2rem;
}

.places article {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.places h3 {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.places p {
  margin: 0;
  font-weight: 300;
}

.contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.5rem;
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.contact-line a {
  text-decoration: none;
  font-size: 0.95rem;
}

/* Final */

.final {
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.final-panel {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 3rem;
  align-items: end;
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--ink);
}

.final h2 {
  max-width: 12ch;
}

/* Footer */

.site-footer {
  background: #1c1916;
  color: #ece7df;
  padding: 4rem 0 2rem;
}

.site-footer a {
  color: #ece7df;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1.1fr 1fr;
  gap: 2.5rem;
}

.site-footer .brand strong,
.site-footer .brand span,
.site-footer h2 {
  color: #f7f4ef;
}

.site-footer h2 {
  margin: 0 0 1rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-footer p,
.site-footer li {
  color: #c9c2b6;
  font-weight: 300;
  font-size: 0.95rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 0.45rem;
}

.legal {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 3rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(236, 231, 223, 0.15);
  color: #b7b0a4;
  font-size: 0.82rem;
}

/* Privacy page */

.page-narrow {
  width: min(40rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.page-narrow p + p {
  margin-top: 1rem;
}

/* Motion */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.9s var(--ease) forwards;
}

.d1 { animation-delay: 0.08s; }
.d2 { animation-delay: 0.18s; }
.d3 { animation-delay: 0.28s; }
.d4 { animation-delay: 0.4s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal,
  .frame img {
    animation: none;
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Tablet and mobile */

@media (max-width: 1100px) {
  .nav-toggle {
    display: grid;
    place-items: center;
    position: relative;
    z-index: 60;
  }

  .nav-panel {
    position: fixed;
    inset: 0;
    z-index: 50;
    align-items: flex-start;
    background: var(--paper-2);
    padding: calc(var(--header) + 1.5rem) 1.5rem 2rem;
    flex-direction: column;
    gap: 1.5rem;
    transform: translateY(-0.6rem);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s var(--ease), visibility 0.35s, transform 0.35s var(--ease);
  }

  .nav-cta {
    display: inline-flex;
  }

  .nav-panel.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .nav-list a {
    font-family: var(--serif);
    font-size: clamp(1.8rem, 7vw, 2.6rem);
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: var(--ink);
    padding: 0.15rem 0;
  }

  .nav-panel .btn {
    align-self: flex-start;
  }

  body.nav-open {
    overflow: hidden;
  }

  .cred-list,
  .tech-list,
  .articles,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-grid,
  .split,
  .split.reverse,
  .final-panel {
    grid-template-columns: 1fr;
  }

  .split.reverse .copy {
    order: 0;
  }

  .hero-photo {
    order: -1;
  }

  .hero-frame {
    max-height: none;
    aspect-ratio: 5 / 4;
  }

  .footer-grid {
    gap: 2rem;
  }
}

@media (max-width: 720px) {
  .wrap,
  .header-bar {
    width: min(100% - 2rem, var(--wide));
  }

  h1 {
    font-size: clamp(2.45rem, 12vw, 3.3rem);
  }

  .cred-list,
  .tech-list,
  .articles,
  .disease-grid,
  .places,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cred-list li,
  .cred-list li:first-child {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 1.15rem 0;
  }

  .cred-list li:first-child {
    border-top: 0;
  }

  .rows li {
    grid-template-columns: 2.2rem 1fr;
  }

  .rows a.more {
    grid-column: 2;
  }

  .header-cta {
    display: none;
  }

  .actions .btn,
  .nav-panel .btn {
    width: 100%;
  }

  .hero-frame {
    aspect-ratio: 4 / 5;
  }
}
