/* ==========================================================================
   CORE Research Programme — shared stylesheet
   Colour scheme taken from CRPP branding: orange #eb7a12 (primary),
   blue #017fbf (secondary accent). Orange is intentionally dominant.
   ========================================================================== */

:root {
  --core-orange: #eb7a12;
  --core-orange-dark: #c8630a;
  --core-orange-tint: #fef3e8;
  --core-blue: #017fbf;
  --core-blue-dark: #01659a;
  --core-blue-tint: #e6f4fa;
  --core-ink: #2b2a26;
  --core-ink-soft: #55534a;
  --core-paper: #ffffff;
  --core-paper-warm: #fffaf5;
  --core-border: #ece6db;
  --core-shadow: 0 10px 30px -12px rgba(43, 42, 38, 0.18);
  --core-radius: 14px;
  --core-max: 1160px;
  --core-font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--core-font);
  color: var(--core-ink);
  background: var(--core-paper);
  line-height: 1.6;
}

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

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

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

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; color: var(--core-ink); }
h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--core-orange-dark);
  background: var(--core-orange-tint);
  border: 1px solid var(--core-orange);
  border-radius: 999px;
  padding: 4px 14px;
  margin-bottom: 14px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--core-orange);
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: 4px solid var(--core-orange);
  background: var(--core-paper);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  max-width: var(--core-max);
  margin: 0 auto;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand img { height: 42px; width: auto; }
.brand-text {
  font-size: .78rem;
  color: var(--core-ink-soft);
  line-height: 1.2;
  max-width: 210px;
}
.brand-text strong { color: var(--core-ink); display:block; font-size: .85rem; }

/* ---------- Nav trigger (hamburger) ---------- */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 2px solid var(--core-orange);
  border-radius: 999px;
  padding: 9px 18px 9px 14px;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle:hover { background: var(--core-orange-tint); }
.nav-toggle .bars {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 20px;
  height: 14px;
}
.nav-toggle .bars span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--core-ink);
  border-radius: 2px;
}
.nav-toggle-label {
  font-weight: 700;
  font-size: .9rem;
  color: var(--core-ink);
  letter-spacing: .02em;
}

/* ---------- Off-canvas nav panel (DREAMS-style pop-up) ---------- */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43, 42, 38, .5);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.nav-overlay.is-visible { opacity: 1; pointer-events: auto; }

.nav-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 100%);
  background: var(--core-paper);
  z-index: 210;
  box-shadow: -12px 0 40px rgba(0,0,0,.2);
  transform: translateX(100%);
  transition: transform .3s ease;
  display: flex;
  flex-direction: column;
  border-left: 4px solid var(--core-orange);
}
.nav-panel.is-open { transform: translateX(0); }

.nav-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--core-border);
  flex-shrink: 0;
}
.nav-panel-head img { height: 34px; }
.nav-close {
  background: none;
  border: 2px solid var(--core-border);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--core-ink-soft);
}
.nav-close:hover { border-color: var(--core-orange); color: var(--core-orange-dark); }

.nav-panel-list {
  list-style: none;
  margin: 0;
  padding: 12px 12px 24px;
  overflow-y: auto;
}
.nav-panel-list > li { border-bottom: 1px solid var(--core-border); }
.nav-panel-list > li:last-child { border-bottom: none; }

.nav-panel-list > li > a {
  display: block;
  padding: 16px 12px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--core-ink);
  border-radius: 10px;
}
.nav-panel-list > li > a:hover,
.nav-panel-list > li > a:focus,
.nav-panel-list > li > a.active {
  background: var(--core-orange-tint);
  color: var(--core-orange-dark);
  text-decoration: none;
}

.nav-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  padding: 16px 12px;
  font-weight: 700;
  font-size: 1.05rem;
  font-family: inherit;
  color: var(--core-ink);
  cursor: pointer;
  border-radius: 10px;
}
.nav-group-toggle:hover { background: var(--core-orange-tint); color: var(--core-orange-dark); }
.nav-group-toggle .chev {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s ease;
  flex-shrink: 0;
}
.nav-group-toggle[aria-expanded="true"] .chev { transform: rotate(-135deg); }
.nav-group-toggle.has-active { color: var(--core-orange-dark); }

