:root {
  /* Colors of American medicine: nitrile gloves and prescription vials. */
  --paper: #f4f5f7;
  --ink: #0e1530;
  --ink-soft: #4a5170;
  --nitrile: #4a5cff;
  --amber: #ff8a1f;
  --mist: #dde1ea;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(20px, 3vw, 48px);
  --max: 1680px;
  --header: 84px;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

h1,
h2,
p {
  margin: 0;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
}

::selection {
  background: var(--amber);
  color: var(--ink);
}

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

.on-ink :focus-visible,
.half-media :focus-visible {
  outline-color: var(--amber);
}

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

.skip {
  position: absolute;
  top: -60px;
  left: 12px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
}

.skip:focus {
  top: 12px;
}

/* Display type: Archivo pushed to its narrowest, heaviest cut. */

.hero-title,
.half h2,
.closing-title,
.footer-wordmark,
.marquee-group,
.couplet,
.logo {
  font-stretch: 75%;
  font-weight: 900;
  letter-spacing: -0.02em;
}

/* Header */

.site-header {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.75rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.logo-mark {
  width: 40px;
  height: 20px;
  transform: rotate(-30deg);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 40px);
  font-size: 1rem;
  font-weight: 500;
}

.nav a {
  text-decoration: none;
}

.nav a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* Capsule button: two halves that pull apart on hover. */

.capsule-button {
  display: inline-flex;
  min-height: 58px;
  border-radius: 999px;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.capsule-button span {
  display: flex;
  align-items: center;
  transition: transform 0.45s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.capsule-button span:first-child {
  padding: 0 14px 0 26px;
  border-radius: 999px 0 0 999px;
  background: var(--nitrile);
  color: #fff;
}

.capsule-button span:last-child {
  padding: 0 26px 0 14px;
  border-radius: 0 999px 999px 0;
  background: var(--amber);
  color: var(--ink);
}

.capsule-button-small {
  min-height: 46px;
  font-size: 0.9375rem;
}

.capsule-button-small span:first-child {
  padding: 0 11px 0 20px;
}

.capsule-button-small span:last-child {
  padding: 0 20px 0 11px;
}

.capsule-button:hover span:first-child,
.capsule-button:focus-visible span:first-child {
  transform: translateX(-5px) rotate(-3deg);
}

.capsule-button:hover span:last-child,
.capsule-button:focus-visible span:last-child {
  transform: translateX(5px) rotate(3deg);
}

/* Hero */

.hero {
  position: relative;
  display: flex;
  min-height: 100svh;
  padding-top: var(--header);
  overflow-x: clip;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding-block: clamp(20px, 5vh, 56px) clamp(14px, 2.5vh, 28px);
  container-type: inline-size;
}

.hero-intro {
  position: relative;
  z-index: 3;
  display: grid;
  justify-items: start;
  gap: 28px;
  max-width: 36ch;
}

.hero-lede {
  font-size: clamp(1.125rem, 0.9rem + 0.7vw, 1.5rem);
  font-weight: 500;
  line-height: 1.35;
}

/* "Distribution" fills the width, unless the screen is too short to fit both lines. */
.hero-title {
  position: relative;
  z-index: 1;
  font-size: max(13cqi, min(21.2cqi, calc((100svh - 380px) / 1.76)));
  line-height: 0.84;
}

.hero-title .line {
  display: block;
  overflow: hidden;
  padding-top: 0.04em;
}

.hero-title .line > span {
  display: inline-block;
  animation: rise 1.1s var(--ease-out) both;
}

.hero-title .line + .line > span {
  animation-delay: 0.1s;
}

@keyframes rise {
  from {
    transform: translateY(104%);
  }
}

/* Sits right of "Media &", dipping just in front of "Distribution". */
.capsule-stage {
  position: absolute;
  top: 9%;
  left: 57%;
  z-index: 2;
  width: 43%;
  height: 84%;
  pointer-events: none;
}

.capsule-canvas,
.capsule-fallback {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.capsule-fallback {
  opacity: 0;
}

.capsule-stage.no-3d .capsule-fallback {
  opacity: 1;
  animation: arrive 1.2s cubic-bezier(0.3, 1.4, 0.5, 1) 0.3s both;
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: scale(0.4) rotate(40deg);
  }
}

/* Marquee */

.marquee {
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(16px, 2vw, 28px);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 48s linear infinite;
}

.marquee-group {
  display: flex;
  align-items: center;
  gap: 0.4em;
  padding-right: 0.4em;
  font-size: clamp(2.75rem, 1.5rem + 5vw, 7rem);
  line-height: 1;
  white-space: nowrap;
}

.pill {
  flex: none;
  width: 1.1em;
  height: 0.55em;
  transform: rotate(-30deg);
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* The two halves */

.halves {
  display: grid;
}

.half {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 72px;
  min-height: clamp(480px, 82svh, 880px);
  padding: clamp(28px, 3.4vw, 56px) var(--gutter) clamp(12px, 1.6vw, 24px);
  container-type: inline-size;
  scroll-margin-top: 0;
}

.half p {
  max-width: 28ch;
  font-size: clamp(1.25rem, 0.95rem + 0.9vw, 1.75rem);
  font-weight: 500;
  line-height: 1.3;
}

/* Sized so "Distribution" spans its whole panel. */
.half h2 {
  font-size: 21cqi;
  line-height: 0.82;
}

.half-media {
  background: var(--nitrile);
  color: #fff;
}

.half-distribution {
  background: var(--amber);
  color: var(--ink);
}

@media (min-width: 900px) {
  .halves {
    grid-template-columns: 1fr 1fr;
  }
}

/* Couplet */

.couplet-section {
  padding-block: clamp(96px, 14vw, 220px) clamp(48px, 7vw, 110px);
}

.couplet {
  font-size: clamp(2.75rem, 1rem + 6.4vw, 8.5rem);
  font-weight: 800;
  line-height: 0.9;
}

.couplet .line {
  display: block;
}

.couplet .line > span {
  display: inline-block;
}

.couplet .line + .line {
  margin-top: 0.3em;
}

/* Closing */

.closing {
  padding-block: clamp(48px, 7vw, 110px) clamp(96px, 12vw, 180px);
}

.closing .wrap {
  container-type: inline-size;
}

.closing-title {
  max-width: 9.5em;
  color: var(--nitrile);
  font-size: 12cqi;
  line-height: 0.84;
}

.closing-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 48px;
  margin-top: clamp(40px, 5vw, 72px);
}

.closing-foot p {
  max-width: 34ch;
  color: var(--ink-soft);
  font-size: clamp(1.125rem, 0.95rem + 0.5vw, 1.375rem);
  line-height: 1.4;
}

/* Footer */

.site-footer {
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
}

.site-footer .wrap {
  container-type: inline-size;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 28px;
  font-size: 1rem;
}

.footer-row a {
  font-weight: 600;
  text-decoration: none;
}

.footer-row a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.footer-row span {
  color: rgb(244 245 247 / 0.6);
}

/* "EnzedMD" measures 3.77em in this cut, so this spans the full width. */
.footer-wordmark {
  margin-bottom: -0.11em;
  font-size: 26.3cqi;
  line-height: 1;
  white-space: nowrap;
}

/* 404 */

.missing {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 32px;
  min-height: 100svh;
  padding-top: var(--header);
  padding-bottom: clamp(32px, 6vh, 72px);
}

.missing .wrap {
  container-type: inline-size;
}

.missing h1 {
  font-size: 16cqi;
  font-stretch: 75%;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 0.84;
}

.missing p {
  margin-top: 28px;
  max-width: 30ch;
  font-size: 1.25rem;
  font-weight: 500;
}

.missing .capsule-button {
  margin-top: 32px;
}

/* The partner button lives in the header on wide screens, in the hero on phones. */

@media (min-width: 760px) {
  .nav-contact,
  .hero-cta {
    display: none;
  }
}

/* Small screens */

@media (max-width: 759px) {
  .nav-section,
  .nav-cta {
    display: none;
  }

  .couplet {
    font-size: 8.6vw;
  }

  .couplet .line > span {
    display: block;
  }

  .closing-title {
    font-size: 15cqi;
  }

  .hero-inner {
    justify-content: flex-start;
    gap: 0;
  }

  .hero-intro {
    gap: 22px;
  }

  .capsule-stage {
    position: relative;
    inset: auto;
    flex: 1;
    width: auto;
    height: auto;
    min-height: 240px;
    margin-inline: calc(var(--gutter) * -1);
  }

  .hero-title {
    font-size: 21.2cqi;
  }

  .half {
    min-height: 72svh;
    gap: 56px;
  }
}

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