/* ==========================================================================
   Nottingham QMC Stoma Support Group
   Design system derived from the printed "let's talk!" flyer.

   Colour note: the flyer's bright lime (#8DC63F) and cyan (#00ADEE) are
   beautiful as shapes but fail WCAG AA as *text* colours (~2:1 on white), and
   the flyer's white-on-lime is only ~2.3:1. Two moves keep the brand bright
   and still pass AA:
     1. On filled bright panels, use near-black ink, not white.
        ink on lime = 7.9:1, ink on cyan = 6.3:1.
     2. For coloured words on white, use the darkened siblings below.
   Bright = fills. Deep = words on white. White text only on --blue-deep.
   ========================================================================== */

:root {
  /* Brand — shapes, logo, large decorative fills */
  --blue: #00adee;
  --green: #8dc63f;
  --overlap: #00a651; /* where the two bubbles cross */

  /* Text-safe siblings (contrast measured against white) */
  --blue-mid: #0091ce;    /* 3.5:1 — large text only */
  --blue-deep: #0079ac;   /* 4.9:1 — body text, links, white-on-blue panels */
  --blue-ink: #00506f;    /* 8.7:1 — headings */
  --green-large: #5c8c16; /* 3.9:1 — large text only (script callouts) */
  --green-deep: #4c7a12;  /* 5.2:1 — body text */
  --green-ink: #3a5c0d;   /* 7.3:1 */

  --ink: #16232b;
  --ink-soft: #40525c;
  --paper: #ffffff;
  --paper-tint: #f2f9fd;
  --rule: #dde8ee;

  --font-sans: "Mulish", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-script: "Grand Hotel", "Brush Script MT", cursive;
  --font-hand: "Caveat", "Comic Sans MS", cursive;

  --measure: 34rem;   /* comfortable reading width */
  --shell: 75rem;     /* max content width */
  --radius: 1.25rem;

  --gap: clamp(1rem, 2.5vw, 2rem);
  --section-y: clamp(3.5rem, 8vw, 7rem);
}

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

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  /* Deliberately large base size: much of this audience is over 60. */
  font-size: clamp(1.0625rem, 0.4vw + 1rem, 1.1875rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p { margin: 0 0 1rem; } # rob removed, not required max-width: var(--measure);
ul { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin-bottom: 0.4rem; }

a { color: var(--blue-deep); text-decoration-thickness: 0.09em; text-underline-offset: 0.18em; }
a:hover { color: var(--blue-ink); }

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

/* ------------------------------------------------------------ utilities ---- */

.shell {
  width: min(100% - 2.5rem, var(--shell));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 999;
  padding: 0.75rem 1.25rem;
  background: var(--blue-ink);
  color: #fff;
  font-weight: 700;
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; color: #fff; }

.eyebrow {
  font-family: var(--font-hand);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--green-large);
  margin-bottom: 0.35em;
}
.eyebrow--blue { color: var(--blue-mid); }
.eyebrow--light { color: #fff; }

/* ------------------------------------------------------ speech bubbles ---- */
/* The flyer's core device: two overlapping bubbles with a script word inside.
   The bubbles are decorative SVG; the text is real text sitting on top, so it
   stays selectable, scalable and available to screen readers. */

.bubble-logo {
  position: relative;
  display: inline-block;
  width: var(--logo-w, 15rem);
  flex: none;
}
.bubble-logo svg { width: 100%; height: auto; }
.bubble-logo__text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-bottom: 14%; /* lift clear of the bubble tails */
  font-family: var(--font-script);
  font-size: calc(var(--logo-w, 15rem) * 0.27);
  line-height: 1;
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
  padding-right: 6%;
}

/* A small standalone callout bubble, as used for "Come along…" / "More info…" */
.callout {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 11rem;
  padding: 1.5rem 2rem 1.75rem;
  border-radius: 50%;
  font-family: var(--font-hand);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-align: center;
}
.callout::after { /* the tail */
  content: "";
  position: absolute;
  bottom: -0.9rem; left: 2.5rem;
  border: 0 solid transparent;
  border-top: 1.6rem solid currentColor;
  border-right: 1.1rem solid transparent;
  color: inherit;
}
/* Bright flyer fills, with ink text rather than white so contrast passes. */
.callout--green { background: var(--green); color: var(--ink); }
.callout--green::after { border-top-color: var(--green); }
.callout--blue { background: var(--blue); color: var(--ink); }
.callout--blue::after { border-top-color: var(--blue); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--gap);
  padding: 0.75rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--blue-deep);
  margin-right: auto;
}
.brand .bubble-logo { --logo-w: 6.5rem; }
.brand__name {
  font-weight: 800;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.brand__name span { display: block; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.5vw, 1.5rem);
}
.nav a {
  font-weight: 700;
  font-size: 1rem;
  color: var(--blue-ink);
  text-decoration: none;
  padding: 0.6rem 0.4rem;
  border-bottom: 3px solid transparent;
}
.nav a:hover { border-bottom-color: var(--green); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  font: inherit;
  font-weight: 700;
  color: var(--blue-ink);
  background: var(--paper-tint);
  border: 2px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
}

