/* GISRUK 2027 — University of Nottingham
   Mint (#00bf87) brand colour, dark green ink for text on mint. */
:root {
  color-scheme: light;
  --mint: #00bf87;
  --mint-dark: #006b4c;     /* text/links on white */
  --on-mint: #04261b;       /* text on mint */
  --mint-pale: #eaf7f1;
  --ink: #1b2420;
  --body: #39433f;
  --muted: #66716c;
  --line: #d8dfdc;
  --page-width: 1000px;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  font-family: var(--sans);
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: #fff;
  color: var(--body);
  font-size: 17px;
  line-height: 1.6;
}

a {
  color: var(--mint-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover { color: var(--on-mint); }

p { margin: 0 0 16px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  width: 100%;
  background: var(--mint);
  border-bottom: 1px solid rgba(4, 38, 27, .15);
}

.navigation {
  display: flex;
  align-items: center;
  min-height: 60px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 28px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 9px;
  color: var(--on-mint);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover { color: var(--on-mint); }

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.navigation-content {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 12px;
}

.navigation-links {
  display: flex;
  align-items: center;
  padding: 0;
  margin: 0;
  list-style: none;
}

.navigation-links li { position: relative; }

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 60px;
  padding: 0 11px;
  border: 0;
  background: transparent;
  color: var(--on-mint);
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus-visible { color: var(--on-mint); text-decoration: underline; }

.nav-link.is-active {
  box-shadow: inset 0 -3px 0 var(--on-mint);
}

.chevron {
  width: 0;
  height: 0;
  margin-left: 7px;
  border-top: 5px solid currentColor;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  min-width: 210px;
  padding: 6px 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .1);
  list-style: none;
}

.has-menu:hover .dropdown,
.has-menu:focus-within .dropdown,
.has-menu.is-open .dropdown { display: block; }

.dropdown a {
  display: block;
  padding: 8px 14px;
  color: var(--body);
  font-size: 15px;
  text-decoration: none;
}

.dropdown a:hover,
.dropdown a.is-active {
  background: var(--mint-pale);
  color: var(--on-mint);
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: auto;
  order: 2;
}

.search-form input {
  width: 0;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  outline: 0;
  background: transparent;
  color: var(--on-mint);
  font: inherit;
  transition: width .2s ease;
}

.search-form:focus-within input,
.search-form.is-open input {
  width: 170px;
  padding: 6px 4px;
  border-bottom-color: var(--on-mint);
}

.search-form input::placeholder { color: rgba(4, 38, 27, .65); }

.search-form button,
.social-link {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 7px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--on-mint);
  cursor: pointer;
}

.search-form button:hover,
.social-link:hover { color: var(--on-mint); opacity: .7; }

.social-link { order: 1; }

.search-form button svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.social-link svg { width: 18px; fill: currentColor; }

.search-message {
  position: absolute;
  top: 44px;
  right: 0;
  display: none;
  width: max-content;
  max-width: 260px;
  padding: 7px 11px;
  margin: 0;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--body);
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}

.search-message.is-visible { display: block; }

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

/* ---------- Hero banners (mint, graticule + contours) ---------- */
.home-hero,
.page-hero {
  position: relative;
  overflow: hidden;
  color: var(--on-mint);
  background:
    linear-gradient(rgba(4, 38, 27, .05) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgba(4, 38, 27, .05) 1px, transparent 1px) 0 0 / 64px 64px,
    var(--mint);
}

.contours {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.contour {
  fill: none;
  stroke: rgba(4, 38, 27, .09);
  stroke-width: 1;
}

.contour-index {
  stroke: rgba(4, 38, 27, .2);
  stroke-width: 1.5;
}

.home-hero-inner,
.page-hero-inner {
  position: relative;
  z-index: 1;
  width: min(var(--page-width), calc(100% - 48px));
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--on-mint);
  font-size: 16px;
  font-weight: 600;
}

/* Home hero */
.home-hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 40px;
  padding: 64px 0 110px;
}

.home-hero h1 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(44px, 6.5vw, 76px);
  font-weight: 700;
  line-height: 1;
}

.home-hero h1 span {
  display: block;
  margin-top: 8px;
  font-size: .4em;
  font-weight: 600;
}

.hero-theme {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: clamp(20px, 2.3vw, 25px);
  font-style: italic;
  font-weight: 600;
}