.nav-sub {
  list-style: none;
  margin: 0;
  padding: 0 0 8px 12px;
  display: none;
}
.nav-sub.is-open { display: block; }
.nav-sub a {
  display: block;
  padding: 12px 12px 12px 16px;
  font-size: .95rem;
  font-weight: 600;
  color: var(--core-ink-soft);
  border-left: 2px solid var(--core-border);
}
.nav-sub a:hover, .nav-sub a:focus, .nav-sub a.active {
  color: var(--core-orange-dark);
  border-left-color: var(--core-orange);
  text-decoration: none;
  background: var(--core-orange-tint);
}

.nav-panel-foot {
  margin-top: auto;
  padding: 20px 24px;
  border-top: 1px solid var(--core-border);
  font-size: .85rem;
  color: var(--core-ink-soft);
  flex-shrink: 0;
}
.nav-panel-foot a { font-weight: 700; }

body.nav-locked { overflow: hidden; }

@media (max-width: 560px) {
  .nav-panel { width: 100%; border-left: none; border-top: 4px solid var(--core-orange); }
  .nav-toggle-label { display: none; }
  .nav-toggle { padding: 10px; border-radius: 10px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--core-orange);
  color: #fff;
  border-color: var(--core-orange);
}
.btn-primary:hover { background: var(--core-orange-dark); border-color: var(--core-orange-dark); color: #fff; text-decoration: none; }
.btn-secondary {
  background: transparent;
  color: var(--core-blue);
  border-color: var(--core-blue);
}
.btn-secondary:hover { background: var(--core-blue); color: #fff; text-decoration: none; }
.btn-ghost {
  background: transparent;
  color: var(--core-ink);
  border-color: var(--core-border);
}
.btn-ghost:hover { border-color: var(--core-orange); color: var(--core-orange-dark); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(150deg, var(--core-orange-tint) 0%, #fff 55%);
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--core-border);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 40px;
  align-items: center;
}
.hero p.lead { font-size: 1.15rem; color: var(--core-ink-soft); max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.hero-logo-card {
  background: #fff;
  border-radius: var(--core-radius);
  box-shadow: var(--core-shadow);
  padding: 28px;
  border: 1px solid var(--core-border);
}
@media (max-width: 800px) {
  .hero-inner { grid-template-columns: 1fr; }
}

.page-hero {
  background: linear-gradient(150deg, var(--core-blue-tint) 0%, #fff 60%);
  padding: 48px 0;
  border-bottom: 1px solid var(--core-border);
  text-align: left;
}
.page-hero .eyebrow { background: var(--core-blue-tint); border-color: var(--core-blue); color: var(--core-blue-dark); }

/* ---------- Sections ---------- */
section.block { padding: 64px 0; }
section.block.tint { background: var(--core-paper-warm); }
section.block.blue-tint { background: var(--core-blue-tint); }
.section-head { max-width: 66ch; margin-bottom: 36px; }
.section-head p { color: var(--core-ink-soft); }

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: 24px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: #fff;
  border: 1px solid var(--core-border);
  border-radius: var(--core-radius);
  padding: 26px;
  border-top: 4px solid var(--core-orange);
  box-shadow: var(--core-shadow);
}
.card.blue { border-top-color: var(--core-blue); }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }

.team-photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin-bottom: 14px;
  border: 2px solid var(--core-border);
}
.card.blue .team-photo { border-color: var(--core-blue); }
.team-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--core-orange-dark);
  background: var(--core-orange-tint);
  border: 2px solid var(--core-orange);
}

.audience-card {
  background: #fff;
  border: 1px solid var(--core-border);
  border-radius: var(--core-radius);
  padding: 26px;
  text-align: left;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.audience-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--core-shadow);
  border-color: var(--core-orange);
  text-decoration: none;
}
.audience-card .tag {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--core-blue-dark);
  margin-bottom: 10px;
}
.audience-card h3 { color: var(--core-ink); margin-bottom: 8px; }
.audience-card p { color: var(--core-ink-soft); flex-grow: 1; }
.audience-card .go { margin-top: 14px; font-weight: 700; color: var(--core-orange-dark); }

/* placeholder / coming-soon state */
.placeholder-card {
  border: 2px dashed var(--core-border);
  border-radius: var(--core-radius);
  padding: 30px;
  text-align: center;
  color: var(--core-ink-soft);
  background: var(--core-paper-warm);
}
.placeholder-card strong { display: block; color: var(--core-ink); margin-bottom: 6px; font-size: 1.05rem; }

