:root {
  color-scheme: light;
  --black: #202021;
  --dark-gray: #393939;
  --border: #5D5E60;
  --brand-primary: #45257B;
  --brand-primary-100: #E6E0F2;
  --brand-secondary: #CB177D;
  --brand-tertiary: #3995A5;
  --font-body: "Figtree", "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: #412078;
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  color: var(--brand-primary);
  font-family: var(--font-body), sans-serif;
  font-size: 1rem;
  line-height: 1;
  overflow-x: hidden;
}

a {
  color: var(--brand-secondary);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #65cbd5;
  outline-offset: 3px;
}

p, h1, h2, h3, h4, h5 {
  text-wrap: pretty;
}

.text-center {
  text-align: center;
}

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

.content-container,
.nav-inner,
.footer-inner {
  width: min(100% - 2rem, 1240px);
  margin-inline: auto;
}

/* Header and hero */
.hero {
  overflow: hidden;
  color: #fff;
  background: linear-gradient(112deg, #54217c 0%, #87227f 48%, #d00f88 100%);
}

.audience-bar {
  margin: 0;
  line-height: 32px;
  color: #fff;
  background: #412078;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.site-nav {
  padding: 1.5rem 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .25), transparent);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand-logo {
  display: block;
  width: 7.6rem;
  height: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(2rem, 8vw, 8rem);
}

.nav-links a,
.nav-action > span {
  color: #fff;
  font-weight: 700;
  text-underline-offset: .15em;
}

.nav-links a {
  font-size: 20px;
  text-decoration-thickness: 1px;
  text-decoration: underline;
}

.nav-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  text-align: center;
}

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  padding: .5rem 1.5rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button-light {
  min-width: 264px;
  color: var(--brand-secondary);
  background: #fff;
}

.button-light:hover {
  color: var(--brand-primary);
  background: #f3eef8;
}

.button-brand {
  color: #fff;
  background: linear-gradient(100deg, var(--brand-primary), var(--brand-secondary));
}

.button-brand:hover {
  color: #fff;
  background: #842179;
}

.hero-content {
  padding: 1.25rem 1rem 2.5rem;
  text-align: center;
}

.hero-intro {
  max-width: 48rem;
  margin: 0 auto 2rem;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.3;
}

.hero-art {
  display: block;
  width: min(100%, 582px);
  height: auto;
  margin: 0 auto 2.5rem;
  animation: rise-in .7s ease-out both;
}

.hero h1 {
  margin: 0;
  font-size: 50px;
  font-weight: 700;
  line-height: 1.1;
}

.patient-page {
  --patient-lavender: #eee8f5;
  --patient-blue: #e5f6fa;
  font-size: 20px;
  line-height: 28px;
}

.patient-page .content-container,
.patient-page .form-container {
  width: min(100% - 2rem, 60rem);
}

.patient-page .nav-action {
  font-size: 16px;
  line-height: 1;
}

.patient-page .button-light {
  min-width: 204px;
}

/* Main: detection section */
.patient-detection {
  padding: 56px 0;
}

.patient-detection-title {
  margin: 0 0 16px;
  line-height: 56px;
  color: var(--brand-primary);
  font-size: 48px;
}

.detection-layout {
  display: grid;
  grid-template-columns: minmax(0, 620px) minmax(0, 292px);
  gap: 48px;
  align-items: start;
}

.patient-facts {
  margin: 0;
  padding: 0;
  list-style: none;
}

.patient-facts p {
  margin: 0;
  line-height: 28px;
}

.patient-facts li {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--black);
}

.patient-facts li + li {
  margin-top: 16px;
}

.patient-facts img {
  width: 80px;
  height: auto;
  flex: 0 0 80px;
}

.patient-disease {
  margin-top: 18px;
  padding-top: 24px;
  border-top: 1px solid #c9b9e3;
}

.patient-disease-title {
  margin: 0 0 16px;
  color: var(--brand-secondary);
  font-size: 32px;
  line-height: 40px;
}

.patient-test-callout {
  padding: 32px 28px 40px;
  border-radius: 16px;
  background: var(--patient-blue);
  text-align: center;
}

.patient-test-callout h3 {
  margin-bottom: 32px;
  font-size: 32px;
  line-height: 40px;
}

.patient-test-callout img {
  display: block;
  width: 180px;
  max-width: 100%;
  height: auto;
  margin: auto;
}

/* Main: risk factors and testing */
.patient-risk-section {
  padding: 56px 0;
  background: var(--patient-lavender);
}

.patient-risk-section > .content-container > p,
.patient-early-testing > p {
  color: var(--black);
}

.patient-risk-title {
  margin: 0;
  color: var(--brand-secondary);
  line-height: 40px;
}

.patient-risk-section p {
  margin: 10px 0;
}