.hero-meta {
  margin: 0 0 26px;
  font-size: 17px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.button {
  display: inline-block;
  padding: 10px 18px;
  border: 2px solid var(--on-mint);
  border-radius: 3px;
  font-weight: 700;
  text-decoration: none;
}

.button-primary { background: var(--on-mint); color: #fff; }
.button-primary:hover { background: #0d3b2c; color: #fff; }
.button-secondary { color: var(--on-mint); }
.button-secondary:hover { background: rgba(4, 38, 27, .08); color: var(--on-mint); }

.countdown-card {
  min-width: 150px;
  padding: 16px 22px;
  margin-top: 8px;
  border: 2px solid var(--on-mint);
  background: #fff;
  text-align: center;
}

.countdown-card p { margin: 0; }

.countdown-number {
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
}

.countdown-label { font-size: 15px; font-weight: 600; }

/* Inner page hero */
.page-hero-inner { padding: 44px 0 96px; }

.page-hero h1 {
  max-width: 800px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(32px, 4.4vw, 46px);
  font-weight: 700;
  line-height: 1.12;
}

.page-hero-lead {
  max-width: 700px;
  margin: 10px 0 0;
  font-size: 19px;
}

/* Map furniture: north arrow, scale bar, coordinate readout */
.map-furniture {
  position: absolute;
  z-index: 2;
  right: max(24px, calc((100% - var(--page-width)) / 2));
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 14px;
  border: 1px solid rgba(4, 38, 27, .25);
  background: #fff;
  color: var(--on-mint);
  pointer-events: none;
}

.north-arrow {
  flex: 0 0 auto;
  width: 28px;
  height: 40px;
  color: var(--on-mint);
}

.north-arrow text {
  fill: currentColor;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
}

.scale-bar {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 28px);
  margin: 0 10px;
  padding-bottom: 18px;
}

.scale-bar span {
  height: 8px;
  border: 1.5px solid var(--on-mint);
  background: #fff;
}

.scale-bar span:nth-child(odd) { background: var(--on-mint); }

.scale-bar em {
  position: absolute;
  bottom: 0;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transform: translateX(-50%);
}

.scale-bar em:nth-of-type(1) { left: 0; }
.scale-bar em:nth-of-type(2) { left: 50%; }
.scale-bar em:nth-of-type(3) { left: 100%; }

.coord-readout {
  min-width: 212px;
  padding: 4px 0 4px 16px;
  margin: 0;
  border-left: 1px solid var(--line);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: pre;
}

.coord-readout::before {
  content: "Lat / long";
  display: block;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
}

/* ---------- Page body ---------- */
.page { flex: 1 0 auto; }

.page-body {
  width: min(var(--page-width), calc(100% - 48px));
  margin: 0 auto;
  padding: 40px 0 72px;
}

/* Keep line lengths readable; the column itself stays centred and lines up with the banner text */
.page-body > * { max-width: 780px; }

.page-content h2 {
  margin: 40px 0 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(23px, 2.8vw, 28px);
  font-weight: 700;
  line-height: 1.25;
}

.page-content > h2:first-child,
.page-body > h2:first-child { margin-top: 0; }

.page-content h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
}

.page-content ul,
.page-content ol {
  padding-left: 24px;
  margin: 0 0 18px;
}

.page-content li { margin-bottom: 5px; }

.lead {
  color: var(--ink);
  font-size: 19.5px;
}

.tbc {
  color: var(--muted);
  font-style: italic;
}

/* Home */
.updates-panel {
  padding: 18px 22px 4px;
  margin-bottom: 32px;
  border-left: 4px solid var(--mint);
  background: var(--mint-pale);
}

.page-content .updates-heading {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  font-size: 21px;
}

.more-info {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* Boxes */
.box-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 4px 0 22px;
}

.box-row.two { grid-template-columns: repeat(2, 1fr); }

.box {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--mint);
  border-radius: 6px;
  background: #fff;
}

.box h3 { margin: 0 0 6px; font-size: 18.5px; }
.box p:last-child,
.box ul:last-child { margin-bottom: 0; }
.box ul { padding-left: 20px; }

.box-label {
  margin: 0 0 2px;
  color: var(--mint-dark);
  font-size: 14px;
  font-weight: 700;
}

