:root {
  --ink: #090a08;
  --muted: #4b5147;
  --paper: #f8f3df;
  --paper-2: #fffdf2;
  --label: #f7f4ea;
  --green: #39b755;
  --green-dark: #0f6d35;
  --red: #f03a35;
  --blue: #34b8e5;
  --purple: #8b36dc;
  --yellow: #ffd84f;
  --steel: #dfe8e5;
  --max: 1180px;
  --border: 3px solid var(--ink);
  --shadow: 10px 10px 0 var(--ink);
  --font-display: Impact, Haettenschweiler, "Arial Black", system-ui, sans-serif;
  --font-body: "Arial Black", Arial, Helvetica, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    linear-gradient(rgba(9, 10, 8, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(9, 10, 8, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, #f7f4ea 0%, #fffdf2 42%, #e9f4ef 100%);
  background-size: 30px 30px, 30px 30px, auto;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    repeating-linear-gradient(105deg, transparent 0 48px, rgba(9, 10, 8, 0.04) 48px 52px),
    radial-gradient(circle at 12% 12%, rgba(57, 183, 85, 0.13), transparent 26%),
    radial-gradient(circle at 86% 10%, rgba(240, 58, 53, 0.16), transparent 24%);
}

img {
  display: block;
  max-width: 100%;
}

span,
strong,
p,
li,
a,
h1,
h2,
h3 {
  overflow-wrap: break-word;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 20;
  display: flex;
  width: min(calc(100% - 24px), var(--max));
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 10px 8px 12px;
  background: rgba(255, 253, 242, 0.92);
  border: var(--border);
  box-shadow: 5px 5px 0 var(--ink);
  transform: translateX(-50%);
}

.brand,
.nav-links,
.hero-actions,
.contract-card {
  display: flex;
  align-items: center;
}

.brand {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.6vw, 3rem);
  line-height: 1;
}

.brand span {
  white-space: nowrap;
}

.nav-links {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.nav-links a,
.primary-action,
.secondary-action,
.contract-card button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: var(--ink);
  background: var(--paper-2);
  border: 2px solid var(--ink);
  font-size: 0.9rem;
  font-weight: 950;
  text-transform: uppercase;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.nav-links .x-link {
  min-width: 44px;
  padding: 0 14px;
  color: white;
  background: var(--ink);
}

.nav-links a:hover,
.primary-action:hover,
.secondary-action:hover,
.contract-card button:hover {
  box-shadow: 4px 4px 0 var(--ink);
  transform: translate(-2px, -2px);
}

main {
  overflow: hidden;
}

section {
  width: min(calc(100% - 28px), var(--max));
  margin: 0 auto;
  scroll-margin-top: 118px;
}

.hero {
  display: grid;
  min-height: 92dvh;
  grid-template-columns: minmax(300px, 0.76fr) minmax(420px, 1.24fr);
  align-items: center;
  gap: clamp(42px, 6vw, 96px);
  padding: 112px 0 34px;
}

.hero-copy {
  position: relative;
  min-width: 0;
  z-index: 2;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  margin: 0 0 14px;
  padding: 8px 12px;
  color: white;
  background: var(--green-dark);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 0.82rem;
  line-height: 1.05;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  width: fit-content;
  max-width: 100%;
  margin-bottom: 6px;
  font-size: clamp(4rem, 7.2vw, 8.2rem);
  line-height: 0.78;
  white-space: nowrap;
  text-shadow: 6px 6px 0 var(--yellow), 10px 10px 0 var(--ink);
}

.hero-name {
  width: fit-content;
  max-width: min(100%, 520px);
  margin-bottom: clamp(26px, 3vw, 42px);
  padding: 10px 14px;
  color: white;
  background: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--red);
  font-size: clamp(1.12rem, 2.1vw, 1.6rem);
  line-height: 1;
  text-transform: uppercase;
}

.hero-lede {
  max-width: 560px;
  margin-bottom: 24px;
  padding-top: clamp(12px, 1.4vw, 20px);
  border-top: 5px solid var(--ink);
  font-size: clamp(1.08rem, 2vw, 1.46rem);
  line-height: 1.22;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.primary-action,
.secondary-action {
  min-height: 54px;
  padding: 0 22px;
  font-size: 1rem;
}

.primary-action {
  color: white;
  background: var(--red);
}

.secondary-action {
  background: var(--yellow);
}

.contract-card {
  width: min(100%, 560px);
  align-items: stretch;
  gap: 0;
  margin-top: 18px;
  background: var(--paper-2);
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}

.contract-card span,
.contract-card code,
.contract-card button {
  min-width: 0;
  border: 0;
}

.contract-card span {
  display: grid;
  place-items: center;
  padding: 0 12px;
  color: white;
  background: var(--green-dark);
  font-size: 1rem;
  line-height: 1;
}

.contract-card code {
  display: block;
  flex: 1;
  padding: 12px;
  overflow: hidden;
  border-right: 3px solid var(--ink);
  border-left: 3px solid var(--ink);
  font-family: "Courier New", Courier, monospace;
  font-size: clamp(0.8rem, 1.1vw, 0.95rem);
  font-weight: 900;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-card button {
  min-height: auto;
  padding: 0 14px;
  background: var(--yellow);
  cursor: pointer;
}

.hero-media {
  position: relative;
  display: grid;
  justify-items: center;
  align-self: center;
  min-width: 0;
  padding: clamp(12px, 2vw, 22px);
}

.hero-media::before {
  position: absolute;
  inset: 1% 0 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, transparent 0 20%, rgba(9, 10, 8, 0.09) 20% 21%, transparent 21% 40%, rgba(9, 10, 8, 0.09) 40% 41%, transparent 41% 60%, rgba(9, 10, 8, 0.09) 60% 61%, transparent 61% 80%, rgba(9, 10, 8, 0.09) 80% 81%, transparent 81% 100%),
    linear-gradient(135deg, white 0 60%, var(--yellow) 60% 75%, var(--red) 75% 100%);
  border: var(--border);
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
}

.hero-media img {
  width: min(100%, 650px);
  max-height: min(78dvh, 690px);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(12px 16px 0 rgba(9, 10, 8, 0.18));
  transform: rotate(-1deg);
}

.stamp {
  position: relative;
  z-index: 1;
  justify-self: end;
  margin: 10px clamp(6px, 1.5vw, 18px) 0 0;
  max-width: 280px;
  padding: 14px 18px;
  color: var(--red);
  background: rgba(255, 253, 242, 0.92);
  border: 4px solid var(--red);
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 2rem);
  line-height: 0.92;
  text-align: center;
  transform: rotate(-4deg);
}

.formula-section,
.research,
.patient,
.shelf,
.side-effects {
  padding: clamp(58px, 9vw, 100px) 0;
}

.formula-section {
  display: grid;
  grid-template-columns: minmax(250px, 0.74fr) minmax(0, 1.26fr);
  align-items: center;
  gap: 18px clamp(24px, 5vw, 76px);
}

.formula-label {
  display: grid;
  min-height: 420px;
  align-content: center;
  gap: 16px;
  padding: clamp(22px, 4vw, 36px);
  background: var(--label);
  border: 5px solid var(--ink);
  box-shadow: var(--shadow);
  transform: rotate(-2deg);
}

.formula-label p,
.formula-label strong,
.formula-label span {
  margin: 0;
  text-transform: uppercase;
}

.formula-label p {
  padding-bottom: 12px;
  border-bottom: 4px solid var(--ink);
  font-size: clamp(1.2rem, 2vw, 1.8rem);
}

.formula-label strong {
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 6.2vw, 5.5rem);
  line-height: 0.82;
}

.formula-label span {
  padding: 12px;
  background: white;
  border: 3px solid var(--ink);
  font-size: clamp(0.9rem, 1.35vw, 1.12rem);
  line-height: 1.2;
}

.formula-copy {
  padding: clamp(22px, 4vw, 40px);
  background: var(--paper-2);
  border: var(--border);
  box-shadow: var(--shadow);
}

.formula-copy h2,
.research h2,
.patient h2,
.shelf h2,
.side-effects h2 {
  margin-bottom: 18px;
  font-size: clamp(2.8rem, 7vw, 6.4rem);
  line-height: 0.88;
}

.formula-copy p,
.formula-copy strong,
.research-copy > p,
.section-heading p,
.side-effects p,
.side-effects strong {
  font-size: clamp(1rem, 2vw, 1.34rem);
  line-height: 1.35;
}

.formula-copy strong,
.side-effects strong {
  display: block;
  padding: 16px;
  background: var(--green);
  border: 2px solid var(--ink);
}

.formula-steps {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.formula-steps article {
  display: grid;
  gap: 8px;
  min-height: 180px;
  padding: 16px;
  background: white;
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.formula-steps span {
  width: fit-content;
  padding: 5px 9px;
  color: white;
  background: var(--red);
  border: 2px solid var(--ink);
}

.formula-steps h3 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.86;
}

.formula-steps p {
  margin: 0;
  color: var(--muted);
  font-family: Arial, Helvetica, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.32;
}

.research {
  padding-top: clamp(50px, 7vw, 82px);
}

.research-copy {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(460px, 1.22fr);
  align-items: end;
  gap: 18px clamp(22px, 4vw, 50px);
}

.research h2 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(3rem, 5.1vw, 5.65rem);
  line-height: 0.9;
}

.research .section-kicker {
  grid-column: 1 / -1;
  width: fit-content;
}

.research-copy > img,
.shelf-wide {
  width: 100%;
  background: white;
  border: var(--border);
  box-shadow: var(--shadow);
}

.research-copy > img {
  grid-column: 2;
  grid-row: 2 / span 2;
  aspect-ratio: 1980 / 1080;
  object-fit: cover;
}

.stats-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.stats-grid article {
  display: grid;
  min-height: 164px;
  align-content: start;
  gap: 8px;
  padding: 16px;
  background: var(--paper-2);
  border: 2px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
}

.stats-grid span {
  display: block;
  color: var(--red);
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 6.4vw, 6.7rem);
  line-height: 0.86;
}

