/* ═══════════════════════════════════════════════════════════════════════════
   Shared stylesheet for the AWS for Healthcare event sites.

   ONE canonical copy lives here in the repo. `publish.sh site <name>` copies
   it to each site's bucket as /event.css, so every site serves it
   SAME-ORIGIN.

   That same-origin requirement is not cosmetic: CloudFrontSigner does not
   authenticate cross-origin resource requests made from HTML tags. A
   <link> pointing at a stylesheet on another Midway-gated domain would be
   refused, and the page would render unstyled. Never reference this file
   across hostnames.

   Covers: event landing pages and their /outcomes pages.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Fonts: Amazon Ember, served by AWS ───────────────────────────────────── */
@font-face {
  font-family: 'Amazon Ember';
  src: url('https://a0.awsstatic.com/libra-css/fonts/amazon-ember/AmazonEmber_Lt.woff2') format('woff2');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Amazon Ember';
  src: url('https://a0.awsstatic.com/libra-css/fonts/amazon-ember/AmazonEmber_Rg.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Amazon Ember';
  src: url('https://a0.awsstatic.com/libra-css/fonts/amazon-ember/AmazonEmber_Bd.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Amazon Ember Display';
  src: url('https://a0.awsstatic.com/libra-css/fonts/amazon-ember-display/AmazonEmberDisplay_Rg.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Amazon Ember Display';
  src: url('https://a0.awsstatic.com/libra-css/fonts/amazon-ember-display/AmazonEmberDisplay_Bd.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ── Tokens ───────────────────────────────────────────────────────────────── */
:root {
  --aws-orange: #FF9900;
  --aws-dark: #232F3E;
  --aws-squid-ink: #0a1929;
  --health-teal: #00A3BF;
  --health-teal-dark: #007A8C;
  --health-green: #1DC4A9;
  --text-primary: #16191f;
  --text-secondary: #545b64;
  --text-light: #d5dbdb;
  --bg-light: #f2f3f3;
  --border: #e4e6e8;
  --white: #ffffff;
  --accent-purple: #6B2FA5;
  --accent-rose: #C9466B;
  --accent-amber: #B26A00;
  --radius: 10px;
  --maxw: 1180px;

  /* Per-event accent. Override in a page-level <style> to re-skin a site
     without touching this file:  :root { --event-accent: #6B2FA5; }  */
  --event-accent: var(--accent-purple);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Amazon Ember', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-primary);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Amazon Ember Display', 'Amazon Ember', sans-serif; line-height: 1.2; }
a { color: var(--health-teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--health-teal); outline-offset: 2px; }

.inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--white); color: var(--text-primary);
  padding: 12px 20px; z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.skip-link:focus { left: 0; }

/* ── Top bar ──────────────────────────────────────────────────────────────── */
.topbar {
  background: var(--aws-squid-ink); color: var(--white);
  padding: 14px 0; position: sticky; top: 0; z-index: 50;
}
.topbar .inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 0.95rem; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--health-green); flex: 0 0 auto; }
.topnav { display: flex; gap: 18px; font-size: 0.88rem; flex-wrap: wrap; }
.topnav a { color: var(--text-light); }
.topnav a:hover { color: var(--white); }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--aws-squid-ink) 0%, var(--aws-dark) 50%, var(--event-accent) 100%);
  color: var(--white); padding: 76px 0 64px;
}
.past-badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.4); color: var(--text-light);
  padding: 4px 11px; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); margin-bottom: 14px; }
.hero .tagline {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  color: var(--health-green); font-weight: 700; margin-bottom: 26px;
}
.hero .context {
  font-size: 0.95rem; color: var(--text-light);
  max-width: 66ch; margin-bottom: 26px;
  padding-left: 14px; border-left: 3px solid rgba(255, 255, 255, 0.3);
}

.facts { display: flex; flex-wrap: wrap; gap: 28px; margin-bottom: 30px; }
.fact { display: flex; align-items: flex-start; gap: 10px; }
.fact svg { width: 19px; height: 19px; stroke: var(--health-green); fill: none; stroke-width: 2; flex: 0 0 auto; margin-top: 3px; }
.fact-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-light); }
.fact-value { font-weight: 700; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; padding: 12px 22px; border-radius: 6px; }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.btn-primary { background: var(--aws-orange); color: var(--aws-dark); }
.btn-primary:hover { background: #ffad33; text-decoration: none; }
.btn-ghost { border: 1px solid rgba(255, 255, 255, 0.5); color: var(--white); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); text-decoration: none; }

/* ── Sections ─────────────────────────────────────────────────────────────── */
section { padding: 68px 0; }
section.alt { background: var(--bg-light); }
.section-head { margin-bottom: 34px; max-width: 74ch; }
.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: 10px; }
.section-head p { color: var(--text-secondary); }

.prose p { max-width: 72ch; margin-bottom: 16px; color: var(--text-secondary); }
.prose p strong { color: var(--text-primary); }

