/* ==========================================================================
   Influenza Update Meeting 2026 — design system
   Palette drawn from the Charles Rennie Mackintosh rose logo:
   rose / coral, sage-mint, gold, black linework on a warm parchment cream.
   Plain CSS, no build step. Swap the tokens below to re-theme the whole site.
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------- */
:root {
  /* Colour — Mackintosh rose palette */
  --ink:        #241d1b;   /* headings / linework near-black (warm) */
  --body:       #4c433d;   /* body text */
  --muted:      #8a7d72;   /* secondary text */

  --rose:       #c34561;   /* primary accent — deep rose */
  --rose-dark:  #9d3450;   /* hover / emphasis */
  --rose-tint:  #f8e8ea;   /* pale rose section wash */
  --rose-soft:  #efc4cc;   /* soft rose (glows, borders) */

  --sage:       #5f9e82;   /* secondary accent — mint/sage */
  --sage-dark:  #3f7a60;
  --sage-tint:  #e5f1ea;

  --gold:       #c39a3c;   /* small accents */

  --line:       #e8ddcc;   /* hairlines / borders (warm) */
  --bg:         #f8f3e9;   /* page background — parchment cream */
  --bg-2:       #f2eadc;   /* deeper parchment (alt sections) */
  --surface:    #fffdf9;   /* cards — warm white */

  /* Type */
  --font-head: "Federo", "Optima", "Gill Sans", "Trebuchet MS", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;

  /* Spacing scale */
  --s-1: .5rem;  --s-2: .75rem; --s-3: 1rem;  --s-4: 1.5rem;
  --s-5: 2rem;   --s-6: 3rem;   --s-7: 4.5rem; --s-8: 6rem;

  /* Misc */
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(36,29,27,.06), 0 10px 30px rgba(36,29,27,.09);
  --shadow-sm: 0 1px 2px rgba(36,29,27,.06), 0 3px 10px rgba(36,29,27,.06);
  --container: 1080px;
  --nav-h: 72px;
}

/* ---- Reset / base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.12;
  font-weight: 400;
  margin: 0 0 var(--s-3);
}
h1 { font-size: clamp(2.2rem, 5.2vw, 3.5rem); text-transform: uppercase; letter-spacing: .04em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); text-transform: uppercase; letter-spacing: .035em; }
h3 { font-size: 1.3rem; letter-spacing: .01em; }
p  { margin: 0 0 var(--s-3); }

a { color: var(--rose); text-decoration: none; }
a:hover { color: var(--rose-dark); text-decoration: underline; }

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

/* ---- Layout helpers ------------------------------------------------------ */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--s-4); }
.section { padding-block: var(--s-7); }
.section--rose { background: var(--rose-tint); }
.section--sage { background: var(--sage-tint); }
.section__lead { color: var(--muted); max-width: 62ch; margin-bottom: var(--s-5); font-size: 1.05rem; }
.eyebrow {
  font-family: var(--font-body);
  font-weight: 600; font-size: .8rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--sage-dark); margin-bottom: var(--s-2);
}
.center { text-align: center; }

