@layer reset, base, components, overrides;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body { margin: 0; }
  img, svg { display: block; max-width: 100%; }
  button, input { font: inherit; }
}

@layer base {
  :root {
    --midnight: #101923;
    --graphite: #344250;
    --silver: #aab8c4;
    --blue: #2764d8;
    --ion: #67c7e8;
    --porcelain: #f3f7f9;
    --white: #fff;
    --line: rgba(16, 25, 35, 0.14);
    --display: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
    --body: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    --wordmark-size: 1.1rem;
    --wordmark-weight: 700;
    --wordmark-tracking: normal;
    color: var(--midnight);
    background: var(--porcelain);
    font-family: var(--body);
    font-synthesis: none;
  }

  body { background: var(--porcelain); color: var(--midnight); }
  a { color: inherit; }
  ::selection { color: var(--white); background: var(--blue); }
  :focus-visible { outline: 3px solid var(--ion); outline-offset: 4px; }

  .wrap { width: min(1240px, calc(100% - 48px)); margin-inline: auto; }
  .kicker {
    margin: 0 0 20px;
    color: var(--blue);
    font-family: var(--mono);
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    line-height: 1.4;
    text-transform: uppercase;
  }
  .skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
    padding: 12px 16px;
    color: var(--white);
    background: var(--midnight);
    border-radius: 4px;
    transform: translateY(-150%);
    transition: transform 160ms ease;
  }
  .skip-link:focus { transform: translateY(0); }
}