/* stat / numbers row */
.stat-row {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.stat-row .stat { min-width: 140px; }
.stat-row .stat .num { font-size: 2rem; font-weight: 800; color: var(--core-orange); }
.stat-row .stat .label { color: var(--core-ink-soft); font-size: .9rem; }

/* affiliation strip */
.affiliation {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--core-border);
  border-radius: var(--core-radius);
  padding: 22px 26px;
}
.affiliation img { height: 60px; width: auto; }
.affiliation .divider { width: 1px; align-self: stretch; background: var(--core-border); }
.affiliation p { margin: 0; color: var(--core-ink-soft); font-size: .95rem; }

/* FAQ */
details.faq {
  border: 1px solid var(--core-border);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 12px;
  background: #fff;
}
details.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--core-ink);
  list-style: none;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::before {
  content: "+";
  color: var(--core-orange);
  font-weight: 800;
  margin-right: 10px;
}
details.faq[open] summary::before { content: "–"; }
details.faq p { margin-top: 10px; color: var(--core-ink-soft); }

/* ---------- Journey scrollytelling (CORE1–CORE4) ----------
   Pattern: sticky visual stage on one side cross-fades between phases while
   the matching phase card scrolls past the vertical centre of the viewport. */
.journey-grid {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 32px;
  align-items: start;
}
.journey-stage {
  position: sticky;
  top: 100px;
  aspect-ratio: 4/3;
  border-radius: var(--core-radius);
  overflow: hidden;
  border: 1px solid var(--core-border);
  background: linear-gradient(150deg, var(--core-orange-tint), var(--core-blue-tint));
  box-shadow: var(--core-shadow);
}
/* Each CORE iteration is one panel of the stage, cross-fading as the timeline
   on the right scrolls. Inside each panel sits its own carousel of slides. */
.phase-viz {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease, visibility .5s;
  background: linear-gradient(150deg, var(--core-orange-tint), var(--core-blue-tint));
}
.phase-viz.tone-blue { background: linear-gradient(150deg, var(--core-blue-tint), var(--core-orange-tint)); }
.phase-viz.active { opacity: 1; visibility: visible; }

/* Per-iteration carousel */
.viz-carousel {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
/* Peek carousel: the active card sits centred with its neighbours just visible
   at either edge, so it reads as scrollable. Cards are offset by a little over
   their own width, which leaves roughly a 10% sliver showing on each side. */
.viz-slide {
  position: absolute;
  top: 52px;
  bottom: 58px;
  left: 11%;
  width: 78%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 22px 24px;
  border-radius: 12px;
  border: 1px solid var(--core-border);
  /* Opaque: a translucent card lets the iteration number and the neighbouring
     slide show straight through it. */
  background: var(--core-paper);
  box-shadow: 0 8px 22px -14px rgba(43, 42, 38, .4);
  transform: translateX(106%) scale(.88);
  opacity: 0;
  transition: transform .5s cubic-bezier(.4, 0, .2, 1), opacity .5s ease;
}
.viz-slide.is-active {
  transform: translateX(0) scale(1);
  opacity: 1;
  z-index: 2;
}
.viz-slide.is-prev,
.viz-slide.is-next {
  opacity: .5;
  z-index: 1;
  cursor: pointer;
}
.viz-slide.is-prev { transform: translateX(-92%) scale(.88); }
.viz-slide.is-next { transform: translateX(92%) scale(.88); }
.viz-slide.is-prev:hover,
.viz-slide.is-next:hover { opacity: .72; }
/* Anything further away waits out of sight on its own side. */
.viz-slide.is-far-prev { transform: translateX(-160%) scale(.8); opacity: 0; }
.viz-slide.is-far-next { transform: translateX(160%) scale(.8); opacity: 0; }

.viz-controls {
  position: absolute;
  left: 30px;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 3;
}
.viz-dots { display: flex; align-items: center; gap: 7px; }
.viz-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(43,42,38,.2);
  cursor: pointer;
  transition: background .25s ease, width .25s ease;
}
.viz-dots button:hover { background: rgba(43,42,38,.4); }
.viz-dots button.is-active { background: var(--core-orange); width: 22px; border-radius: 999px; }
.viz-dots button:focus-visible { outline: 2px solid var(--core-orange-dark); outline-offset: 3px; }

