:root {
  --bg: #f8f5ef;
  --paper: rgba(255,255,255,.78);
  --paper-strong: #fffdfa;
  --text: #23181b;
  --muted: #5f5459;
  --border: rgba(92, 23, 40, 0.12);
  --accent: #7d1730;
  --accent-dark: #541022;
  --accent-soft: #f6e6eb;
  --blue: #9fd8ff;
  --shadow: 0 16px 45px rgba(59, 17, 31, 0.13);
  --radius: 28px;
  --container: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(159,216,255,.35), transparent 30%),
    radial-gradient(circle at 100% 0%, rgba(125,23,48,.08), transparent 35%),
    linear-gradient(180deg, #fcfaf6 0%, #f5eee4 100%);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.site-shell { overflow: hidden; }
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: auto 1fr auto; gap: 1rem;
  align-items: center;
  padding: 1rem clamp(1rem, 2vw, 2rem);
  backdrop-filter: blur(18px);
  background: rgba(248,245,239,.84);
  border-bottom: 1px solid rgba(92,23,40,.08);
}
.brand { display: flex; align-items: center; gap: .9rem; }
.brand img { width: 58px; height: 58px; object-fit: contain; }
.brand strong { display: block; font-size: 1rem; }
.brand span { color: var(--muted); font-size: .92rem; }
.nav-menu { display: flex; justify-content: center; gap: 1.25rem; }
.nav-menu a { font-weight: 600; color: var(--muted); }
.nav-menu a:hover { color: var(--accent); }
.toolbar { display: flex; align-items: center; gap: .75rem; }
.lang-switch {
  display: inline-flex; gap: .3rem; padding: .3rem; border-radius: 999px;
  background: rgba(255,255,255,.72); border: 1px solid var(--border);
}
.lang-btn, .senior-btn, .nav-toggle, .btn, .modal-close {
  border: 0; cursor: pointer; font: inherit;
}
.lang-btn {
  min-width: 44px; padding: .55rem .7rem; border-radius: 999px; background: transparent; font-weight: 700; color: var(--muted);
}
.lang-btn.active { background: var(--accent); color: white; }
.senior-btn {
  padding: .8rem 1rem; border-radius: 999px; background: var(--paper-strong);
  box-shadow: var(--shadow); font-weight: 700; color: var(--accent-dark);
}
.nav-toggle { display: none; background: var(--paper-strong); padding: .7rem 1rem; border-radius: 999px; }

.hero {
  position: relative;
  min-height: calc(100vh - 80px);
  display: flex; align-items: center;
  padding: clamp(2rem, 5vw, 5rem) clamp(1rem, 3vw, 2.5rem);
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(248,245,239,.92) 0%, rgba(248,245,239,.65) 45%, rgba(248,245,239,.2) 100%),
    url("images/project-sheet.jpg") center/cover no-repeat;
  opacity: .9;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 180px;
  background: linear-gradient(180deg, transparent, rgba(248,245,239,.95));
}
.hero-inner, .section, .stats, .footer { position: relative; z-index: 1; max-width: var(--container); width: 100%; margin: 0 auto; }
.hero-inner {
  display: grid; grid-template-columns: 1.2fr .85fr; gap: 2rem; align-items: center;
}
.eyebrow, .section-tag {
  display: inline-flex; padding: .45rem .8rem; border-radius: 999px;
  background: rgba(255,255,255,.82); border: 1px solid var(--border);
  color: var(--accent-dark); font-weight: 700; letter-spacing: .03em; text-transform: uppercase; font-size: .78rem;
}
.hero h1, .section h2, .callout h2 {
  font-family: "Cormorant Garamond", serif;
  line-height: .95; letter-spacing: -.02em; margin: .8rem 0 1rem;
}
.hero h1 { font-size: clamp(3rem, 7vw, 6rem); max-width: 11ch; }
.section h2, .callout h2 { font-size: clamp(2.2rem, 4.7vw, 4rem); }
.lead { font-size: clamp(1.07rem, 2vw, 1.25rem); max-width: 58ch; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.6rem 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; padding: .95rem 1.3rem;
  border-radius: 999px; transition: transform .2s ease, box-shadow .2s ease;
  font-weight: 700;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), #a61c41); color: white; box-shadow: var(--shadow); }
