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

html,
body {
  overscroll-behavior-y: none;
}

html {
  scroll-behavior: smooth;
}

:root {
  --bg: #faf9f5;
  --text: #141413;
  --muted: #5e5d59;
  --dim: #87867f;
  --accent: #399399;
  --salmon: #e07a5f;
  --border: rgba(20, 20, 19, 0.1);
}

body {
  font-family: "Inter", -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-weight: 300;
}

.serif {
  font-family: Georgia, "Times New Roman", serif;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 3.5rem);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-outline {
  border: 1px solid rgba(20, 20, 19, 0.25);
  color: var(--text);
}

.btn-outline:hover {
  border-color: rgba(20, 20, 19, 0.6);
  background: rgba(20, 20, 19, 0.04);
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  opacity: 0.85;
}

/* Nav */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.4rem 0;
  background: rgba(250, 249, 245, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-img {
  height: 26px;
  display: block;
}

.nav-logo-text {
  font-family: "Fredoka", "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--accent);
  text-transform: uppercase;
}

.nav-tabs {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  flex: 1;
}

.nav-tabs a {
  position: relative;
  padding: 0.2rem 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-tabs a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.05rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.nav-tabs a:hover::after,
.nav-tabs a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

@media (prefers-reduced-motion: reduce) {
  .nav-tabs a::after {
    transition: none;
  }
}

.nav-tabs a.active::after {
  transform: scaleX(1);
}

#hero {
  min-height: 100svh;
  padding: 0;
}

.hero-pin {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 90px;
  overflow: hidden;
  background: var(--bg);
}

.hero-pin.pin-glow {
  background:
    radial-gradient(
      ellipse 60% 50% at 82% 8%,
      rgba(57, 147, 153, 0.14) 0%,
      transparent 60%
    ),
    radial-gradient(circle, rgba(20, 20, 19, 0.07) 1px, transparent 1px),
    var(--bg);
  background-size:
    100% 100%,
    26px 26px,
    100% 100%;
}

.hero-inner {
  width: 100%;
  text-align: center;
  max-width: 880px;
}

.hero-title {
  display: inline-flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  margin-bottom: 2.25rem;
}

.hero-lungs {
  display: block;
  width: clamp(3rem, 9vw, 7rem);
  height: auto;
  transform-origin: 50% 60%;
  animation: breathe 5s ease-in-out infinite;
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(0.92);
  }
  45% {
    transform: scale(1.06);
  }
}

.hero-wordmark {
  font-family: "Fredoka", "Inter", sans-serif;
  font-size: clamp(2.4rem, 9vw, 6.75rem);
  font-weight: 300;
  line-height: 0.98;
  white-space: nowrap;
  letter-spacing: 0.005em;
}

.hero-wordmark em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  /* Font scales with the width so the mission stays at ~3 lines */
  font-size: clamp(1.15rem, 2.7vw, 2.25rem);
  font-weight: 300;
  line-height: 1.45;
  max-width: 1200px;
  text-wrap: balance;
  margin: 0 auto 3rem;
}

.hero-sub .reveal-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(10px);
  animation: word-reveal 0.7s ease forwards;
}

/* Same word reveal, held until the element scrolls into view */
.reveal-on-view .reveal-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(10px);
}

.reveal-on-view.in-view .reveal-word {
  animation: word-reveal 0.7s ease forwards;
}

@keyframes word-reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-lungs {
    animation: none;
  }

  .hero-sub .reveal-word,
  .reveal-on-view .reveal-word,
  .reveal-on-view.in-view .reveal-word {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* Section framing */
section {
  padding: clamp(4.5rem, 10vw, 8rem) 0;
}

section + section {
  border-top: 1px solid var(--border);
}

/* First section on interior pages: clear the fixed nav */
.page-top {
  padding-top: clamp(8.5rem, 16vw, 11rem);
}

/* Title band on interior pages: the same light teal hue and size as the
   Donate and Partner headers (pale teal easing into the page cream, soft
   glows, faint dots), clearing the 72px nav */
.page-band {
  padding: calc(72px + clamp(3.5rem, 9vh, 6rem)) 0 clamp(3rem, 7vh, 4.5rem);
  background:
    radial-gradient(circle, rgba(20, 20, 19, 0.06) 1px, transparent 1px),
    radial-gradient(
      ellipse 70% 60% at 85% 5%,
      rgba(57, 147, 153, 0.11) 0%,
      transparent 68%
    ),
    radial-gradient(
      ellipse 50% 45% at 70% 0%,
      rgba(110, 160, 205, 0.07) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 60% 55% at 8% 95%,
      rgba(57, 147, 153, 0.08) 0%,
      transparent 68%
    ),
    linear-gradient(180deg, #ebf4f3 0%, #eff6f4 50%, #f4f7f4 85%, var(--bg) 100%);
  background-size:
    26px 26px,
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%;
}

.page-band .section-heading {
  margin-bottom: 0;
}

.page-band-body {
  padding-top: clamp(1.5rem, 4vh, 2.5rem);
}

/* The band's edge already separates it, so the list drops its own top rule */
.page-band-body .row-list > .row-item:first-child {
  border-top: 0;
}

.section-eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.section-heading {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  max-width: 760px;
  margin-bottom: 1.5rem;
}

/* Heading allowed to run the full width (one line when it fits) */
.section-heading.heading-wide {
  max-width: none;
}

.section-heading em {
  font-style: normal;
  color: var(--accent);
}

.section-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 580px;
  line-height: 1.8;
  margin-bottom: 4.5rem;
  font-weight: 300;
}

.section-sub.wide {
  max-width: 680px;
}

.section-sub:last-child {
  margin-bottom: 0;
}

.accent-emphasis {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--accent);
  font-size: 1.25em;
  font-weight: 400;
}