.stats-grid p {
  margin: 0;
  font-size: clamp(0.92rem, 1.25vw, 1.08rem);
  line-height: 1.25;
}

.patient-card {
  padding: clamp(18px, 4vw, 34px);
  background: var(--steel);
  border: 4px solid var(--ink);
  box-shadow: var(--shadow);
}

.file-top,
.patient-layout,
.diagnosis {
  display: grid;
  gap: 22px;
}

.file-top {
  grid-template-columns: 1fr auto;
  align-items: start;
  margin-bottom: 22px;
  border-bottom: 4px solid var(--ink);
}

.file-top span {
  padding: 10px 14px;
  color: white;
  background: var(--red);
  border: 2px solid var(--ink);
  font-size: clamp(1.1rem, 3vw, 2rem);
}

.patient-layout {
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  align-items: start;
}

.patient-layout img {
  width: 100%;
  background: white;
  border: 3px solid var(--ink);
}

.patient-notes {
  padding: 20px;
  background: var(--paper-2);
  border: 3px solid var(--ink);
}

.patient-notes p,
.patient-notes li,
.diagnosis p {
  font-size: clamp(0.98rem, 1.7vw, 1.2rem);
  line-height: 1.35;
}

.patient-notes h3 {
  margin: 16px 0 8px;
  color: var(--green-dark);
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.patient-notes ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 22px;
}