.btn-secondary { background: rgba(255,255,255,.82); border: 1px solid var(--border); color: var(--accent-dark); }
.hero-points { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-points span, .commune-badges span {
  padding: .7rem 1rem; border-radius: 999px; background: rgba(255,255,255,.78); border: 1px solid var(--border); color: var(--muted);
}
.floating-card, .programme-card, .team-card, .contact-card, .callout {
  background: linear-gradient(180deg, rgba(255,255,255,.84), rgba(255,255,255,.76));
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.candidate-card {
  border-radius: var(--radius); overflow: hidden; transform: translateY(18px);
}
.candidate-card img { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; }
.candidate-meta { padding: 1.25rem; }
.candidate-kicker { margin: 0 0 .35rem; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; }
.candidate-meta h2 { margin: 0 0 .5rem; font-size: 1.7rem; }
.candidate-meta p { margin: 0; color: var(--muted); }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  padding: 0 clamp(1rem, 3vw, 2.5rem) 2rem;
  margin-top: -2rem;
}
.stats article {
  border-radius: 24px; padding: 1.2rem; background: rgba(255,255,255,.82);
  border: 1px solid var(--border); box-shadow: var(--shadow); text-align: center;
}
.stats strong { display: block; font-size: clamp(1.8rem, 3vw, 2.6rem); color: var(--accent); }
.stats span { color: var(--muted); }

.section { padding: clamp(2rem, 5vw, 5rem) clamp(1rem, 3vw, 2.5rem); }
.section-grid, .commune-section { display: grid; grid-template-columns: 1.05fr .95fr; gap: 2rem; align-items: center; }
.section p { color: var(--muted); font-size: 1.04rem; line-height: 1.75; }
.vision-panel { padding: 1rem; border-radius: var(--radius); display: grid; gap: .9rem; }
.mini-card { padding: 1rem 1.1rem; border-radius: 22px; background: rgba(248,245,239,.95); border: 1px solid var(--border); }
.mini-card strong { display: block; margin-bottom: .25rem; color: var(--accent); }
.section-head { max-width: 820px; margin: 0 auto 2rem; }
.section-head.center { text-align: center; }
.programme-spotlight {
  border-radius: var(--radius); overflow: hidden; display: grid; grid-template-columns: .95fr 1.05fr; margin-bottom: 1.3rem;
}
.spotlight-image img { width: 100%; height: 100%; object-fit: cover; }
.spotlight-copy { padding: clamp(1.2rem, 3vw, 2rem); display: flex; flex-direction: column; justify-content: center; }
.spotlight-copy h3 { margin: .6rem 0; font-size: clamp(1.8rem, 4vw, 2.8rem); font-family: "Cormorant Garamond", serif; }
.programme-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem;
}
.programme-card {
  position: relative; border-radius: 26px; padding: 1.3rem; overflow: hidden;
}
.programme-card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: linear-gradient(180deg, var(--accent), var(--blue));
}
.programme-card img { width: 72px; height: 72px; object-fit: contain; margin-bottom: .6rem; }
.programme-card h3 { margin: .25rem 0 .7rem; font-size: 1.35rem; }
.programme-card p { margin: 0 0 .7rem; }
.programme-card .punch { font-weight: 700; color: var(--accent-dark); }
.team-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1rem;
}
.team-card {
  border-radius: 24px; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease;
}
.team-card:hover { transform: translateY(-6px) scale(1.01); }
.team-card button {
  width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer;
}
.team-card img { aspect-ratio: 1 / 1.08; width: 100%; object-fit: cover; }
.team-card .team-body { padding: 1rem; }
.team-card h3 { margin: 0 0 .4rem; font-size: 1.12rem; }
.team-card p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.55; }
.team-chip { margin-top: .75rem; display: inline-flex; padding: .45rem .75rem; background: var(--accent-soft); color: var(--accent); border-radius: 999px; font-weight: 700; font-size: .8rem; }
.commune-visual { border-radius: var(--radius); padding: 1rem; }
.commune-visual img { border-radius: calc(var(--radius) - 12px); width: 100%; }
.callout { border-radius: var(--radius); display: grid; grid-template-columns: 1.15fr .85fr; gap: 1.25rem; align-items: center; padding: 1.3rem; }
.callout img { border-radius: 24px; width: 100%; object-fit: cover; }
.contact-card {
  max-width: 840px; margin: 0 auto; border-radius: var(--radius); display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1.4rem 1.5rem;
}
.contact-label { text-transform: uppercase; font-size: .8rem; letter-spacing: .05em; color: var(--accent); font-weight: 800; margin: 0 0 .4rem; }
.contact-link { font-size: clamp(1.2rem, 3vw, 1.7rem); font-weight: 800; }
.contact-note { margin: .5rem 0 0; color: var(--muted); }
.footer {
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
  padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 2rem; color: var(--muted);
}