/* ---- Skip link ----------------------------------------------------------- */
.skip-link {
  position: absolute; left: var(--s-3); top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px;
  transition: top .15s ease;
}
.skip-link:focus { top: var(--s-3); text-decoration: none; color: #fff; }

/* ---- Navigation ---------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248,243,233,.88);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--container); margin-inline: auto;
  min-height: var(--nav-h); padding-inline: var(--s-4);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
}
.brand {
  display: inline-flex; align-items: center; gap: .65rem;
  font-family: var(--font-head); font-weight: 400; font-size: 1.15rem;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--ink); }
.brand__logo { height: 46px; width: auto; }

.nav__links { display: flex; align-items: center; gap: var(--s-1); list-style: none; margin: 0; padding: 0; }
.nav__links a {
  display: inline-block; padding: .5rem .8rem; border-radius: 8px;
  color: var(--body); font-weight: 500; font-size: .96rem;
}
.nav__links a:hover { background: var(--rose-tint); color: var(--rose-dark); text-decoration: none; }
.nav__links a[aria-current="page"] { color: var(--rose-dark); background: var(--rose-tint); }
.nav__links .btn { color: #fff; }
.nav__links .btn:hover { color: #fff; }

.nav__toggle {
  display: none; border: 1px solid var(--line); background: var(--surface);
  width: 44px; height: 44px; border-radius: 10px; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav__toggle svg { width: 22px; height: 22px; stroke: var(--ink); }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--rose); color: #fff; font-weight: 600; font-size: .96rem;
  padding: .7rem 1.3rem; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: background .15s ease, transform .05s ease;
}
.btn:hover { background: var(--rose-dark); color: #fff; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--ghost {
  background: transparent; color: var(--rose-dark);
  border-color: var(--rose-soft);
}
.btn--ghost:hover { background: var(--rose-tint); color: var(--rose-dark); }
.btn--lg { padding: .85rem 1.7rem; font-size: 1.02rem; }

/* ---- Hero ---------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(60% 90% at 82% 30%, rgba(195,69,97,.10), transparent 60%),
    radial-gradient(50% 80% at 12% 90%, rgba(95,158,130,.10), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero::before { /* faint influenza-virion texture */
  content: ""; position: absolute; inset: 0;
  background: url("../img/flu-texture.jpg") center/cover no-repeat;
  opacity: .5; mix-blend-mode: multiply; pointer-events: none;
}
.hero__inner {
  position: relative; z-index: 1;
  max-width: var(--container); margin-inline: auto;
  padding: clamp(var(--s-5), 6vw, var(--s-7)) var(--s-4);
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(var(--s-4), 4vw, var(--s-6));
  align-items: center;
}
.hero__art { justify-self: center; }
.hero__art img { width: 100%; max-width: 460px; filter: drop-shadow(0 14px 30px rgba(36,29,27,.18)); }
.hero h1 { color: var(--ink); margin-bottom: var(--s-3); font-size: clamp(2rem, 3.6vw, 3rem); }
.hero__meta {
  display: flex; flex-direction: column; gap: .3rem;
  font-weight: 500; font-size: 1.05rem; color: var(--body); margin-block: var(--s-3) var(--s-3);
}
.hero__meta span { display: inline-flex; align-items: center; gap: .6rem; }
.hero__host {
  display: inline-flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  margin-top: var(--s-4); color: var(--muted); font-size: .95rem;
}
.hero__host img { height: 52px; width: auto; }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* ---- Snapshot strip ------------------------------------------------------ */
.snapshot {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: var(--s-4) var(--s-5); margin-top: var(--s-6); position: relative; z-index: 2;
}
.snapshot__item { text-align: center; position: relative; }
.snapshot__item + .snapshot__item::before {
  content: ""; position: absolute; left: calc(var(--s-4) * -.5); top: 10%; bottom: 10%;
  width: 1px; background: var(--line);
}
.snapshot__item .k { font-family: var(--font-body); font-size: .72rem; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; line-height: 1.25;
  min-height: 2.6em; /* reserve 2 lines so values stay aligned when a label wraps */ }
.snapshot__item .v { font-family: var(--font-head); font-size: 1rem; color: var(--ink);
  text-transform: uppercase; letter-spacing: .01em; line-height: 1.2; white-space: nowrap; }

/* ---- Cards & grids ------------------------------------------------------- */
.grid { display: grid; gap: var(--s-4); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: var(--s-5); transition: box-shadow .18s ease, transform .18s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { margin-bottom: var(--s-1); }
.card p { color: var(--body); margin-bottom: var(--s-2); }
.card__meta { color: var(--muted); font-size: .9rem; }
.card__link { font-weight: 600; }

/* Featured keynote card */
.keynote {
  display: grid; grid-template-columns: 220px 1fr; gap: var(--s-6); align-items: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--s-6);
}
.keynote__photo {
  width: 100%; aspect-ratio: 1; border-radius: 50%; object-fit: cover;
  background: var(--rose-tint); border: 4px solid #fff; box-shadow: var(--shadow-sm);
}
.keynote__photo--placeholder { display: grid; place-items: center; color: var(--rose);
  font-family: var(--font-head); font-size: 2.5rem; }
.keynote__name { margin-bottom: .15rem; }
.keynote__affil { color: var(--sage-dark); font-weight: 600; margin-bottom: var(--s-3);
  font-family: var(--font-body); }

/* ---- Sponsors ------------------------------------------------------------ */
.sponsors {
  display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: stretch;
}
.sponsor {
  flex: 1 1 220px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; gap: var(--s-3);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: var(--s-5); min-height: 150px;
}
.sponsor img { max-height: 74px; width: auto; }
.sponsor__tier { font-family: var(--font-body); font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--sage-dark); }
.sponsor__placeholder {
  color: var(--muted); border: 2px dashed var(--line); border-radius: var(--radius-sm);
  padding: var(--s-4) var(--s-5); width: 100%;
}
.sponsor__name { font-family: var(--font-head); font-size: 1.35rem; color: var(--ink); letter-spacing: .01em; }

/* ---- Organising committee — simple list, no cards ----------------------- */
.people { list-style: none; margin: var(--s-4) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-3) var(--s-6); }
.people li { color: var(--body); }
.people__name { font-weight: 600; color: var(--ink); }

