/* ExpressMeds — expressmeds.ca
   Layout: a bottle-green "dispatch" band (header, hero, order panel) and a matching
   contact band bookend a quiet mineral page. Content runs in a 1200px wrap.
   Type: Archivo (variable wght + wdth) widened for display, normal width for text;
   Geist Mono for labels and data, the way a shipping manifest reads. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 100% 125%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f3f6f4;
  --surface: #ffffff;
  --ink: #0d1a17;
  --muted: #4d5d57;
  --line: #d3ddd9;
  --accent: #0b6e59;

  --brand: #0f3d35;
  --brand-raised: #134a40;
  --brand-line: #2a5a50;
  --on-brand: #eaf3ef;
  --on-brand-muted: #a7c3b9;
  --mint: #8fe3c8;
  --mint-hover: #aaecd7;
  --mint-ink: #06231c;
  --shadow: rgb(3 20 16 / 0.45);
  --footer-mark-tile: #0f3d35;
  --footer-mark-glyph: #8fe3c8;

  --font-sans: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --text-h3: 1.125rem;
  --text-h2: clamp(1.75rem, 1.2rem + 2.1vw, 2.75rem);
  --text-h1: clamp(2.25rem, 1.3rem + 3.3vw, 3.875rem);

  --gutter: clamp(1.25rem, 5vw, 3rem);
  --radius: 14px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09110f;
    --surface: #0f1a17;
    --ink: #e4eeea;
    --muted: #94a6a0;
    --line: #20302b;
    --accent: #6fd3b4;
    --brand: #0e2a24;
    --brand-raised: #12352e;
    --brand-line: #234740;
    --on-brand: #e4eeea;
    --on-brand-muted: #9db9af;
    --shadow: rgb(0 0 0 / 0.55);
    --footer-mark-tile: #8fe3c8;
    --footer-mark-glyph: #0e2a24;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #09110f;
  --surface: #0f1a17;
  --ink: #e4eeea;
  --muted: #94a6a0;
  --line: #20302b;
  --accent: #6fd3b4;
  --brand: #0e2a24;
  --brand-raised: #12352e;
  --brand-line: #234740;
  --on-brand: #e4eeea;
  --on-brand-muted: #9db9af;
  --shadow: rgb(0 0 0 / 0.55);
  --footer-mark-tile: #8fe3c8;
  --footer-mark-glyph: #0e2a24;
  color-scheme: dark;
}

/* Base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  accent-color: var(--accent);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-size-adjust: from-font;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p,
ol,
ul,
dl,
dd,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

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

a {
  color: inherit;
}

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

.band :focus-visible {
  outline-color: var(--mint);
}

::selection {
  background: var(--mint);
  color: var(--mint-ink);
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.skip-link {
  position: absolute;
  left: max(1rem, env(safe-area-inset-left, 0px));
  top: 0.75rem;
  z-index: 20;
  padding: 0.5rem 0.875rem;
  border-radius: 6px;
  background: var(--mint);
  color: var(--mint-ink);
  font-weight: 600;
  text-decoration: none;
  translate: 0 -200%;
}

.skip-link:focus {
  translate: 0 0;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.band .eyebrow {
  color: var(--on-brand-muted);
}

/* Brand bands */

.band {
  background: var(--brand);
  color: var(--on-brand);
}

/* Header */

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-block: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--on-brand);
  font-size: 1.1875rem;
  font-weight: 650;
  font-stretch: 112%;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.mark {
  width: 30px;
  height: 30px;
  flex: none;
}

.mark-tile {
  fill: var(--mint);
}

.mark-glyph {
  fill: var(--brand);
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  gap: 1.75rem;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--on-brand-muted);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--on-brand);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8125rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-arrow {
  transition: translate 0.2s ease;
}

.btn:hover .btn-arrow {
  translate: 3px 0;
}

.btn--mint {
  background: var(--mint);
  color: var(--mint-ink);
}

.btn--mint:hover {
  background: var(--mint-hover);
}

.btn--outline {
  border-color: var(--brand-line);
  color: var(--on-brand);
  padding: 0.5625rem 1rem;
}

.btn--outline:hover {
  border-color: var(--on-brand-muted);
}

/* Hero */

