/* Preagon Biotech — www.preagon.com (phase 1, 2026-10).
   A dark, integrated page: hero picture with the title, Our Mission (text + three smoked-glass
   cards) fading in over the hero, Our Team (photos dissolving into the page), Our Partners and
   Get in Touch between two grey lines. Desktop layout measured at 1440 px; below 1000 px a
   stacked phone layout. site.js adds "scrolled" (smaller header) and "reveal-ready" /
   "is-visible" (sections coming in on scroll) to <html> and the [data-reveal] elements. */

/* ---------- Fonts (self-hosted, SIL Open Font License, see fonts/README.txt) ---------- */
@font-face { font-family: "Poppins"; font-weight: 300; font-style: normal; font-display: swap;
  src: url("fonts/poppins-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/open-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 100 900; font-style: normal; font-display: swap;
  src: url("fonts/outfit-latin-wght-normal.woff2") format("woff2-variations"); }

/* ---------- Tokens ---------- */
:root {
  --black: #000;
  --white: #fff;
  --grey-text: #bfbfbf;
  --card-text: #c6cacf;
  --line: #5a5a5a;
  --teal: #00a5b0;
  --header-h: 100px;
  --gutter: 70px;
  --display: "Poppins", "Segoe UI", Arial, sans-serif;
  --text: "Open Sans", "Segoe UI", Arial, sans-serif;
  --menu: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
html.scrolled { --header-h: 75px; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font: 16px/1.6 var(--text);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
address { font-style: normal; }
.wrap { width: min(1285px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--white); color: var(--black); padding: 8px 14px; border-radius: 4px;
}
.skip:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

.button {
  display: inline-block;
  min-width: 142px;
  padding: 0 34px;
  border: 1px solid var(--white);
  border-radius: 5px;
  background: var(--black);
  color: var(--white);
  font: 14px/53px var(--text);
  text-align: center;
  text-decoration: none;
  transition: background-color .2s, color .2s;
}
.button:hover { background: var(--white); color: var(--black); }

/* ---------- Header: 100 px, 75 px once scrolled (logo and menu scaled to 0.75) ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  background: var(--black);
  box-shadow: 0 0 30px rgba(20, 20, 22, .3);
  transition: height .35s ease, box-shadow .35s ease;
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.logo { display: block; margin-left: -7px; }
.logo img { width: 213px; height: auto; transform-origin: left center; transition: transform .35s ease; }
.site-nav {
  display: flex; gap: 0 38px; margin-right: 80px;
  transform-origin: right center; transition: transform .35s ease;
}
html.scrolled .logo img,
html.scrolled .site-nav { transform: scale(.75); }
.site-nav a {
  font: 16px var(--menu);
  letter-spacing: .1em;
  text-decoration: none;
  color: var(--white);
  transition: color .2s;
}
.site-nav a:hover { color: var(--teal); }
.menu-toggle { display: none; }

/* ---------- Hero: the picture fades to black at its bottom, under the Mission box ---------- */
.hero {
  position: relative;
  padding: 160px 0 554px;
  background-color: var(--black);
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0) calc(100% - 300px), var(--black) calc(100% - 40px)),
    url("img/hero-2560.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.hero h1 {
  max-width: 950px;
  font: 600 80px/96px var(--display);
  letter-spacing: -.01em;
}
.hero-lead {
  max-width: 880px;
  margin: 37px 0 0;
  font: 200 32px/1.32 "Outfit", var(--text);
}

/* ---------- Our Mission: no frame; both columns fade in from transparent over the hero ---------- */
.mission { position: relative; margin-top: -160px; }
.mission-box { display: grid; grid-template-columns: 513px 1fr; }
.mission-intro {
  position: relative; isolation: isolate;
  padding: 196px 90px 80px 81px;
}
.mission-intro::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: var(--black) url("img/mission-bg.jpg") center / cover no-repeat;
  /* transparent at the top (240 px) and the bottom (120 px), 20 % fades at the sides */
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0, #000 240px, #000 calc(100% - 120px), transparent 100%),
    linear-gradient(to right, transparent 0, #000 20%, #000 80%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, transparent 0, #000 240px, #000 calc(100% - 120px), transparent 100%),
    linear-gradient(to right, transparent 0, #000 20%, #000 80%, transparent 100%);
  mask-composite: intersect;
}
.mission-intro h2 { font: 300 45px/1.2 var(--display); margin-bottom: 22px; }
.mission-intro p { font-size: 16px; line-height: 28.8px; color: var(--grey-text); }
.mission-cards {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, var(--black) 240px);
  padding: 40px 0 46px;
  display: flex; flex-direction: column; gap: 22px;
}

/* Cards: dark smoked glass with a fine light edge, white titles, teal icons and line */
.card {
  position: relative;
  width: 678px;
  padding: 18px 38px 58px 39px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 16px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02)),
    rgba(10, 12, 16, .55);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--card-text);
}
.card::after {
  content: "";
  position: absolute; left: 39px; right: 39px; bottom: 33px;
  height: 2px; border-radius: 7px;
  background: linear-gradient(to right, var(--teal), rgba(0, 165, 176, 0));
}
.card-1 { margin-left: -29px; }
.card-2 { margin-left: 119px; }
.card-3 { margin-left: 10px; }
.card h3 {
  display: flex; align-items: center; gap: 20px;
  min-height: 46px;
  padding-left: 6px;
  margin-bottom: 10px;
  font: 600 27px/1.25 var(--display);
  color: var(--white);
}
.card-icon {
  flex: none; width: 46px; height: 46px;
  fill: none; stroke: var(--teal); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.card-icon-flame { width: 34px; margin-inline: 6px; }
.card p { font-size: 14px; line-height: 22.4px; color: var(--card-text); }

/* ---------- Our Team: photos dissolve into the page, names centred on the faded part ---------- */
.team { padding: 225px 0 0; }
.team h2 { font: 300 56px/1.5 var(--display); text-align: center; }
.team-lead {
  max-width: 660px;
  margin: 14px auto 0;
  font-size: 16px; line-height: 28.8px;
  color: var(--grey-text);
}
.team-panel { margin: 40px 40px 0; padding: 42px 0; }
.team-list {
  list-style: none; margin: 0 auto; padding: 0;
  display: grid; grid-template-columns: repeat(3, 287px); justify-content: center; gap: 81px;
}
.person { position: relative; }
.person img {
  width: 287px; height: 323px; object-fit: cover;
  border-radius: 14px 14px 0 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 52%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 52%, transparent 100%);
}
.person-tag {
  position: absolute; left: 50%; bottom: 4px;
  width: max-content; max-width: calc(100% - 24px);
  padding: 1px 0 2px 18px;
  overflow: hidden;
  transform: translateX(-50%);
}
.person-tag::before {
  content: "";
  position: absolute; left: 0; top: 3px; bottom: 3px;
  width: 6px; border-radius: 3px;
  background: var(--teal);
}
.person-name { font: 500 20px/1.15 "Barlow", var(--text); color: var(--white); }
.person-role { margin-top: 1px; font-size: 14.5px; line-height: 1.25; color: var(--card-text); }

