/* ==========================================================================
   ViSAR — Victim Support through Alignment of Remedies
   Design system. Palette derived from the project logo (assets/images/logo.png):
   grey "V", rose "i", crimson "SAR".
   Self-contained: no external fonts, scripts or trackers (EU/GDPR friendly).
   ========================================================================== */

:root {
  /* Brand */
  --red: #9e1b1b;
  --red-dark: #7a1414;
  --red-soft: #c56d6d;
  --rose: #a67c7c;
  --rose-tint: #d9bfbf;
  --grey: #8e8e8e;
  --charcoal: #3d3b3a;
  --charcoal-dark: #292827;

  /* Neutrals */
  --ink: #1f1d1c;
  --ink-soft: #5c5654;
  --line: #e6dedb;
  --line-strong: #d5c9c5;
  --bg: #ffffff;
  --tint: #faf6f5;
  --tint-2: #f3ecea;

  /* Typography */
  --font-sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-head: var(--font-sans);

  /* Shape & depth */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-xs: 0 1px 2px rgba(31, 29, 28, 0.06);
  --shadow-sm: 0 2px 8px rgba(31, 29, 28, 0.07);
  --shadow-md: 0 10px 28px rgba(31, 29, 28, 0.10);
  --shadow-lg: 0 22px 48px rgba(31, 29, 28, 0.14);

  /* Layout */
  --max-width: 1180px;
  --max-narrow: 900px;
  --header-h: 88px;
  --transition: 180ms ease;
}