@media (max-width: 60rem) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.25rem 1.25rem;
    background: #fff;
    border-bottom: 4px solid var(--green);
    box-shadow: 0 1rem 2rem rgba(0, 40, 60, 0.12);
  }
  .nav[data-open="true"] { display: flex; }
  .nav a {
    padding: 0.9rem 0.25rem;
    border-bottom: 1px solid var(--rule);
  }
}

/* --------------------------------------------------------------- buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.25rem;      /* generous tap target */
  padding: 0.75rem 1.75rem;
  font-weight: 800;
  font-size: 1.0625rem;
  text-decoration: none;
  border: 3px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.12s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* Bright lime with ink text: 7.9:1, and unmistakably the flyer's green. */
.btn--green { background: var(--green); color: var(--ink); }
.btn--green:hover { background: #7cb32c; color: var(--ink); }
.btn--blue { background: var(--blue-deep); color: #fff; }
.btn--blue:hover { background: var(--blue-ink); color: #fff; }
.btn--ghost { border-color: currentColor; color: var(--blue-ink); background: transparent; }
.btn--ghost:hover { background: var(--paper-tint); color: var(--blue-ink); }
.btn--on-dark { background: #fff; color: var(--blue-ink); }
.btn--on-dark:hover { background: var(--paper-tint); color: var(--blue-ink); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

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

.hero {
  position: relative;
  padding: clamp(2.5rem, 6vw, 5rem) 0 0;
  background: var(--paper);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}
@media (max-width: 62rem) {
  .hero__grid { grid-template-columns: 1fr; }
}

.hero .bubble-logo { --logo-w: clamp(15rem, 32vw, 24rem); margin-bottom: 1.5rem; }

.hero h1 {
  font-size: clamp(2.25rem, 6vw, 4rem);
  color: var(--blue-mid);
  margin-bottom: 0.25em;
}
.hero h1 .hero__sub {
  display: block;
  margin-top: 0.15em;
  font-size: 0.42em;
  color: var(--green-deep);
  letter-spacing: 0;
}
.hero__lede {
  font-size: clamp(1.1875rem, 1.8vw, 1.5rem);
  font-weight: 600;
  color: var(--ink);
  max-width: 30rem;
}

.hero__media { position: relative; }
.photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #cfd8dd;
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
/* The flyer's portraits are black and white, but that was a print decision.
   A real photograph of real members is warmer in colour, so grayscale is now
   opt-in via .photo--mono rather than applied to every image. */
.photo--mono img { filter: grayscale(1) contrast(1.05); }
.photo--tall { aspect-ratio: 4 / 5; }
.photo--wide { aspect-ratio: 16 / 9; }
.photo--round { border-radius: 50%; }

/* A member quote in a speech bubble.
   The flyer uses full ellipses, but an ellipse containing a paragraph of text
   squeezes the text into a sliver as the box grows taller than it is wide. A
   softly rounded bubble with a tail keeps the flyer's voice-of-a-member
   meaning while leaving a rectangular, readable text area. */
.quote-blob {
  position: relative;
  padding: 1.75rem 2rem 2rem;
  border-radius: 2rem 2rem 2rem 0.35rem;
  color: var(--ink);
  font-weight: 700;
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.5;
}
.quote-blob--green { background: var(--green); }
.quote-blob--blue { background: var(--blue); }
.quote-blob p { max-width: 30ch; margin: 0; }
.quote-blob::before {
  content: "\201C";
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3rem;
  line-height: 0.55;
  opacity: 0.45;
  margin-bottom: 0.5rem;
}
.quote-blob::after { /* the bubble tail */
  content: "";
  position: absolute;
  left: 0;
  bottom: -1.15rem;
  border-top: 1.25rem solid;
  border-top-color: inherit;
  border-right: 1.5rem solid transparent;
}
.quote-blob--green::after { border-top-color: var(--green); }
.quote-blob--blue::after { border-top-color: var(--blue); }

/* The green-over-blue arc sweep that closes the flyer's front panel */
.sweep {
  position: relative;
  height: clamp(3rem, 7vw, 6rem);
  margin-top: clamp(2rem, 5vw, 4rem);
}
.sweep svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ------------------------------------------------------------- sections ---- */

.section { padding: var(--section-y) 0; }
.section--tint { background: var(--paper-tint); }

.section__head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section__head h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  color: var(--blue-ink);
}
.section--dark .section__head h2 { color: #fff; }

/* --------------------------------------------------------- meeting card ---- */

.meeting {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.75rem, 4vw, 3rem);
  background: #fff;
  border: 3px solid var(--green);
  border-radius: var(--radius);
  box-shadow: 0 1.25rem 2.5rem rgba(0, 60, 90, 0.08);
}
@media (max-width: 48rem) {
  .meeting { grid-template-columns: 1fr; }
}
.meeting dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1.25rem 2rem;
  margin: 0;
}
.meeting dt {
  font-size: 0.9375rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green-deep);
  margin-bottom: 0.15rem;
}
.meeting dd {
  margin: 0;
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  font-weight: 700;
  color: var(--blue-ink);
}
.meeting__addr {
  display: block;
  margin-top: 0.35rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* ----------------------------------------------------------- who we are ---- */
/* Big cyan panel with a curved leading edge — straight from page 2. */

.who {
  position: relative;
  background: var(--blue-deep);
  color: #fff;
  padding: var(--section-y) 0;
  overflow: hidden;
}
/* The lime crescent ribbon from page 2: a green disc with a second disc in the
   panel colour laid over it, offset, to carve the crescent out. */
.who::before {
  content: "";
  position: absolute;
  top: -14%; bottom: -14%;
  right: -20%;
  width: 46%;
  background: var(--green);
  border-radius: 50%;
}
.who::after {
  content: "";
  position: absolute;
  top: -18%; bottom: -18%;
  right: -28%;
  width: 46%;
  background: var(--blue-deep);
  border-radius: 50%;
}
.who .shell { position: relative; z-index: 1; }
.who h2 { color: #fff; }
.who__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  max-width: 52rem;
}
.who__grid p { font-weight: 700; font-size: 1.125rem; margin: 0; }
.who__grid > div {
  padding-left: 1.25rem;
  border-left: 4px solid rgba(255, 255, 255, 0.5);
}
@media (max-width: 62rem) {
  .who::before, .who::after { display: none; }
}

/* ----------------------------------------------------------- stat / hand ---- */

.hand-quote {
  position: relative;
  padding: 0 0 0 3.5rem;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.35;
  color: var(--green-large);
  max-width: 24em;
}
.hand-quote--blue { color: var(--blue-mid); }
.hand-quote::before {
  content: "\201C";
  position: absolute;
  left: 0; top: -0.15em;
  font-family: Georgia, serif;
  font-size: 1.6em;
  line-height: 1;
  opacity: 0.6;
}
.hand-quote cite {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--gap);
  align-items: start;
}

/* -------------------------------------------------------------- voices ---- */

.voices {
  display: grid;
  /* 25rem forces two columns at desktop width, so four quotes sit 2x2 rather
     than leaving a fourth orphaned on its own row. */
  grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
  gap: clamp(1.5rem, 3vw, 2.25rem) clamp(1.25rem, 3vw, 2rem);
  list-style: none;
  margin: 0; padding: 0;
}
.voices li { margin: 0; }
.voices .quote-blob { height: 100%; display: grid; align-content: start; }
/* alternate the tail side so the row reads as a conversation */
.voices li:nth-child(even) .quote-blob {
  border-radius: 2rem 2rem 0.35rem 2rem;
}
.voices li:nth-child(even) .quote-blob::after {
  left: auto; right: 0;
  border-right: 0;
  border-left: 1.5rem solid transparent;
}

/* --------------------------------------------------------------- cards ---- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--gap);
  list-style: none;
  margin: 0; padding: 0;
}
.card {
  height: 100%;
  padding: 1.75rem;
  background: #fff;
  border: 2px solid var(--rule);
  border-top: 6px solid var(--green);
  border-radius: var(--radius);
}
.cards > li:nth-child(even) .card { border-top-color: var(--blue); }
.card h3 { font-size: 1.25rem; color: var(--blue-ink); }
.card p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------- contact list ---- */

.contacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: var(--gap);
  list-style: none;
  margin: 0; padding: 0;
}
.contact {
  padding: 1.5rem 1.75rem;
  background: #fff;
  border: 2px solid var(--rule);
  border-radius: var(--radius);
  height: 100%;
}
.contact h3 { font-size: 1.1875rem; color: var(--blue-deep); margin-bottom: 0.35rem; }
.contact .contact__note { font-size: 0.9375rem; color: var(--ink-soft); margin-bottom: 0.6rem; }
.contact .tel {
  display: inline-block;
  font-size: 1.3125rem;
  font-weight: 800;
  color: var(--blue-ink);
  text-decoration: none;
  border-bottom: 3px solid var(--green);
}
.contact .tel:hover { border-bottom-color: var(--blue); }
.contact .freephone {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green-deep);
  vertical-align: middle;
}