.section-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: -2.5rem;
  margin-bottom: 4.5rem;
}

.section-divider {
  border-top: 1px solid var(--border);
  margin: 3.5rem 0;
}

/* Numbered / avatar row list (donate points, approach, partner points, team) */
.row-list {
  display: flex;
  flex-direction: column;
}

.row-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 2rem;
  padding: 2.25rem 0;
  border-top: 1px solid var(--border);
}

.row-item:last-child {
  border-bottom: 1px solid var(--border);
}

.row-index {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--dim);
  letter-spacing: 0.05em;
  padding-top: 0.2rem;
}

.row-avatar {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(0.25);
}

.row-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.row-body p {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 300;
  color: var(--text);
  line-height: 1.6;
  max-width: 640px;
}

.row-body .row-title {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.row-body .row-desc {
  font-size: 1rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.7;
  max-width: 620px;
}

.row-body .row-name {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text);
}

.linkedin-link {
  display: inline-flex;
  color: var(--dim);
  transition: color 0.2s ease;
}

.linkedin-link:hover {
  color: var(--accent);
}

.linkedin-link svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.row-body .row-role {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0.35rem 0 0.85rem;
}

/* Expandable donate reasons */
.reason-list {
  display: flex;
  flex-direction: column;
  interpolate-size: allow-keywords;
}

.reason {
  border-top: 1px solid var(--border);
}

.reason:last-child {
  border-bottom: 1px solid var(--border);
}

.reason-list-secondary {
  margin-top: 4rem;
}

.reason summary {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: baseline;
  gap: 2rem;
  padding: 2.5rem 0;
  cursor: pointer;
  list-style: none;
}

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

.reason-index {
  font-size: 1rem;
  font-weight: 300;
  color: var(--dim);
  letter-spacing: 0.05em;
}

.reason-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 400;
  line-height: 1.3;
  color: var(--text);
  transition: color 0.2s ease;
}

.reason summary:hover .reason-title,
.reason[open] .reason-title {
  color: var(--accent);
}

.reason summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Plus that rotates into a minus when open */
.reason-icon {
  position: relative;
  width: 18px;
  height: 18px;
  align-self: center;
  color: var(--accent);
}

.reason-icon::before,
.reason-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.reason-icon::after {
  transform: rotate(90deg);
}

.reason[open] .reason-icon::after {
  transform: rotate(0deg);
}

.reason::details-content {
  block-size: 0;
  overflow: hidden;
  transition:
    block-size 0.4s cubic-bezier(0.65, 0, 0.35, 1),
    content-visibility 0.4s allow-discrete;
}

.reason[open]::details-content {
  block-size: auto;
}

/* Always-open row (Privacy): same layout as an open reason, not clickable */
.reason-static .reason-head {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: baseline;
  gap: 2rem;
  padding: 2.5rem 0;
}

.reason-desc {
  margin-left: calc(90px + 2rem);
  padding-bottom: 2.5rem;
  max-width: 640px;
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--muted);
}

@media (max-width: 640px) {
  .reason summary {
    grid-template-columns: 2rem 1fr auto;
    gap: 1rem;
    padding: 1.75rem 0;
  }

  .reason-desc {
    margin-left: calc(2rem + 1rem);
    padding-bottom: 1.75rem;
  }

  .reason-static .reason-head {
    grid-template-columns: 2rem 1fr;
    gap: 1rem;
    padding: 1.75rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reason::details-content,
  .reason-icon::before,
  .reason-icon::after {
    transition: none;
  }
}

/* Donate: interest form for people outside Sharp HealthCare */
.interest {
  max-width: 760px;
  margin-top: clamp(4rem, 8vw, 6rem);
  padding: clamp(2rem, 5vw, 3rem);
  border-radius: 20px;
  background: rgba(57, 147, 153, 0.07);
}

.interest-heading {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 400;
  line-height: 1.25;
  color: var(--text);
}

.interest-sub {
  margin-top: 0.6rem;
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--muted);
}

.interest-form {
  margin-top: 2rem;
}

.interest-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.interest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
}

.interest-full {
  grid-column: 1 / -1;
}

.interest-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.92rem;
  color: var(--text);
}

.interest-field em {
  font-style: normal;
  color: var(--dim);
}

.interest-field input,
.interest-field select,
.interest-field textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(20, 20, 19, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.75);
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.interest-field textarea {
  resize: vertical;
  min-height: 6rem;
}

.interest-field input::placeholder {
  color: var(--dim);
}

.interest-field input:focus,
.interest-field select:focus,
.interest-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(57, 147, 153, 0.18);
}

.interest-note {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
}

/* Same outline pill as the homepage buttons, with a light teal wash on hover */
.interest-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding: 0.8rem 1.9rem 0.85rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background-color: transparent;
  background-image: linear-gradient(
    90deg,
    rgba(57, 147, 153, 0.14) 0%,
    rgba(57, 147, 153, 0.14) 40%,
    rgba(57, 147, 153, 0) 60%
  );
  background-repeat: no-repeat;
  background-size: 200% 100%;
  background-position: 100% 0;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background-position 0.55s cubic-bezier(0.65, 0, 0.35, 1);
}

