/* ============================================================
   Find a Pharmacy — design system
   Tokens + shared nav, footer, buttons, chips, cards
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Instrument+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  /* brand */
  --navy-950: #060d1f;
  --navy-900: #0a1735;
  --navy-800: #10224d;
  --blue-700: #0b4fa2;
  --blue-600: #005eb8;          /* NHS blue heritage */
  --blue-500: #1d7ff0;
  --blue-100: #dcebfd;
  --teal-500: #00a499;
  --green-600: #007f3b;
  --amber-400: #ffb81c;

  /* neutrals */
  --ink-900: #101828;
  --ink-600: #475467;
  --ink-400: #98a2b3;
  --line: #e4e9f0;
  --paper: #ffffff;
  --mist: #f5f8fb;

  /* semantics */
  --brand: var(--blue-600);
  --brand-hover: var(--blue-700);
  --accent: var(--teal-500);

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;

  --shadow-s: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-m: 0 8px 24px -6px rgba(10, 23, 53, .14);
  --shadow-l: 0 24px 60px -12px rgba(10, 23, 53, .22);

  --font: 'Instrument Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --mono: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;

  /* warm paper surfaces — deliberately not the usual startup white/gradient */
  --paper-warm: #faf7f1;
  --paper-warm-2: #f3efe6;

  --nav-h: 72px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink-900);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------------------------------------------------- nav
   Editorial header: solid surface, serif brand lockup, quiet underline
   links. Landing sits on warm paper; app pages sit on white. */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 2000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 0 clamp(16px, 4vw, 44px);
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.landing .site-nav {
  background: var(--paper-warm);
  border-bottom-color: #e6dfd0;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -.01em;
  color: var(--ink-900);
  text-decoration: none;
  white-space: nowrap;
}
.nav-logo svg { flex: 0 0 auto; }
.nav-logo .logo-dot {
  font-family: var(--font);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: #fff;
  background: var(--blue-600);
  padding: 3px 7px;
  border-radius: 6px;
  transform: translateY(-7px);
  margin-left: 2px;
}

.nav-links {
  display: flex;
  gap: 30px;
  margin-left: auto;
  align-items: center;
}
.nav-links a {
  position: relative;
  padding: 4px 0;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--ink-600);
  text-decoration: none;
  transition: color .15s;
}
.nav-links a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 2px;
  background: var(--blue-600);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}
.nav-links a:not(.nav-cta):hover { color: var(--ink-900); }
.nav-links a:not(.nav-cta):hover::after { transform: scaleX(1); }
.nav-links a.active { color: var(--ink-900); }
.nav-links a.active:not(.nav-cta)::after { transform: scaleX(1); background: var(--teal-500); }

/* dropdown */
.nav-drop { position: relative; display: flex; align-items: center; }
.nav-drop-toggle .caret { font-size: .62rem; margin-left: 5px; opacity: .55; }
.nav-drop-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: -16px;
  min-width: 210px;
  display: none;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-m);
  z-index: 300;
}
.nav-drop::after { /* hover bridge so the menu doesn't vanish mid-travel */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 100%;
  height: 14px;
}
.nav-drop:hover .nav-drop-menu,
.nav-drop:focus-within .nav-drop-menu { display: grid; gap: 2px; }
.nav-drop-menu a {
  padding: 10px 14px !important;
  border-radius: 9px;
  font-size: .86rem;
  font-weight: 500;
  color: var(--ink-900);
}
.nav-drop-menu a::after { display: none !important; }
.nav-drop-menu a:hover { background: var(--mist); }
.nav-drop-menu a small { display: block; font-weight: 400; color: var(--ink-400); font-size: .74rem; }

/* academy promo link */
.nav-academy {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px !important;
  border: 1.5px solid var(--teal-500);
  border-radius: 10px;
  color: #067c73 !important;
  font-weight: 600 !important;
  transition: background .15s, color .15s;
}
.nav-academy::after { display: none !important; }
.nav-academy:hover { background: var(--teal-500); color: #fff !important; }

.nav-cta { margin-left: 4px; }
.nav-links a.nav-cta, .nav-links a.nav-cta:hover {
  color: #fff;
  background: var(--blue-600);
  border-radius: 10px;
  padding: 10px 20px;
  font-weight: 600;
  box-shadow: 0 2px 0 var(--navy-800);
}
.nav-links a.nav-cta:hover { background: var(--blue-700); transform: translateY(-1px); }

/* mobile nav */
.nav-burger {
  display: none;
  margin-left: auto;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  color: inherit;
}
@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 16px 18px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-m);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; border-radius: var(--radius-s); }
  .nav-links a:not(.nav-cta)::after { display: none; }
  .nav-links a:not(.nav-cta):hover { background: var(--mist); }
  .nav-burger { display: block; }
  .nav-cta { margin: 8px 0 0; }
  /* dropdown flattens into the mobile menu */
  .nav-drop { flex-direction: column; align-items: stretch; }
  .nav-drop::after { display: none; }
  .nav-drop-menu {
    position: static;
    display: grid;
    min-width: 0;
    border: none;
    box-shadow: none;
    padding: 0 0 0 18px;
    background: transparent;
  }
  .nav-academy { justify-content: center; }
}

/* ---------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  font-family: var(--font);
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--blue-600);
  color: #fff;
  box-shadow: 0 2px 0 var(--navy-800);
}
.btn-primary:hover { background: var(--blue-700); transform: translateY(-1px); box-shadow: 0 3px 0 var(--navy-800); }
.btn-ghost {
  background: transparent;
  border-color: var(--ink-900);
  color: var(--ink-900);
}
.btn-ghost:hover { background: var(--ink-900); color: #fff; }
.on-dark .btn-ghost { border-color: rgba(255, 255, 255, .25); color: #fff; }
.on-dark .btn-ghost:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .5); }
.btn-lg { padding: 14px 30px; font-size: 1.02rem; }

/* ---------------------------------------------------- chips & badges */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: .82rem;
  font-weight: 500;
  color: var(--ink-600);
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
}

/* ---------------------------------------------------- footer */
.site-footer {
  background: var(--navy-950);
  color: rgba(255, 255, 255, .72);
  padding: 56px clamp(16px, 4vw, 44px) 28px;
  font-size: .9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.6fr;
  gap: 36px;
  max-width: 1180px;
  margin: 0 auto;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }

.site-footer h4 {
  margin: 0 0 14px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .45);
}
.site-footer a { color: rgba(255, 255, 255, .78); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-brand p { margin: 12px 0 0; line-height: 1.6; max-width: 300px; }
.footer-attribution { line-height: 1.65; font-size: .8rem; color: rgba(255, 255, 255, .5); }
.footer-bottom {
  max-width: 1180px;
  margin: 40px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: .8rem;
  color: rgba(255, 255, 255, .45);
}

/* ---------------------------------------------------- misc shared */
.container { max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 44px); }

.section-label {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