/* --------------------------------------------------------------- Reset --- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--charcoal-dark);
  line-height: 1.22;
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.5vw, 2.05rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); font-weight: 600; }
h4 { font-size: 1.02rem; font-weight: 600; }

p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--red);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition);
}
a:hover { color: var(--red-dark); }

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

ul, ol { margin: 0 0 1.1rem; padding-left: 1.3rem; }
li { margin-bottom: 0.4rem; }
li:last-child { margin-bottom: 0; }

strong { color: var(--charcoal-dark); }

/* On dark backgrounds emphasis must stay legible */
.hero strong,
.page-hero strong,
.section-dark strong,
.event--featured strong,
.avatar-visual strong,
.site-footer strong { color: #fff; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

/* -------------------------------------------------------------- Layout --- */

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

.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-tint { background: var(--tint); }
.section-dark { background: var(--charcoal-dark); color: #e9e4e2; }
.section-dark h2,
.section-dark h3 { color: #fff; }
.section-sm { padding: clamp(2rem, 4vw, 3rem) 0; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 2000;
  padding: 0.7rem 1.1rem;
  background: var(--red);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  transition: top var(--transition);
}
.skip-link:focus { top: 0; color: #fff; }

/* -------------------------------------------------------------- Header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--transition);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.logo-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.logo-link img {
  height: auto;
  max-height: 62px;
  width: auto;
  max-width: min(260px, 52vw);
  object-fit: contain;
}

/* Nav toggle (mobile) */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Nav panel */
.main-nav {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  padding: 0.75rem 1.25rem 1.25rem;
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  /* visibility flips instantly on open and only after the fade on close */
  transition: transform var(--transition), opacity var(--transition), visibility 0s linear 180ms;
}
.main-nav.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition: transform var(--transition), opacity var(--transition), visibility 0s;
}

.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list > li { position: relative; margin: 0; }

.nav-list a {
  display: block;
  padding: 0.7rem 0.85rem;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.nav-list a:hover { background: var(--tint-2); color: var(--red); }
.nav-list a.active,
.nav-list a[aria-current="page"] { color: var(--red); }

.has-dropdown > a { display: flex; align-items: center; gap: 0.35rem; }
.has-dropdown > a::after {
  content: "";
  width: 0.42em;
  height: 0.42em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: 0.65;
  transition: transform var(--transition);
}

.dropdown {
  list-style: none;
  margin: 0.15rem 0 0.5rem;
  padding: 0.25rem 0 0.25rem 0.9rem;
  border-left: 2px solid var(--line);
}
.dropdown a { font-size: 0.9rem; font-weight: 500; color: var(--ink-soft); }

@media (min-width: 1024px) {
  .nav-toggle { display: none; }

  .main-nav {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 0;
    border: 0;
    box-shadow: none;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: transparent;
  }

  .nav-list { display: flex; align-items: center; gap: 0.1rem; }
  .nav-list a { padding: 0.55rem 0.75rem; font-size: 0.9rem; }

  .nav-list > li > a {
    position: relative;
  }
  .nav-list > li > a::before {
    content: "";
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.15rem;
    height: 2px;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
  }
  .nav-list > li > a.active::before,
  .nav-list > li > a:hover::before { transform: scaleX(1); }

  .dropdown {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    min-width: 250px;
    margin: 0;
    padding: 0.4rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity var(--transition), transform var(--transition), visibility 0s linear 180ms;
  }
  .has-dropdown:hover > .dropdown,
  .has-dropdown:focus-within > .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity var(--transition), transform var(--transition), visibility 0s;
  }
  .has-dropdown:hover > a::after,
  .has-dropdown:focus-within > a::after { transform: translateY(1px) rotate(225deg); }
  .dropdown a { padding: 0.55rem 0.7rem; }
}

/* ---------------------------------------------------------------- Hero --- */

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(120% 130% at 88% 8%, rgba(198, 110, 110, 0.55) 0%, rgba(198, 110, 110, 0) 55%),
    linear-gradient(135deg, var(--charcoal-dark) 0%, #5c4342 42%, var(--red) 100%);
  padding: clamp(3.25rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(115deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 34px);
  opacity: 0.7;
  pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.32rem 0.85rem;
  margin-bottom: 1.25rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
}

.hero h1 { color: #fff; margin-bottom: 0.4rem; }

.hero-subtitle {
  font-size: clamp(1.1rem, 0.95rem + 0.7vw, 1.5rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 1.75rem;
  max-width: 40ch;
}

.hero-lead { max-width: 62ch; }
.hero-lead p {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* Inner-page hero */
.page-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(100% 140% at 90% 0%, rgba(166, 124, 124, 0.5) 0%, rgba(166, 124, 124, 0) 60%),
    linear-gradient(120deg, var(--charcoal-dark) 0%, #5c4342 60%, var(--red) 130%);
  padding: clamp(2.5rem, 5vw, 3.75rem) 0;
}
.page-hero h1 { color: #fff; margin-bottom: 0.5rem; }
.page-hero .page-hero-intro {
  max-width: 68ch;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0;
}

.breadcrumb {
  margin: 0 0 0.9rem;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.78);
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
}
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.4rem; opacity: 0.6; }
.breadcrumb a { color: #fff; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: rgba(255, 255, 255, 0.8); }

/* ------------------------------------------------------------- Buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.4rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--red); border-color: var(--red); color: #fff; box-shadow: var(--shadow-xs); }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; box-shadow: var(--shadow-sm); }

.btn-outline { background: transparent; border-color: var(--line-strong); color: var(--charcoal-dark); }
.btn-outline:hover { border-color: var(--red); color: var(--red); background: var(--tint); }

.btn-light { background: #fff; border-color: #fff; color: var(--red); }
.btn-light:hover { background: rgba(255, 255, 255, 0.9); color: var(--red-dark); }

.btn-outline-light { background: transparent; border-color: rgba(255, 255, 255, 0.65); color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.16); border-color: #fff; color: #fff; }

.btn-sm { padding: 0.48rem 0.95rem; font-size: 0.84rem; }

/* Document link buttons (agenda / materials / minutes) */
.btn[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.62;
  transform: none;
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.25rem;
}
.doc-actions .doc-note {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* ------------------------------------------------- Section furniture ----- */

.section-head { max-width: 62ch; margin-bottom: 2.5rem; }
.section-head.centered { margin-inline: auto; text-align: center; }

.kicker {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}
.section-dark .kicker { color: var(--rose-tint); }

.section-head h2 { margin-bottom: 0.85rem; }
.section-head p { color: var(--ink-soft); margin-bottom: 0; }
.section-dark .section-head p { color: rgba(255, 255, 255, 0.85); }

.lead {
  font-size: clamp(1.02rem, 0.98rem + 0.25vw, 1.15rem);
  color: var(--ink-soft);
}

/* ---------------------------------------------------------- Prose block --- */

.prose { max-width: 74ch; }
.prose h2 {
  margin-top: 2.75rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}
.prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { margin-top: 2rem; color: var(--red); }
.prose ul { padding-left: 1.15rem; }
.prose ul li::marker { color: var(--rose); }

.prose-wide { max-width: none; }

/* ----------------------------------------------------------- Card grids --- */

.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) {
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, var(--grey), var(--rose) 55%, var(--red));
  opacity: 0;
  transition: opacity var(--transition);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.card:hover::before { opacity: 1; }

.card h3 { margin-bottom: 0.6rem; }
.card p { color: var(--ink-soft); font-size: 0.96rem; margin-bottom: 0; }

.card-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 1.1rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--grey), var(--rose) 55%, var(--red));
  box-shadow: var(--shadow-xs);
}

/* Feature list (bulleted highlight lists) */
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
}
.pill-list li {
  margin: 0;
  padding: 0.4rem 0.9rem;
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--charcoal-dark);
  background: var(--tint-2);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.section-dark .pill-list li {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

/* Check / bullet list with accent markers */
.marker-list { list-style: none; padding: 0; margin: 0 0 1.1rem; }
.marker-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.7rem;
}
.marker-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--rose);
  transform: rotate(45deg);
}
.section-dark .marker-list li::before { background: var(--rose-tint); }

/* Objectives */
.objective-list { list-style: none; padding: 0; margin: 0; counter-reset: obj; }
.objective-list li {
  position: relative;
  margin-bottom: 1rem;
  padding: 1.15rem 1.35rem 1.15rem 3.6rem;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-xs);
}
.objective-list li::before {
  counter-increment: obj;
  content: counter(obj, decimal-leading-zero);
  position: absolute;
  left: 1.2rem;
  top: 1.15rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--rose);
  letter-spacing: 0.02em;
}

