/* events.jic.ac.uk — landing page
   Matched against a real screenshot of jic.ac.uk (not a placeholder, as
   the previous green palette here explicitly was) - navy/slate-blue from
   the real logo mark (assets/logos/jic-logo-blue.png), mustard as a sparse
   accent, serif italic for display headlines against sans-serif (Inter)
   everywhere else, same mixed treatment the real site uses. Exact hex
   values are a close visual read of that screenshot, not sampled from
   JIC's actual design tokens - nudge them if a real style guide turns up. */

:root {
  --jic-navy: #003876;
  --jic-navy-dark: #00224a;
  --jic-slate: #7b88b5;
  --jic-pale: #d7dbf0;
  --jic-mustard: #c9a227;
  --ink: #1a2233;
  --muted: #5c6472;
  --paper: #ffffff;
  --border: #e3e5ef;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(26, 34, 51, 0.06), 0 8px 24px rgba(26, 34, 51, 0.08);
  --font-serif: "Source Serif 4", Georgia, serif;
}

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

html, body { height: 100%; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1 0 auto; }

a { color: var(--jic-navy); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ── Header ──────────────────────────────────────────────────────────── */
header.site { border-bottom: 1px solid var(--border); }
header.site .main-row { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; }
header.site img.logo { height: 44px; width: auto; }
header.site nav { display: flex; gap: 28px; }
header.site nav a { color: var(--ink); font-size: 15px; font-weight: 500; }
header.site nav a:hover { color: var(--jic-navy); text-decoration: none; }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero {
  /* The new JIC building (Next Generation Infrastructure Programme) -
     BDP's rendering, used here as a local preview only; confirm usage
     rights with JIC comms/BDP before this goes into a real deployment. */
  background:
    linear-gradient(100deg, rgba(0, 34, 74, 0.92) 0%, rgba(0, 34, 74, 0.72) 42%, rgba(0, 34, 74, 0.35) 100%),
    url("../assets/building-hero-preview.jpg") center 35% / cover no-repeat;
  color: #fff;
  padding: 56px 0 96px;
  clip-path: polygon(0 0, 100% 0, 100% 82%, 0 100%);
}
.hero .eyebrow {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--jic-mustard); margin-bottom: 10px;
}
.hero h1 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(26px, 3.2vw, 38px);
  letter-spacing: -0.01em;
  margin-bottom: 0;
  max-width: 640px;
}

/* ── Section headings ───────────────────────────────────────────────── */
.section { padding: 64px 0; }
.section + .section { border-top: 1px solid var(--border); }
.section h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.section .lede { color: var(--muted); margin-bottom: 36px; font-size: 15px; }

/* ── Event cards ─────────────────────────────────────────────────────── */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.event-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.15s, transform 0.15s;
}
.event-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.event-card .date-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--jic-pale);
  color: var(--jic-navy);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 999px;
  width: fit-content;
}
.event-card h3 { font-size: 18px; font-weight: 700; line-height: 1.3; }
.event-card .meta { color: var(--muted); font-size: 14px; }
.event-card .meta span { display: inline-flex; align-items: center; gap: 6px; }
.event-card .status {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
.event-card .status .open { color: var(--jic-navy); font-weight: 600; }
.event-card .status .closed { color: var(--muted); font-weight: 600; }
.event-card .view-link { font-weight: 600; font-size: 14px; }

.empty-state {
  color: var(--muted);
  font-size: 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}

/* ── Past events: plain list, not cards (less visual weight) ──────────── */
.past-list { display: flex; flex-direction: column; gap: 0; }
.past-list .row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.past-list .row:first-child { border-top: 1px solid var(--border); }
.past-list .row .title { font-weight: 600; }
.past-list .row .date { color: var(--muted); font-size: 14px; white-space: nowrap; }
.view-all-link { display: inline-block; margin-top: 20px; font-weight: 600; font-size: 14px; }

.page-title { padding: 40px 0 8px; }
.page-title h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; }
.back-link { display: inline-block; margin-top: 20px; font-size: 14px; color: var(--muted); }

/* ── Plain content page (e.g. travel.html) ──────────────────────────── */
.prose { max-width: 680px; }
.prose h3 { font-size: 18px; font-weight: 700; margin: 28px 0 8px; }
.prose h3:first-child { margin-top: 0; }
.prose p { margin-bottom: 14px; line-height: 1.7; }
.prose ul { margin: 0 0 14px 20px; line-height: 1.8; }

/* ── Footer ──────────────────────────────────────────────────────────── */
footer.site {
  background: var(--jic-navy);
  color: rgba(255, 255, 255, 0.75);
  padding: 40px 0;
  margin-top: 40px;
  font-size: 14px;
}
footer.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
footer.site img.logo { height: 28px; width: auto; opacity: 0.9; }
footer.site a { color: #fff; }
footer.site nav { display: flex; gap: 20px; }

@media (max-width: 640px) {
  header.site nav { display: none; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 48px 0; }
}
