/*
 * For Pharmacies — page sheet (owned by the for-pharmacies agent ONLY).
 * 1:1 port of design-import/Pharmacies.dc.html on top of the tokens and
 * primitives in assets/css/design/base.css. Loaded after base.css by slug.
 *
 * Modules: hero / branded portal / NPI-first onboarding / catalog control /
 * intake queues / reports / we-onboard-for-you dark CTA + demo form.
 */

/* ── 0 · Scroll-driven entrance (design: section > div fadeUp) ─────────── */
/* ── 1 · Shared page scaffolding ───────────────────────────────────────── */
.phx-rail {
  max-width: 1000px;
  margin: 0 auto;
}

.phx-band {
  padding: 88px 24px;
}

.phx-band--white {
  background: #fff;
  border-top: 1px solid var(--d-line);
}

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

.phx-lede {
  color: var(--d-body);
  font-size: 16px;
  margin: 12px auto 0;
}

.phx-lede--540 { max-width: 540px; }
.phx-lede--500 { max-width: 500px; }

/* 2-col module headline (clamp 26-34) and the intake variant (22-28). */
.phx-section .phx-h2 {
  font-size: clamp(26px, 3vw, 34px);
  margin: 12px 0 0;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.phx-section .phx-h2--intake {
  font-size: clamp(22px, 2.4vw, 28px);
}

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

/* Check list rows. */
.phx-checks {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.phx-checks li {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

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

/* Two-column module grid (copy + frame). */
.phx-grid {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 48px;
  align-items: center;
}

.phx-grid--flip {
  grid-template-columns: 440px 1fr;
}

/* Nowrap lines release ≤768px (design media query). */
.phx-nowrap { white-space: nowrap; }

/* ── 2 · Hero ──────────────────────────────────────────────────────────── */
/* Background: the white → var(--c-sand) blend already painted by base.css on the
   page body, so the glass header melts into the hero exactly as designed. */
.phx-hero {
  padding: 72px 24px 48px;
  text-align: center;
}

.phx-hero__copy {
  max-width: 800px;
  margin: 0 auto;
}

.phx-hero .phx-hero__title {
  font-size: clamp(28px, 3.8vw, 42px);
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.025em;
  font-weight: 800;
}

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

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

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

/* This page's hero CTAs are 15px in the source (base defaults to 15.5px). */
.phx-hero .d-btn--lg,
.phx-hero .d-btn--ghost {
  font-size: 15px;
}

.phx-hero__frame {
  max-width: 920px;
  margin: 52px auto 0;
}

/* ── 3 · Product-media frames restyled to the design's browser chrome ──── */
.phx-frame .product-window {
  border-radius: 16px;
  border: 1px solid var(--d-frame-border);
  background: var(--d-frame-bg);
  box-shadow: 0 16px 48px rgba(23, 37, 31, .08);
}

.phx-frame--hero .product-window,
.phx-frame--wide .product-window {
  background: #fff;
}

.phx-frame--hero .product-window {
  box-shadow: 0 24px 70px rgba(23, 37, 31, .1);
}

.phx-frame .product-window__bar {
  min-height: 0;
  justify-content: flex-start;
  gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--d-line-soft);
  background: #fff;
}

.phx-frame--hero .product-window__bar,
.phx-frame--wide .product-window__bar {
  background: var(--d-frame-bg);
}

.phx-frame--hero .product-window__bar {
  padding: 11px 16px;
}

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

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

/* Chrome label rendered as the design's address chip. */
.phx-frame .product-media__title {
  flex: 0 0 auto;
  margin-left: 8px;
  font-size: 11.5px;
  color: var(--d-muted-alt);
  background: var(--d-chip-bg);
  border-radius: 6px;
  padding: 3px 12px;
}

.phx-frame--hero .product-media__title {
  margin-left: 10px;
  font-size: 12px;
  padding: 3px 14px;
}

.phx-frame .product-media__stage {
  background: transparent;
}

.phx-frame--wide {
  margin-top: 24px;
}

/* ── 4 · Onboarding step cards ─────────────────────────────────────────── */
.phx-steps {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.phx-step {
  background: #fff;
  border: 1px solid var(--d-line);
  border-radius: 14px;
  padding: 26px;
  transition: transform .25s ease, box-shadow .25s ease;
}

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

.phx-section .phx-cardtitle {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: normal;
  margin: 0;
  color: var(--d-ink);
}

.phx-step .phx-cardtitle {
  margin-top: 14px;
}

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

/* ── 5 · Report cards ──────────────────────────────────────────────────── */
.phx-reports {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

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

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

.phx-tile {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--d-tile);
  color: var(--d-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

/* ── 6 · Dark we-onboard-for-you band + demo form ──────────────────────── */
/* Design: section padding 88px 24px 0 with the footer rail 72px below; the
   global footer band follows on the same deep green, so 72px bottom padding
   reproduces the composition exactly. */
.phx-cta {
  background: var(--d-deep);
  color: #fff;
  padding: 88px 24px 72px;
}

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

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

.phx-cta .phx-cta__title em {
  color: var(--d-accent-soft);
  font-style: normal;
}

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

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

.phx-cta .phx-democard__title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: normal;
  margin: 0;
  color: var(--d-ink);
}

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

.phx-democard .form-status {
  margin: 0 0 14px;
}

.phx-demoform__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.phx-field {
  margin: 0;
}

.phx-field 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);
}

.phx-field input:focus-visible {
  border-color: var(--d-green);
  outline: 2px solid var(--d-green);
  outline-offset: 1px;
}

.phx-demoform__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;
}

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

/* Sending state (theme.js disables the button on submit): the design's
   post-submit green. */
.phx-demoform__submit[disabled] {
  background: var(--d-accent);
  cursor: default;
}

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

/* ── 7 · Responsive (WORK-SUMMARY.md breakpoints) ──────────────────────── */
@media (min-width: 1600px) {
  .phx-rail {
    max-width: 1160px;
  }

  .phx-hero__frame {
    max-width: 1040px;
  }
}

@media (max-width: 900px) {
  .phx-grid,
  .phx-grid--flip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .phx-nowrap {
    white-space: normal !important;
  }
}

@media (max-width: 560px) {
  .phx-demoform__grid {
    grid-template-columns: 1fr;
  }
}

/* ── 8 · Motion safety ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .phx-step,
  .phx-report,
  .phx-demoform__submit {
    transition: none;
  }

  .phx-step:hover,
  .phx-report: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. */
.phx-frame .product-media__stage {
  aspect-ratio: 16 / 9;
}

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