/* ------------------------------------------------------------ Consortium -- */

.consortium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}
@media (min-width: 900px) {
  .consortium-grid { grid-template-columns: repeat(4, 1fr); }
}

.partner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 128px;
  margin: 0;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.partner:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--line-strong); }
.partner img { max-height: 78px; width: auto; object-fit: contain; }
.partner--tall img { max-height: 96px; }
.partner--lead { border-color: var(--rose); box-shadow: var(--shadow-xs); }

.partner-caption {
  margin-top: 1.75rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: center;
}

/* -------------------------------------------------------------- Events --- */

.event {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: 1.75rem;
}
.event:last-child { margin-bottom: 0; }

.event--featured {
  border: 0;
  color: #fff;
  background:
    radial-gradient(90% 120% at 85% 10%, rgba(197, 109, 109, 0.5) 0%, rgba(197, 109, 109, 0) 60%),
    linear-gradient(125deg, var(--charcoal-dark), var(--red) 140%);
  box-shadow: var(--shadow-md);
}
.event--featured h2,
.event--featured h3 { color: #fff; }
.event--featured p { color: rgba(255, 255, 255, 0.9); }
.event--featured .event-meta { color: rgba(255, 255, 255, 0.88); }
.event--featured .event-meta span { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.25); }
.event--featured .kicker { color: var(--rose-tint); }
.event--featured .marker-list li::before { background: var(--rose-tint); }

.event-title { margin-bottom: 0.3rem; }
.event-subtitle {
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--rose);
  margin-bottom: 1rem;
}
.event--featured .event-subtitle { color: var(--rose-tint); }

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.35rem;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.event-meta li { margin: 0; }
.event-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.8rem;
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.event-topics { margin-top: 1.5rem; }
.event-topics h4 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
}
.event--featured .event-topics h4 { color: rgba(255, 255, 255, 0.75); }

