@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/montserrat.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122;
}

:root {
  --navy: #0A1E3C;
  --blue: #1E5AA8;
  --gold: #B89B5A;
  --gray: #F3F5F7;
  --charcoal: #2B2F36;
  --white: #FFFFFF;

  --hairline: #E4E8EE;
  /* Single source of truth (unitless %) for where the photo begins, so the
     text column is sized against it and the two can never collide. */
  --photo-left: 52.6;
  --shell: 1440px;
  --gutter: clamp(22px, 5.2vw, 86px);
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--charcoal);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
h1, h2, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 30;
  background: var(--navy);
  color: var(--white);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- Logo ---------- */

.logo {
  display: inline-flex;
  align-items: center;
  gap: clamp(11px, 1.15vw, 16px);
}

.logo__mark {
  width: auto;
  height: clamp(42px, 3.8vw, 54px);
}

.logo__type {
  display: flex;
  flex-direction: column;
  /* Clamp keeps the two words optically the same width, as in the mark. */
  align-items: stretch;
}

.logo__name {
  font-size: clamp(23px, 2.1vw, 30px);
  font-weight: 700;
  letter-spacing: 0.012em;
  line-height: 1;
  color: var(--navy);
  text-transform: uppercase;
}

.logo__sub {
  font-size: clamp(10.5px, 0.92vw, 13px);
  font-weight: 400;
  line-height: 1;
  color: var(--navy);
  text-transform: uppercase;
  margin-top: 0.36em;
  /* Tracked out so LABORATORIES sets to the width of AVANTIS above it. */
  letter-spacing: 0.325em;
  text-indent: 0.325em;
  text-align: center;
}

.logo--rev .logo__name,
.logo--rev .logo__sub { color: var(--white); }

/* ---------- Top bar ---------- */

/* The photo runs from the very top of the page, behind the top bar, as in
   the mockup. The stage holds both so they share one coordinate space. */
.stage {
  position: relative;
  background: var(--white);
  overflow: hidden;
}

/* display:contents so the <img> keeps taking the stage's positioning and,
   on mobile, its own flex order. */
.stage picture { display: contents; }

.stage__photo {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 0;
  width: calc(100% - var(--photo-left) * 1%);
  height: 100%;
  object-fit: cover;
  /* Keeps the microscope and test tubes in frame as the column narrows. */
  object-position: 78% 50%;
  /* Fade the left edge into the white so it reads as one scene. The photo
     carries its own soft edge too, so this stays gentle. */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.55) 8%, #000 22%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.55) 8%, #000 22%);
}

.topbar {
  position: relative;
  z-index: 2;
  padding-block: clamp(15px, 1.8vw, 22px);
  border-bottom: 1px solid var(--hairline);
  background: transparent;
}

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

.hero {
  position: relative;
  z-index: 2;
}

.hero__inner {
  padding-block: clamp(38px, 4.6vw, 66px) clamp(32px, 3.5vw, 50px);
}

.hero__text {
  position: relative;
  /* Stop short of the photo at every width. */
  max-width: calc(
    var(--photo-left) * 1vw
    - max(0px, (100vw - var(--shell)) / 2)
    - var(--gutter) - 18px
  );
}

/* The molecule network sits behind the type as a whisper. Deliberately faint:
   it must never compete with the headline. */
.stage::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: min(1150px, calc(var(--photo-left) * 1vw));
  background: url('/molecules.svg') no-repeat left top / 1150px auto;
  opacity: 0.19;
  -webkit-mask-image: linear-gradient(to right, #000 0%, rgba(0,0,0,0.3) 13%, rgba(0,0,0,0.2) 42%, rgba(0,0,0,0.85) 100%);
  mask-image: linear-gradient(to right, #000 0%, rgba(0,0,0,0.3) 13%, rgba(0,0,0,0.2) 42%, rgba(0,0,0,0.85) 100%);
  pointer-events: none;
  z-index: 1;
}

.eyebrow {
  font-size: clamp(12px, 0.97vw, 13.5px);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--blue);
}

.eyebrow__rule {
  display: block;
  width: 38px;
  height: 3px;
  background: var(--blue);
  margin-top: 14px;
}