.viz-arrows { display: flex; gap: 8px; }
.viz-arrows .arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--core-border);
  background: rgba(255,255,255,.85);
  color: var(--core-ink);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.viz-arrows .arrow:hover { background: var(--core-orange); border-color: var(--core-orange); color: #fff; }
.viz-arrows .arrow:focus-visible { outline: 2px solid var(--core-orange-dark); outline-offset: 2px; }

.phase-viz .pv-tag {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--core-orange-dark);
  margin-bottom: 8px;
}
.phase-viz.tone-blue .pv-tag { color: var(--core-blue-dark); }
.phase-viz h4 { margin-bottom: 6px; }
.phase-viz p { margin: 0; color: var(--core-ink-soft); font-size: .95rem; max-width: 34ch; }
/* Iteration indicator — moved to the top so it can't clash with each
   carousel's own dots along the bottom. */
.journey-progress {
  position: absolute;
  left: 30px;
  top: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 4;
}
.journey-progress button {
  width: 26px;
  height: 4px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(43,42,38,.15);
  transition: background .3s ease;
  cursor: pointer;
}
.journey-progress button:hover { background: rgba(43,42,38,.32); }
.journey-progress button.active { background: var(--core-orange); }
.journey-progress button:focus-visible { outline: 2px solid var(--core-orange-dark); outline-offset: 3px; }

.phase-steps { display: flex; flex-direction: column; gap: 18px; }
.phase-card {
  border: 1px solid var(--core-border);
  border-radius: var(--core-radius);
  background: #fff;
  padding: 22px 24px;
  transition: border-color .3s ease, background .3s ease, transform .3s ease;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: inherit;
}
/* CORE 1-4 alternate in the CRPP palette: translucent orange, then blue. */
.phase-card:nth-child(odd) {
  background: rgba(235, 122, 18, .10);
  border-color: rgba(235, 122, 18, .35);
}
.phase-card:nth-child(even) {
  background: rgba(1, 127, 191, .10);
  border-color: rgba(1, 127, 191, .35);
}
.phase-card:nth-child(odd):hover  { background: rgba(235, 122, 18, .17); border-color: var(--core-orange); }
.phase-card:nth-child(even):hover { background: rgba(1, 127, 191, .17); border-color: var(--core-blue); }
/* The active card deepens rather than switching colour, so the sequence stays readable. */
.phase-card.active:nth-child(odd) {
  background: rgba(235, 122, 18, .24);
  border-color: var(--core-orange);
}
.phase-card.active:nth-child(even) {
  background: rgba(1, 127, 191, .24);
  border-color: var(--core-blue);
}
.phase-card.active { transform: translateX(8px); }
.phase-card .pc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.phase-card .pc-num {
  font-family: var(--core-font);
  font-weight: 800;
  font-size: .85rem;
  color: var(--core-ink-soft);
  border: 1px solid var(--core-border);
  border-radius: 999px;
  padding: 2px 10px;
  background: rgba(255,255,255,.75);
  white-space: nowrap;
}
.phase-card:nth-child(odd)  .pc-num { color: var(--core-orange-dark); border-color: rgba(235,122,18,.45); }
.phase-card:nth-child(even) .pc-num { color: var(--core-blue-dark);   border-color: rgba(1,127,191,.45); }
.phase-card.active:nth-child(odd)  .pc-num { border-color: var(--core-orange); }
.phase-card.active:nth-child(even) .pc-num { border-color: var(--core-blue); }
.phase-card h4 { margin: 0; }
.phase-card p { margin: 0; color: var(--core-ink-soft); }

@media (max-width: 900px) {
  .journey-grid { grid-template-columns: 1fr; }
  /* Keep 4/3 here — 16/9 leaves too little height once the carousel controls
     take their strip along the bottom. */
  .journey-stage { position: relative; top: auto; aspect-ratio: 4/3; }
  .phase-card.active { transform: none; }
}
@media (max-width: 560px) {
  .viz-slide { padding: 26px 22px 74px; }
  .viz-controls { left: 22px; right: 18px; }
  .journey-progress { left: 22px; top: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .phase-viz, .phase-card, .journey-progress button { transition: none; }
}

/* Form */
form.contact-form { display: grid; gap: 18px; max-width: 620px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }
label { font-weight: 700; font-size: .9rem; display: block; margin-bottom: 6px; }
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--core-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: .95rem;
  background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--core-orange);
  box-shadow: 0 0 0 3px var(--core-orange-tint);
}