.patient-geography {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 300px;
  grid-template-rows: repeat(4, auto);
  gap: 16px 32px;
  width: calc(100% + 212px);
  margin: 56px -106px;
}

.patient-map {
  grid-column: 2;
  grid-row: 1 / 5;
  text-align: center;
}

.patient-map-title {
  max-width: 340px;
  margin: 0 auto 20px;
  font-size: 28px;
  line-height: 36px;
}

.patient-map img {
  display: block;
  width: 100%;
  height: auto;
}

.patient-region {
  padding: 16px;
  border-radius: 4px;
  border-left: 6px solid var(--brand-tertiary);
  background: #fff;
}

.patient-region h4 {
  margin: 0;
  color: var(--brand-tertiary);
  font-size: 24px;
}

.patient-region ul {
  margin: 0;
  padding-left: 28px;
  color: var(--black);
  font-size: 16px;
  line-height: 1.7;
}

.patient-region li::marker {
  color: var(--brand-tertiary);
}

.region-asia,
.region-africa,
.region-pacific {
  grid-column: 1;
  border-left: 0;
  border-right: 6px solid var(--brand-tertiary);
}

.region-asia { grid-row: 1 / 3; }
.region-africa { grid-row: 3; }
.region-pacific { grid-row: 4; }
.region-europe { grid-column: 3; grid-row: 1; }
.region-america { grid-column: 3; grid-row: 2; }
.region-middle-east { grid-column: 3; grid-row: 3; }
.region-other { grid-column: 3; grid-row: 4; }

.region-pacific ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 64px;
}

.patient-additional {
  padding: 0 0 16px;
}

.patient-additional-title {
  margin: 0 0 16px;
  font-size: 28px;
  line-height: 36px;
  text-align: center;
}

.patient-risk-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 32px;
  margin: 0;
  padding: 0;
  color: var(--black);
  text-align: center;
  list-style: none;
}

.patient-risk-list img {
  display: block;
  width: 135px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 16px;
}

.patient-early-testing,
.patient-resource {
  margin-top: 56px;
  padding-top: 56px;
  border-top: 1px solid #d1c4e5;
}

.patient-early-testing-title,
.patient-resource-title {
  margin: 0;
  font-size: 28px;
  line-height: 36px;
}

.patient-resource-title {
  color: var(--brand-secondary);
}

.patient-resource p {
  margin: 8px 0 0;
  font-weight: 700;
}

.screening-steps ol {
  display: flex;
  list-style-type: none;
  margin: 0;
  padding: 0;
  gap: 2em;
}

.screening-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: .8rem 1rem;
  border-radius: 1em;
  background: #fff;
  color: var(--black);
  font-size: 1rem;
  line-height: 24px;
}

.patient-page .screening-steps {
  margin: 32px 0 0;
}

.patient-page .screening-steps ol {
  gap: 80px;
}

.patient-page .screening-steps li {
  flex: 1;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1.35;
}

.patient-page .screening-steps p {
  color: var(--black);
}

.patient-page .screening-steps strong {
  color: var(--brand-primary);
}

/* Main: confirmation page */
.thank-you {
  padding: 120px 0;
  margin-bottom: 16px;
}

.thank-you h2 {
  color: var(--brand-primary);
  font-size: 32px;
}

.thank-you p {
  margin-bottom: 16px;
  color: #CB177D;
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
}

.thank-you .button {
  height: 52px;
}

/* Main: registration form */
.register-section {
  padding: 56px 0;
  background: #fff;
}

.form-container {
  width: min(100% - 2rem, 58.5rem);
  margin-inline: auto;
}

.form-required::after {
  margin-left: 1px;
}

.register-heading {
  margin-bottom: 1rem;
}

.register-heading h2 {
  margin: 0 0 20px;
  font-size: 32px;
  font-weight: 700;
  line-height: 40px;
}

.register-heading > p {
  margin: 0 0 1rem;
  color: var(--brand-secondary);
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
}

.patient-page .register-heading > p {
  margin-bottom: 16px;
  color: var(--black);
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
}

.register-heading h2 {
  margin-bottom: 16px;
  color: var(--brand-secondary);
}

.required-note,
.field label span,
.consent-group legend span,
.captcha-note span {
  color: var(--brand-secondary);
}

.required-note {
  font-size: 16px;
  line-height: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px 20px;
}

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  grid-column: span 12;
}

.field-full {
  grid-column: 1 / -1;
}

.field-half,
.field-email {
  grid-column: span 6;
}

.field-third {
  grid-column: span 3;
}

.field label,
.consent-group legend {
  margin-bottom: .5em;
  color: var(--dark-gray);
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--dark-gray);
  background: #fff;
  font: inherit;
  font-size: 16px;
  line-height: 26px;
}