.hero {
  padding-block: clamp(2.5rem, 7vw, 6rem) clamp(3.5rem, 8vw, 6.5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
}

.hero-copy {
  display: grid;
  justify-items: start;
  min-width: 0;
}

.hero h1 {
  margin-top: 1.25rem;
  font-size: var(--text-h1);
  font-weight: 620;
  font-stretch: 116%;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.hero h1 em {
  font-style: normal;
  color: var(--mint);
}

.lead {
  max-width: 34em;
  margin-top: 1.5rem;
  color: var(--on-brand-muted);
  font-size: var(--text-lg);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2.25rem;
}

.text-link {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  text-decoration: underline;
  text-decoration-color: var(--brand-line);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: text-decoration-color 0.2s ease;
}

.text-link:hover {
  text-decoration-color: currentColor;
}

.credential {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--brand-line);
  color: var(--on-brand-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
}

/* Order panel (illustration of the partner portal) */

.panel {
  min-width: 0;
  padding: 1.5rem;
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
  background: var(--brand-raised);
  box-shadow: 0 40px 80px -40px var(--shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
}

.panel-title {
  color: var(--on-brand-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
}

.panel-meta > div {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: 0.625rem;
  border-top: 1px solid var(--brand-line);
  font-size: var(--text-sm);
}

.panel-meta dt {
  color: var(--on-brand-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.85;
}

.steps {
  display: grid;
  margin-top: 0.5rem;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--brand-line);
  list-style: none;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.875rem;
  padding-block: 0.5rem;
  font-size: var(--text-sm);
}

/* connector between nodes */
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: calc(0.625rem - 1px);
  top: calc(50% + 0.625rem);
  height: calc(100% - 1.25rem);
  width: 2px;
  background: var(--brand-line);
}

.step--done:not(:last-child)::before {
  background: var(--mint);
}

.node {
  position: relative;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--brand-line);
  border-radius: 50%;
}

.step--done .node {
  border-color: var(--mint);
  background: var(--mint);
}

/* check mark */
.step--done .node::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 45%;
  width: 0.3rem;
  height: 0.55rem;
  border: solid var(--mint-ink);
  border-width: 0 2px 2px 0;
  translate: -50% -50%;
  rotate: 45deg;
}

.step--current .node {
  border-color: var(--mint);
}

.step--current .node::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--mint);
}