/* Contact details list */
.contact-detail { display: flex; gap: 14px; margin-bottom: 20px; }
.contact-detail .icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--core-orange-tint); color: var(--core-orange-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; flex-shrink: 0;
}
.contact-detail h4 { margin-bottom: 2px; }
.contact-detail p { color: var(--core-ink-soft); margin: 0; }

/* CTA banner */
.cta-banner {
  background: var(--core-orange);
  color: #fff;
  border-radius: var(--core-radius);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-banner h2 { color: #fff; margin-bottom: 6px; }
.cta-banner p { color: rgba(255,255,255,.9); margin: 0; }
.cta-banner .btn-primary { background: #fff; color: var(--core-orange-dark); border-color: #fff; }
.cta-banner .btn-primary:hover { background: var(--core-ink); color: #fff; border-color: var(--core-ink); }

/* Footer */
.site-footer {
  background: var(--core-ink);
  color: #d8d5cb;
  padding: 52px 0 24px;
  border-top: 4px solid var(--core-blue);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px; }
.site-footer a { color: #d8d5cb; }
.site-footer a:hover { color: var(--core-orange); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-brand img { height: 34px; margin-bottom: 12px; }
.footer-brand p { font-size: .88rem; color: #b7b4aa; max-width: 32ch; }
.social-row { display: flex; gap: 10px; margin-top: 14px; }
.social-row a {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid #55534a; display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; color: #d8d5cb;
}
.social-row a:hover { border-color: var(--core-orange); color: var(--core-orange); }
.footer-bottom {
  border-top: 1px solid #45443c;
  padding-top: 20px;
  font-size: .82rem;
  color: #a8a59b;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* Breadcrumb-ish page intro */
.page-title-row { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 20px; }

/* Publications list */
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--core-border);
  font-size: .95rem;
  line-height: 1.55;
}
.pub-list li:last-child { border-bottom: none; }
.pub-list .pub-year {
  display: inline-block;
  font-weight: 700;
  color: var(--core-orange-dark);
  margin-right: 4px;
}
.pub-list .pub-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
  padding: 2px 9px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--core-blue-tint);
  color: var(--core-blue-dark);
}
.pub-list .pub-src { color: var(--core-ink-soft); }

/* Publication type jump links */
.pub-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.pub-nav a {
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  padding: 7px 15px;
  border: 1px solid var(--core-border);
  border-radius: 999px;
  background: var(--core-paper);
  color: var(--core-ink);
}
.pub-nav a:hover,
.pub-nav a:focus-visible { border-color: var(--core-blue); color: var(--core-blue-dark); background: var(--core-blue-tint); }
section.block[id] { scroll-margin-top: 96px; }

/* The publications page runs many short type sections — tighten the rhythm */
body[data-page="publications"] section.block { padding: 36px 0; }
body[data-page="publications"] .section-head { margin-bottom: 20px; }
body[data-page="publications"] .pub-nav { margin-bottom: 4px; }

/* Grant rows */
.grant-row {
  display: grid;
  grid-template-columns: 2.2fr .9fr 1fr .7fr;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--core-border);
  font-size: .9rem;
}
.grant-row:first-child { font-weight: 700; color: var(--core-ink-soft); text-transform: uppercase; font-size: .72rem; letter-spacing: .04em; }
.grant-row:last-child { border-bottom: none; }
.grant-status {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 3px 10px;
  border-radius: 999px;
}
.grant-status.active { background: var(--core-orange-tint); color: var(--core-orange-dark); }
.grant-status.closed { background: #eee; color: var(--core-ink-soft); }
@media (max-width: 700px) {
  .grant-row { grid-template-columns: 1fr; gap: 4px; padding: 16px 0; }
  .grant-row:first-child { display: none; }
}

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.small-note { font-size: .85rem; color: var(--core-ink-soft); }

/* ---------- "I am a..." find-your-path heading ---------- */
.path-head .path-intro {
  font-size: 1.22rem;
  line-height: 1.6;
  color: var(--core-ink-soft);
  margin-bottom: 14px;
  max-width: 60ch;
}
.path-head h2 { margin-bottom: 0; }
@media (max-width: 700px) {
  .path-head .path-intro { font-size: 1.08rem; }
}

/* Publications grouped by researcher */
.pub-person {
  margin: 34px 0 6px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--core-orange);
  font-size: 1.15rem;
}
.pub-person:first-of-type { margin-top: 0; }
.pub-person span {
  display: block;
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--core-ink-soft);
  margin-top: 4px;
}

/* ---------- Per-researcher publications dialog ---------- */
.pub-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(43, 42, 38, .55);
}
.pub-modal[hidden] { display: none; }
.pub-modal-box {
  background: var(--core-paper);
  border-radius: var(--core-radius);
  border-top: 5px solid var(--core-orange);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.45);
  width: min(760px, 100%);
  max-height: min(80vh, 760px);
  display: flex;
  flex-direction: column;
}
.pub-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--core-border);
  flex-shrink: 0;
}
.pub-modal-head h2 { margin: 0; font-size: 1.3rem; }
.pub-modal-role {
  margin: 4px 0 0;
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--core-orange-dark);
}
.pub-modal-close {
  background: none;
  border: 2px solid var(--core-border);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--core-ink-soft);
  flex-shrink: 0;
}
.pub-modal-close:hover { border-color: var(--core-orange); color: var(--core-orange-dark); }