/* ------------------------------------------------------------ get in touch ---- */

.touch {
  position: relative;
  background: var(--blue-deep);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3.5rem);
  overflow: hidden;
}
.touch::before {
  content: "";
  position: absolute;
  right: -6rem; top: -6rem;
  width: 22rem; height: 22rem;
  background: var(--green);
  border-radius: 50%;
  opacity: 0.25;
}
.touch__inner { position: relative; z-index: 1; }
.touch h2 { color: #fff; }
/* :not(.btn) matters — a bare `.touch a` rule outranks .btn--on-dark and would
   paint the buttons' text white on a white pill. */
.touch a:not(.btn) { color: #fff; }
.touch__lines {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.touch__lines dt {
  font-size: 0.875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}
.touch__lines dd {
  margin: 0.2rem 0 0;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  font-weight: 800;
  overflow-wrap: anywhere;
}

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

.site-footer {
  padding: clamp(2.5rem, 5vw, 4rem) 0 2rem;
  background: var(--ink);
  color: #cbd8de;
  font-size: 1rem;
}
.site-footer a { color: #fff; }
.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--gap);
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.site-footer h2 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding-top: 1.5rem;
  font-size: 0.9375rem;
}
.site-footer__legal p { margin: 0; max-width: none; }

/* ----------------------------------------------------- medical disclaimer ---- */

.disclaimer {
  padding: 1.25rem 1.5rem;
  background: #fff8e6;
  border-left: 6px solid #b8860b;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1rem;
}
.disclaimer strong { color: #6b4c00; }
.disclaimer p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------- print ---- */

@media print {
  .site-header, .nav-toggle, .sweep, .btn-row { display: none; }
  body { font-size: 11pt; color: #000; }
  .who, .touch, .site-footer { background: #fff !important; color: #000 !important; }
  .who h2, .touch h2, .touch a, .site-footer a { color: #000 !important; }
}