.interest-btn span {
  transition: transform 0.3s ease;
}

.interest-btn:hover,
.interest-btn:focus-visible {
  background-position: 0% 0;
}

.interest-btn:hover span,
.interest-btn:focus-visible span {
  transform: translateX(4px);
}

.interest-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.interest-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.interest-status {
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--muted);
}

.interest-status:empty {
  display: none;
}

.interest-status.is-success {
  color: var(--accent);
}

.interest-status.is-error {
  color: var(--salmon);
}

.interest-status a {
  color: inherit;
}

/* Thank-you panel that replaces the form after a submission: a teal check,
   the same heading and sub styles, and a button to start a new response */
.interest-done[hidden],
.interest-form-view[hidden] {
  display: none;
}

.interest-done {
  animation: interest-done-in 0.5s ease both;
}

.interest-done-icon {
  position: relative;
  display: block;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1.25rem;
  border-radius: 50%;
  background: rgba(57, 147, 153, 0.16);
}

.interest-done-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 0.75rem;
  height: 1.3rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translate(-50%, -50%) rotate(45deg);
}

.interest-done .interest-heading:focus {
  outline: none;
}

.interest-done .interest-sub {
  max-width: 34em;
}

.interest-done .interest-btn {
  margin-top: 2rem;
}

@keyframes interest-done-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  .interest-btn,
  .interest-btn span {
    transition: none;
  }

  .interest-done {
    animation: none;
  }
}

/* Team rows: larger photo, vertically centered with the bio */
.team-list .row-item {
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: 2.5rem;
}

.team-list .row-avatar {
  width: 140px;
  height: 140px;
}

@media (min-width: 1024px) {
  .team-list .row-item {
    grid-template-columns: 160px 1fr;
  }

  .team-list .row-avatar {
    width: 160px;
    height: 160px;
  }
}

@media (max-width: 640px) {
  .team-list .row-item {
    grid-template-columns: 96px 1fr;
    gap: 1.25rem;
  }

  .team-list .row-avatar {
    width: 96px;
    height: 96px;
  }
}

/* Stat grid (Problem section) */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat-col {
  padding: 2.5rem 2rem;
}

.stat-col + .stat-col {
  border-left: 1px solid var(--border);
}

.stat-value {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 300;
  color: var(--text);
  line-height: 1;
  margin-bottom: 1rem;
}

.stat-label {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.stat-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
  font-weight: 300;
}

/* Founder note (home only) */
/* Our Story (homepage): story on the left, portrait on the right */
.story {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  grid-template-areas:
    "head portrait"
    "body portrait";
  grid-template-rows: auto 1fr;
  column-gap: clamp(3rem, 7vw, 7rem);
  align-items: start;
}

.story-heading {
  grid-area: head;
  margin-bottom: 2.5rem;
}

.story-body {
  grid-area: body;
  max-width: 680px;
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  font-weight: 300;
  line-height: 1.7;
  color: var(--text);
  text-wrap: pretty;
}

.story-body p {
  margin-bottom: 1.4rem;
}

.story-body .story-closing {
  margin: 2.5rem 0 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--accent);
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  font-weight: 400;
  line-height: 1.4;
  color: var(--accent);
}

.story-aside {
  grid-area: portrait;
  position: sticky;
  top: 120px;
}

.story-portrait {
  margin: 0;
}

.story-portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: 16px;
}

.story-portrait figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 1.1rem;
}

.story-portrait-name {
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text);
}

.story-portrait-role {
  margin-top: 0.15rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.story-portrait-bio {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--muted);
}

.story-portrait-bio a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(57, 147, 153, 0.45);
  text-underline-offset: 3px;
  transition:
    color 0.2s ease,
    text-decoration-color 0.2s ease;
}

.story-portrait-bio a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* Compact NYT card under the portrait */
.story-press {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 1rem;
  align-items: center;
  margin-top: 2rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}

.story-press:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.story-press-img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  object-position: 50% 70%;
  border-radius: 10px;
}

.story-press-text {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.story-press-source {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.story-press-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.98rem;
  line-height: 1.3;
}

.story-press-cta {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
}

.story-press-cta span {
  display: inline-block;
  transition: transform 0.2s ease;
}

.story-press:hover .story-press-cta span {
  transform: translateX(3px);
}

@media (max-width: 860px) {
  .story {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "portrait"
      "body"
      "press";
  }

  /* On phones the NYT card moves below the story */
  .story-aside {
    display: contents;
  }

  .story-portrait {
    grid-area: portrait;
    max-width: 320px;
    margin-bottom: 2.5rem;
  }

  .story-press {
    grid-area: press;
    max-width: 480px;
    margin-top: 3rem;
  }
}

.section-cta {
  margin-top: 4rem;
}

/* Failure rate (homepage): the 90% on its own */
.failure {
  text-align: center;
}

/* 90% sits inside a ring: salmon for drugs that fail, teal for the rest */
.failure-value {
  --ring: clamp(240px, 40vw, 400px);
  position: relative;
  display: grid;
  place-items: center;
  width: var(--ring);
  height: var(--ring);
  margin: 0 auto;
}

.failure-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}

.failure-ring circle {
  fill: none;
  stroke-width: 0.8;
}