/* The scrollable region */
.pub-modal-body {
  overflow-y: auto;
  padding: 4px 24px 8px;
  flex: 1 1 auto;
  overscroll-behavior: contain;
}
.pub-modal-body .pub-list li { font-size: .9rem; }

.pub-modal-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
  padding: 14px 24px 18px;
  border-top: 1px solid var(--core-border);
  font-size: .8rem;
  color: var(--core-ink-soft);
  flex-shrink: 0;
}
.pub-modal-count { font-weight: 700; color: var(--core-ink); }

@media (max-width: 620px) {
  .pub-modal { padding: 12px; }
  .pub-modal-box { max-height: 88vh; }
  .pub-modal-head, .pub-modal-body, .pub-modal-foot { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Decorative shape artwork ----------
   One source file drives both placements — swap --core-art to change the graphic. */
:root {
  --core-art: url("../img/core-shapes.png");             /* square-ish, for the menu corner */
  --core-art-band: url("../img/core-shapes-soft.png");  /* your artwork, recoloured + rounded */
}

/* Header: a warm cream wash across the right, with the artwork bleeding in over it */
.site-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(to right,
    var(--core-paper) 0%, var(--core-paper) 26%, #fdf7ea 52%, #f7edd4 100%);
}
.site-header::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(30%, 470px);
  background: var(--core-art-band) right center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.30) 26%, rgba(0,0,0,.78) 58%, #000 88%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.30) 26%, rgba(0,0,0,.78) 58%, #000 88%);
  pointer-events: none;
  z-index: 0;
}
.header-inner { position: relative; z-index: 1; }
/* Keep the menu button reading as white-on-artwork */
.nav-toggle { background: var(--core-paper); }
.nav-toggle:hover { background: var(--core-orange-tint); }