/* ── Recap video ──────────────────────────────────────────────────────────── */
.video-wrap {
  margin-top: 28px; border-radius: var(--radius); overflow: hidden;
  background: var(--aws-squid-ink); border: 1px solid var(--border);
}
.video-wrap video { width: 100%; display: block; aspect-ratio: 16 / 9; background: #000; }
.video-note {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  padding: 14px 18px; font-size: 0.86rem; color: var(--text-light);
}
.video-note a { color: var(--health-green); font-weight: 700; }

/* ── Agenda timeline ──────────────────────────────────────────────────────── */
.agenda { max-width: 900px; }
.agenda-track {
  margin-bottom: 40px; padding: 18px 22px;
  background: var(--white); border: 1px solid var(--border);
  border-left: 4px solid var(--event-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.agenda-track h3 { font-size: 1.15rem; margin-bottom: 6px; }
.agenda-track p { font-size: 0.92rem; color: var(--text-secondary); }
.agenda-track .track-meta {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--health-teal-dark); font-weight: 700; margin-bottom: 8px;
}

.slot {
  display: grid; grid-template-columns: 128px 1fr; gap: 20px;
  padding: 18px 0; border-bottom: 1px solid var(--border);
}
.slot:last-child { border-bottom: none; }
.slot-time { font-weight: 700; font-size: 0.9rem; color: var(--event-accent); white-space: nowrap; }
.slot-title { font-weight: 700; margin-bottom: 4px; }
.slot-kind {
  display: inline-block; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-secondary); border: 1px solid var(--border);
  border-radius: 3px; padding: 1px 6px; margin-left: 8px; vertical-align: 2px;
}
.slot-people { font-size: 0.9rem; color: var(--text-secondary); margin-top: 6px; }
.slot-people div { margin-bottom: 2px; }
.slot-people .org { color: var(--text-secondary); }
.slot.break .slot-title { font-weight: 400; color: var(--text-secondary); }

/* ── Programme format cards (when no timed agenda exists) ─────────────────── */
.formats { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.format {
  background: var(--white); border: 1px solid var(--border);
  border-left: 4px solid var(--health-teal);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 22px;
}
.format h3 { font-size: 1.08rem; margin-bottom: 8px; }
.format p { font-size: 0.92rem; color: var(--text-secondary); }
.invite-only {
  display: inline-block; margin-top: 10px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--accent-purple);
  border: 1px solid var(--accent-purple); border-radius: 3px; padding: 2px 7px;
}

/* ── Topics ───────────────────────────────────────────────────────────────── */
.topics { display: flex; flex-wrap: wrap; gap: 10px; }
.topic {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 16px; font-size: 0.9rem; font-weight: 700;
}

/* ── Speakers ─────────────────────────────────────────────────────────────── */
.speakers { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
.speaker { text-align: center; }
.speaker-photo {
  width: 128px; height: 128px; margin: 0 auto 14px;
  border-radius: 50%; overflow: hidden;
  border: 3px solid var(--white); box-shadow: 0 3px 12px rgba(0, 0, 0, 0.14);
  background: var(--bg-light);
}
.speaker-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.speaker-name { font-weight: 700; margin-bottom: 3px; }
.speaker-role { font-size: 0.85rem; color: var(--text-secondary); }

/* Initials stand-in for speakers whose photograph we do not hold. Better than
   omitting them: the roster stays complete and the titles are the useful part. */
.speaker-photo.initials {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--bg-light) 0%, #dde2e6 100%);
  color: var(--text-secondary);
  font-family: 'Amazon Ember Display', 'Amazon Ember', sans-serif;
  font-size: 1.9rem; font-weight: 700; letter-spacing: 0.02em;
  user-select: none;
}

.roster { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border); }
.roster h3 { font-size: 1.05rem; margin-bottom: 12px; }
.roster p { color: var(--text-secondary); font-size: 0.93rem; max-width: 78ch; }
.roster .names { margin-top: 12px; line-height: 2; }
.roster .names span {
  display: inline-block; background: var(--white);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 3px 10px; margin: 0 6px 6px 0; font-size: 0.88rem;
}

/* ── Organisations ────────────────────────────────────────────────────────── */
.logo-strip {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: center; gap: 40px; margin-bottom: 34px;
}
.logo-strip img { height: 54px; max-width: 190px; object-fit: contain; }
.org-list p { color: var(--text-secondary); font-size: 0.93rem; max-width: 82ch; }

/* Captioned logo grid.
   Preferred over .logo-strip when there are many organisations, or when their
   aspect ratios vary a lot — these range from 1:1 to 7:1, and a bare strip
   makes the wide ones look tiny and the square ones look huge. A fixed-height
   mark box plus a caption normalises that and names each organisation, so a
   logo nobody recognises is still identifiable. */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}