.diagnosis {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
}

.diagnosis p {
  margin: 0;
  padding: 18px;
  background: var(--yellow);
  border: 3px solid var(--ink);
}

.section-heading {
  max-width: 860px;
  margin-bottom: 26px;
}

.shelf-wide {
  max-height: 620px;
  object-fit: cover;
  object-position: center;
}

.prescription-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.prescription-grid article {
  display: grid;
  align-content: start;
  min-height: 100%;
  padding: 14px;
  background: var(--paper-2);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
}

.prescription-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: white;
  border: 2px solid var(--ink);
}

.prescription-grid h3 {
  margin: 14px 0 6px;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 0.9;
}

.prescription-grid p {
  margin: 0;
  color: var(--muted);
  font-family: Arial, Helvetica, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
}

.side-effects {
  margin-bottom: 46px;
  padding-right: clamp(18px, 5vw, 52px);
  padding-left: clamp(18px, 5vw, 52px);
  color: white;
  background: var(--ink);
  border: 4px solid var(--ink);
  box-shadow: var(--shadow);
}

.side-effects .section-kicker {
  color: var(--ink);
  background: var(--yellow);
}

.side-effects h2 {
  color: var(--red);
  text-shadow: 4px 4px 0 white;
}

.side-effects strong {
  color: var(--ink);
  background: var(--red);
}

@media (max-width: 920px) {
  .site-header {
    position: absolute;
    align-items: flex-start;
  }

  .nav-links a {
    padding: 0 10px;
    font-size: 0.78rem;
  }

  .hero,
  .formula-section,
  .research-copy,
  .patient-layout,
  .diagnosis {
    grid-template-columns: 1fr;
  }

  .research-copy > img {
    grid-column: auto;
    grid-row: auto;
  }

  .hero {
    min-height: auto;
    padding-top: 116px;
  }

  .hero-media {
    order: -1;
    align-self: center;
  }

  .hero-media img {
    width: min(100%, 500px);
    max-height: 48dvh;
  }

  .formula-label {
    min-height: auto;
    transform: none;
  }

  .formula-steps {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .site-header {
    display: block;
  }

  .hero {
    padding-top: 190px;
  }

  .brand {
    justify-content: center;
    margin-bottom: 8px;
    font-size: 2.55rem;
  }

  .nav-links {
    justify-content: center;
  }

  .nav-links a {
    min-height: 38px;
  }

  h1 {
    font-size: clamp(2.9rem, 14vw, 4.35rem);
    line-height: 0.84;
    text-shadow: 3px 3px 0 var(--yellow), 5px 5px 0 var(--ink);
  }

  .hero-lede {
    font-size: 1rem;
  }

  .contract-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .contract-card code {
    border-right: 0;
  }

  .contract-card button {
    grid-column: 1 / -1;
    min-height: 42px;
    border-top: 3px solid var(--ink);
  }

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

  .stats-grid article {
    min-height: 118px;
    grid-template-columns: minmax(112px, 0.44fr) 1fr;
    align-items: center;
  }

  .stamp {
    max-width: min(100%, 240px);
    margin-top: 8px;
    padding: 10px 12px;
    font-size: 1.16rem;
    transform: rotate(-2deg);
  }

  .hero-name {
    max-width: 100%;
    font-size: 1rem;
  }

  .formula-copy,
  .formula-label,
  .patient-card {
    box-shadow: 6px 6px 0 var(--ink);
  }

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

  .file-top {
    grid-template-columns: 1fr;
  }
}

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