.step-state {
  color: var(--on-brand-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.step--current .step-state {
  color: var(--mint);
}

.panel figcaption {
  margin-top: 1.25rem;
  color: var(--on-brand-muted);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
}

/* Sections */

.section {
  padding-block: clamp(4rem, 10vw, 7.5rem);
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: end;
  gap: 1.5rem clamp(2rem, 6vw, 5rem);
}

.section h2 {
  margin-top: 0.875rem;
  font-size: var(--text-h2);
  font-weight: 600;
  font-stretch: 112%;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.intro {
  max-width: 34em;
  color: var(--muted);
  font-size: var(--text-lg);
}

/* Network */

.specialties {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  list-style: none;
}

.specialty {
  display: grid;
  align-content: start;
  gap: 0.625rem;
  min-width: 0;
  padding: clamp(1.5rem, 2.5vw, 2rem);
  background: var(--surface);
}

.icon {
  width: 28px;
  height: 28px;
  margin-bottom: 0.75rem;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.specialty h3,
.capability h3,
.flow h3 {
  font-size: var(--text-h3);
  font-weight: 600;
  font-stretch: 108%;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.specialty p,
.capability p,
.flow p {
  color: var(--muted);
  font-size: var(--text-sm);
}

.temp {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.specialty .temp {
  color: var(--ink);
}

/* Technology */

.tech-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 2.5rem clamp(2rem, 6vw, 5rem);
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.capabilities {
  display: grid;
  align-content: start;
  padding: 0;
  list-style: none;
}

.capability {
  display: grid;
  gap: 0.375rem;
  padding-block: 1.375rem;
  border-top: 1px solid var(--line);
}

.capability:last-child {
  border-bottom: 1px solid var(--line);
}

.flow {
  min-width: 0;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.flow-title {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flow ol {
  display: grid;
  gap: 0;
  margin-top: 1.5rem;
  padding: 0;
  list-style: none;
  counter-reset: flow;
}

.flow li {
  position: relative;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 0.25rem 1rem;
  padding-bottom: 1.5rem;
  counter-increment: flow;
}

.flow li:last-child {
  padding-bottom: 0;
}

.flow li::before {
  content: counter(flow);
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  grid-row: span 2;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
}

.flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(1.25rem - 0.5px);
  top: 2.5rem;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.flow h3 {
  padding-top: 0.5rem;
}

/* Leadership */

.leader {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: start;
  gap: 2rem clamp(2rem, 6vw, 5rem);
}

.years {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.years-num {
  color: var(--accent);
  font-size: clamp(5rem, 3rem + 9vw, 9.5rem);
  font-weight: 600;
  font-stretch: 125%;
  line-height: 0.85;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.years-label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.statement {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  font-weight: 500;
  font-stretch: 108%;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.leader-body p + p {
  margin-top: 1.25rem;
}

.leader-body .support {
  max-width: 34em;
  color: var(--muted);
  font-size: var(--text-lg);
}

/* Contact */

.contact {
  padding-block: clamp(4rem, 9vw, 6.5rem);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 2rem clamp(2rem, 6vw, 5rem);
}

.contact h2 {
  margin-top: 0.875rem;
  font-size: var(--text-h2);
  font-weight: 600;
  font-stretch: 112%;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.contact-copy p:not(.eyebrow) {
  max-width: 32em;
  margin-top: 1.25rem;
  color: var(--on-brand-muted);
  font-size: var(--text-lg);
}

.contact-action {
  display: grid;
  justify-items: start;
  gap: 1.5rem;
}

.email-xl {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: clamp(1.5rem, 1rem + 2.2vw, 2.5rem);
  font-weight: 560;
  font-stretch: 112%;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-decoration: underline;
  text-decoration-color: var(--brand-line);
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
  transition: text-decoration-color 0.2s ease;
}

.email-xl:hover {
  text-decoration-color: var(--mint);
}

/* Footer */

.site-footer {
  padding-block: 2.5rem 3rem;
  color: var(--muted);
  font-size: var(--text-xs);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 650;
  font-stretch: 112%;
  text-decoration: none;
}

.footer-brand .mark {
  width: 22px;
  height: 22px;
}

.footer-brand .mark-tile {
  fill: var(--footer-mark-tile);
}

.footer-brand .mark-glyph {
  fill: var(--footer-mark-glyph);
}

.footer-notes {
  display: grid;
  gap: 0.5rem;
  max-width: 62em;
  padding-top: 1.5rem;
  line-height: 1.6;
}

/* 404 */

.notfound {
  padding-block: clamp(4rem, 12vw, 8rem);
}

.notfound h1 {
  margin-top: 1rem;
  font-size: var(--text-h2);
  font-weight: 600;
  font-stretch: 112%;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.notfound p:not(.eyebrow) {
  max-width: 32em;
  margin-top: 1rem;
  color: var(--on-brand-muted);
  font-size: var(--text-lg);
}

.notfound .actions {
  margin-top: 2rem;
}

/* Responsive */

@media (max-width: 960px) {
  .hero-grid,
  .section-head,
  .tech-grid,
  .leader,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .panel {
    max-width: 30rem;
  }

  .specialties {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-nav {
    display: none;
  }

  .site-header .btn {
    margin-left: auto;
  }
}

@media (max-width: 560px) {
  .specialties {
    grid-template-columns: minmax(0, 1fr);
  }

  .panel-meta > div {
    grid-template-columns: 5.5rem minmax(0, 1fr);
  }
}

/* Motion: one load sequence in the hero. The page is complete without it. */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .hero-copy > * {
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .hero-copy > :nth-child(2) {
    animation-delay: 0.06s;
  }

  .hero-copy > :nth-child(3) {
    animation-delay: 0.12s;
  }

  .hero-copy > :nth-child(4) {
    animation-delay: 0.18s;
  }

  .hero-copy > :nth-child(5) {
    animation-delay: 0.24s;
  }

  .panel {
    animation: rise 0.8s 0.15s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .step .node {
    animation: tick 0.45s cubic-bezier(0.3, 1.4, 0.5, 1) both;
  }

  .step:nth-child(1) .node {
    animation-delay: 0.55s;
  }

  .step:nth-child(2) .node {
    animation-delay: 0.7s;
  }

  .step:nth-child(3) .node {
    animation-delay: 0.85s;
  }

  .step:nth-child(4) .node {
    animation-delay: 1s;
  }

  .step--current .node::after,
  .status-dot {
    animation: pulse 1.6s 1.2s ease-in-out 3;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 14px;
  }
}

@keyframes tick {
  from {
    opacity: 0;
    scale: 0.5;
  }
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}
