/* Structure layer — shared across the retail pharmacy sites.
   Tokens only: every colour, typeface and brand asset comes from brand.css,
   which must be linked AFTER this file. Nothing site-specific belongs here. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: var(--display-tracking);
}
h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); font-weight: var(--display-weight); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: var(--display-weight); }
h3 { font-size: 1.15rem; font-weight: var(--display-weight); }
p  { margin: 0 0 1em; }
a  { color: var(--brand); }
img, video { max-width: 100%; display: block; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
section { padding: 88px 0; }
.eyebrow {
  font-family: var(--font-text);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 14px;
}
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 58ch; }

/* Inline separator drawn in CSS so no punctuation lives in a text node. */
.dot-sep > * + *::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: .72;
  margin: 0 5.5px .16em;
  vertical-align: middle;
}

/* Icons: stroked, inherit the text colour, scale with the type. */
.icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: .98rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-btn); }
.btn-primary:hover { background: var(--brand-2); box-shadow: var(--shadow-btn-hover); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-secondary:hover { background: var(--brand-soft); }
.btn:focus-visible, a:focus-visible, button:focus-visible,
input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}
.btn:active { transform: translateY(1px); }
.link-quiet { color: var(--ink-2); font-size: .95rem; text-underline-offset: 3px; }
.link-quiet:hover { color: var(--brand); }

/* ── Header ─────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.brand-link { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-link img { height: var(--logo-h); width: auto; }
.main-nav { display: flex; align-items: center; gap: 24px; }
.main-nav a {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: 6px 2px; border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: var(--brand); border-bottom-color: var(--brand); }
.header-cta { white-space: nowrap; padding: 11px 20px; }
.nav-toggle {
  display: none; background: none; border: 0; padding: 8px; cursor: pointer;
}
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }

@media (max-width: 900px) {
  .main-nav, .header-cta { display: none; }
  .nav-toggle { display: block; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .mobile-drawer {
    display: none; position: fixed; inset: var(--header-h) 0 0; z-index: 49;
    background: var(--bg); padding: 32px 24px; flex-direction: column; gap: 8px;
    overflow-y: auto;
  }
  body.nav-open .mobile-drawer { display: flex; }
  .mobile-drawer a {
    color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.25rem;
    padding: 14px 6px; border-bottom: 1px solid var(--line);
  }
  .mobile-drawer a:hover { color: var(--brand); }
  .mobile-drawer .btn { margin-top: 20px; text-align: center; }
}
@media (min-width: 901px) { .mobile-drawer { display: none !important; } }

/* ── Hero (video-first) ─────────────────────────────── */
.hero {
  position: relative; overflow: hidden; padding: 0;
  color: var(--ink);
}
/* Two brand-mark planes drift at different rates on scroll (app.js, transform only). */
.hero-plane {
  position: absolute; z-index: 0; pointer-events: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.hero-plane-far { right: -6%; bottom: -18%; width: min(52vw, 640px); aspect-ratio: 1; opacity: .09; }
.hero-plane-near { left: -3%; bottom: 4%; width: min(20vw, 244px); aspect-ratio: 1; opacity: .06; }
.hero.has-video .hero-plane { display: none; }
@media (max-width: 700px) {
  .hero-plane-far { width: 78vw; right: -22%; bottom: -12%; opacity: .07; }
  .hero-plane-near { display: none; }
}
.hero-media {
  position: absolute; inset: 0; z-index: 0; display: none;
}
.hero.has-video .hero-media { display: block; }
.hero-media video {
  width: 100%; height: 100%; object-fit: cover;
}
.hero.has-video .hero-media::after {   /* legibility scrim; gradient lives in brand.css */
  content: ""; position: absolute; inset: 0;
}
.hero .wrap { position: relative; z-index: 1; padding-top: 120px; padding-bottom: 120px; }
.hero.has-video { color: var(--on-video); }
.hero.has-video .lede { color: var(--on-video-soft); }
.hero.has-video .eyebrow { color: var(--hero-accent-on-video); }
.hero.has-video .link-quiet { color: var(--on-video-muted); }
.hero.has-video .btn-secondary { color: var(--on-video); border-color: var(--on-video); }
.hero.has-video .btn-secondary:hover { background: var(--on-video-veil); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 28px; }
.hero-tertiary { width: 100%; margin-top: 6px; }
.hero-tertiary .icon { vertical-align: -.13em; margin-left: .1em; transition: transform .15s; }
.hero-tertiary:hover .icon { transform: translateX(4px); }

/* ── Cards & grids ──────────────────────────────────── */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card:hover { border-color: var(--line-2); box-shadow: var(--shadow-float); transform: translateY(-3px); }
.card p { color: var(--ink-2); font-size: .96rem; margin: 0; }
/* One line tall (1.6em = the body line-height) so the card keeps the exact
   height it had when this was a text arrow; the square glyph is centred in it. */
.card .arrow {
  color: var(--brand); margin-top: 12px; display: block;
  width: 1.05em; height: 1.6em; stroke-width: 2;
  transition: transform .15s;
}
.card:hover .arrow { transform: translateX(4px); }

.section-cta { margin-top: 40px; text-align: center; }

/* Alternating section tint */
.tint { background: var(--surface-2); }

/* ── Steps (For patients) ───────────────────────────── */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 26px 22px 22px; background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius); }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand); color: var(--on-brand); font-weight: 800; font-family: var(--font-text);
  margin-bottom: 14px;
}
.step p { color: var(--ink-2); font-size: .95rem; margin: 0; }

