:root {
  --primary: #767CC4;
  --primary-dark: #5a5e95;
  --accent: #BABFFF;
  --surface: #E1E3FB;
  --surface-soft: #f8f8fc;
  --ink: #24222F;
  --ink-soft: #6e6c75;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 18px 40px -24px rgba(36, 34, 47, 0.45);
  --maxw: 1140px;

  /* Hub core (deep purple from the concept) */
  --hub-deep: #402a60;
  --hub-deeper: #33214d;

  /* Persona palette (from the ecosystem infographic) */
  --p1: #1b5fa8; /* political level — blue */
  --p2: #7a2f8f; /* b2b — purple */
  --p3: #1e8a4c; /* education & research — green */
  --p4: #f07c1d; /* social institutions — orange */
  --p5: #e84a7f; /* victims — pink */
  --p6: #12876f; /* helpers — teal */
  --p7: #2456a8; /* justice — blue */
  --p8: #ef7f22; /* perpetrator work — orange */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.85rem;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }

.accent { color: var(--primary); }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn--primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 10px 24px -10px rgba(118, 124, 196, 0.8);
}
.btn--primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--surface);
}
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ===== Navbar ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--surface-soft);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand { display: flex; align-items: center; gap: 0.55rem; }
.nav__logo { height: 26px; width: auto; display: block; }
.nav__badge {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--primary);
  background: var(--surface);
  padding: 0.15rem 0.6rem;
  border-radius: 8px;
  letter-spacing: 0.02em;
}
.nav__links { display: flex; align-items: center; gap: 1.6rem; font-weight: 500; font-size: 0.95rem; }
.nav__links a { color: var(--ink-soft); transition: color 0.15s ease; }
.nav__links a:hover { color: var(--ink); }
.nav__cta {
  background: var(--ink);
  color: var(--white) !important;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
}
.nav__cta:hover { background: var(--primary-dark); }

/* ===== Language switcher ===== */
.lang {
  display: inline-flex;
  gap: 2px;
  background: var(--surface-soft);
  border: 1px solid var(--surface);
  border-radius: 999px;
  padding: 3px;
}
.lang button {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  padding: 0.26rem 0.58rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang button:hover { color: var(--ink); }
.lang button.active { background: var(--primary); color: var(--white); }

/* ===== Hero ===== */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 5rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 700; margin-bottom: 1.2rem; }
.lead { font-size: 1.08rem; color: var(--ink-soft); max-width: 44ch; }
.hero__actions { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.hero__note { margin-top: 1.4rem; font-size: 0.85rem; color: var(--ink-soft); }

/* ===== Ecosystem diagram (8 personas around the hub) ===== */
.eco {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--surface) 0%, var(--surface-soft) 58%, transparent 70%);
}
.eco__core {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 190px; height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, var(--hub-deep), var(--hub-deeper));
  color: var(--white);
  box-shadow: 0 24px 50px -20px rgba(51, 33, 77, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  text-align: center;
  padding: 1rem;
  z-index: 2;
}
.eco__core-logo { width: 40px; height: 40px; margin-bottom: 0.15rem; }
.eco__core strong { font-size: 0.92rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.25; }
.eco__core small { font-size: 0.6rem; line-height: 1.5; color: rgba(255,255,255,0.82); font-weight: 500; }
.hnode {
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  background: var(--white);
  border: 1.5px solid var(--surface);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.32rem 0.7rem 0.32rem 0.36rem;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 8px 20px -14px rgba(36,34,47,0.5);
  transition: transform 0.15s ease, border-color 0.15s ease;
  z-index: 3;
}
.hnode:hover { transform: translate(-50%, -50%) scale(1.06); border-color: var(--pc); }
.hnode i {
  font-style: normal;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--pc);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.hnode--1 { left: 50%; top: 4%; }
.hnode--2 { left: 84%; top: 17%; }
.hnode--3 { left: 97%; top: 50%; }
.hnode--4 { left: 84%; top: 83%; }
.hnode--5 { left: 50%; top: 96%; }
.hnode--6 { left: 16%; top: 83%; }
.hnode--7 { left: 3%;  top: 50%; }
.hnode--8 { left: 16%; top: 17%; }

/* Mobile-only legend for the ecosystem diagram */
.eco-legend { display: none; }

