/*
 * For Prescribers page sheet — owned by the for-prescribers page agent.
 * Source of truth: design-import/Prescribers.dc.html (7 modules), tokens
 * from assets/css/design/base.css. Loaded after base.css by functions.php.
 */

/* ── Scroll-linked fade-up (design: section > div view() timeline) ─────── */
/* ── Section scaffolding ───────────────────────────────────────────────── */
.pre-section {
  padding: 88px 24px;
}

.pre-rail {
  max-width: 1000px;
  margin: 0 auto;
}

/* White bands with a hairline top rule (flow, price, education). */
.pre-flow,
.pre-price,
.pre-edu {
  background: #fff;
  border-top: 1px solid var(--d-line);
}

/* Centered section head (flow, tracking). */
.pre-section-head {
  text-align: center;
}

.pre-section-head h2 {
  font-size: clamp(28px, 3.4vw, 38px);
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.pre-section-head__lede {
  color: var(--d-body);
  font-size: 16px;
  margin: 12px auto 0;
  max-width: 520px;
}

.pre-section-head__lede b {
  font-weight: 700;
  color: var(--d-ink);
}

/* ── 1 · Hero ──────────────────────────────────────────────────────────── */
.pre-hero {
  padding: 72px 24px 48px;
  text-align: center;
}

.pre-hero__copy {
  max-width: 780px;
  margin: 0 auto;
}

.pre-badge {
  display: inline-block;
  border: 1px solid var(--d-input-border);
  background: #fff;
  border-radius: 99px;
  padding: 6px 15px;
  font-size: 13px;
  font-weight: 700;
  color: var(--d-green);
}

.pre-hero h1 {
  font-size: clamp(32px, 4.4vw, 50px);
  line-height: 1.08;
  margin: 22px 0 0;
  letter-spacing: -0.025em;
  font-weight: 800;
}

.pre-hero__lead {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--d-body);
  max-width: 560px;
  margin: 18px auto 0;
  text-wrap: balance;
}

.pre-hero__lead b {
  font-weight: 700;
  color: var(--d-ink);
}

.pre-hero__ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* Design CTA size on this page: 15px (base --lg is 15.5px). */
.pre-hero__ctas .d-btn--lg,
.pre-hero__ctas .d-btn--ghost {
  font-size: 15px;
}

.pre-hero__media {
  max-width: 920px;
  margin: 52px auto 0;
  text-align: left;
}

/* ── Browser-frame chrome (product-media rendered to the design frame) ─── */
.pre-frame .product-window {
  border-radius: 16px;
  border: 1px solid var(--d-frame-border);
  background: #fff;
  box-shadow: 0 16px 48px rgba(23, 37, 31, .08);
}

.pre-frame--hero .product-window {
  box-shadow: var(--d-shadow-frame-lg);
}

.pre-frame .product-window__bar {
  justify-content: flex-start;
  min-height: 0;
  gap: 7px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--d-line-soft);
  background: var(--d-frame-bg);
  font-family: var(--d-font);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}

.pre-frame .product-window__dots {
  gap: 7px;
}

.pre-frame .product-window__dots span {
  width: 9px;
  height: 9px;
  background: var(--d-frame-dot);
}

.pre-frame .product-media__title {
  flex: none;
  min-width: 0;
  margin-left: 10px;
  font-size: 12px;
  color: var(--d-muted-alt);
  background: var(--d-chip-bg);
  border-radius: 6px;
  padding: 3px 14px;
}

.pre-frame .product-media__stage {
  background: #fff;
}

/* Small frames beside copy (favorites, price). */
.pre-frame--sm .product-window__bar {
  padding: 10px 14px;
}

.pre-frame--sm .product-media__title {
  margin-left: 8px;
  font-size: 11.5px;
  padding: 3px 12px;
}

/* Price frame inverts the surfaces: warm body, white bar. */
.pre-frame--invert .product-window {
  background: var(--d-frame-bg);
}