.failure-ring-fail {
  stroke: var(--salmon);
  filter: drop-shadow(0 0 3px rgba(224, 122, 95, 0.55));
}

.failure-ring-pass {
  stroke: var(--accent);
}

.failure-figure {
  position: relative;
  font-size: calc(var(--ring) * 0.3);
  font-weight: 200;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.failure-fail {
  color: var(--salmon);
  font-weight: 400;
}

.failure-label {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  max-width: 680px;
  margin: 1.5rem auto 0;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  line-height: 1.5;
  color: var(--text);
  text-wrap: balance;
}

/* Underline draws under "cancer drugs fail" once the count-up finishes */
.failure-mark {
  white-space: nowrap;
  color: var(--text);
  background-image: linear-gradient(var(--text), var(--text));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
  padding-bottom: 0.08em;
  transition: background-size 0.8s cubic-bezier(0.65, 0, 0.35, 1) 0.15s;
}

.failure-label.is-marked .failure-mark {
  background-size: 100% 2px;
}

@media (prefers-reduced-motion: reduce) {
  .failure-mark {
    transition: none;
  }
}

/* Solution (homepage): what Anemos is building */
/* Text on the left, microscope images fading into each other on the right */
/* Title runs full width; the images sit beside the paragraph only */
.solution {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  grid-template-areas:
    "tag tag"
    "head head"
    "body cells"
    "detail detail";
  align-items: start;
  column-gap: clamp(3rem, 6vw, 6rem);
}

.solution .solution-tag {
  grid-area: tag;
}

.solution .solution-heading {
  grid-area: head;
}

.solution .solution-body {
  grid-area: body;
}

.solution-cells {
  grid-area: cells;
  justify-self: center;
  text-align: center;
}

/* Characterization: example data crossfading in a circle on the left,
   a second highlighted heading beside it on the right */
.solution-detail {
  grid-area: detail;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(3rem, 6vw, 6rem);
  margin-top: clamp(4rem, 8vw, 6.5rem);
}

.solution-data {
  width: clamp(200px, 19vw, 270px);
  text-align: center;
}

/* Beside the circle it wraps at full size rather than shrinking to two lines */
.solution .solution-heading-2 {
  grid-area: auto;
  margin: 0;
}

.solution-heading-2 .solution-line {
  white-space: normal;
}

/* Pushed to the right edge, lining up with the cell bank above */
.solution-detail-text {
  justify-self: end;
  width: min(100%, 680px);
}

.solution-detail-body {
  max-width: 640px;
  margin-top: 1.5rem;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.6;
  color: var(--text);
}

.data-list {
  list-style: none;
  max-width: 640px;
  margin-top: 1rem;
  border-bottom: 1px solid var(--border);
}

.data-list li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--border);
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  color: var(--text);
}

.data-list li::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.solution-heading-2 br {
  display: none;
}

.solution-heading-2 .solution-line + br + .solution-line::before {
  content: " ";
}

.data-fade {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: #111;
  box-shadow: 0 0 0 1px var(--border), 0 18px 40px -24px rgba(20, 20, 19, 0.45);
}

.data-fade img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.data-fade img.is-active {
  opacity: 1;
}

.solution-data figcaption {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.solution-data .cell-caption {
  transition: opacity 0.4s ease;
}

.solution-data .cell-caption.is-swapping {
  opacity: 0;
}

.cell-bank {
  --cell-size: clamp(200px, 19vw, 270px);
  --tile: 9%;
  position: relative;
  width: var(--cell-size);
  height: var(--cell-size);
}

/* The one cell line, which shrinks to become the center of the bank */
.cell-bank-core,
.cell-tile {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  border-radius: 50%;
  background-color: #111;
  background-size: cover;
  background-position: center;
}

.cell-bank-core {
  z-index: 1;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px var(--border), 0 18px 40px -24px rgba(20, 20, 19, 0.45);
  transition:
    width 1s cubic-bezier(0.65, 0, 0.35, 1),
    height 1s cubic-bezier(0.65, 0, 0.35, 1),
    box-shadow 1s ease;
}

.cell-bank.is-shrunk .cell-bank-core {
  width: var(--tile);
  height: var(--tile);
  box-shadow: 0 0 0 2px var(--accent);
}

/* The other 100 pop in from the center outward */
.cell-tile {
  width: var(--tile);
  height: var(--tile);
  opacity: 0;
  transform: translate(-50%, -50%) rotate(var(--r)) scale(0);
  transition:
    transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) var(--d),
    opacity 0.35s ease var(--d);
}

.cell-bank.is-filled .cell-tile {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(var(--r)) scale(1);
}

/* Once everything is in place, hovering any circle enlarges it */
.cell-bank.is-settled .cell-tile,
.cell-bank.is-settled .cell-bank-core {
  cursor: zoom-in;
  transition:
    transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1),
    box-shadow 0.3s ease;
}

.cell-bank.is-settled .cell-tile:hover,
.cell-bank.is-settled .cell-bank-core:hover {
  z-index: 3;
  box-shadow: 0 0 0 2px var(--bg), 0 10px 24px -6px rgba(20, 20, 19, 0.5);
}

.cell-bank.is-settled .cell-tile:hover {
  transform: translate(-50%, -50%) rotate(var(--r)) scale(3.2);
}

.cell-bank.is-settled .cell-bank-core:hover {
  transform: translate(-50%, -50%) scale(3.2);
  box-shadow: 0 0 0 2px var(--accent), 0 10px 24px -6px rgba(20, 20, 19, 0.5);
}