/* Persona color helpers */
.pc1 { --pc: var(--p1); }
.pc2 { --pc: var(--p2); }
.pc3 { --pc: var(--p3); }
.pc4 { --pc: var(--p4); }
.pc5 { --pc: var(--p5); }
.pc6 { --pc: var(--p6); }
.pc7 { --pc: var(--p7); }
.pc8 { --pc: var(--p8); }

/* ===== Section heads ===== */
.section-head { text-align: center; max-width: 680px; margin: 0 auto 3rem; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 700; margin-bottom: 0.7rem; }
.section-head p { color: var(--ink-soft); }

/* ===== Persona cards ===== */
.personas { max-width: var(--maxw); margin: 0 auto; padding: 4rem 1.5rem; }
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.3rem;
}
.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--surface-soft);
  border-top: 4px solid var(--pc, var(--primary));
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.4rem;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-6px); border-color: var(--pc, var(--accent)); }
.card__num {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--pc, var(--primary));
  color: var(--white);
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.9rem;
}
.card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.25rem; color: var(--pc, var(--ink)); }
.card .card__who { color: var(--ink-soft); font-size: 0.82rem; margin-bottom: 0.75rem; }
.card p.card__desc { color: var(--ink); font-size: 0.86rem; margin-bottom: 0.9rem; }
.card__more {
  display: inline-block;
  margin-top: auto;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--pc, var(--primary));
}

/* ===== Istanbul Convention compass ===== */
.compass {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 4rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 3rem;
  align-items: center;
}
.compass h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 700; margin-bottom: 1rem; }
.compass__text p { color: var(--ink-soft); margin-bottom: 1rem; }
.compass__panel {
  background: linear-gradient(160deg, #f4effc 0%, var(--surface-soft) 100%);
  border: 1px solid #e5dcf5;
  border-radius: var(--radius);
  padding: 2rem;
}
.compass__panel h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--hub-deep);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.compass__panel > p { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 1.1rem; }
.checks { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; }
.checks li {
  position: relative;
  padding-left: 1.8rem;
  font-size: 0.93rem;
  font-weight: 500;
}
.checks li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 0.05em;
  width: 1.2rem; height: 1.2rem;
  border-radius: 50%;
  background: var(--hub-deep);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.checks li em { color: var(--ink-soft); font-style: normal; font-weight: 400; }

/* ===== Cost of inaction ===== */
.costs {
  background: linear-gradient(160deg, var(--hub-deeper) 0%, var(--hub-deep) 100%);
  color: var(--white);
  padding: 4.5rem 1.5rem;
}
.costs .section-head h2 { color: var(--white); }
.costs .section-head p { color: rgba(255,255,255,0.75); }
.costs .eyebrow { color: var(--accent); }
.stats {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.3rem;
}
.stat {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
  text-align: center;
}
.stat strong { display: block; font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; letter-spacing: -0.02em; }
.stat span { font-size: 0.85rem; color: rgba(255,255,255,0.78); line-height: 1.45; display: block; margin-top: 0.35rem; }
.costs__note {
  max-width: var(--maxw);
  margin: 1.6rem auto 0;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
}

/* ===== Summary pillars ===== */
.pillars-wrap { max-width: var(--maxw); margin: 0 auto; padding: 4.5rem 1.5rem 3rem; }
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.3rem;
}
.pillar {
  background: var(--white);
  border: 1px solid var(--surface-soft);
  border-radius: var(--radius);
  padding: 1.7rem 1.5rem;
  box-shadow: var(--shadow);
}
.pillar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 13px;
  background: var(--surface);
  color: var(--primary-dark);
  margin-bottom: 1rem;
}
.pillar__icon svg { width: 24px; height: 24px; }
.pillar h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: 0.45rem; }
.pillar p { color: var(--ink-soft); font-size: 0.88rem; }

/* ===== CTA ===== */
.cta {
  max-width: 760px;
  margin: 3rem auto 5rem;
  padding: 3.5rem 2rem;
  text-align: center;
  background: var(--ink);
  color: var(--white);
  border-radius: 28px;
}
.cta h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; margin-bottom: 0.6rem; }
.cta p { color: rgba(255,255,255,0.7); margin-bottom: 1.8rem; }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--surface-soft);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.88rem;
}
.footer__logo { height: 22px; margin-bottom: 0.6rem; }