.h1 {
  margin-top: clamp(20px, 2.3vw, 30px);
  font-size: clamp(31px, 3.72vw, 53px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.021em;
  color: var(--navy);
}

.lede {
  margin-top: clamp(16px, 1.7vw, 23px);
  max-width: 520px;
  font-size: clamp(14.5px, 1.06vw, 15.2px);
  line-height: 1.75;
  color: var(--charcoal);
}

/* ---------- Form ---------- */

.form { margin-top: clamp(22px, 2.5vw, 32px); }

.form__row {
  display: flex;
  gap: 12px;
  max-width: 512px;
}

.input {
  flex: 1 1 auto;
  min-width: 0;
  height: 58px;
  padding: 0 20px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background: var(--white);
  color: var(--charcoal);
  font-family: var(--font);
  font-size: 15.5px;
  transition: border-color 0.2s ease;
}
.input::placeholder { color: #9AA1AC; }
.input:focus { outline: none; border-color: var(--blue); }

/* Honeypot — off-screen, never shown, not announced. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 58px;
  padding: 0 24px;
  border: 0;
  border-radius: 6px;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font);
  font-size: 15.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}
.btn:hover { background: #0d2950; }
.btn[disabled] { opacity: 0.6; cursor: default; }
.btn svg { flex: 0 0 auto; }

.status {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.status:empty { display: none; }
.status[data-state="ok"] { color: #1B6B3A; }
.status[data-state="error"] { color: #A32020; }

.fineprint {
  margin-top: 13px;
  font-size: 12.5px;
  color: #77808C;
}

/* ---------- Pillars ---------- */

.pillars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(24px, 2.7vw, 36px);
  max-width: 524px;
}

.pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-inline: clamp(6px, 1vw, 14px);
  border-left: 1px solid var(--hairline);
}
.pillar:first-child { border-left: 0; padding-left: 0; }
.pillar:last-child { padding-right: 0; }

.pillar__icon {
  width: clamp(31px, 2.8vw, 38px);
  height: clamp(31px, 2.8vw, 38px);
  color: var(--navy);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pillar__label {
  margin-top: 12px;
  font-size: clamp(10.5px, 0.9vw, 12.6px);
  font-weight: 600;
  line-height: 1.42;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  color: var(--navy);
}

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

.foot {
  background: var(--navy);
  color: var(--white);
  padding-block: clamp(24px, 2.6vw, 33px);
}

.foot__inner {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
  flex-wrap: wrap;
}

.foot__rule {
  width: 1px;
  align-self: stretch;
  min-height: 52px;
  background: rgba(255, 255, 255, 0.28);
}

.foot__tagline {
  font-size: clamp(13.5px, 1.05vw, 15.5px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.94);
}

.foot__legal {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.6vw, 44px);
  font-size: clamp(12.5px, 0.95vw, 14px);
  color: rgba(255, 255, 255, 0.82);
}
.foot__legal a { transition: color 0.2s ease; }
.foot__legal a:hover { color: var(--white); text-decoration: underline; }

/* ---------- Privacy page ---------- */

.doc {
  padding-block: clamp(44px, 5.4vw, 78px) clamp(56px, 6.4vw, 92px);
  max-width: 760px;
}

.doc h1 {
  font-size: clamp(30px, 3.3vw, 44px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.doc__meta {
  margin-top: 12px;
  font-size: 13.5px;
  color: #77808C;
}

.doc h2 {
  margin-top: clamp(30px, 3.2vw, 42px);
  font-size: clamp(17px, 1.4vw, 20px);
  font-weight: 600;
  line-height: 1.35;
  color: var(--navy);
}

.doc p {
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--charcoal);
}

.doc a { color: var(--blue); text-decoration: underline; }

.doc__rule {
  width: 46px;
  height: 3px;
  background: var(--gold);
  margin-top: clamp(26px, 3vw, 34px);
}

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

@media (max-width: 900px) {
  .stage { display: flex; flex-direction: column; }

  /* `main` is the flex child, not `.hero` — order must go on it. */
  .topbar { order: 1; }
  .stage > main { order: 2; }

  .hero__inner { padding-bottom: clamp(30px, 5.4vw, 44px); }

  .stage__photo {
    order: 3;
    position: static;
    width: 100%;
    height: auto;
    /* Native ratio — nothing is cropped, so the microscope always stays in frame. */
    aspect-ratio: 882 / 682;
    object-position: center;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 9%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 9%);
  }

  .hero__text { max-width: 100%; }

  /* Narrow screens sit inside the pattern's strongest band, so pull it back. */
  .stage::before {
    width: 100%;
    opacity: 0.15;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .pillars { max-width: 100%; }
}

@media (max-width: 620px) {
  .form__row { flex-direction: column; max-width: 100%; }
  .btn { justify-content: center; width: 100%; }

  .pillars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px 0;
  }
  .pillar:nth-child(odd) { border-left: 0; padding-left: 0; }
  .pillar:nth-child(even) { padding-right: 0; }

  .foot__inner { gap: 18px; }
  .foot__rule { display: none; }
  .foot__legal {
    margin-left: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