.pre-frame--invert .product-window__bar {
  background: #fff;
}

.pre-frame--invert .product-media__stage {
  background: var(--d-frame-bg);
}

/* ── 2 · 30-second flow ────────────────────────────────────────────────── */
.pre-flow__grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.pre-flow__card {
  background: var(--d-bg);
  border: 1px solid var(--d-line-soft);
  border-radius: 14px;
  padding: 24px;
  transition: transform .25s ease, box-shadow .25s ease;
}

.pre-flow__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(23, 37, 31, .08);
}

.pre-flow__card .d-stepnum {
  display: inline-flex;
}

.pre-flow__card h3 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: normal;
  margin: 14px 0 0;
}

.pre-flow__card p {
  font-size: 14px;
  color: var(--d-body);
  line-height: 1.55;
  margin: 7px 0 0;
}

/* ── Shared split layout (favorites, price, education) ─────────────────── */
.pre-split {
  display: grid;
  gap: 48px;
  align-items: center;
}

.pre-split--media-right {
  grid-template-columns: 1fr 440px;
}

.pre-split--media-left {
  grid-template-columns: 440px 1fr;
}

.pre-split--even {
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.pre-split h2 {
  font-size: clamp(26px, 3vw, 34px);
  margin: 12px 0 0;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.pre-split .d-eyebrow {
  margin: 0;
}

.pre-split__lead {
  font-size: 15.5px;
  color: var(--d-body);
  line-height: 1.65;
  margin: 16px 0 0;
  max-width: 460px;
}

.pre-checks {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pre-checks__row {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.pre-checks__row > span:last-child {
  font-size: 14.5px;
  color: var(--d-body-strong);
}

.pre-split__media {
  min-width: 0;
}

/* ── 5 · Tracking to the door ──────────────────────────────────────────── */
.pre-track__card {
  margin-top: 40px;
  background:
    linear-gradient(180deg, rgba(236, 243, 238, .7) 0, rgba(255, 255, 255, 0) 112px),
    #fff;
  border: 1px solid var(--d-line);
  border-radius: 18px;
  padding: 36px 32px 30px;
  box-shadow: 0 16px 44px rgba(23, 37, 31, .06);
}

.pre-track__stages {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  counter-reset: track-stage;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.pre-track__stages::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, var(--d-green), var(--d-accent));
}

.pre-track__stage {
  counter-increment: track-stage;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 10px 8px;
  position: relative;
}

.pre-track__dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--d-green);
  border: 5px solid var(--d-tile);
  display: grid;
  place-items: center;
  box-sizing: border-box;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  position: relative;
  z-index: 1;
}

.pre-track__dot::after {
  content: counter(track-stage);
}

.pre-track__dot--final {
  background: var(--d-accent);
  border-color: var(--d-tile);
  box-shadow: 0 0 0 5px rgba(47, 138, 107, .12);
}

.pre-track__label {
  font-size: 15px;
  font-weight: 800;
  margin-top: 14px;
}

.pre-track__sub {
  font-size: 13px;
  color: var(--d-body);
  line-height: 1.45;
  margin-top: 5px;
}

.pre-track__footer {
  margin-top: 28px;
  border-top: 1px solid var(--d-line-soft);
  padding-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  font-size: 13.5px;
  color: var(--d-body);
}

.pre-track__footer > span {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  min-height: 54px;
  padding: 14px;
  border-radius: 12px;
  background: var(--d-bg);
}

.pre-track__media {
  max-width: 920px;
  margin: 32px auto 0;
}

.pre-frame--track .product-window {
  box-shadow: var(--d-shadow-frame-lg);
}

/* ── 6 · Education teaser ──────────────────────────────────────────────── */
.pre-edu__fineprint {
  font-size: 13.5px;
  color: var(--d-muted);
  margin: 14px 0 0;
}

.pre-edu__card {
  background: var(--d-bg);
  border: 1px solid var(--d-line);
  border-radius: 16px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pre-edu__row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.pre-edu__tile {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--d-tile);
  color: var(--d-green);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pre-edu__title {
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: normal;
  margin: 0;
}

.pre-edu__body {
  font-size: 13.5px;
  color: var(--d-body);
  margin: 3px 0 0;
  line-height: 1.5;
}

/* ── 7 · Free forever + invite CTA (dark, blends into the footer) ──────── */
.pre-invite {
  background: var(--d-deep);
  color: #fff;
  /* Design: 88px top, footer joins below; 72px matches the .dc footer gap. */
  padding: 88px 24px 72px;
}

.pre-invite__rail {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.pre-invite__badge {
  display: inline-block;
  background: var(--d-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: 99px;
  padding: 6px 14px;
}

.pre-invite h2 {
  font-size: clamp(30px, 3.8vw, 44px);
  margin: 18px 0 0;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: #fff;
}

.pre-invite__lede {
  font-size: 16px;
  color: var(--d-dark-body);
  line-height: 1.6;
  margin: 14px auto 0;
  max-width: 460px;
}

.pre-invite__card {
  margin-top: 32px;
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  text-align: left;
  color: var(--d-ink);
}

.pre-invite__card h3 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: normal;
  margin: 0;
}

.pre-invite__cardlede {
  font-size: 13.5px;
  color: var(--d-body);
  margin: 6px 0 16px;
  line-height: 1.55;
}

.pre-invite__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pre-invite__grid input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--d-input-border);
  border-radius: 9px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14.5px;
  background: var(--d-frame-bg);
  color: var(--d-ink);
}

.pre-invite__grid input:focus-visible {
  outline: 2px solid var(--d-green);
  outline-offset: 1px;
}

.pre-invite__grid input::placeholder {
  color: var(--d-muted-alt);
}

.pre-invite__submit {
  width: 100%;
  margin-top: 12px;
  background: var(--d-green);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease;
}

.pre-invite__submit:hover,
.pre-invite__submit:focus-visible {
  background: var(--d-green-hover);
}

.pre-invite__submit[disabled] {
  background: var(--d-accent);
  cursor: default;
}

.pre-invite__note {
  text-align: center;
  font-size: 12px;
  color: var(--d-muted);
  margin-top: 10px;
}

/* The dark card status notices sit inside the white card: keep them tight. */
.pre-invite__card .form-status {
  margin: 0 0 16px;
}

/* ── Responsive (WORK-SUMMARY.md: 2-col ≤900, form grid ≤560) ──────────── */
@media (min-width: 1600px) {
  .pre-rail {
    max-width: 1160px;
  }

  .pre-hero__media {
    max-width: 1040px;
  }
}

@media (max-width: 900px) {
  .pre-split--media-right,
  .pre-split--media-left,
  .pre-split--even {
    grid-template-columns: 1fr;
  }

  .pre-track__stages {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .pre-track__stages::before {
    top: 18px;
    bottom: 18px;
    left: 17px;
    right: auto;
    width: 2px;
    height: auto;
  }

  .pre-track__stage {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 14px;
    padding: 0;
    text-align: left;
  }

  .pre-track__dot {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .pre-track__label,
  .pre-track__sub {
    grid-column: 2;
  }

  .pre-track__label {
    margin-top: 0;
  }

  .pre-track__sub {
    margin-top: 2px;
  }

  .pre-track__footer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .pre-track__card {
    padding: 26px 20px 20px;
  }

  .pre-invite__grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pre-flow__card,
  .pre-invite__submit {
    transition: none;
  }

  .pre-flow__card:hover {
    transform: none;
  }
}

/* Annotated graphics are 1600x900 and the hero video is 1920x866. Match each
   stage to its own source, or object-fit: contain pads the difference and the
   frames letterbox. */
.pre-frame .product-media__stage {
  aspect-ratio: 16 / 9;
}

.pre-frame--hero .product-media__stage {
  aspect-ratio: 1920 / 866;
}