.solution-cells figcaption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Wide screens: the heading runs the full width at full size, and the
   images sit beside the body text, growing to fill the space */
@media (min-width: 1200px) {
  .solution {
    grid-template-columns: minmax(0, 760px) minmax(0, 1fr);
    grid-template-areas:
      "tag tag"
      "head head"
      "body cells"
      "detail detail";
    grid-template-rows: auto auto 1fr auto;
  }

  .solution-data {
    width: min(30vw, 370px);
  }

  .solution-cells {
    align-self: center;
    justify-self: stretch;
  }

  /* Body text and images share a row, centered on each other */
  .solution .solution-body {
    align-self: center;
  }

  .cell-bank {
    width: min(100%, 370px);
    height: auto;
    aspect-ratio: 1;
    margin: 0 auto;
  }
}

/* Wider still: the images span the heading rows too, centered on the whole
   text block. Right-aligned, the round bank curves clear of the heading;
   it's capped so it keeps a gap from the heading text on narrower screens */
@media (min-width: 1400px) {
  .solution-cells {
    grid-area: 1 / 2 / 4 / 3;
    justify-self: end;
    width: min(100%, 370px, 100vw - 1130px);
    position: relative;
    top: 3.5rem;
  }

  .solution .solution-body {
    align-self: start;
  }

  /* Clears the bank, which is shifted down by 3.5rem */
  .solution-detail {
    margin-top: calc(3.5rem + clamp(4rem, 8vw, 6.5rem));
  }
}

@media (prefers-reduced-motion: reduce) {
  .cell-bank-core,
  .cell-tile,
  .data-fade img {
    transition: none;
  }
}

/* Mini FAQ under the solution: same expand pattern as .flaw, in teal */
.faq {
  list-style: none;
  max-width: 760px;
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  border-bottom: 1px solid var(--text);
  interpolate-size: allow-keywords;
}

/* Standalone FAQ page: sits just under the page heading */
.faq-page {
  margin-top: clamp(2rem, 4vw, 3rem);
  margin-bottom: clamp(4rem, 8vw, 6rem);
}

.faq li {
  border-top: 1px solid var(--text);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 0;
  cursor: pointer;
  list-style: none;
}

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

.faq-item summary:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

.faq-q {
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 300;
  line-height: 1.35;
  color: var(--text);
}

.faq-q,
.faq-icon {
  transition: color 0.25s ease;
}

.faq-item summary:hover .faq-q,
.faq-item summary:hover .faq-icon,
.faq-item[open] .faq-q,
.faq-item[open] .faq-icon {
  color: var(--accent);
}

/* Plus that rotates into a minus when open */
.faq-icon {
  position: relative;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--text);
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.faq-icon::after {
  transform: rotate(90deg);
}

.faq-item[open] .faq-icon::after {
  transform: rotate(0deg);
}

.faq-item::details-content {
  block-size: 0;
  overflow: hidden;
  transition:
    block-size 0.4s cubic-bezier(0.65, 0, 0.35, 1),
    content-visibility 0.4s allow-discrete;
}

.faq-item[open]::details-content {
  block-size: auto;
}

/* Answers match the homepage body text: black, a step larger */
.faq-a {
  max-width: 680px;
  padding-bottom: 1.5rem;
  font-size: clamp(1.1rem, 1.4vw, 1.25rem);
  font-weight: 300;
  line-height: 1.65;
  color: var(--text);
  text-wrap: pretty;
}

/* Answers split into paragraphs sit closer together */
.faq-a:has(+ .faq-a) {
  padding-bottom: 0.9rem;
}

.faq-a strong {
  font-weight: 500;
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  .faq-item::details-content,
  .faq-icon::before,
  .faq-icon::after {
    transition: none;
  }
}

@media (max-width: 860px) {
  .solution {
    grid-template-columns: 1fr;
    grid-template-areas:
      "tag"
      "head"
      "body"
      "cells"
      "detail";
  }

  .solution-cells {
    margin-top: 3rem;
  }

  /* Stacked: heading first, then the circle */
  .solution-detail {
    grid-template-columns: 1fr;
    row-gap: 2.5rem;
    margin-top: 4rem;
  }

  .solution-detail-text {
    order: -1;
  }

  .solution-data {
    justify-self: center;
    width: min(260px, 72vw);
  }

  .cell-bank {
    --cell-size: min(260px, 72vw);
  }
}

/* "The solution" is a plain serif label above the heading */
.solution-tag {
  margin-bottom: 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.3;
  color: var(--text);
}

/* The heading gets a soft highlighter mark that sweeps in on scroll
   (across both lines when it wraps) and replays on hover */
.solution-mark {
  background-image: linear-gradient(rgba(57, 147, 153, 0.22), rgba(57, 147, 153, 0.22));
  background-repeat: no-repeat;
  background-size: 0% 100%;
  transition: background-size 1.2s cubic-bezier(0.65, 0, 0.35, 1) 0.2s;
}

/* Extra line spacing so the two highlighted lines never overlap */
.solution-heading {
  line-height: 1.32;
}

/* Always two lines above phone width: same size as the other section
   headings, shrinking only if a line (~19.2em wide) wouldn't fit */
@media (min-width: 641px) {
  .solution-heading {
    container-type: inline-size;
    max-width: none;
  }

  .solution-mark {
    font-size: min(1em, 5.1cqi);
  }

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

  .solution-heading-2 .solution-mark {
    font-size: 1em;
  }
}