/* Event picture gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.7rem;
  margin-top: 1.25rem;
}
@media (min-width: 700px) {
  .gallery { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}

.gallery-item {
  position: relative;
  display: block;
  overflow: hidden;
  margin: 0;
  aspect-ratio: 4 / 3;
  background: var(--tint-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: zoom-in;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms ease;
}
.gallery-item:hover,
.gallery-item:focus-visible {
  border-color: var(--rose);
  box-shadow: var(--shadow-sm);
}
.gallery-item:hover img { transform: scale(1.04); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(18, 16, 15, 0.94);
}
.lightbox[hidden] { display: none; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 16, 15, 0.6);
}

.lightbox-dialog {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  height: 100%;
  padding: 3.5rem 0.75rem 3rem;
}

.lightbox-figure {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin: 0;
  min-height: 0;
  height: 100%;
}
.lightbox-figure img {
  max-width: 100%;
  max-height: calc(100vh - 11rem);
  width: auto;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  background: #17151480;
}
.lightbox-figure figcaption {
  max-width: 70ch;
  color: #efe9e7;
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
}

.lightbox-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.24); }
.lightbox-prev { grid-column: 1; }
.lightbox-next { grid-column: 3; }
.lightbox-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  font-size: 1.1rem;
}
.lightbox-counter {
  position: absolute;
  bottom: 0.9rem;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.75);
}

/* On small screens the arrows float over the image so it can use full width */
@media (max-width: 700px) {
  .lightbox-dialog {
    grid-template-columns: 1fr;
    padding: 3.25rem 0.5rem 3.25rem;
  }
  .lightbox-figure { grid-column: 1; }
  .lightbox-prev,
  .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(18, 16, 15, 0.6);
  }
  .lightbox-prev { left: 0.4rem; }
  .lightbox-next { right: 0.4rem; }
  .lightbox-figure img { max-height: calc(100vh - 12rem); }
}

body.lightbox-open { overflow: hidden; }

/* Document lists (event materials) */
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li {
  position: relative;
  padding: 0.7rem 0 0.7rem 1.9rem;
  border-bottom: 1px solid var(--line);
}
.doc-list li:last-child { border-bottom: 0; }
.doc-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05em;
  width: 12px;
  height: 15px;
  border: 1.5px solid var(--rose);
  border-radius: 2px;
  background:
    linear-gradient(var(--rose), var(--rose)) no-repeat 2px 4px / 6px 1.5px,
    linear-gradient(var(--rose), var(--rose)) no-repeat 2px 7px / 6px 1.5px;
}
.doc-list a { font-weight: 600; text-decoration: none; }
.doc-list a:hover { text-decoration: underline; }
.doc-meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.doc-size {
  font-weight: 400;
  font-size: 0.78rem;
  opacity: 0.75;
}

/* Timeline (project meetings) */
.timeline { position: relative; margin: 0; padding: 0 0 0 1.9rem; list-style: none; }
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0.6rem;
  bottom: 0.6rem;
  width: 2px;
  background: linear-gradient(180deg, var(--rose), var(--line));
}
.timeline > li { position: relative; margin-bottom: 1.75rem; }
.timeline > li:last-child { margin-bottom: 0; }
.timeline > li::before {
  content: "";
  position: absolute;
  left: -1.9rem;
  top: 1.9rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--red);
}

/* -------------------------------------------------------------- Modules --- */

.module-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .module-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1050px) { .module-grid { grid-template-columns: repeat(3, 1fr); } }

.module {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.module:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--rose); }

.module-num {
  align-self: flex-start;
  padding: 0.22rem 0.62rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  background: var(--tint-2);
  border-radius: 999px;
}
.module h3 { font-size: 1.05rem; margin: 0; }
.module .module-source {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--rose);
  margin: 0;
}
.module p { font-size: 0.93rem; color: var(--ink-soft); margin: 0; }

/* ---------------------------------------------------------- Highlights --- */

.callout {
  padding: 1.5rem 1.75rem;
  background: var(--tint);
  border: 1px solid var(--line);
  border-left: 4px solid var(--rose);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 2rem 0;
}
.callout h3 { margin-bottom: 0.6rem; }
.callout p:last-child { margin-bottom: 0; }

