/* ============================================================
   Flagship Pioneering Holdings — static site
   Ported from the Pioneering Medicines design system tokens.
   ============================================================ */

:root {
  /* Core palette */
  --pm-blue:   #006D95;
  --pm-red:    #CD2026;
  --pm-yellow: #F5BE2D;
  --pm-green:  #00A652;

  /* Grayscale */
  --pm-white:   #FFFFFF;
  --pm-gray-25: #BFBFBF;
  --pm-gray-50: #7F7F7F;
  --pm-gray-75: #404040;
  --pm-black:   #000000;

  /* Tints */
  --pm-blue-tint: #E5EFF3;

  /* Brand / interactive */
  --color-primary:       var(--pm-blue);
  --color-primary-hover: #005A7C;

  /* Text */
  --text-strong: var(--pm-black);
  --text-body:   var(--pm-gray-75);
  --text-muted:  var(--pm-gray-50);
  --text-link:   var(--pm-blue);

  /* Surfaces */
  --surface-page:   var(--pm-white);
  --surface-card:   var(--pm-white);
  --surface-sunken: #F6F6F4;

  /* Borders */
  --border-default: #E2E2DF;
  --border-strong:  var(--pm-gray-25);
  --border-focus:   var(--pm-blue);

  /* Fonts — Neue Haas Grotesk is proprietary; the Helvetica/Arial
     stack is the brand's own sanctioned fallback and intended look. */
  --font-sans-display: "Neue Haas Grotesk Display", "Neue Haas Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-sans-text:    "Neue Haas Grotesk Text", "Neue Haas Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Weights */
  --weight-medium: 500;
  --weight-bold:   700;

  /* Type scale */
  --text-display-lg: 56px;
  --text-display-sm: 34px;
  --text-h3:      21px;
  --text-lead:    19px;
  --text-base:    16px;
  --text-sm:      14px;
  --text-overline:11px;

  /* Line heights */
  --leading-tight:  1.05;
  --leading-snug:   1.2;
  --leading-normal: 1.5;

  /* Letter spacing */
  --tracking-tight:    -0.02em;
  --tracking-snug:     -0.01em;
  --tracking-overline: 0.12em;

  /* Radii / borders */
  --radius-md:   4px;
  --border-thick: 3px;

  /* Motion */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 120ms;

  /* Layout */
  --container: 1160px;
  --gutter: 40px;
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans-text);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-sans-display);
  color: var(--text-strong);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
  margin: 0;
}

a { color: var(--text-link); text-underline-offset: 2px; }
img { display: block; }

/* ---- Type utilities ---- */
.pm-display-lg { font-family: var(--font-sans-display); font-weight: var(--weight-bold); font-size: var(--text-display-lg); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); color: var(--text-strong); }
.pm-display-sm { font-family: var(--font-sans-display); font-weight: var(--weight-medium); font-size: var(--text-display-sm); line-height: var(--leading-snug); letter-spacing: var(--tracking-snug); color: var(--text-strong); }
.pm-h3   { font-family: var(--font-sans-display); font-weight: var(--weight-medium); font-size: var(--text-h3); line-height: var(--leading-snug); color: var(--text-strong); }
.pm-lead { font-family: var(--font-sans-text); font-size: var(--text-lead); line-height: var(--leading-normal); color: var(--text-body); }
.pm-body { font-family: var(--font-sans-text); font-size: var(--text-base); line-height: var(--leading-normal); color: var(--text-body); }
.pm-small { font-family: var(--font-sans-text); font-size: var(--text-sm); line-height: var(--leading-normal); color: var(--text-muted); }
.pm-overline {
  font-family: var(--font-sans-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-overline);
  letter-spacing: var(--tracking-overline);
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---- Layout primitives ---- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.section-pad { padding-top: 88px; padding-bottom: 88px; }

/* ---- Brand bars motif ---- */
.bars { display: inline-flex; align-items: flex-end; gap: 5px; height: 28px; }
.bars > span { width: 6px; display: block; }
.bars .bar-red    { height: 19.6px; background: var(--pm-red); }
.bars .bar-blue   { height: 28px;   background: var(--pm-blue); }
.bars .bar-yellow { height: 15.4px; background: var(--pm-yellow); }

/* ---- Logo ---- */
.logo { display: inline-flex; align-items: center; gap: 14px; }
.logo__img { height: 42px; }
.logo__divider { width: 1px; align-self: stretch; background: var(--border-strong); }
.logo__text {
  font-family: var(--font-sans-display);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-strong);
  line-height: 1;
}
.logo--white .logo__img { height: 38px; }
.logo--white .logo__divider { background: rgba(255,255,255,0.35); }
.logo--white .logo__text { font-size: 16px; color: rgba(255,255,255,0.92); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans-display);
  font-weight: var(--weight-medium);
  line-height: 1;
  letter-spacing: 0.005em;
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--duration-fast) var(--ease-standard),
              color var(--duration-fast) var(--ease-standard),
              border-color var(--duration-fast) var(--ease-standard);
}
.btn--sm { padding: 7px 14px;  font-size: 13px; min-height: 32px; }
.btn--md { padding: 10px 20px; font-size: 15px; min-height: 42px; }
.btn--lg { padding: 14px 28px; font-size: 17px; min-height: 52px; }

.btn--primary {
  background: var(--color-primary);
  color: var(--pm-white);
  border-color: var(--color-primary);
}
.btn--primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}
.btn--secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn--secondary:hover { background: var(--pm-blue-tint); }