@media (max-width: 640px) {
  .solution-heading br {
    display: none;
  }

  /* Keep a space where the line break was */
  .solution-line + br + .solution-line::before {
    content: " ";
  }
}

.solution-heading.in-view .solution-mark {
  background-size: 100% 100%;
}

.solution-mark:hover {
  animation: highlight-sweep 1.2s cubic-bezier(0.65, 0, 0.35, 1);
}

@keyframes highlight-sweep {
  from {
    background-size: 0% 100%;
  }
  to {
    background-size: 100% 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .solution-mark,
  .solution-mark:hover {
    background-size: 100% 100%;
    transition: none;
    animation: none;
  }
}

.solution-body {
  max-width: 820px;
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  line-height: 1.5;
  color: var(--text);
  text-wrap: pretty;
}

/* Mission (homepage): the answer to the bottleneck */
.mission-eyebrow {
  font-size: clamp(1rem, 1.7vw, 1.3rem);
  color: var(--text);
  margin-bottom: 1.5rem;
}

.mission-heading {
  font-size: clamp(1.9rem, 7.5vw, 4.25rem);
  max-width: none;
  margin-bottom: 0;
}

/* The mission sits on its own full screen */
#mission {
  min-height: 100svh;
  display: flex;
  align-items: center;
}

.mission .mission-heading .nowrap {
  display: block;
}

/* Next screen: the lung cancer line on the left, the call to action for
   patients on the right */
#lung-cancer {
  min-height: 100svh;
  display: flex;
  align-items: center;
}

.lung-split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(3rem, 7vw, 6rem);
  align-items: center;
}

/* Same size as the solution heading, but steps down on phones so the
   mission above stays the biggest line */
.mission-next {
  margin: 0;
  font-size: clamp(1.4rem, 3.4vw, 3.1rem);
}

/* In the half-width column, let the line wrap at full size instead of
   shrinking to stay on two lines */
.lung-split .solution-mark {
  font-size: 1em;
}

.lung-split .solution-line {
  white-space: normal;
}

.lung-split .solution-heading br {
  display: none;
}

.lung-split .solution-line + br + .solution-line::before {
  content: " ";
}

.mission-cta {
  padding-left: clamp(2.5rem, 5vw, 4rem);
  border-left: 1px solid var(--border);
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  line-height: 1.65;
  color: var(--text);
  text-wrap: pretty;
}

.mission-cta p {
  max-width: 600px;
}

/* Teal outline pill in the title serif; fills from the left on hover */
.mission-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 2rem;
  padding: 0.8rem 1.9rem 0.85rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background-color: transparent;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 0% 100%;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  font-weight: 400;
  text-decoration: none;
  transition:
    background-size 0.45s cubic-bezier(0.65, 0, 0.35, 1),
    color 0.3s ease;
}

.mission-cta-btn span {
  transition: transform 0.3s ease;
}

.mission-cta-btn:hover,
.mission-cta-btn:focus-visible {
  background-size: 100% 100%;
  color: #fff;
}

.mission-cta-btn:hover span,
.mission-cta-btn:focus-visible span {
  transform: translateX(4px);
}

.mission-cta-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .mission-cta-btn,
  .mission-cta-btn span {
    transition: none;
  }
}

@media (max-width: 760px) {
  .lung-split {
    grid-template-columns: 1fr;
  }

  .mission-cta {
    padding-left: 0;
    padding-top: clamp(2.5rem, 5vw, 3.5rem);
    border-left: 0;
    border-top: 1px solid var(--border);
  }
}

.mission-cta-label {
  margin-bottom: 0.9rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.15;
  color: var(--text);
}

.nowrap {
  white-space: nowrap;
}

/* Bottleneck (homepage): animated drug development pipeline */
.pipeline {
  --node: clamp(76px, 9vw, 112px);
  --step: 0.55s;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: clamp(3rem, 6vw, 4.5rem) 0 clamp(3.5rem, 7vw, 5.5rem);
}

.pipeline-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Connector from this circle to the next one */
.pipeline-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: calc(var(--node) / 2);
  left: calc(50% + var(--node) / 2);
  width: calc(100% - var(--node));
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left center;
}

.pipeline-node {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--node);
  height: var(--node);
  flex-shrink: 0;
  border-radius: 50%;
}

.pipeline-node svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(180deg);
}

.pipeline-node circle {
  fill: none;
  stroke: var(--text);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}

.pipeline-num {
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--text);
  opacity: 0;
}

.pipeline-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  font-weight: 400;
  color: var(--text);
  clip-path: inset(0 100% 0 0);
}

.pipeline-flag {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--salmon);
  opacity: 0;
}

/* Diffuse salmon glow hugging the Preclinical circle */
.pipeline-step.is-problem .pipeline-node::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  box-shadow:
    0 0 0 1px rgba(224, 122, 95, 0.55),
    0 0 18px 4px rgba(224, 122, 95, 0.45),
    inset 0 0 14px 2px rgba(224, 122, 95, 0.25);
  opacity: 0;
}

/* Sequence: circle draws, label wipes in, connector draws to the next */
.pipeline.in-view .pipeline-node circle {
  animation: draw-circle 0.6s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  animation-delay: calc(var(--i) * var(--step));
}

