/* International Institute of Justice & Police Sciences (IIJPS)
   Site stylesheet. Colours are taken from the IIJPS logo. */

:root {
  --ink: #13294b;        /* navy: headings, footer, page bands */
  --blue: #1d5ba8;       /* logo blue: links, buttons */
  --blue-dark: #164884;
  --gold: #e9a319;       /* logo gold: the balance beam, rules */
  --seal: #a51c24;       /* logo red: used sparingly */
  --text: #1f2a3c;
  --muted: #4d5b73;
  --mist: #eef2f8;       /* cool panel background */
  --line: #d6dde8;
  --paper: #ffffff;
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", "Segoe UI", Arial, sans-serif;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 .5em;
  font-weight: 600;
}
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: 72ch; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 50; }

/* ---------- Header ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 84px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 56px; height: 56px; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; line-height: 1.2; max-width: 270px; }
.brand-name small { display: block; font-family: var(--sans); font-weight: 400; font-size: .8rem; color: var(--muted); margin-top: 2px; }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0; }
.nav a {
  display: block; padding: 8px 10px; text-decoration: none; color: var(--ink);
  font-weight: 500; font-size: .95rem; white-space: nowrap; border-bottom: 3px solid transparent;
}
.nav a:hover { color: var(--blue); }
.nav a[aria-current="page"] { border-bottom-color: var(--gold); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 6px;
  padding: 8px 12px; font: inherit; color: var(--ink); cursor: pointer;
}

@media (max-width: 1080px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: 8px var(--gutter) 16px; }
  .nav a { border-bottom: 0; border-left: 3px solid transparent; }
  .nav a[aria-current="page"] { border-left-color: var(--gold); }
}
@media (max-width: 420px) {
  .brand img { width: 44px; height: 44px; }
  .brand-name { font-size: 1rem; }
}

/* ---------- The balance beam: the site's one signature mark ---------- */
.beam { position: relative; height: 14px; width: min(320px, 70%); margin: 18px 0 0; }
.beam::before { content: ""; position: absolute; left: 0; right: 0; top: 2px; height: 3px; background: var(--gold); }
.beam::after {
  content: ""; position: absolute; left: 50%; top: 5px; width: 0; height: 0;
  border-left: 8px solid transparent; border-right: 8px solid transparent;
  border-bottom: 9px solid var(--gold); transform: translateX(-50%);
}