.modal {
  position: fixed; inset: 0; display: none; z-index: 100;
}
.modal.open { display: block; }
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(29, 15, 21, .58); backdrop-filter: blur(6px);
}
.modal-card {
  position: relative; z-index: 1; max-width: 980px; width: calc(100% - 2rem); margin: 4vh auto;
  background: linear-gradient(180deg, #fffdf8, #fff7f4); border-radius: 28px; box-shadow: 0 30px 70px rgba(0,0,0,.22); padding: 1rem;
}
.modal-close {
  position: absolute; top: .85rem; right: .85rem; width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 1.6rem;
}
.modal-content { display: grid; grid-template-columns: 320px 1fr; gap: 1.4rem; align-items: start; }
.modal-content img { border-radius: 22px; aspect-ratio: 1 / 1.12; object-fit: cover; width: 100%; }
.modal-role { margin: .3rem 0; color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; }
.modal-meta { margin-top: .3rem; color: var(--muted); font-weight: 700; }
.modal-bio p { margin: .7rem 0; line-height: 1.75; color: var(--text); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

body.senior-mode { font-size: 118%; }
body.senior-mode .lead,
body.senior-mode .section p,
body.senior-mode .team-card p,
body.senior-mode .contact-note,
body.senior-mode .hero-points span,
body.senior-mode .commune-badges span { font-size: 1.06em; line-height: 1.9; }
body.senior-mode .topbar { background: rgba(255,255,255,.97); }
body.senior-mode .floating-card,
body.senior-mode .programme-card,
body.senior-mode .team-card,
body.senior-mode .contact-card,
body.senior-mode .callout,
body.senior-mode .stats article { background: #fff; border-color: rgba(0,0,0,.1); }

@media (max-width: 1024px) {
  .hero-inner, .section-grid, .commune-section, .callout, .programme-spotlight, .modal-content { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .topbar { grid-template-columns: auto auto; }
  .nav { order: 3; grid-column: 1 / -1; }
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    display: none; margin-top: .8rem; flex-direction: column; align-items: flex-start;
    padding: 1rem; border-radius: 20px; background: rgba(255,255,255,.9); border: 1px solid var(--border);
  }
  .nav-menu.open { display: flex; }
  .hero { min-height: auto; }
  .team-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .programme-grid { grid-template-columns: 1fr; }
  .contact-card, .footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 540px) {
  .topbar { grid-template-columns: 1fr; }
  .toolbar { justify-content: space-between; flex-wrap: wrap; }
  .brand { align-items: flex-start; }
  .brand img { width: 52px; height: 52px; }
  .hero-copy { padding-top: .5rem; }
  .hero h1 { max-width: none; }
  .hero-points { gap: .5rem; }
  .team-grid, .stats { grid-template-columns: 1fr; }
  .modal-card { width: calc(100% - 1rem); margin: 1rem auto; }
  .section, .hero, .stats, .footer { padding-left: 1rem; padding-right: 1rem; }
}