/* ---- Responsive embeds (map / form) ------------------------------------- */
.embed {
  position: relative; width: 100%; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm); background: var(--surface);
}
.embed--map { min-height: 320px; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed--form { padding: 0; max-width: 720px; margin-inline: auto; }
/* Google Forms is cross-origin, so the page can't read its height or detect which page
   the user is on — the box is one fixed size for all 6 pages. Sized to fit page 1 (the
   tallest: ≈1714px at 720px wide, ≈1806px on mobile); the later pages are shorter and
   simply show a little trailing space. Raise these if page 1 changes. */
.embed--form iframe { position: static; width: 100%; min-height: 1730px; display: block; }
@media (max-width: 700px) { .embed--form iframe { min-height: 1880px; } }

.map-layout { display: grid; grid-template-columns: 1fr 1.3fr; gap: var(--s-6); align-items: stretch; }
.map-layout address { font-style: normal; color: var(--body); line-height: 1.9; }

/* ---- Programme ----------------------------------------------------------- */
.day { margin-bottom: var(--s-6); }
.day__title {
  display: flex; align-items: baseline; gap: var(--s-3);
  padding-bottom: var(--s-2); border-bottom: 2px solid var(--rose-soft); margin-bottom: var(--s-4);
}
.day__title .date { color: var(--muted); font-family: var(--font-body); font-size: 1rem;
  font-weight: 500; text-transform: none; letter-spacing: 0; }
.slot {
  display: grid; grid-template-columns: 130px 1fr; gap: var(--s-4);
  padding: var(--s-3) 0; border-bottom: 1px solid var(--line);
}
.slot:last-child { border-bottom: 0; }
.slot__time { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 500; }
.slot__title { color: var(--ink); font-weight: 600; }
.slot__speaker { color: var(--body); }
.slot__links { margin-top: .35rem; font-size: .92rem; }
.tag {
  display: inline-block; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  font-weight: 600; color: var(--sage-dark); background: var(--sage-tint);
  padding: .15rem .5rem; border-radius: 999px; margin-left: .5rem; vertical-align: middle;
}

/* ---- Prose (labs page etc.) --------------------------------------------- */
.prose { max-width: 68ch; }
.prose h2 { margin-top: var(--s-6); text-transform: none; letter-spacing: .01em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }

/* ---- Placeholder flag (remove once real content is in) ------------------ */
.ph {
  background: #fbf3df; border: 1px dashed var(--gold); color: #7a5b12;
  border-radius: var(--radius-sm); padding: var(--s-3) var(--s-4); font-size: .92rem;
  margin-bottom: var(--s-4);
}
.ph strong { color: #614a0f; }

/* ---- Footer -------------------------------------------------------------- */
.footer { background: var(--ink); color: #d7cec4; padding-block: var(--s-6); margin-top: var(--s-7); }
.footer a { color: #eab8c1; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: var(--s-5); align-items: start; }
.footer h4 { color: #fff; font-family: var(--font-body); font-size: .8rem; letter-spacing: .12em;
  text-transform: uppercase; margin-bottom: var(--s-3); }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: .4rem; }
.footer__host { margin-top: var(--s-4); }
.footer__host img { height: 58px; width: auto;
  /* KCL logo is black artwork — invert to show white on the dark footer */
  filter: invert(1) brightness(1.7); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: var(--s-5);
  padding-top: var(--s-4); font-size: .84rem; color: #a2978c; }
.footer__credit { margin: 0 0 .5rem; line-height: 1.55; max-width: 90ch; }
.footer__credit em { font-style: italic; }
.footer__copyright { margin: .8rem 0 0; }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 860px) {
  .nav__links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: var(--s-2) var(--s-3) var(--s-4);
    box-shadow: var(--shadow); display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: .8rem .75rem; border-radius: 8px; }
  .nav__links .btn { margin-top: var(--s-2); justify-content: center; }
  .nav__toggle { display: inline-flex; }

  .hero__inner { grid-template-columns: 1fr; text-align: center; gap: var(--s-5); }
  .hero__art { max-width: 320px; margin-inline: auto; }
  .hero__art img { max-width: 320px; margin-inline: auto; }
  .hero__meta { align-items: center; }
  .hero__host { justify-content: center; }
  .hero__cta { justify-content: center; }

  .snapshot { grid-template-columns: 1fr; gap: var(--s-3); }
  .snapshot__item + .snapshot__item::before { display: none; }
  .map-layout { grid-template-columns: 1fr; gap: var(--s-4); }
  .keynote { grid-template-columns: 1fr; text-align: center; gap: var(--s-4); padding: var(--s-5); }
  .keynote__photo { width: 160px; margin-inline: auto; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .people { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: var(--s-4); }
  .slot { grid-template-columns: 1fr; gap: .25rem; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .people { grid-template-columns: 1fr; }
  /* Long wordmark clips next to the menu button on small phones — show the emblem only */
  .brand span { display: none; }
  .brand__logo { height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