@layer components {
  .site-content {
    position: relative;
    z-index: 130;
    background: var(--porcelain);
    box-shadow: 0 -40px 100px rgba(16, 25, 35, 0.15);
    isolation: isolate;
  }

  .threshold {
    position: relative;
    padding: 150px 0 132px;
    overflow: hidden;
    background:
      linear-gradient(90deg, transparent 49.95%, rgba(39, 100, 216, 0.1) 50%, transparent 50.05%),
      var(--porcelain);
  }
  .threshold::after {
    content: "8";
    position: absolute;
    right: -0.04em;
    bottom: -0.38em;
    z-index: -1;
    color: rgba(39, 100, 216, 0.04);
    font: 800 clamp(340px, 48vw, 720px)/1 var(--display);
  }
  .threshold__line { position: absolute; inset: 0 auto 0 50%; width: 1px; background: rgba(39, 100, 216, 0.12); }
  .threshold__line span { position: sticky; top: 40vh; display: block; width: 5px; height: 80px; margin-left: -2px; background: var(--blue); box-shadow: 0 0 30px var(--ion); }
  .threshold__grid { display: grid; grid-template-columns: 0.75fr 2fr 1fr; align-items: start; gap: 64px; }
  .threshold h1,
  .section-head h2,
  .standard h2,
  .contact-panel h2 {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(3rem, 6vw, 6.5rem);
    font-weight: 650;
    letter-spacing: -0.055em;
    line-height: 0.96;
  }
  .threshold h1 em { color: var(--blue); font-weight: 520; }
  .lede { max-width: 58ch; margin: 36px 0 0; color: var(--graphite); font-size: clamp(1.05rem, 1.6vw, 1.35rem); line-height: 1.65; }
  .signal-list { margin: 4px 0 0; }
  .signal-list div { display: grid; grid-template-columns: 38px 1fr; gap: 14px; padding: 18px 0; border-top: 1px solid var(--line); }
  .signal-list div:last-child { border-bottom: 1px solid var(--line); }
  .signal-list dt { color: var(--blue); font: 700 0.7rem/1.5 var(--mono); }
  .signal-list dd { margin: 0; color: var(--graphite); font-size: 0.9rem; font-weight: 600; }

  .pathways { padding: 148px 0; }
  .section-head { max-width: 920px; margin-bottom: 72px; }
  .section-head h2 { font-size: clamp(2.8rem, 5vw, 5.6rem); }
  .section-head--split { display: grid; grid-template-columns: 1.35fr 0.65fr; max-width: none; align-items: end; gap: 80px; }
  .section-head--split > p { margin: 0; color: rgba(243, 247, 249, 0.64); font-size: 0.95rem; line-height: 1.7; }
  .pathway-grid { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); }
  .pathway { position: relative; min-height: 510px; padding: 48px; overflow: hidden; border-right: 1px solid var(--line); }
  .pathway:last-child { border-right: 0; }
  .pathway::after { content: ""; position: absolute; inset: auto -16% -42% auto; width: 430px; aspect-ratio: 1; border: 1px solid rgba(39, 100, 216, 0.15); border-radius: 50%; box-shadow: inset 0 0 0 34px rgba(39, 100, 216, 0.035), inset 0 0 0 68px rgba(39, 100, 216, 0.025); transition: transform 500ms ease; }
  .pathway:hover::after { transform: scale(1.08) rotate(12deg); }
  .pathway__index { color: var(--silver); font: 700 0.7rem/1 var(--mono); letter-spacing: 0.14em; }
  .pathway__icon { width: 70px; height: 70px; margin: 92px 0 32px; display: grid; place-items: center; color: var(--blue); border: 1px solid rgba(39, 100, 216, 0.28); border-radius: 50%; }
  .pathway__icon svg { width: 30px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  .pathway h3 { margin: 0; font: 650 clamp(2.2rem, 4vw, 4rem)/1 var(--display); letter-spacing: -0.04em; }
  .pathway p { position: relative; z-index: 1; max-width: 49ch; margin: 24px 0 36px; color: var(--graphite); line-height: 1.7; }
  .pathway a, .text-link { position: relative; z-index: 1; display: inline-flex; gap: 10px; align-items: center; color: var(--blue); font-size: 0.9rem; font-weight: 700; text-decoration: none; }
  .pathway a::after, .text-link::after { content: ""; position: absolute; right: 0; bottom: -7px; left: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 240ms ease; }
  .pathway a:hover::after, .text-link:hover::after { transform: scaleX(1); transform-origin: left; }

  .medications { padding: 148px 0; color: var(--porcelain); background: var(--midnight); }
  .medications .kicker { color: var(--ion); }
  .medications .section-head h2 { color: var(--white); }
  .category-rail { display: grid; grid-template-columns: repeat(5, 1fr); margin-bottom: 40px; border-top: 1px solid rgba(243, 247, 249, 0.15); border-bottom: 1px solid rgba(243, 247, 249, 0.15); }
  .category-rail a { position: relative; min-height: 280px; padding: 32px 28px; color: inherit; text-decoration: none; border-right: 1px solid rgba(243, 247, 249, 0.15); transition: background 220ms ease, color 220ms ease; }
  .category-rail a:last-child { border-right: 0; }
  .category-rail a::before { content: ""; position: absolute; inset: 0; background: linear-gradient(145deg, rgba(103, 199, 232, 0.17), transparent 60%); opacity: 0; transition: opacity 220ms ease; }
  .category-rail a:hover { color: var(--white); background: rgba(39, 100, 216, 0.12); }
  .category-rail a:hover::before { opacity: 1; }
  .category-rail span { display: block; color: var(--ion); font: 700 0.68rem/1 var(--mono); }
  .category-rail strong { position: absolute; right: 28px; bottom: 76px; left: 28px; font: 600 clamp(1.15rem, 1.6vw, 1.45rem)/1.15 var(--display); }
  .category-rail small { position: absolute; right: 28px; bottom: 28px; left: 28px; color: rgba(243, 247, 249, 0.5); line-height: 1.45; }
  .medications > .wrap > .text-link { color: var(--ion); }

  .standard { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 100px; align-items: center; padding: 160px 0; }
  .standard__visual { position: relative; min-height: 610px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, #dbe5eb, #f7fafb); }
  .standard__visual::before { content: ""; position: absolute; width: 42%; aspect-ratio: 1; background: rgba(39, 100, 216, 0.08); border-radius: 50%; filter: blur(30px); }
  .standard__visual img { position: relative; width: 150px; filter: drop-shadow(0 30px 28px rgba(16, 25, 35, 0.18)); }
  .standard__visual > span { position: absolute; right: 28px; bottom: 24px; color: var(--blue); font: 700 0.8rem/1 var(--mono); letter-spacing: 0.18em; }
  .orbit { position: absolute; border: 1px solid rgba(39, 100, 216, 0.2); border-radius: 50%; }
  .orbit--one { width: 76%; aspect-ratio: 1; }
  .orbit--two { width: 50%; aspect-ratio: 1; border-style: dashed; animation: orbit-spin 28s linear infinite; }
  .standard h2 { font-size: clamp(2.8rem, 4.8vw, 5.6rem); }
  .standard__copy > p:not(.kicker) { margin: 32px 0; color: var(--graphite); line-height: 1.75; }
  .standard__points { margin: 38px 0; border-top: 1px solid var(--line); }
  .standard__points > div { display: grid; grid-template-columns: 42px 1fr; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
  .standard__points span { color: var(--blue); font: 700 0.7rem/1.5 var(--mono); }
  .standard__points p { margin: 0; color: var(--graphite); font-size: 0.92rem; line-height: 1.6; }
  .standard__points strong { color: var(--midnight); }
  @keyframes orbit-spin { to { transform: rotate(360deg); } }

  .contact-panel { padding: 122px 0; color: var(--white); background: var(--blue); }
  .contact-panel .kicker { color: rgba(255,255,255,.68); }
  .contact-panel__inner { display: grid; grid-template-columns: 1.4fr 0.6fr; align-items: end; gap: 80px; }
  .contact-panel h2 { font-size: clamp(2.8rem, 5.2vw, 6rem); }
  .contact-panel__actions { display: flex; flex-wrap: wrap; gap: 12px; }
  .button { display: inline-flex; justify-content: center; min-width: 180px; padding: 16px 22px; border: 1px solid transparent; text-decoration: none; font-size: 0.88rem; font-weight: 700; }
  .button--light { color: var(--blue); background: var(--white); }
  .button--outline { color: var(--white); border-color: rgba(255,255,255,.45); }
  .contact-panel__actions p { flex-basis: 100%; margin: 16px 0 0; color: rgba(255,255,255,.7); font-size: 0.78rem; line-height: 1.5; }

  .site-footer { position: relative; z-index: 140; padding: 88px 0 30px; color: rgba(243,247,249,.62); background: #0b1118; }
  .site-footer__grid { display: grid; grid-template-columns: 1.4fr .7fr .7fr 1fr; gap: 64px; padding-bottom: 70px; }
  .site-footer__brand { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px; color: var(--white); text-decoration: none; }
  .site-footer__brand span { white-space: nowrap; font-family: var(--display); font-size: var(--wordmark-size); font-weight: var(--wordmark-weight); line-height: 1; letter-spacing: var(--wordmark-tracking); }
  .site-footer__logo { width: 40px; height: 58px; object-fit: contain; transform: scale(1.72); }
  .site-footer p { max-width: 44ch; font-size: .82rem; line-height: 1.7; }
  .site-footer__contact { display: grid; gap: 7px; margin-top: 18px; font-style: normal; }
  .site-footer__contact a, .site-footer__contact span { width: fit-content; color: rgba(243,247,249,.68); font-size: .78rem; line-height: 1.5; text-decoration: none; }
  .site-footer__contact a:hover { color: var(--ion); }
  .site-footer h2 { margin: 0 0 18px; color: var(--white); font: 700 .69rem/1 var(--mono); letter-spacing: .15em; text-transform: uppercase; }
  .site-footer nav { display: flex; flex-direction: column; gap: 12px; }
  .site-footer nav a { width: fit-content; color: rgba(243,247,249,.6); font-size: .82rem; text-decoration: none; }
  .site-footer nav a:hover { color: var(--ion); }
  .site-footer__notice { padding-left: 24px; border-left: 1px solid rgba(243,247,249,.14); }
  .site-footer__bottom { display: flex; justify-content: space-between; gap: 24px; padding-top: 24px; border-top: 1px solid rgba(243,247,249,.12); }
  .site-footer__bottom p { margin: 0; color: rgba(243,247,249,.35); font: 500 .66rem/1.5 var(--mono); letter-spacing: .04em; }
}

@layer overrides {
  :root, .sw-root {
    --sw-bg: #f3f7f9;
    --sw-ink: #101923;
    --sw-ink-soft: #526574;
    --sw-accent: #2764d8;
    --sw-font-display: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
    --sw-font-body: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  }
  .sw-topbar { padding-top: 22px; }
  .sw-brand { gap: 7px; }
  .sw-brand__mark {
    width: 34px;
    height: 48px;
  }
  .sw-brand__mark .sw-logo-piece { inset: -42%; width: 184%; height: 184%; }
  .sw-brand__name { display: block; color: var(--midnight); white-space: nowrap; font-family: var(--display); font-size: var(--wordmark-size); font-weight: var(--wordmark-weight); line-height: 1; letter-spacing: var(--wordmark-tracking); }
  .sw-nav { padding: 4px; border-color: rgba(16,25,35,.12); background: rgba(243,247,249,.68); box-shadow: 0 10px 30px rgba(16,25,35,.07); }
  .sw-nav__item { padding: 7px 12px; color: #526574; font: 650 .66rem/1 var(--mono); letter-spacing: .04em; }
  .sw-nav__item.is-active { color: var(--white); background: var(--midnight); }
  .sw-topcta { color: var(--midnight); background: transparent; border: 1px solid rgba(16,25,35,.3); border-radius: 2px; font-size: .76rem; }
  .sw-copylayer::before { width: min(60vw, 850px); background: linear-gradient(90deg, rgba(243,247,249,.98) 0%, rgba(243,247,249,.9) 38%, rgba(243,247,249,.45) 66%, transparent 100%); }
  .sw-copy { width: min(39vw, 500px); }
  .sw-copy__num { color: #7a8b98; font-size: .66rem; }
  .sw-copy__eyebrow { margin-top: 16px; font-family: var(--mono); font-size: .69rem; letter-spacing: .19em; }
  .sw-copy__title { max-width: 10ch; font-size: clamp(2.7rem, 5.2vw, 5.9rem); font-weight: 620; letter-spacing: -.055em; line-height: .94; }
  .sw-copy__body { max-width: 38ch; font-size: clamp(.97rem, 1.15vw, 1.1rem); line-height: 1.65; }
  .sw-copy__tags { gap: 6px; }
  .sw-copy__tags li { padding: 7px 11px; color: var(--midnight); background: rgba(243,247,249,.74); border-color: rgba(39,100,216,.22); border-radius: 2px; font: 650 .66rem/1 var(--mono); }
  .sw-btn { border-radius: 2px; font-size: .82rem; }
  .sw-btn--primary { background: var(--blue); }
  .sw-btn--ghost { background: rgba(243,247,249,.66); }
  .sw-route__label { border-radius: 2px; font-family: var(--mono); font-size: .64rem; }
  .sw-scrollbar { height: 2px; }
  .sw-hint { font-family: var(--mono); font-size: .63rem; }
  .sw-hint i { width: 18px; height: 29px; }
  .sw-root .sw-stage,
  .sw-root .sw-copylayer,
  .sw-root .sw-topbar,
  .sw-root .sw-route,
  .sw-root .sw-hint,
  .sw-root .sw-scrollbar,
  .sw-root .sw-sky { transition: opacity 420ms ease, transform 420ms ease; }
  .sw-root.sw-is-past .sw-stage,
  .sw-root.sw-is-past .sw-copylayer,
  .sw-root.sw-is-past .sw-route,
  .sw-root.sw-is-past .sw-hint,
  .sw-root.sw-is-past .sw-scrollbar,
  .sw-root.sw-is-past .sw-sky { opacity: 0 !important; pointer-events: none; }
  .sw-root.sw-is-past .sw-topbar { opacity: 0; transform: translateY(-24px); pointer-events: none; }
}

@media (max-width: 1050px) {
  .threshold__grid { grid-template-columns: 1fr 2.2fr; }
  .threshold__grid .signal-list { grid-column: 2; }
  .category-rail { grid-template-columns: repeat(3, 1fr); }
  .category-rail a:nth-child(3) { border-right: 0; }
  .category-rail a:nth-child(n+4) { border-top: 1px solid rgba(243,247,249,.15); }
  .standard { gap: 56px; }
  .site-footer__grid { grid-template-columns: 1.25fr .7fr .7fr; }
  .site-footer__notice { grid-column: 1 / -1; padding: 24px 0 0; border-top: 1px solid rgba(243,247,249,.14); border-left: 0; }
}

@media (max-width: 760px) {
  .wrap { width: min(100% - 32px, 620px); }
  .threshold, .pathways, .medications, .standard { padding-top: 96px; padding-bottom: 96px; }
  .threshold__line { display: none; }
  .threshold__grid { grid-template-columns: 1fr; gap: 28px; }
  .threshold__grid .signal-list { grid-column: auto; margin-top: 30px; }
  .threshold h1, .section-head h2, .standard h2, .contact-panel h2 { line-height: 1; }
  .section-head, .section-head--split { display: block; margin-bottom: 46px; }
  .section-head--split > p { margin-top: 28px; }
  .pathway-grid { grid-template-columns: 1fr; }
  .pathway { min-height: 430px; padding: 32px 26px; border-right: 0; border-bottom: 1px solid var(--line); }
  .pathway:last-child { border-bottom: 0; }
  .pathway__icon { margin-top: 72px; }
  .category-rail { grid-template-columns: 1fr; }
  .category-rail a { min-height: 180px; border-right: 0; border-top: 1px solid rgba(243,247,249,.15); }
  .category-rail a:first-child { border-top: 0; }
  .standard { grid-template-columns: 1fr; }
  .standard__visual { min-height: 440px; }
  .contact-panel { padding: 88px 0; }
  .contact-panel__inner { grid-template-columns: 1fr; gap: 48px; }
  .contact-panel__actions { align-items: stretch; }
  .button { flex: 1 1 100%; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 46px 28px; }
  .site-footer__grid > div:first-child, .site-footer__notice { grid-column: 1 / -1; }
  .site-footer__bottom { flex-direction: column; }
}

@media (max-width: 860px) {
  .sw-topbar { padding: 16px; }
  .sw-topcta { display: none; }
  .sw-copy { bottom: calc(clamp(52px, 10dvh, 94px) + env(safe-area-inset-bottom)); }
  .sw-copylayer::before { height: 74%; background: linear-gradient(0deg, rgba(243,247,249,.98) 12%, rgba(243,247,249,.82) 54%, transparent 100%); }
  .sw-copy__title { font-size: clamp(2.25rem, 10vw, 3.4rem); }
  .sw-copy__body { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
  .sw-copy__tags { display: none; }
}

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