/* ---------- Page bands ---------- */
.band { background: var(--ink); color: #e6ecf5; }
.band h1, .band h2 { color: #fff; }
.band a { color: #fff; }
.page-head { padding: 52px 0 46px; }
.page-head p { max-width: 64ch; margin: 14px 0 0; font-size: 1.1rem; color: #cfd9e8; }
.crumbs { font-size: .9rem; margin-bottom: 10px; color: #b9c6da; }
.crumbs a { color: #dbe4f1; }

/* ---------- Home hero ---------- */
.hero { padding: 64px 0 60px; }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 48px; align-items: center; }
.hero .lede { font-size: 1.2rem; color: #d3dceb; max-width: 54ch; margin-top: 16px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-note { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); border-radius: 10px; padding: 16px; }
.hero-note img { border-radius: 6px; }
.hero-note p { margin: 12px 0 0; font-size: .95rem; color: #d3dceb; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 12px 20px; border-radius: 6px; text-decoration: none;
  font-weight: 600; background: var(--blue); color: #fff; border: 2px solid var(--blue);
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--blue); }
.band .btn.ghost { color: #fff; border-color: rgba(255,255,255,.6); }
.band .btn.ghost:hover { background: rgba(255,255,255,.1); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn.gold:hover { background: #d18f0c; border-color: #d18f0c; color: var(--ink); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section.tint { background: var(--mist); }
.section-head { margin-bottom: 28px; max-width: 70ch; }
.section-head p { color: var(--muted); }

/* Three pillars: separated by vertical gold rules, not boxed */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); }
.pillars > div { padding: 4px 28px; border-left: 3px solid var(--gold); }
.pillars > div + div { margin-left: 0; }
.pillars p { color: var(--muted); margin: 0; }
@media (max-width: 860px) {
  .pillars { grid-template-columns: 1fr; gap: 26px; }
}

.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 6px 14px; font-size: .95rem; }

.split { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; }
.split.wide-media { grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .split, .split.wide-media { grid-template-columns: 1fr; gap: 24px; } }
.portrait { border-radius: 8px; max-width: 300px; }

.posters { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 28px; }
.posters figure { margin: 0; }
.posters img { border-radius: 6px; border: 1px solid var(--line); width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: top; }
.posters figcaption { margin-top: 10px; font-size: .95rem; }
.posters figcaption strong { display: block; color: var(--ink); font-family: var(--serif); font-size: 1.05rem; line-height: 1.3; }

.logos { display: flex; flex-wrap: wrap; gap: 20px 28px; align-items: center; }
.logos a { display: block; }
.logos img { height: 74px; width: auto; }

/* ---------- Programme list ---------- */
.program { display: grid; grid-template-columns: 1fr 220px; gap: 32px; padding: 30px 0; border-top: 1px solid var(--line); }
.program:first-of-type { border-top: 0; padding-top: 0; }
.program h3 { margin-bottom: .35em; }
.program .meta { color: var(--muted); font-size: .95rem; margin-bottom: .8em; }
.program img { border-radius: 6px; border: 1px solid var(--line); }
@media (max-width: 700px) { .program { grid-template-columns: 1fr; } .program img { max-width: 260px; } }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0 0 1em; }
.facts dt { font-weight: 600; color: var(--ink); }
.facts dd { margin: 0; }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; } .facts dd { margin-bottom: 8px; } }

/* ---------- Activities timeline ---------- */
.year { display: grid; grid-template-columns: 120px 1fr; gap: 32px; padding: 40px 0; border-top: 1px solid var(--line); }
.year:first-of-type { border-top: 0; }
.year > h2 { font-size: 2.2rem; color: var(--gold); position: sticky; top: 16px; align-self: start; margin: 0; }
.event { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 0 0 28px; }
.event + .event { padding-top: 28px; border-top: 1px dashed var(--line); }
.event img { border-radius: 6px; border: 1px solid var(--line); }
.event h3 { margin-bottom: .25em; }
.event .when { font-weight: 600; color: var(--seal); font-size: .95rem; margin-bottom: .4em; }
.event p { margin-bottom: .5em; }
@media (max-width: 760px) {
  .year { grid-template-columns: 1fr; gap: 12px; }
  .year > h2 { position: static; }
  .event { grid-template-columns: 110px 1fr; gap: 16px; }
}

/* ---------- People ---------- */
.people-index { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; }
.people-index li { padding: 22px 0; border-top: 1px solid var(--line); }
.people-index h3 { margin-bottom: .2em; }
.people-index p { margin: 0; color: var(--muted); }
@media (max-width: 760px) { .people-index { grid-template-columns: 1fr; } }

.person { display: grid; grid-template-columns: 170px 1fr; gap: 32px; padding: 34px 0; border-top: 1px solid var(--line); }
.person:first-child { border-top: 0; padding-top: 0; }
.person img { width: 170px; height: 200px; object-fit: cover; object-position: top; border-radius: 8px; background: var(--mist); }
.person .role { font-weight: 600; color: var(--seal); font-size: .95rem; margin: 0 0 .2em; }
.person h2 { font-size: 1.5rem; margin-bottom: .5em; }
.person p { max-width: 75ch; }
@media (max-width: 620px) {
  .person { grid-template-columns: 96px 1fr; gap: 18px; }
  .person img { width: 96px; height: 116px; }
  .person .bio { grid-column: 1 / -1; }
}

/* ---------- Panels and callouts ---------- */
.panel { background: var(--mist); border-radius: 10px; padding: 28px; }
.callout { border-left: 4px solid var(--gold); padding: 6px 0 6px 20px; margin: 28px 0; }
.check { padding-left: 1.2em; }
.check li { margin-bottom: .45em; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; gap: 24px; } }

table.fees { border-collapse: collapse; margin: 0 0 1em; min-width: 280px; }
table.fees th, table.fees td { text-align: left; padding: 8px 16px 8px 0; border-bottom: 1px solid var(--line); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c9d4e5; font-size: .95rem; padding: 52px 0 28px; }
.site-footer h2 { font-size: 1.1rem; color: #fff; margin-bottom: .8em; }
.site-footer a { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.4fr; gap: 40px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 6px; }
.social { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.legal { border-top: 1px solid rgba(255,255,255,.15); margin-top: 36px; padding-top: 18px; font-size: .88rem; color: #a9b7cc; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr; gap: 28px; } }

.hero-text { max-width: 780px; }
.pub { padding: 28px 0; border-top: 1px solid var(--line); max-width: 80ch; }
.pub:first-of-type { border-top: 0; padding-top: 0; }
.pub cite { font-style: normal; }
.pub .facts { margin-top: .6em; }

.wrap.prose { max-width: var(--wrap); }
.wrap.prose > * { max-width: 72ch; }

/* Registration strip above the header */
.regstrip { background: var(--mist); border-bottom: 1px solid var(--line); color: var(--muted); font-size: .85rem; line-height: 1.4; padding: 7px 0; }
.regstrip a { color: var(--ink); font-weight: 600; }
