/* Waterloo Pharmacy, Longton - static site.
   Job: let a local person see what the pharmacy does and ring or visit.
   Feeling: trusted, clean, caring. Primary action: call 01782 342955.
   Motion: CSS only, authored inside prefers-reduced-motion: no-preference. */

:root {
  --navy: #0a1e43;
  --navy-2: #14336b;
  --green: #26bc6f;
  --mint: #dcf5e5;
  --mint-soft: #f1fbf5;
  --grey: #808080;
  --green-ink: #0b7240;   /* green for TEXT on white (AA); #26bc6f is for fills/icons only */
  --text: #2b3957;
  --muted: #566176;
  --line: #e3ebe6;
  --white: #fff;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --gutter: 20px;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(10, 30, 67, .06), 0 8px 24px rgba(10, 30, 67, .07);
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.65; color: var(--text);
  background: var(--white); overflow-x: clip;
}
img, svg { max-width: 100%; display: block; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: min(1160px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 2px solid transparent;
  font: 700 1rem/1 var(--font); text-decoration: none; cursor: pointer;
  transition: transform .18s ease-out, box-shadow .18s ease-out, background-color .18s;
}
.btn:active { transform: scale(.98); }
.btn-call { background: var(--green); color: var(--navy); box-shadow: 0 6px 18px rgba(38, 188, 111, .35); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.btn-light { background: #fff; color: var(--navy); }
@media (hover: hover) { .btn-call:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(38, 188, 111, .45); } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: block; line-height: 0; border-radius: 8px; }
.brand img { height: 44px; width: auto; }
.nav { display: none; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font-weight: 600; font-size: .95rem; color: var(--navy); text-decoration: none; border-radius: 999px; }
.nav a:hover { background: var(--mint); }
.header-call { display: none; }
.call-fab { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--green); color: var(--navy); box-shadow: 0 4px 14px rgba(38, 188, 111, .4); }
.call-fab .icon { width: 22px; height: 22px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: clip; background:
    radial-gradient(60% 50% at 85% 20%, rgba(38, 188, 111, .16), transparent 70%),
    linear-gradient(180deg, var(--mint-soft), #fff 92%); }
.hero-in { display: grid; gap: 28px; padding-block: 36px 52px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: .55em; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--green-ink); margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 14px; height: 14px; background: var(--green);
  clip-path: polygon(35% 0, 65% 0, 65% 35%, 100% 35%, 100% 65%, 65% 65%, 65% 100%, 35% 100%, 35% 65%, 0 65%, 0 35%, 35% 35%); }
h1 { font-size: clamp(2.15rem, 1.15rem + 4.6vw, 4rem); font-weight: 800; line-height: 1.04; letter-spacing: -.02em; color: var(--navy); text-wrap: balance; }
h1 em { font-style: italic; color: var(--green-ink); }
.lead { margin-top: 18px; font-size: clamp(1.05rem, .95rem + .5vw, 1.25rem); color: var(--text); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.cta-row .btn { flex: 1 1 200px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .85rem; font-weight: 600; color: var(--navy); box-shadow: 0 1px 2px rgba(10, 30, 67, .05); }
.chip .icon { width: 16px; height: 16px; color: var(--green-ink); }

.hero-art { perspective: 900px; justify-self: center; width: min(300px, 78%); }
.hero-art svg { width: 100%; height: auto; overflow: visible; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.pill-a, .pill-b, .pill-c, .spark { transform-box: fill-box; transform-origin: center; }

/* ---------- Sections ---------- */
section { scroll-margin-top: var(--header-h); }
.sec { padding-block: 64px; }
.below { content-visibility: auto; contain-intrinsic-size: auto 720px; }
.sec-head { max-width: 52em; margin-bottom: 36px; }
h2 { font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.6rem); font-weight: 800; line-height: 1.12; letter-spacing: -.015em; color: var(--navy); text-wrap: balance; }
.sec-head p { margin-top: 14px; color: var(--muted); font-size: 1.05rem; }

/* Services */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
  transition: transform .22s ease-out, box-shadow .22s ease-out, border-color .22s; }
.card h3 { font-size: 1.12rem; font-weight: 700; color: var(--navy); line-height: 1.3; }
.card p { margin-top: 8px; color: var(--muted); font-size: .97rem; }
.card-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--mint); color: var(--navy); margin-bottom: 16px; }
.card-icon .icon { width: 26px; height: 26px; }
.card.feature { background: linear-gradient(135deg, var(--mint-soft), #fff 70%); border-color: #c9ecd7; }
.card .tag { display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px; font-size: .92rem; font-weight: 700; color: var(--green-ink); text-decoration: none; }
.card .tag:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) { .card:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(10, 30, 67, .06), 0 16px 36px rgba(10, 30, 67, .12); border-color: var(--green); } }
.note { display: flex; gap: 10px; align-items: center; margin-top: 26px; padding: 14px 18px; border-radius: 14px; background: var(--mint-soft); border: 1px dashed #9fdcb9; color: var(--navy); font-weight: 600; font-size: .97rem; }
.note .icon { color: var(--green-ink); }

/* Pharmacy First band */
.pf { position: relative; overflow: clip; background: linear-gradient(135deg, var(--navy), #0d2a5c 70%); color: #fff; }
.pf-in { position: relative; display: grid; gap: 28px; padding-block: 64px; z-index: 1; }
.pf h2 { color: #fff; }
.pf .eyebrow { color: var(--green); }
.pf p { color: #d3dcee; }
.pf .lead { color: #d3dcee; }
.conds { display: flex; flex-wrap: wrap; gap: 10px; }
.conds li { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 16px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2); font-weight: 600; font-size: .95rem; }
.conds li::before { content: ""; width: 10px; height: 10px; background: var(--green); clip-path: polygon(35% 0, 65% 0, 65% 35%, 100% 35%, 100% 65%, 65% 65%, 65% 100%, 35% 100%, 35% 65%, 0 65%, 0 35%, 35% 35%); }
.pf small { display: block; margin-top: 14px; color: #aebbd6; font-size: .9rem; }
.pf-ghost { position: absolute; right: -90px; top: 50%; width: 460px; translate: 0 -50%; opacity: .1; pointer-events: none; }

/* Why us */
.why { display: grid; gap: 16px; }
.why li { display: flex; gap: 16px; align-items: flex-start; padding: 22px; border-radius: var(--radius); background: var(--mint-soft); border: 1px solid #d3efde; }
.why .card-icon { flex: none; margin: 0; background: var(--navy); color: var(--green); width: 48px; height: 48px; border-radius: 14px; }
.why h3 { font-size: 1.1rem; font-weight: 700; color: var(--navy); line-height: 1.3; }
.why p { margin-top: 6px; color: var(--muted); font-size: .97rem; }

/* Visit */
.visit { background: linear-gradient(180deg, #fff, var(--mint-soft)); }
.visit-in { display: grid; gap: 28px; }
.details { display: grid; gap: 18px; margin-top: 26px; }
.details li { display: flex; gap: 14px; align-items: flex-start; }
.details .card-icon { margin: 0; flex: none; width: 46px; height: 46px; border-radius: 14px; }
.details .label { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--green-ink); }
.details address, .details .val { font-style: normal; font-weight: 600; font-size: 1.08rem; color: var(--navy); line-height: 1.45; }
.details a.val { text-decoration: none; display: inline-block; min-height: 44px; padding-top: 6px; }
.details a.val:hover { text-decoration: underline; }
.visit .cta-row { margin-top: 30px; }
.street { position: relative; overflow: hidden; min-height: 260px; border-radius: 28px; background: var(--navy); }
.street svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pin-pulse { transform-box: fill-box; transform-origin: center; }

.hours { border-collapse: collapse; margin-top: 4px; font-size: 1.02rem; }
.hours th, .hours td { padding: 6px 0; text-align: left; color: var(--navy); }
.hours th { font-weight: 600; padding-right: 20px; white-space: nowrap; }
.hours td { font-weight: 800; white-space: nowrap; }
@media (max-width: 400px) { .hours { font-size: .92rem; } .hours th { padding-right: 12px; } }
.hours tr + tr th, .hours tr + tr td { border-top: 1px solid var(--line); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Footer */
.site-footer { background: var(--navy); color: #c7d2e8; padding-block: 52px 28px; }
.foot { display: grid; gap: 32px; }
.foot img { height: 60px; width: auto; }
.foot h3 { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--green); margin-bottom: 10px; font-weight: 700; }
.foot a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.foot a:hover { text-decoration: underline; }
.foot address { font-style: normal; line-height: 1.7; }
.foot ul a { padding-right: 18px; }
.legal { margin-top: 32px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .14); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: .88rem; }
.legal a { min-height: 44px; display: inline-flex; align-items: center; }

/* Legal pages */
.legal-wrap { max-width: 760px; margin-inline: auto; padding: 48px var(--gutter) 72px; }
.legal-wrap h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); }
.legal-wrap h2 { font-size: 1.2rem; margin: 34px 0 10px; letter-spacing: 0; }
.legal-wrap p, .legal-wrap li { margin-bottom: 12px; color: var(--text); }
.legal-wrap ul { list-style: disc; padding-left: 22px; }
.legal-wrap a:not(.btn) { color: var(--green-ink); text-underline-offset: 3px; }
.legal-updated { color: var(--muted); font-size: .9rem; margin: 8px 0 28px; }

/* ---------- Breakpoints ---------- */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .card.wide { grid-column: span 2; }
  .why { grid-template-columns: repeat(3, 1fr); }
  .why li { flex-direction: column; }
  .cta-row .btn { flex: 0 1 auto; }
  .foot { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (min-width: 760px) {
  :root { --header-h: 76px; --gutter: 28px; }
  .nav { display: flex; gap: 4px; }
  .brand img { height: 52px; }
  .header-call { display: inline-flex; min-height: 48px; padding: 0 22px; }
  .call-fab { display: none; }
  .visit-in { grid-template-columns: 1.05fr .95fr; align-items: stretch; }
  .street { min-height: 380px; }
  .pf-in { grid-template-columns: 1.1fr .9fr; align-items: center; }
}
@media (min-width: 900px) {
  .hero-in { grid-template-columns: 1.15fr .85fr; padding-block: 72px 88px; gap: 40px; }
  .hero-art { width: min(440px, 100%); }
  .sec { padding-block: 96px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .card.wide { grid-column: span 2; }
  .pf-in { padding-block: 88px; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .hero-art:hover svg { transform: rotateY(-9deg) rotateX(4deg); }
}

/* ---------- Motion (only when the visitor has not asked for less) ---------- */
@keyframes rise { from { opacity: 0; translate: 0 18px; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes bob-r { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 4px -10px; rotate: 6deg; } }
@keyframes twinkle { 0%, 100% { opacity: .35; scale: .85; } 50% { opacity: 1; scale: 1.1; } }
@keyframes ping { 0% { opacity: .55; scale: .6; } 100% { opacity: 0; scale: 2.2; } }

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .6s ease-out both; }
  .hero-copy > :nth-child(2) { animation-delay: 70ms; }
  .hero-copy > :nth-child(3) { animation-delay: 140ms; }
  .hero-copy > :nth-child(4) { animation-delay: 210ms; }
  .hero-copy > :nth-child(5) { animation-delay: 280ms; }
  .hero-art svg { animation: rise .8s ease-out .15s both; }
  .pill-a { animation: bob 6s ease-in-out infinite; }
  .pill-b { animation: bob-r 7s ease-in-out -2s infinite; }
  .pill-c { animation: bob 8s ease-in-out -4s infinite; }
  .spark { animation: twinkle 3.2s ease-in-out infinite; }
  .spark.s2 { animation-delay: -1.1s; }
  .spark.s3 { animation-delay: -2.1s; }
  .pin-pulse { animation: ping 2.4s ease-out infinite; }
  @supports (animation-timeline: view()) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
  }
}