/* ---------- Our Partners: between two grey lines as wide as the content column;
   485 px (1.5 × photo height) from the photos to the first line ---------- */
.partners { padding: 443px 0 0; }
.partners .wrap::before,
.partners .wrap::after {
  content: "";
  display: block;
  height: 1px;
  background: var(--line);
}
.partners .wrap::before { margin-bottom: 21px; }
.partners .wrap::after { margin-top: 21px; }
.partners-box { display: grid; grid-template-columns: repeat(4, 1fr); }
.partners-cell {
  display: flex; align-items: center; justify-content: center;
  min-height: 194px;
  padding: 20px 18px;
  background: var(--black);
}
.partners-title h2 { font: 300 30px/36px var(--display); }
.partners-cell img { width: auto; max-height: 108px; }
.partner-link { display: block; transition: opacity .2s; }
.partner-link:hover { opacity: .8; }

/* ---------- Footer (Get in Touch): logo + address | button | follow + copyright ---------- */
.site-footer { padding: 56px 0 64px; }
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
}
.footer-logo { width: 190px; margin: 0 0 14px -15px; }
.footer-address address { font-size: 14px; line-height: 1.55; color: var(--grey-text); }
.footer-follow {
  justify-self: end;
  display: grid; grid-template-columns: auto auto; align-items: center;
  justify-content: end; column-gap: 10px;
}
.footer-follow p { font-size: 14px; line-height: 1.55; color: var(--grey-text); }
.social { display: inline-block; transition: opacity .2s; }
.social:hover { opacity: .75; }
.social svg { display: block; }
.footer-follow .copyright {
  grid-column: 1 / -1;
  margin-top: 12px;
  font-size: 13px; line-height: 22.4px;
  text-align: right;
}

/* ---------- Coming in on scroll (only after the first scroll; only the coming in is animated) ---------- */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(48px);
  will-change: opacity, transform;
}
.reveal-ready [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1);
}
.reveal-ready .card-1[data-reveal].is-visible { transition-delay: .12s; }
.reveal-ready .card-2[data-reveal].is-visible { transition-delay: .24s; }
.reveal-ready .card-3[data-reveal].is-visible { transition-delay: .36s; }
.reveal-ready .team-lead[data-reveal].is-visible { transition-delay: .12s; }
.reveal-ready .person[data-reveal].is-visible:nth-child(1) { transition-delay: .15s; }
.reveal-ready .person[data-reveal].is-visible:nth-child(2) { transition-delay: .3s; }
.reveal-ready .person[data-reveal].is-visible:nth-child(3) { transition-delay: .45s; }