.pipeline.in-view .pipeline-num {
  animation: fade-in 0.5s ease forwards;
  animation-delay: calc(var(--i) * var(--step) + 0.3s);
}

.pipeline.in-view .pipeline-label {
  animation: wipe-in 0.6s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  animation-delay: calc(var(--i) * var(--step) + 0.25s);
}

.pipeline.in-view .pipeline-step:not(:last-child)::after {
  animation: draw-line 0.35s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  animation-delay: calc(var(--i) * var(--step) + 0.45s);
}

.pipeline.in-view .is-problem .pipeline-node::before {
  animation:
    fade-in 0.8s ease 3s forwards,
    glow-pulse 2.6s ease-in-out 3.8s infinite;
}

.pipeline.in-view .is-problem .pipeline-flag {
  animation: fade-in 0.6s ease 3.3s forwards;
}

@keyframes draw-circle {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes draw-line {
  to {
    transform: scale(1);
  }
}

@keyframes wipe-in {
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes fade-in {
  to {
    opacity: 1;
  }
}

@keyframes glow-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.bottleneck-lead {
  max-width: none;
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  line-height: 1.5;
  color: var(--text);
  text-wrap: pretty;
  margin-bottom: 2.5rem;
}

/* The first sentence gets a line of its own */
.bottleneck-lead .lead-line {
  display: block;
}

.bottleneck-lead strong {
  font-weight: 600;
  white-space: nowrap;
}

.flaws {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  column-gap: clamp(1.5rem, 4vw, 3rem);
  interpolate-size: allow-keywords;
}

.flaws li {
  border-top: 1px solid var(--text);
}

/* Each flaw expands to explain itself (same pattern as .reason) */
/* Title centered in the cell, plus/minus pinned to the right */
.flaw summary {
  display: grid;
  grid-template-columns: 14px 1fr 14px;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
  cursor: pointer;
  list-style: none;
}

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

.flaw summary:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

.flaw-title {
  grid-column: 2;
  text-align: center;
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  font-weight: 300;
  line-height: 1.3;
  color: var(--text);
}

/* Salmon marks the flaw as a problem once it's opened */
.flaw-title,
.flaw-icon {
  transition: color 0.25s ease;
}

.flaw summary:hover .flaw-title,
.flaw summary:hover .flaw-icon,
.flaw[open] .flaw-title,
.flaw[open] .flaw-icon {
  color: var(--salmon);
}

/* Plus that rotates into a minus when open */
.flaw-icon {
  grid-column: 3;
  position: relative;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--text);
}

.flaw-icon::before,
.flaw-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.flaw-icon::after {
  transform: rotate(90deg);
}

.flaw[open] .flaw-icon::after {
  transform: rotate(0deg);
}

.flaw::details-content {
  block-size: 0;
  overflow: hidden;
  transition:
    block-size 0.4s cubic-bezier(0.65, 0, 0.35, 1),
    content-visibility 0.4s allow-discrete;
}

.flaw[open]::details-content {
  block-size: auto;
}

.flaw-desc {
  max-width: 440px;
  margin: 0 auto;
  text-align: center;
  padding-bottom: 1.5rem;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--muted);
  text-wrap: pretty;
}

@media (prefers-reduced-motion: reduce) {
  .flaw::details-content,
  .flaw-icon::before,
  .flaw-icon::after {
    transition: none;
  }
}


@media (prefers-reduced-motion: reduce) {
  .pipeline-node circle {
    stroke-dashoffset: 0;
  }

  .pipeline-step:not(:last-child)::after {
    transform: none;
  }

  .pipeline-label {
    clip-path: none;
  }

  .pipeline-num,
  .pipeline-flag,
  .pipeline-step.is-problem .pipeline-node::before {
    opacity: 1;
    transform: none;
  }

  .pipeline.in-view *,
  .pipeline.in-view *::before,
  .pipeline.in-view *::after {
    animation: none !important;
  }
}

/* Tablets and up: keep the whole section (heading through the flaws) on one
   screen by tying its spacing to the viewport height */
@media (min-width: 641px) {
  #bottleneck {
    padding-block: clamp(3.5rem, 9vh, 6rem);
  }

  .pipeline {
    --node: clamp(64px, min(8vw, 11vh), 104px);
    margin: clamp(2rem, 5vh, 3.5rem) 0 clamp(2.25rem, 6vh, 4rem);
  }

  .bottleneck-lead {
    margin-bottom: clamp(1.5rem, 4vh, 2.5rem);
  }
}