.field input:focus,
.field select:focus {
  border-color: var(--brand-secondary);
  box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--brand-secondary) 16%, transparent);
  outline: 0;
}

input[type="email"].error ~ .error,
input[type="text"].error ~ .error,
select.error ~ .error {
  display: none;
  margin-top: .25rem;
  color: var(--brand-secondary);
  font-size: 14px;
  line-height: 20px;
}

input[type="checkbox"].error {
  outline: 2px solid var(--brand-secondary);
}

input[type="checkbox"].error ~ label {
  color: var(--brand-secondary);
}

input[type="checkbox"].error ~ .error {
  display: none !important;
}

.consent-group {
  margin: 20px 0 0;
  padding: 0;
  border: 0;
}

.consent-group legend {
  float: none;
  width: auto;
  margin-bottom: 16px;
}

.consent-group legend a {
  color: var(--brand-secondary);
}

.check-field {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin: 0 0 16px;
  color: var(--dark-gray);
  font-size: 16px;
  line-height: 24px;
}

.check-field input {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  margin: .1rem 0 0;
  accent-color: var(--brand-secondary);
}

.check-field input:focus-visible {
  outline-offset: 2px;
}

.check-field .invalid-feedback {
  flex-basis: 100%;
}

.captcha-note {
  margin: 0 0 12px;
  color: var(--dark-gray);
  font-size: 16px;
  line-height: 24px;
}

.patient-page .captcha-note {
  margin-bottom: 16px;
}

.captcha-placeholder {
  display: flex;
  width: 318px;
  height: 83px;
  align-items: center;
  justify-content: center;
  background: #EFF0ED;
}

.patient-page .captcha-placeholder {
  max-width: 100%;
  color: var(--dark-gray);
  font-size: 16px;
}

.form-note {
  margin: 20px 0 16px;
  color: var(--dark-gray);
  font-size: 16px;
  line-height: 24px;
}

.patient-page .form-note {
  margin: 20px 0 16px;
}

.webform-button--submit.button{
  min-width: 138px;
  height: 50px;
}

span.invalid-feedback {
  display: none;
}

.form-status {
  display: none;
}

.form-status:not(:empty) {
  display: block;
  margin: .9rem 0 0;
  padding: .7rem .9rem;
  border-left: 3px solid var(--brand-tertiary);
  background: var(--brand-primary-100);
  font-weight: 600;
  line-height: 24px;
}

.form-confirmation {
  margin: 3rem auto;
}

.form-confirmation .heading {
  font-size: 32px;
  font-weight: 400;
  line-height: 1.25;
  margin: 0 auto .5rem;
}

.form-confirmation p {
  color: var(--brand-secondary);
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  margin: 2.25rem auto 3rem;
}

.form-confirmation p:last-of-type {
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  background: linear-gradient(105deg, var(--brand-primary), var(--brand-secondary));
  color: #fff;
  font-family: "Montserrat", sans-serif;
  padding-top: 0;
  padding-bottom: 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 135px;
  gap: 1rem 2rem;
}

.footer-inner .brand-logo {
  width: 132px;
}

.site-footer p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  text-wrap: nowrap;
}

.footer-links {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 0 20px;
  margin-left: auto;
}

.footer-links a {
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  text-decoration: underline;
}

.site-footer:not(:has(.site-footer__top)) .site-footer__bottom {
  border-top: none;
  margin-top: 0;
}

/* Responsive overrides follow the page structure above. */
@media (min-width: 761px) and (max-width: 1250px) {
  .patient-page .nav-links {
    gap: 2rem;
  }

  .patient-geography {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 16px;
    width: 100%;
    margin-inline: 0;
  }
}