/* ── Visit & forms ──────────────────────────────────── */
.visit-info { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; margin-bottom: 48px; }
@media (max-width: 800px) { .visit-info { grid-template-columns: 1fr; } }
.visit-block h3 { margin-bottom: 8px; }
.visit-block dl { margin: 0; }
.visit-block dt { font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-top: 14px; }
.visit-block dd { margin: 2px 0 0; color: var(--ink-2); }
.map-frame {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  min-height: 300px; background: var(--surface-3);
}
.map-frame iframe { width: 100%; height: 100%; min-height: 300px; border: 0; }

.forms { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 800px) { .forms { grid-template-columns: 1fr; } }
.form-card { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.form-card h3 { margin-bottom: 4px; }
.form-card .sub { color: var(--ink-2); font-size: .93rem; margin-bottom: 20px; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 16px 0 6px; }
input[type=text], input[type=tel], input[type=email], textarea, select {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
}
input:hover, textarea:hover, select:hover { border-color: var(--ink-3); }
textarea { min-height: 110px; resize: vertical; }
.form-card .btn { margin-top: 22px; width: 100%; }
.form-msg { display: none; margin-top: 16px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: .95rem; }
.form-msg.ok { background: var(--ok-bg); color: var(--ok-ink); border: 1px solid var(--ok-line); }
.form-msg.err { background: var(--err-bg); color: var(--err-ink); border: 1px solid var(--err-line); }
.form-msg.show { display: block; }
/* visibly-hidden honeypot */
.hp-field {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ── Footer ─────────────────────────────────────────── */
.site-footer { background: var(--ink); color: var(--on-ink); padding: 64px 0 0; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 48px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--on-ink-strong); font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: var(--on-ink); text-decoration: none; }
.site-footer a:hover { color: var(--on-ink-strong); text-decoration: underline; }
.footer-brand img { height: var(--footer-logo-h); margin-bottom: 14px; filter: brightness(0) invert(1); }
.footer-bar { border-top: 1px solid var(--footer-rule); padding: 20px 0; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .85rem; color: var(--on-ink-muted); }
.footer-bar a { color: var(--on-ink-muted); }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--on-ink-strong); text-decoration: underline; }

/* ── Price sheet ────────────────────────────────────── */
.ps-hero { padding: 72px 0 40px; }
.lock-card {
  max-width: 520px; margin: 0 auto; background: var(--surface-1);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow);
}
.seg { display: flex; border: 1px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; margin-top: 6px; }
.seg label { flex: 1; margin: 0; text-align: center; padding: 11px 8px; cursor: pointer; font-weight: 600; font-size: .93rem; color: var(--ink-2); background: var(--bg); }
.seg input { position: absolute; opacity: 0; }
.seg input:checked + label, .seg label:has(input:checked) { background: var(--brand); color: var(--on-brand); }
.seg input:focus-visible + label { outline: 3px solid var(--brand); outline-offset: -3px; }
.fine { font-size: .82rem; color: var(--ink-3); margin-top: 14px; }
.why { max-width: 520px; margin: 40px auto 0; }
.why .card { margin-bottom: 14px; }

.ps-toolbar { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-bottom: 24px; }
.ps-toolbar input { flex: 1; min-width: 240px; }
.ps-count { color: var(--ink-2); font-size: .93rem; white-space: nowrap; }

.acc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-1); margin-bottom: 12px; overflow: hidden; }
.acc-head {
  width: 100%; display: flex; align-items: baseline; gap: 12px; text-align: left;
  padding: 20px 24px; background: none; border: 0; cursor: pointer; font: inherit;
}
.acc-head:hover { background: var(--surface-2); }
.acc-brand { font-family: var(--font-display); font-size: 1.25rem; font-weight: var(--display-weight); color: var(--ink); }
.acc-generic { font-style: italic; color: var(--ink-3); font-size: .95rem; }
.acc-chev {
  margin-left: auto; align-self: center; color: var(--brand);
  width: 1.35rem; height: 1.35rem; stroke-width: 2.2;
  transition: transform .2s;
}
.acc.open .acc-chev { transform: rotate(180deg); }
.acc-panel { display: none; padding: 0 24px 24px; }
.acc.open .acc-panel { display: block; }

.table-scroll { overflow-x: auto; }
.ps-table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: .93rem; }
.ps-table th, .ps-table td { padding: 10px 14px; border: 1px solid var(--line); text-align: left; }
.ps-table thead th { background: var(--surface-2); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
.ps-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ps-notes { font-size: .84rem; color: var(--ink-3); margin-top: 14px; }
.ps-state { text-align: center; color: var(--ink-2); padding: 48px 0; }

/* ── Standalone note pages ──────────────────────────── */
/* Server-rendered confirmation / error pages (approve, deny, expired link,
   send failure). They load this file plus brand.css and nothing else. */
body.note-page { background: var(--surface-2); }
.note-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 24px;
}
.note-card {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 460px;
  width: 100%;
  padding: 36px;
  text-align: center;
}
.note-mark { width: 56px; height: 56px; margin: 0 auto 20px; }
.note-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: var(--display-weight); margin: 0 0 10px; }
.note-card.note-ok .note-title { color: var(--ok-ink); }
.note-card.note-err .note-title { color: var(--brand-2); }
.note-body { color: var(--ink-2); margin: 0; }
.note-body + .note-body { margin-top: .8em; }
.note-foot { color: var(--ink-3); font-size: .84rem; margin-top: 24px; }
.note-card .btn { margin-top: 24px; }

/* ── Scroll reveals (transform/opacity only) ────────── */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(22px); }
  .reveal.in {
    opacity: 1; transform: none;
    transition: opacity .65s ease, transform .65s cubic-bezier(.16, 1, .3, 1);
    transition-delay: var(--reveal-delay, 0s);
  }
}