/* Phones: the pipeline runs top to bottom */
@media (max-width: 640px) {
  .pipeline {
    --node: 60px;
    grid-template-columns: 1fr;
  }

  .pipeline-step {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    padding-bottom: 1.75rem;
  }

  .pipeline-step:last-child {
    padding-bottom: 0;
  }

  .pipeline-step:not(:last-child)::after {
    top: var(--node);
    left: calc(var(--node) / 2);
    width: 1px;
    height: calc(100% - var(--node));
    transform: scaleY(0);
    transform-origin: center top;
  }

  .pipeline-label {
    align-items: flex-start;
    gap: 0.35rem;
    min-height: var(--node);
    justify-content: center;
    margin: 0 0 0 1.25rem;
  }

  .flaws {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

footer p,
footer a {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
}

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

/* Fuller footer, shared with the pages on styles-v2.css */
.footer-v2 {
  padding: clamp(3rem, 6vw, 4.5rem) 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2.5rem;
}

.footer-brand p {
  margin-top: 0.9rem;
  max-width: 28ch;
  font-size: 0.92rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-v2 .footer-col-title {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.footer-v2 .footer-col a {
  font-size: 0.92rem;
}

.footer-base {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

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

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* Responsive */
/* Desktop: use the full width of the screen, keeping side margins */
@media (min-width: 1024px) {
  .container {
    max-width: 1600px;
    padding: 0 clamp(3rem, 6vw, 7rem);
  }

  .hero-inner {
    max-width: none;
  }

  .section-heading {
    max-width: 1000px;
  }

  .section-sub,
  .section-sub.wide {
    max-width: 820px;
  }

  .row-body p,
  .row-body .row-desc {
    max-width: 900px;
  }

  .row-item {
    grid-template-columns: 140px 1fr;
  }
}

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

  .nav-tabs {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
    gap: 1.5rem;
    overflow-x: auto;
    padding-top: 0.9rem;
    margin-top: 0.9rem;
    border-top: 1px solid var(--border);
  }

  /* Clear the taller two-row nav */
  .page-top {
    padding-top: 11.5rem;
  }

  /* Same as the Donate and Partner bands under the two-row (151px) nav */
  .page-band {
    padding-top: calc(151px + clamp(3.5rem, 9vh, 6rem));
  }
}

@media (max-width: 640px) {
  /* Four tabs fit on one row at phone width */
  .nav-tabs {
    justify-content: space-between;
    gap: 1rem;
  }

  .nav-tabs a {
    font-size: 0.95rem;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .stat-col + .stat-col {
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .row-item {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* FAQ page: questions on the left, "Have more questions?" beside them on
   the right */
@media (min-width: 961px) {
  .faq-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    column-gap: clamp(2.5rem, 5vw, 4.5rem);
    align-items: start;
  }

  .faq-layout .faq-page {
    max-width: none;
    margin-bottom: 0;
  }

  .faq-layout .interest {
    margin-top: clamp(2rem, 4vw, 3rem);
  }
}
/* Phone nav: once the page scrolls, the tabs fold away behind a menu button
   (added by nav.js) that opens them as a dropdown under the logo */
.nav-toggle {
  display: none;
}

@media (max-width: 640px) {
  .nav-toggle {
    order: 2;
    position: relative;
    width: 40px;
    height: 40px;
    margin: -8px -8px -8px auto;
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    cursor: pointer;
  }

  nav.is-compact .nav-toggle {
    display: block;
  }

  /* No gap left behind for the folded tabs row */
  nav.is-compact .nav-inner {
    row-gap: 0;
  }

  .nav-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 8px;
  }

  /* Three bars that turn into a cross when open */
  .nav-toggle-bar {
    position: absolute;
    left: 10px;
    width: 20px;
    height: 1.5px;
    border-radius: 2px;
    background: currentColor;
    transition:
      transform 0.3s ease,
      opacity 0.2s ease;
  }

  .nav-toggle-bar:nth-child(1) {
    top: 13px;
  }

  .nav-toggle-bar:nth-child(2) {
    top: 19px;
  }

  .nav-toggle-bar:nth-child(3) {
    top: 25px;
  }

  nav.is-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  nav.is-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }

  nav.is-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  /* The tabs row folds shut when compact, and opens as a list */
  .nav-tabs {
    max-height: 4rem;
    overflow: hidden;
    transition:
      max-height 0.35s ease,
      opacity 0.25s ease,
      padding 0.35s ease,
      margin 0.35s ease,
      border-color 0.35s ease;
  }

  nav.is-compact:not(.is-open) .nav-tabs {
    max-height: 0;
    padding-top: 0;
    margin-top: 0;
    border-top-color: transparent;
    opacity: 0;
    visibility: hidden;
  }

  nav.is-compact.is-open .nav-tabs {
    max-height: 14rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
    padding-top: 1.1rem;
    padding-bottom: 0.4rem;
  }

  nav.is-compact.is-open .nav-tabs a {
    font-size: 1.1rem;
  }
}

@media (max-width: 640px) and (prefers-reduced-motion: reduce) {
  .nav-tabs,
  .nav-toggle-bar {
    transition: none;
  }
}

/* Team page: one person per row, the photo on the left and their name with
   LinkedIn and title beside it, rows split by a thin rule */
.team-grid {
  list-style: none;
}

.team-card {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(1.75rem, 3.5vw, 2.5rem) 0;
  border-top: 1px solid var(--border);
}

.team-card:first-child {
  padding-top: 0;
  border-top: 0;
}

.team-photo {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 18px;
  background: rgba(57, 147, 153, 0.08);
}

/* Name and title share one type style; the title is a touch smaller and
   set apart by color */
.team-name {
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--text);
}

/* LinkedIn icon sits inline right after the name */
.team-name .linkedin-link {
  margin-left: 0.4rem;
  vertical-align: -0.1em;
}

.team-role {
  margin-top: 0.25rem;
  font-size: calc(1.3rem - 2px);
  font-weight: 400;
  line-height: 1.35;
  color: var(--accent);
}

@media (max-width: 760px) {
  .team-card {
    grid-template-columns: 160px minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  /* Phones: a smaller photo beside the text */
  .team-card {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 1.1rem;
  }

  .team-name {
    font-size: 1.05rem;
  }

  .team-role {
    font-size: calc(1.05rem - 2px);
  }
}