@media (max-width: 760px) {
  .desktop-break {
    display: none;
  }

  .button-light {
    min-width: 0;
  }

  .content-container,
  .footer-inner {
    width: min(100% - 2rem, 36rem);
  }

  /* Header and hero */
  .nav-inner {
    flex-wrap: wrap;
    gap: 1rem;
    margin: 0;
    width: 100%;
  }

  .brand-logo {
    width: 80px;
  }

  .nav-action {
    flex: 0 0 100%;
    min-width: 0;
    flex-direction: row;
    order: 1;
    justify-content: center;
    gap: 1rem;
    padding: .5rem 1rem;
    background: linear-gradient(45deg, #cc177e80, #D35DA4);
  }

  .nav-action .button {
    min-width: 120px;
    padding: 0 .25rem;
    font-size: 14px;
  }

  .nav-links {
    order: 3;
    flex: 0 1 0;
    min-width: 0;
    justify-content: flex-end;
    gap: 1rem;
    margin-right: 1rem;
  }

  .nav-links a {
    font-size: 14px;
    line-height: 18px;
    text-align: center;
  }

  .site-nav {
    padding: 0;
    background: unset;
  }

  .site-nav .brand {
    order: 2;
    flex: 0 0 auto;
    margin-left: 1rem;
  }

  .hero-content {
    padding: 2.5rem 1rem 2.25rem;
  }

  .hero-intro {
    max-width: 25rem;
    margin-bottom: 1.5rem;
    font-size: 23px;
  }

  .hero-art {
    width: min(100%, 25rem);
    margin-bottom: 1.5rem;
  }

  .hero h1 {
    font-size: 30px;
    font-weight: 600;
  }

  .patient-page .nav-inner {
    width: 100%;
  }

  .patient-page .nav-action {
    gap: 16px;
    font-size: 16px;
  }

  .patient-page .nav-action > span {
    max-width: 140px;
    text-align: left;
  }

  .patient-page .button-light {
    min-width: 176px;
    min-height: 36px;
  }

  .patient-page .nav-links {
    flex-basis: 180px;
    gap: 24px;
  }

  .patient-page .nav-links a {
    font-size: 14px;
    line-height: 1.2;
  }

  .patient-page .hero-content {
    padding: 42px 16px 40px;
  }

  .patient-page .hero-intro {
    margin-bottom: 32px;
    font-size: 20px;
  }

  .patient-page .hero-art {
    margin-bottom: 24px;
  }

  .patient-page .hero h1 {
    font-size: clamp(24px, 7.2vw, 30px);
    font-weight: 700;
  }

  /* Main: detection section */
  .detection-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 62px;
  }

  .patient-detection {
    padding: 32px 0;
  }

  .patient-detection-title {
    margin: 0;
    font-size: clamp(26px, 7.6vw, 32px);
  }

  .patient-disease h3 {
    font-size: 28px;
    line-height: 36px;
  }

  .patient-facts li {
    gap: 16px;
  }

  .patient-facts li + li {
    margin-top: 20px;
  }

  .patient-test-callout {
    padding: 14px 16px;
  }

  .patient-test-callout h3 {
    margin: 0 0 14px;
    font-size: 32px;
  }

  .patient-test-callout img {
    width: 120px;
  }

  /* Main: risk factors and testing */
  .patient-risk-section {
    padding-bottom: 32px;
  }

  .patient-risk-title {
    margin-bottom: 32px;
  }

  .patient-resource p {
    line-height: 26px;
  }

  .patient-geography {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    margin: 24px 0 38px;
  }

  .patient-map {
    text-align: left;
  }

  .patient-map h3 {
    margin: 0 0 16px;
  }

  .patient-region {
    border: 0;
    border-bottom: 6px solid var(--brand-tertiary);
  }

  .patient-region h4 {
    font-size: 24px;
    margin-bottom: 8px
  }

  .patient-region ul {
    font-size: 20px;
    line-height: 1.75;
  }

  .patient-additional h3 {
    margin-bottom: 24px;
    text-align: left;
  }

  .patient-risk-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    text-align: left;
  }

  .patient-risk-list li {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .patient-risk-list img {
    width: 64px;
    flex: 0 0 64px;
    margin: 0;
  }

  .patient-risk-section p {
    /* margin: 32px 0 20px; */
    line-height: 26px;
  }

  .patient-resource {
    margin-top: 24px;
    padding-top: 20px;
  }

  .patient-early-testing {
    margin-top: 0;
    padding-top: 20px;
  }

  .patient-page .screening-steps ol {
    gap: 60px;
    flex-direction: column;
  }

  .patient-page .screening-steps img {
    width: 75px;
  }

  .patient-resource h3 {
    margin-bottom: 10px;
    font-size: 24px;
    line-height: 32px;
  }

  /* Main: registration form */
  .register-section {
    padding: 2.75em 0;
  }

  .register-heading h2 {
    font-size: 32px;
    line-height: 40px;
  }

  .register-heading > p {
    font-size: 24px;
    line-height: 32px;
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .field,
  .field-half,
  .field-third,
  .field-email,
  .field-full {
    grid-column: 1 / -1;
  }

  patient-d .field label,
  .consent-group legend {
    line-height: 20px;
  }

  .field input,
  .field select {
    min-height: 44px;
    font-size: 16px;
    line-height: 24px;
  }

  .form-confirmation {
    margin: 2rem auto;
  }

  .form-confirmation .heading {
    margin-bottom: 1rem;
  }

  .form-confirmation p {
    line-height: 1.3;
    margin: 2.25rem 0 1.5rem;
  }

  /* Footer */
  .site-footer {
    min-height: 294px;
    padding: 30px 0 68px;
    gap: 20px;
  }

  .footer-links {
    gap: 20px;
    margin-left: 0;
    padding: 8px 0;
  }

  .footer-links a {
    font-size: 14px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .patient-page .footer-inner {
    width: calc(100% - 2rem);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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