.date-box span {
  display: block;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.date-box time {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
}

.date-box.is-main {
  border-color: var(--mint);
  background: var(--mint-pale);
}

.box-contact {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  border-left: 4px solid var(--mint);
  background: var(--mint-pale);
}

.box-contact a { font-weight: 600; word-break: break-word; }

/* Notices and callouts */
.notice {
  padding: 16px 20px 2px;
  margin-bottom: 22px;
  border-left: 4px solid var(--mint);
  background: var(--mint-pale);
}

.callout {
  padding: 14px 18px;
  margin: 0 0 20px;
  border-left: 4px solid #d99a2b;
  background: #fbf4e6;
  color: #4d3a12;
}

/* Organiser names as bubbles */
.page-content .name-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.page-content .name-list li {
  margin: 0;
  padding: 6px 14px;
  border: 1px solid #b5e4d2;
  border-radius: 999px;
  background: var(--mint-pale);
  color: var(--on-mint);
  font-weight: 600;
}

/* Venue map */
.map-figure { margin: 24px 0 8px; }

.map-frame {
  position: relative;
  border: 1px solid var(--line);
}

.venue-map {
  height: 440px;
  background: var(--mint-pale);
}

.map-fallback {
  display: grid;
  height: 100%;
  margin: 0;
  place-items: center;
  color: var(--muted);
}

.map-legend {
  position: absolute;
  z-index: 500;
  top: 10px;
  right: 10px;
  display: grid;
  gap: 4px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .95);
  color: var(--ink);
  font-size: 13.5px;
}

.map-legend span { display: flex; align-items: center; gap: 8px; }

.map-legend-title {
  margin: 0 0 2px;
  font-weight: 700;
}

.map-figure figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.pin {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: var(--on-mint);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
  transform: rotate(-45deg);
}

.map-legend .pin { width: 13px; height: 13px; }

.pin-venue { background: #e07b28; }
.pin-social { background: var(--on-mint); }
.pin-transport { background: #2a7fc9; }
.pin-stay { background: var(--mint); }

.leaflet-container { font-family: var(--sans); }
.leaflet-popup-content { font-size: 14px; line-height: 1.45; }
.leaflet-popup-content strong { color: var(--on-mint); }

/* ---------- Footer ---------- */
.site-footer {
  flex-shrink: 0;
  background: var(--on-mint);
  color: #b9d6ca;
  font-size: 15px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  width: min(var(--page-width), calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0;
}

.site-footer p { margin: 0; }

.footer-title {
  margin-bottom: 2px !important;
  color: #fff;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 20px;
}

.footer-contact { margin-top: 8px !important; }
.footer-contact a { color: #fff; word-break: break-word; }

.footer-links a { color: #e0efe8; }
.footer-links a:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .navigation {
    flex-wrap: wrap;
    gap: 0;
    padding: 0 20px;
  }

  .brand { min-height: 58px; }

  .menu-toggle {
    position: static;
    display: flex;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 9px;
    margin-left: auto;
    overflow: visible;
    clip: auto;
    clip-path: none;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .menu-toggle span:not(.sr-only) {
    display: block;
    width: 21px;
    height: 2px;
    background: var(--on-mint);
  }

  .navigation-content {
    display: none;
    width: 100%;
    flex: 0 0 100%;
    flex-wrap: wrap;
    padding: 0 0 12px;
  }

  .navigation-content.is-open { display: flex; }

  .navigation-links {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-link {
    min-height: 44px;
    width: 100%;
    justify-content: space-between;
    padding: 0 3px;
  }

  .nav-link.is-active { box-shadow: none; text-decoration: underline; }

  .dropdown {
    position: static;
    box-shadow: none;
  }

  .search-form { margin-left: 0; }

  .search-form:focus-within input,
  .search-form.is-open input { width: min(230px, calc(100vw - 120px)); }

  .home-hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 48px 0 110px;
  }

  .countdown-card { justify-self: start; margin-top: 0; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }

  .home-hero-inner,
  .page-hero-inner,
  .page-body,
  .footer-inner { width: calc(100% - 32px); }

  .lead { font-size: 18px; }

  .box-row,
  .box-row.two { grid-template-columns: 1fr; }

  .map-furniture { right: 16px; bottom: 16px; gap: 10px; padding: 6px 10px; }
  .scale-bar { display: none; }
  .coord-readout { min-width: 0; padding-left: 10px; font-size: 12.5px; }
  .venue-map { height: 360px; }
  .map-legend { top: auto; right: 8px; bottom: 28px; font-size: 12px; }

  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