.notice {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 2.5rem;
  text-align: center;
  align-items: center;
  background: var(--tint);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--ink-soft);
}
.notice .notice-badge {
  padding: 0.3rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.stat-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 2.5rem;
}
.stat {
  padding: 1.4rem 1.25rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
}
.stat dt {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--rose-tint);
  margin-bottom: 0.35rem;
}
.stat dd { margin: 0; font-size: 1.05rem; font-weight: 600; color: #fff; line-height: 1.4; }

/* CTA band */
.cta-band {
  background: var(--tint);
  border-top: 1px solid var(--line);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0;
}
.cta-band .cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.cta-band h2 { margin-bottom: 0.35rem; }
.cta-band p { color: var(--ink-soft); margin-bottom: 0; max-width: 58ch; }

/* Avatar / AI page */
.avatar-layout {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}
@media (min-width: 900px) {
  .avatar-layout { grid-template-columns: 1.15fr 0.85fr; gap: 3rem; }
}
.avatar-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 2rem;
  border-radius: var(--radius-lg);
  color: #fff;
  text-align: center;
  background:
    radial-gradient(80% 100% at 50% 0%, rgba(197, 109, 109, 0.55) 0%, rgba(197, 109, 109, 0) 65%),
    linear-gradient(150deg, var(--charcoal-dark), var(--red) 160%);
  box-shadow: var(--shadow-md);
}
.avatar-visual .avatar-mark {
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.avatar-visual p { color: rgba(255, 255, 255, 0.86); font-size: 0.92rem; margin: 0; }
.avatar-visual h3 { color: #fff; margin-bottom: 0.4rem; }

.feature-list { display: grid; gap: 1rem; margin: 1.75rem 0 0; padding: 0; list-style: none; }
.feature-list li {
  display: flex;
  gap: 0.9rem;
  margin: 0;
  padding: 1rem 1.15rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.feature-list .feature-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--tint-2);
  color: var(--red);
  font-weight: 700;
  font-size: 0.9rem;
}
.feature-list strong { display: block; margin-bottom: 0.15rem; }
.feature-list span.feature-text { font-size: 0.92rem; color: var(--ink-soft); }

/* -------------------------------------------------------------- Footer --- */

.site-footer {
  background: var(--charcoal-dark);
  color: #cfc7c4;
  font-size: 0.92rem;
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 1.5rem;
}
.site-footer a { color: var(--rose-tint); }
.site-footer a:hover { color: #fff; }

.footer-grid {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 2rem;
}
@media (min-width: 860px) {
  .footer-grid { grid-template-columns: minmax(240px, 320px) 1fr auto; gap: 3rem; }
}

.footer-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.footer-logos .logo-project {
  max-height: 74px;
  width: auto;
  background: #fff;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
}
/* EU emblem sits on the dark footer: transparent background, white wordmark */
.footer-logos .eu-logo { max-height: 56px; max-width: min(230px, 100%); width: auto; }

.footer-meta h2 {
  font-size: 1.02rem;
  color: #fff;
  margin-bottom: 1rem;
}
.footer-facts { margin: 0; display: grid; gap: 0.45rem; }
.footer-facts div { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.footer-facts dt { font-weight: 600; color: #fff; margin: 0; }
.footer-facts dd { margin: 0; color: #cfc7c4; }

.footer-nav h2 { font-size: 1.02rem; color: #fff; margin-bottom: 1rem; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }

.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 1.35rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #a79f9c;
}
.footer-legal p { margin-bottom: 0.75rem; }
.footer-legal p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------ Utilities --- */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 1.5rem; }
.mt-3 { margin-top: 2.25rem; }
.mb-0 { margin-bottom: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Scroll reveal — only applied when JavaScript is available, so content is
   always visible if scripts are blocked or fail. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 500ms ease, transform 500ms ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ----------------------------------------------------------------- Print -- */

@media print {
  .site-header, .nav-toggle, .main-nav, .cta-band, .skip-link { display: none !important; }
  body { color: #000; font-size: 11pt; }
  .hero, .page-hero, .event--featured, .site-footer { background: none !important; color: #000; }
  .hero h1, .page-hero h1, .event--featured h2, .event--featured h3 { color: #000; }
  .hero-lead p, .page-hero .page-hero-intro, .event--featured p { color: #000; }
  a { color: #000; text-decoration: underline; }
  .card, .module, .event, .partner { box-shadow: none; break-inside: avoid; }
}