/* Nav panel: artwork tucked into the bottom-right corner */
.nav-panel { overflow: hidden; }
.nav-panel::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 420px;
  height: 420px;
  background: var(--core-art) right bottom / cover no-repeat;
  /* farthest-side: centred on the bottom-right corner, the far sides sit exactly
     one box-width away, so the radius equals the box and the fade finishes right
     at the straight edges. (closest-side would be 0 here — it hides the layer.) */
  -webkit-mask-image: radial-gradient(circle farthest-side at 100% 100%,
    #000 0%, rgba(0,0,0,.72) 34%, rgba(0,0,0,.34) 58%, rgba(0,0,0,.10) 78%, transparent 100%);
  mask-image: radial-gradient(circle farthest-side at 100% 100%,
    #000 0%, rgba(0,0,0,.72) 34%, rgba(0,0,0,.34) 58%, rgba(0,0,0,.10) 78%, transparent 100%);
  opacity: .62;
  pointer-events: none;
  z-index: 0;
}
.nav-panel-head,
.nav-panel-list,
.nav-panel-foot { position: relative; z-index: 1; }
.nav-panel-foot { background: linear-gradient(to right, var(--core-paper) 55%, rgba(255,255,255,.72)); }

@media (max-width: 700px) {
  .site-header::after { width: min(46%, 260px); }
  .nav-panel::after { width: 300px; height: 300px; }
}

/* ---------- Article & opinion pages ---------- */
.sample-flag {
  display: inline-block;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8a5a00;
  background: #fff3cd;
  border: 1px solid #e0b64d;
  border-radius: 4px;
  padding: 2px 8px;
  margin-left: 8px;
  vertical-align: middle;
}
.sample-banner {
  background: #fff8e6;
  border: 1px solid #e0b64d;
  border-left: 5px solid #e0b64d;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: .9rem;
  color: #6b4a00;
  margin-bottom: 28px;
}
.sample-banner strong { color: #5a3d00; }

/* Topic chips */
.topic-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.topic-chip {
  font-size: .82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--core-border);
  background: var(--core-paper);
  color: var(--core-ink-soft);
  cursor: default;
}
.topic-chip.is-on { background: var(--core-orange-tint); border-color: var(--core-orange); color: var(--core-orange-dark); }

/* Article cards */
.article-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--core-border);
  border-top: 4px solid var(--core-orange);
  border-radius: var(--core-radius);
  background: var(--core-paper);
  padding: 22px 24px;
  height: 100%;
}
.article-card.tone-blue { border-top-color: var(--core-blue); }
.article-card .kicker {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--core-orange-dark);
  margin-bottom: 8px;
}
.article-card.tone-blue .kicker { color: var(--core-blue-dark); }
.article-card h3 { margin-bottom: 8px; }
.article-card p { color: var(--core-ink-soft); font-size: .95rem; }
.article-card .byline {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--core-border);
  font-size: .84rem;
  color: var(--core-ink-soft);
}
.article-card .byline strong { color: var(--core-ink); display: block; }
.article-meta { font-size: .78rem; color: var(--core-ink-soft); margin-top: 4px; }

/* Featured / lead article */
.lead-article {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  align-items: center;
  border: 1px solid var(--core-border);
  border-radius: var(--core-radius);
  background: linear-gradient(120deg, rgba(235,122,18,.08), rgba(1,127,191,.08));
  padding: 32px;
  margin-bottom: 34px;
}
.lead-article h3 { font-size: 1.5rem; }
.lead-article .byline { font-size: .88rem; color: var(--core-ink-soft); }
@media (max-width: 800px) { .lead-article { grid-template-columns: 1fr; padding: 24px; } }

/* Opinion pieces */
.opinion {
  border: 1px solid var(--core-border);
  border-radius: var(--core-radius);
  background: var(--core-paper);
  padding: 26px 28px;
  margin-bottom: 20px;
}
.opinion:nth-of-type(odd)  { background: rgba(235,122,18,.05); border-color: rgba(235,122,18,.28); }
.opinion:nth-of-type(even) { background: rgba(1,127,191,.05);  border-color: rgba(1,127,191,.28); }
.opinion-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 14px; margin-bottom: 12px; }
.opinion-head h3 { margin: 0; }
.opinion .who { font-size: .86rem; color: var(--core-ink-soft); }
.opinion .who strong { color: var(--core-ink); }
.pull-quote {
  margin: 16px 0;
  padding: 14px 20px;
  border-left: 4px solid var(--core-orange);
  font-size: 1.08rem;
  font-style: italic;
  color: var(--core-ink);
  background: rgba(255,255,255,.6);
  border-radius: 0 8px 8px 0;
}
.opinion:nth-of-type(even) .pull-quote { border-left-color: var(--core-blue); }

/* Issue banner for the rotating quarter */
.issue-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(120deg, var(--core-orange), #f0973f);
  color: #fff;
  border-radius: var(--core-radius);
  padding: 22px 28px;
  margin-bottom: 30px;
}
.issue-banner h2 { color: #fff; margin: 0 0 4px; font-size: 1.35rem; }
.issue-banner p { margin: 0; color: rgba(255,255,255,.92); font-size: .95rem; }
.issue-banner .next-up {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Archive list */
.archive-row {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--core-border);
  font-size: .92rem;
}
.archive-row:last-child { border-bottom: none; }
.archive-row .season { font-weight: 700; color: var(--core-orange-dark); }
.archive-row .who { color: var(--core-ink-soft); font-size: .86rem; }
@media (max-width: 700px) {
  .archive-row { grid-template-columns: 1fr; gap: 4px; padding: 16px 0; }
}