/* ---------- Narrower desktops ---------- */
@media (max-width: 1360px) {
  :root { --gutter: 40px; }
  .site-nav { margin-right: 0; gap: 0 28px; }
  .mission-box { grid-template-columns: 40% 1fr; }
  .mission-intro { padding: 160px 48px 60px; }
  .mission-cards { padding-right: 24px; }
  .card { width: auto; max-width: 678px; }
  .card-2 { margin-left: 60px; }
  .team-list { grid-template-columns: repeat(3, minmax(0, 287px)); gap: 5vw; }
  .person img { width: 100%; height: auto; aspect-ratio: 287 / 323; }
}

/* ---------- Tablet and phone ---------- */
@media (max-width: 1000px) {
  :root { --header-h: 72px; --gutter: 20px; }
  html.scrolled { --header-h: 54px; }

  .logo img { width: 150px; }
  .menu-toggle {
    display: block; position: relative;
    width: 44px; height: 44px; margin-right: -8px;
    border: 0; background: none; cursor: pointer;
  }
  .menu-toggle-bar,
  .menu-toggle-bar::before,
  .menu-toggle-bar::after {
    position: absolute; left: 11px; width: 22px; height: 2px;
    background: var(--white); transition: transform .2s, top .2s, opacity .2s;
  }
  .menu-toggle-bar { top: 21px; }
  .menu-toggle-bar::before, .menu-toggle-bar::after { content: ""; left: 0; }
  .menu-toggle-bar::before { top: -7px; }
  .menu-toggle-bar::after { top: 7px; }
  .menu-open .menu-toggle-bar { background: transparent; }
  .menu-open .menu-toggle-bar::before { top: 0; transform: rotate(45deg); }
  .menu-open .menu-toggle-bar::after { top: 0; transform: rotate(-45deg); }
  /* the phone menu drops down under the header and is not scaled when scrolled */
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto;
    display: none; flex-direction: column;
    padding: 8px var(--gutter) 24px;
    background: var(--black);
    border-top: 1px solid #222;
    transition: none;
  }
  html.scrolled .site-nav { transform: none; }
  .menu-open .site-nav { display: flex; }
  .site-nav a { padding: 14px 0; font-size: 18px; border-bottom: 1px solid #1c1c1c; }

  .hero {
    padding: calc(var(--header-h) + 48px) 0 258px;
    background-image:
      linear-gradient(rgba(0, 0, 0, .45), rgba(0, 0, 0, .15) 55%, rgba(0, 0, 0, 0) calc(100% - 200px), var(--black) calc(100% - 30px)),
      url("img/hero-1280.jpg");
  }
  .hero h1 { font-size: clamp(34px, 8.5vw, 60px); line-height: 1.2; }
  .hero-lead { margin-top: 24px; font-size: clamp(20px, 5.4vw, 26px); }

  .mission { margin-top: -90px; }
  .mission-box { grid-template-columns: 1fr; }
  .mission-intro { padding: 56px 28px; text-align: center; }
  .mission-intro h2 { font-size: clamp(32px, 8.5vw, 40px); }
  /* one column: only the intro meets the hero, the cards below it stay on black */
  .mission-cards { padding: 20px 14px 24px; gap: 14px; background: var(--black); }
  .card, .card-1, .card-2, .card-3 { width: auto; margin: 0; padding: 22px 22px 52px; text-align: center; }
  .card::after { left: 22px; right: 22px; bottom: 26px; }
  .card h3 { flex-direction: column; gap: 10px; padding-left: 0; font-size: clamp(22px, 6.4vw, 27px); }

  .team { padding-top: 110px; }
  .team h2 { font-size: clamp(34px, 8vw, 48px); }
  .team-lead { padding-inline: var(--gutter); }
  .team-panel { margin: 32px 0 0; padding: 32px 20px; }
  .team-list { grid-template-columns: minmax(0, 287px); gap: 34px; }

  /* phones: 0.75 × the photo height from the photos to the first line */
  .partners { padding-top: 210px; }
  .partners .wrap::before { margin-bottom: 20px; }
  .partners .wrap::after { margin-top: 20px; }
  .partners-box { grid-template-columns: 1fr; }
  .partners-cell { min-height: 140px; }
  .partners-cell img { max-width: 260px; }

  .site-footer { padding: 32px 0 48px; }
  .footer-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 26px; }
  .footer-logo { margin: 0 auto 12px; }
  .footer-follow { justify-self: center; justify-content: center; }
  .footer-follow .copyright { text-align: center; }

  /* one column: no waiting for the neighbours */
  .reveal-ready .card-1[data-reveal].is-visible, .reveal-ready .card-2[data-reveal].is-visible,
  .reveal-ready .card-3[data-reveal].is-visible,
  .reveal-ready .person[data-reveal].is-visible:nth-child(n) { transition-delay: 0s; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .reveal-ready [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- 404 ---------- */
.not-found { min-height: 100vh; padding: calc(var(--header-h) + 120px) 0 120px; }
.not-found h1 { font: 300 56px/1.2 var(--display); }
.not-found p { margin: 20px 0 36px; color: var(--grey-text); }
