/* ==========================================================================
   The Counter — Pharmacy edition, download page
   Light theme only. No gradients. Mobile-first: 360px base, 620px, 1000px.
   Tokens follow the design canvas in assets/.

   The page is header + hero + footer. There are no content sections below the
   hero, so there are no card, list or table styles here.
   ========================================================================== */

:root {
  --navy: #1B3A5C;
  --green: #256138;
  --green-dark: #1C4C2C;

  --ink: #1C2A20;        /* wordmark only */
  --text: #43474E;
  --muted: #73777F;

  --bg: #FFFFFF;
  --tint: #F2F3FA;
  --disabled-bg: #E1E2E8;

  --border: #C3C6CF;
  --border-strong: #73777F;
  --rule-soft: #B7C9AE;  /* the hairlines beside "Pharmacy" */
  --edition: #6B7A63;

  --sans: ui-sans-serif, "Segoe UI Variable Text", "Segoe UI", system-ui,
    -apple-system, Roboto, Arial, sans-serif;
  --serif: Georgia, "Source Serif 4", "Times New Roman", serif;
  --mono: ui-monospace, Consolas, "SFMono-Regular", Menlo, monospace;

  --radius: 10px;
  --wrap: 1000px;
  --gutter: 24px;
  --measure: 62ch;
}

/* --------------------------------------------------------------- reset -- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

/* The page is short, so it is a flex column: the hero takes the slack and the
   footer stays at the bottom of the viewport instead of floating mid-screen. */
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg { max-width: 100%; }

p { margin: 0 0 1em; }

h1 {
  margin: 0 0 0.4em;
  color: var(--navy);
  font-size: 2rem;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--navy); text-decoration: underline; }

/* ---------------------------------------------------------------- a11y -- */

:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  background: var(--navy);
  color: #FFFFFF;
  padding: 0.7rem 1.1rem;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* -------------------------------------------------------------- layout -- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* The small monospace label that opens the hero. */
.eyebrow {
  margin: 0 0 12px;
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
}

/* -------------------------------------------------------------- header -- */

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* The icon carries its own green plate; the radius only traces the corner
   the SVG already has (rx 224 on a 1024 box), it does not crop the art. */
.wordmark img {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.wordmark-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.wordmark-name {
  font: 600 19px/1 var(--serif);
  letter-spacing: -0.005em;
  color: var(--ink);
}

/* "Pharmacy" sits between two hairlines: a fixed one, then one that fills the
   width the name above sets. */
.wordmark-edition {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 400 10px/1 var(--mono);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--edition);
}

.wordmark-edition i {
  height: 1px;
  background: var(--rule-soft);
}

.wordmark-edition i:first-child { width: 14px; flex: 0 0 auto; }
.wordmark-edition i:last-child { flex: 1; min-width: 14px; }

.header-link {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* ---------------------------------------------------------------- hero -- */

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

/* No border-bottom: the footer sits directly below and draws the only rule
   between the two tinted bands. Two adjacent borders would read as 2px. */
.hero {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  background: var(--tint);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
  padding-top: 44px;
  padding-bottom: 40px;
}

/* No max-width here: the prose caps itself below, which lets the button row
   use the full width of the hero column so all three fit on one line. */
.hero-copy { max-width: none; }

.hero-copy h1,
.eyebrow { max-width: 34rem; }

.lead {
  margin: 0 0 8px;
  max-width: 34rem;
  font-size: 1.0625rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.hero-note {
  margin: 20px 0 0;
  max-width: var(--measure);
  font-size: 0.875rem;
  color: var(--muted);
}

/* Stacked (below 880px) the lockup leads, above the copy. The image is
   decorative and holds nothing focusable, so reordering it costs no tab or
   reading order. */
.hero-art {
  display: flex;
  order: -1;
}

/* The full lockup, not the app icon: it already carries its own dark plate
   (#1D2A20, the --ink green), so it needs no border — only the page radius. */
.hero-art img {
  display: block;
  width: clamp(200px, 28vw, 270px);
  height: auto;
  border-radius: var(--radius);
}

/* ----------------------------------------------------------- downloads -- */

.downloads {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

/* All three platforms sit on one line: the row needs ~615px and the desktop
   column gives it 634px. It wraps below that, where three buttons cannot fit
   without shrinking the labels. */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* One shared box for the two links and the disabled button so all three read
   as the same control regardless of element type. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
}

.btn-icon {
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: #FFFFFF;
  padding: 14px 16px;
  min-height: 50px;
  font-size: 14px;
}

.btn-primary .btn-icon { width: 16px; height: 16px; }

.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #FFFFFF;
  text-decoration: none;
}

.btn-secondary {
  background: var(--bg);
  border-color: var(--border-strong);
  color: var(--navy);
  padding: 14px 16px;
  min-height: 50px;
  font-size: 14px;
}

.btn-secondary .btn-icon { width: 16px; height: 16px; }

.btn-secondary:hover {
  border-color: var(--green);
  color: var(--green);
  text-decoration: none;
}

.btn-disabled {
  background: var(--disabled-bg);
  border-color: var(--border);
  color: var(--muted);
  padding: 14px 16px;
  min-height: 50px;
  font-size: 14px;
  cursor: not-allowed;
}

.btn-disabled .btn-icon { width: 16px; height: 16px; }

/* -------------------------------------------------------------- footer -- */

.site-footer {
  background: var(--tint);
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 28px;
  padding-bottom: 28px;
  font-size: 14px;
  color: var(--muted);
}

.footer-text {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

/* rosette_mono.svg is single-tone, so masking tints it green without editing
   or restyling the source file. */
.footer-mark {
  flex: 0 0 auto;
  width: 22px;
  height: 18px;
  background-color: var(--green);
  -webkit-mask: url("../assets/logo/rosette_mono.svg") no-repeat center / contain;
  mask: url("../assets/logo/rosette_mono.svg") no-repeat center / contain;
}

.footer-link {
  color: var(--text);
  font-weight: 600;
}

/* ======================================================= tablet and up === */

@media (min-width: 620px) {
  h1 { font-size: 2.5rem; }

  .hero-inner {
    padding-top: 56px;
    padding-bottom: 52px;
  }

  .lead { font-size: 1.125rem; }
}

/* ============================================================= desktop === */

/* The two-column hero starts here, not at 880px: the art is a full lockup, and
   only from 1000px is the copy column wide enough (≈634px) to keep all three
   download buttons on one line beside it. Below this the hero stacks, which
   gives the row the full page width. */
@media (min-width: 1000px) {
  h1 { font-size: 2.75rem; }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 48px;
    padding-top: 64px;
    padding-bottom: 56px;
  }

  /* Two columns: the lockup returns to the right of the copy. */
  .hero-art { order: 0; }
}