/* ---- Top nav ---- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-default);
}
.topnav__inner {
  padding-top: 18px;
  padding-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav { display: flex; align-items: center; gap: 32px; }
.nav__link {
  font-family: var(--font-sans-display);
  font-weight: 500;
  font-size: 15px;
  color: var(--text-strong);
  text-decoration: none;
}

/* ---- Hero ---- */
.hero { border-bottom: 1px solid var(--border-default); }
.hero__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: stretch;
  gap: 56px;
}
.hero__copy { padding: 88px 0; align-self: center; }
.hero__title { margin-top: 26px; max-width: 16ch; }
.hero__lead { margin-top: 22px; max-width: 50ch; }
.hero__actions { display: flex; gap: 14px; margin-top: 32px; }
.hero__media {
  background: var(--pm-blue);
  min-height: 420px;
  position: relative;
  overflow: hidden;
}
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- What we do ---- */
.section__title { margin-top: 12px; }
.overline--blue { color: var(--pm-blue); }
.overline--red  { color: var(--pm-red); }

.what-we-do .section__title { max-width: 24ch; }
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 44px;
}
.card {
  position: relative;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 28px;
}
.card--blue   { border-top: var(--border-thick) solid var(--pm-blue); }
.card--red    { border-top: var(--border-thick) solid var(--pm-red); }
.card--yellow { border-top: var(--border-thick) solid var(--pm-yellow); }
.card__icon { width: 52px; height: 52px; object-fit: contain; margin-bottom: 18px; }
.card__title { margin-bottom: 10px; }

/* ---- About ---- */
.about {
  background: var(--surface-sunken);
  border-top: 1px solid var(--border-default);
  border-bottom: 1px solid var(--border-default);
}
.about__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: start;
}
.about .section__title { max-width: 20ch; }
.about__p { margin-top: 14px; max-width: 58ch; font-size: 17px; line-height: 1.65; }
.about__p--first { margin-top: 20px; }
.about__link {
  display: inline-block;
  margin-top: 22px;
  font-family: var(--font-sans-display);
  font-weight: 500;
  font-size: 15px;
  color: var(--text-link);
  text-decoration: none;
  border-bottom: 1px solid var(--pm-blue);
  padding-bottom: 2px;
}
.about__media {
  align-self: stretch;
  position: relative;
  overflow: hidden;
  min-height: 380px;
  background: var(--pm-blue);
}
.about__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Footer ---- */
.footer { background: var(--pm-black); color: #fff; }
.footer__main {
  padding-top: 56px;
  padding-bottom: 56px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
}
.footer__brand { display: grid; gap: 18px; }
.footer__addr { color: rgba(255,255,255,0.6); max-width: 44ch; margin: 0; }
.footer__contact { display: grid; gap: 10px; justify-items: start; }
.footer__overline { color: rgba(255,255,255,0.5); }
.footer__link {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 14px;
  font-family: var(--font-sans-text);
}
.footer__bottom { border-top: 1px solid rgba(255,255,255,0.15); }
.footer__bottom-inner {
  padding-top: 18px;
  padding-bottom: 18px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer__copy { color: rgba(255,255,255,0.5); }

/* ============================================================
   Responsive — the prototype is desktop-only; stack on narrow
   viewports without altering the desktop composition.
   ============================================================ */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 0; }
  .hero__copy { padding: 56px 0 40px; }
  .hero__media { min-height: 320px; }
  .about__grid { grid-template-columns: 1fr; gap: 36px; }
  .about__media { min-height: 300px; }
  .cards { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --gutter: 24px; }
  .pm-display-lg { font-size: 40px; }
  .pm-display-sm { font-size: 28px; }
  .section-pad { padding-top: 60px; padding-bottom: 60px; }
  .hero__actions { flex-wrap: wrap; }
  .nav { gap: 18px; }
}

/* ============================================================
   Legal pages (Privacy Policy / Terms of Service)
   ============================================================ */
.legal { padding-top: 64px; padding-bottom: 96px; }
.legal__header {
  border-bottom: 1px solid var(--border-default);
  padding-bottom: 28px;
  margin-bottom: 40px;
}
.legal__updated { margin-top: 14px; }
.legal__prose { max-width: 74ch; }
.legal__prose > p:first-of-type { margin-top: 0; }
.legal__prose h2 {
  font-family: var(--font-sans-display);
  font-weight: var(--weight-medium);
  font-size: 22px;
  line-height: var(--leading-snug);
  color: var(--text-strong);
  margin-top: 44px;
  margin-bottom: 12px;
}
.legal__prose h3 {
  font-family: var(--font-sans-display);
  font-weight: var(--weight-medium);
  font-size: 17px;
  color: var(--text-strong);
  margin-top: 24px;
  margin-bottom: 8px;
}
.legal__prose p {
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--text-body);
  margin: 0 0 16px;
}
.legal__prose ul { margin: 0 0 16px; padding-left: 22px; }
.legal__prose li { margin-bottom: 8px; line-height: 1.6; }
.legal__prose a { color: var(--text-link); }
.legal__prose strong { color: var(--text-strong); font-weight: var(--weight-bold); }
.legal__contact {
  margin-top: 8px;
  padding: 20px 24px;
  background: var(--surface-sunken);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-style: normal;
  line-height: 1.7;
}

/* Footer legal links */
.footer__legal { display: flex; gap: 24px; }
.footer__legal-link {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 14px;
  font-family: var(--font-sans-text);
}
.footer__legal-link:hover { color: rgba(255,255,255,0.9); }