/* ===== Persona sub-pages ===== */
.subhero {
  max-width: 860px;
  margin: 0 auto;
  padding: 4rem 1.5rem 2rem;
  text-align: center;
}
.back {
  display: inline-block;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 1.6rem;
}
.back:hover { color: var(--primary); }
.subhero__icon {
  position: relative;
  width: 88px; height: 88px;
  border-radius: 24px;
  background: color-mix(in srgb, var(--pc, var(--primary)) 14%, white);
  color: var(--pc, var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.4rem;
  box-shadow: var(--shadow);
}
.subhero__icon svg { width: 42px; height: 42px; }
.subhero__icon .badge-num {
  position: absolute;
  top: -10px; right: -10px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--pc, var(--primary));
  color: var(--white);
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px -6px rgba(0,0,0,0.35);
}
.subhero h1 { font-size: clamp(2rem, 4.6vw, 3rem); font-weight: 700; margin-bottom: 0.5rem; }
.subhero__who { color: var(--pc, var(--primary)); font-weight: 600; font-size: 0.95rem; margin-bottom: 1rem; }
.subhero .lead { margin: 0 auto; max-width: 58ch; }

/* USP checklist section on persona pages */
.usp-wrap { max-width: 860px; margin: 0 auto; padding: 1.5rem 1.5rem 1rem; }
.usp-panel {
  background: linear-gradient(160deg, color-mix(in srgb, var(--pc, var(--primary)) 8%, white) 0%, var(--surface-soft) 100%);
  border: 1px solid color-mix(in srgb, var(--pc, var(--primary)) 22%, white);
  border-radius: var(--radius);
  padding: 2rem 2.2rem;
}
.usp-panel h2 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--pc, var(--primary-dark));
  margin-bottom: 1.1rem;
}
.usp-panel .checks li::before { background: var(--pc, var(--primary)); }

.areas-wrap { max-width: var(--maxw); margin: 0 auto; padding: 2.5rem 1.5rem 3rem; }
.areas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.areas--4 { grid-template-columns: repeat(4, 1fr); }
.area {
  background: var(--white);
  border: 1px solid var(--surface-soft);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
}
.area__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--pc, var(--primary)) 13%, white);
  color: var(--pc, var(--primary-dark));
  margin-bottom: 1rem;
}
.area__icon svg { width: 28px; height: 28px; }
.area h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.5rem; }
.area p { color: var(--ink-soft); font-size: 0.93rem; }
.area p em { color: var(--pc, var(--primary)); font-style: normal; font-weight: 600; }

.connect {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem 1rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.connect a { color: var(--primary); font-weight: 600; }

/* ===== Responsive ===== */
@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .areas, .areas--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  /* minmax(0,1fr): don't let long words (DE compounds) force the column wider than the viewport */
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 3rem; }
  .hero > *, .compass > * { min-width: 0; } /* grid items default to min-width:auto and refuse to shrink */
  .hero h1, .subhero h1, .compass h2, .section-head h2 { overflow-wrap: anywhere; hyphens: auto; }
  .eco { order: -1; max-width: 380px; }
  .eco__core { width: 150px; height: 150px; }
  .eco__core small { display: none; }
  .compass { grid-template-columns: 1fr; }
  .hnode span { font-size: 0.68rem; }
}
@media (max-width: 560px) {
  .nav__links a:not(.nav__cta) { display: none; }
  /* compact navbar: brand + language switcher + CTA must fit 360-390px */
  .nav__inner { padding: 0.7rem 1rem; }
  .nav__links { gap: 0.7rem; }
  .nav__logo { height: 22px; }
  .nav__badge { display: none; }
  .lang button { padding: 0.22rem 0.44rem; font-size: 0.7rem; }
  .nav__cta { padding: 0.45rem 0.85rem; font-size: 0.82rem; white-space: nowrap; }
  .cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .areas, .areas--4 { grid-template-columns: 1fr; }
  .lead { max-width: none; }
  .hnode span { display: none; }
  .hnode { padding: 0.3rem; }
  .hnode i { width: 24px; height: 24px; }

  /* diagram first, legend directly beneath it, then the hero text */
  .eco { order: -2; }
  .eco-legend {
    order: -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 0.9rem;
    list-style: none;
    margin: 0.75rem 0 0.5rem;
    padding: 0;
  }
  .eco-legend a {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--ink);
  }
  .eco-legend i {
    font-style: normal;
    flex: none;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--pc);
    color: var(--white);
    font-size: 0.68rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.05em;
  }
}