.logo-tile {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 16px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center;
}
.logo-tile .mark {
  height: 50px; width: 100%;
  display: flex; align-items: center; justify-content: center;
}
.logo-tile .mark img { max-height: 50px; max-width: 100%; object-fit: contain; }
.logo-tile .label {
  font-size: 0.8rem; font-weight: 700; line-height: 1.35; color: var(--text-primary);
}
.logo-tile .sub {
  display: block; margin-top: 3px;
  font-size: 0.71rem; font-weight: 400; color: var(--text-secondary);
}

/* ── Photography ──────────────────────────────────────────────────────────── */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.gallery figure { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--bg-light); }
.gallery img { width: 100%; height: 230px; object-fit: cover; display: block; }
.gallery figcaption { padding: 12px 16px; font-size: 0.85rem; color: var(--text-secondary); }

/* ── CTA ──────────────────────────────────────────────────────────────────── */
.cta {
  background: linear-gradient(120deg, var(--health-teal-dark) 0%, var(--event-accent) 100%);
  color: var(--white); text-align: center; padding: 66px 0;
}
.cta h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin-bottom: 12px; }
.cta p { color: var(--text-light); max-width: 62ch; margin: 0 auto 26px; }

/* ── Outcomes pages ───────────────────────────────────────────────────────── */
.head {
  background: linear-gradient(135deg, var(--aws-squid-ink) 0%, var(--aws-dark) 55%, var(--health-teal-dark) 100%);
  color: var(--white); padding: 60px 0 52px;
}
.crumb { font-size: 0.85rem; color: var(--text-light); margin-bottom: 14px; }
.crumb a { color: var(--health-green); }
.head h1 { font-size: clamp(1.8rem, 3.8vw, 2.6rem); margin-bottom: 12px; }
.head p { color: var(--text-light); max-width: 66ch; }

/* Access-scope banner. States the governance rule where it is acted on. */
.scope {
  display: flex; gap: 14px; align-items: flex-start;
  background: #fdf0dc; border: 1px solid #f5dcb0;
  border-left: 4px solid var(--accent-amber);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 18px; margin-bottom: 34px;
}
.scope svg { width: 20px; height: 20px; stroke: var(--accent-amber); fill: none; stroke-width: 2; flex: 0 0 auto; margin-top: 2px; }
.scope p { font-size: 0.9rem; color: #6b4500; }
.scope strong { color: #4a2f00; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }

.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  display: flex; flex-direction: column; gap: 13px;
}
.card h3 { font-size: 1.1rem; }
.card p.desc { font-size: 0.92rem; color: var(--text-secondary); flex: 1; }
.card.template { border-style: dashed; background: transparent; }
.meta { font-size: 0.78rem; color: var(--text-secondary); }

.tag {
  display: inline-flex; align-items: center;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em;
  padding: 3px 9px; border-radius: 4px; border: 1px solid transparent;
}
.tag.wl { background: #e0f5f8; color: var(--health-teal-dark); border-color: #b8e6ee; }
.tag.ok { background: #e3f5ec; color: #1a7f4b; border-color: #b7e4cb; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

.assets { display: flex; flex-wrap: wrap; gap: 8px; }
.asset {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: 6px;
  padding: 7px 12px; font-size: 0.85rem; font-weight: 700;
  color: var(--text-primary); background: var(--white);
}
.asset:hover { border-color: var(--health-teal); color: var(--health-teal-dark); text-decoration: none; }
.asset svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.asset .size { font-weight: 400; color: var(--text-secondary); font-size: 0.78rem; }

/* SharePoint links: NOT hosted here, access enforced by SharePoint.
   Styled distinctly so it is obvious which assets leave the site. */
.asset.source {
  border-style: dashed; border-color: var(--accent-rose);
  color: var(--accent-rose); font-weight: 400;
}
.asset.source:hover { border-color: var(--accent-rose); color: var(--text-primary); }

.pending {
  font-size: 0.78rem; color: var(--accent-amber);
  background: #fdf0dc; border: 1px dashed #f5dcb0;
  border-radius: 4px; padding: 6px 10px;
}

/* Marks a page or section that is knowingly incomplete, so nobody mistakes
   thin content for the whole story. */
.needs-content {
  display: flex; gap: 14px; align-items: flex-start;
  background: #eef3fb; border: 1px solid #cfdcf0;
  border-left: 4px solid var(--health-teal-dark);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 18px; margin-bottom: 32px;
}
.needs-content svg { width: 20px; height: 20px; stroke: var(--health-teal-dark); fill: none; stroke-width: 2; flex: 0 0 auto; margin-top: 2px; }
.needs-content p { font-size: 0.9rem; color: #24486e; }
.needs-content strong { color: #14304d; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
footer { background: var(--aws-squid-ink); color: var(--text-light); padding: 40px 0; font-size: 0.9rem; }
footer .inner { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; }
footer a { color: var(--white); }

@media (max-width: 640px) {
  section { padding: 46px 0; }
  .hero { padding: 54px 0 46px; }
  .head { padding: 44px 0 38px; }
  .facts { gap: 18px; }
  .slot { grid-template-columns: 1fr; gap: 4px; }
}
