/* ========================================================================== */
/* UVEC shared stylesheet                                                     */
/* Only selectors used by the current static HTML pages are kept here.        */
/* ========================================================================== */

/* -------------------------------------------------------------------------- */
/* Fonts: self-hosted in assets/fonts (SIL Open Font License).                */
/* -------------------------------------------------------------------------- */
@font-face { font-family: "Anton"; src: url("../fonts/anton-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* -------------------------------------------------------------------------- */
/* Design tokens: brand colours from the UVEC logo and print kit.             */
/* -------------------------------------------------------------------------- */
:root {
  --navy: #002855;
  --blue: #054bad;        /* UVic blue */
  --gold: #f5aa1c;
  --gold-light: #ffbe3d;
  --gold-tint: #fdf1d8;   /* selected row in "Up next" */
  --red: #e5262b;
  --green: #26a739;
  --ink: #1d2433;
  --ink-soft: #4a5468;
  --mist: #c9d7e3;
  --on-navy: #dbe4ef;
  --paper: #ffffff;
  --tint: #eef3f8;
  --line: #d9e1ea;

  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --sans: "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --header: 64px;
}

/* -------------------------------------------------------------------------- */
/* Global document defaults                                                   */
/* -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header);
}

body {
  /* Flex layout keeps the footer at the bottom on pages with little content. */
  min-height: 100vh; /* Fallback for browsers that don't support svh */
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }
h1, h2, h3 { margin: 0; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

img { max-width: 100%; height: auto; display: block; }

/* Keep keyboard focus visible against light and dark surfaces. */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* -------------------------------------------------------------------------- */
/* Skip link                                                                  */
/* -------------------------------------------------------------------------- */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
}

.skip:focus { left: 0; }

/* -------------------------------------------------------------------------- */
/* Shared content width and buttons                                           */
/* -------------------------------------------------------------------------- */
.wrap {
  width: min(1180px, 100% - (var(--gutter) * 2));
  margin-inline: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75em 1.15em;
  border: 2px solid transparent;
  border-radius: 999px;
  background: none;
  color: inherit;
  font: 600 0.9rem/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.btn-solid { border-color: var(--gold); background: var(--gold); color: var(--navy); }
.btn-solid:hover { border-color: var(--gold-light); background: var(--gold-light); }
.btn-quiet { padding-inline: 0.5em; color: var(--blue); text-decoration: underline; text-underline-offset: 0.2em; }

/* -------------------------------------------------------------------------- */
/* Header and navigation                                                      */
/* -------------------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.topbar .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header);
}

/* The official logo, on white as it's designed to be. */
.brand img { width: auto; height: 30px; }

.nav { display: flex; gap: clamp(0.9rem, 2.5vw, 2rem); }

.navlink {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.navlink:hover,
.navlink[aria-current="page"] { color: var(--blue); }

/* Menu toggle: only shown when the header collapses on narrow windows. */
.navtoggle { display: none; }

@media (max-width: 640px) {
  .topbar .bar { flex-wrap: wrap; cursor: pointer; }
  .nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
    padding-bottom: 0.75rem;
    cursor: auto;
  }
  .topbar.is-open .nav { display: flex; }
  .navlink { padding: 0.7rem 0; font-size: 1rem; border-top: 1px solid var(--line); }

  .navtoggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
  }

  /* Three-line icon that morphs into an X when open. */
  .navtoggle-icon,
  .navtoggle-icon::before,
  .navtoggle-icon::after {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform 0.2s var(--ease), background 0.2s var(--ease);
  }

  .navtoggle-icon { position: relative; }
  .navtoggle-icon::before,
  .navtoggle-icon::after { content: ""; position: absolute; left: 0; }
  .navtoggle-icon::before { top: -7px; }
  .navtoggle-icon::after { top: 7px; }

  .topbar.is-open .navtoggle-icon { background: transparent; }
  .topbar.is-open .navtoggle-icon::before { transform: translateY(7px) rotate(45deg); }
  .topbar.is-open .navtoggle-icon::after { transform: translateY(-7px) rotate(-45deg); }
}

/* -------------------------------------------------------------------------- */
/* Hero: the one bold element on the page                                     */
/* -------------------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  /* Fills the screen below the header, so the first screen is the hero alone
     and the next section starts at the fold instead of being cut in half.
     It grows past that if its content needs the room. */
  min-height: calc(100vh - var(--header));
  min-height: calc(100svh - var(--header));
  overflow: hidden;
  padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(3.5rem, 6vw, 5rem);
  background: var(--navy);
  color: #fff;
}

/* Muted event footage behind the headline. The poster frame shows while it
   loads. */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* It's a backdrop, so the mouse passes through it and the browser shows
     no video controls over it. */
  pointer-events: none;
}

/* A navy wash over the footage: light at the top, so the logo's navy and
   blue letters stand out, and deeper at the bottom behind the paragraph so
   it stays readable. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 40, 85, 0.2) 0%, rgba(0, 40, 85, 0.3) 40%, rgba(0, 40, 85, 0.85) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

/* The official logo, set huge across the footage. */
.hero-logo { margin: 0 0 clamp(1.25rem, 2.5vw, 2rem); }

.hero-logo img {
  /* As wide as the screen allows, up to 720px (960px on big monitors), but
     never wider than the screen is tall, so phones held sideways stay short. */
  width: min(100%, clamp(720px, 50vw, 960px), 100vh);
  margin-inline: auto;
}

.lede {
  max-width: 46rem;
  margin: 0 auto 1.75rem;
  color: var(--on-navy);
  font-size: clamp(1.02rem, 1.5vw, 1.25rem);
  line-height: 1.5;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

.lede strong { color: #fff; font-weight: 700; }

/* -------------------------------------------------------------------------- */
/* Sections                                                                   */
/* -------------------------------------------------------------------------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-tinted { background: var(--tint); }

.section h2 {
  color: var(--navy);
  font: 400 clamp(2.2rem, 4.5vw, 3.4rem)/1 var(--display);
  text-transform: uppercase;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 1rem 2rem;
  align-items: end;
  margin-bottom: 2.5rem;
}

.section-head p { max-width: 34rem; margin: 0; color: var(--ink-soft); }
.section-head a, .more a { font-weight: 600; }

/* About: the manifesto on the left, what we run on the right. */
.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.about-intro h2 { margin-bottom: 1.5rem; }
.manifesto { margin: 0; }

.manifesto p {
  color: var(--navy);
  font: 600 clamp(1.3rem, 2.2vw, 1.75rem)/1.35 var(--sans);
  letter-spacing: -0.01em;
}

.pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.25rem 2.5rem;
}

/* Each one is topped with a logo colour. */
.pillar { padding-top: 1.1rem; border-top: 4px solid var(--pillar-colour, var(--navy)); }
.pillar-gold { --pillar-colour: var(--gold); }
.pillar-red { --pillar-colour: var(--red); }
.pillar-green { --pillar-colour: var(--green); }
.pillar-blue { --pillar-colour: var(--blue); }
.pillar h3 { margin-bottom: 0.5rem; color: var(--navy); font-size: 1.12rem; font-weight: 700; line-height: 1.3; }
.pillar p { color: var(--ink-soft); font-size: 0.95rem; }

/* -------------------------------------------------------------------------- */
/* Events: the phone list, built by assets/js/events.js                       */
/* -------------------------------------------------------------------------- */
.agenda {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.event {
  display: grid;
  grid-template-columns: 5.5rem 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.4rem 1.75rem;
}

.event + .event { border-top: 1px solid var(--line); }

.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  color: var(--navy);
  line-height: 1;
}

.event-day { font: 400 3rem/1 var(--display); }
.event-month { margin-top: 0.25rem; color: var(--blue); font-size: 0.85rem; font-weight: 700; }
.event-when { margin: 0 0 0.2rem; color: var(--ink-soft); font-size: 0.88rem; font-weight: 600; }
.event h3 { color: var(--ink); font-size: 1.2rem; font-weight: 700; line-height: 1.3; }
.event-place { margin: 0.25rem 0 0; font-size: 0.9rem; }
.event-place a { color: var(--ink-soft); }
.event-actions { display: flex; align-items: center; gap: 0.25rem; }
.agenda-note { padding: 1.75rem; }
.more { margin: 1.25rem 0 0; }

/* -------------------------------------------------------------------------- */
/* Events: the calendar on wider screens, also built by events.js             */
/* -------------------------------------------------------------------------- */
/* Both columns stretch to the taller one, so their bottoms line up. */
.calendar-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.5rem;
  align-items: stretch;
}

.calendar-wrap[hidden] { display: none; }

/* Once the calendar is up, the list is only for phones. */
.has-calendar .agenda { display: none; }

.calendar {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.calendar-head h3 {
  color: var(--navy);
  font: 400 1.6rem/1 var(--display);
  text-transform: uppercase;
}

.month-step {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  color: var(--navy);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.month-step:hover:not(:disabled) { background: var(--tint); }
.month-step:disabled { opacity: 0.3; cursor: default; }

.weekdays,
.days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

/* The day rows share whatever height the calendar gets. */
.days { flex: 1; grid-auto-rows: 1fr; }

.weekdays span { padding: 0 0.4rem 0.4rem; color: var(--ink-soft); font-size: 0.78rem; font-weight: 600; }

.day {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  min-height: 92px;
  padding: 0.35rem;
  border-radius: 6px;
  background: var(--tint);
}

.day.is-blank { background: none; }
.day.is-before .day-number { opacity: 0.5; }
.day.is-today { box-shadow: inset 0 0 0 2px var(--navy); }
.day-number { color: var(--ink-soft); font-size: 0.8rem; font-weight: 600; }

/* Chip colour shows state: navy upcoming, grey past, gold selected. */
.chip {
  padding: 0.25rem 0.4rem;
  border: 0;
  border-radius: 4px;
  background: var(--navy);
  color: #fff;
  font: 600 0.72rem/1.25 var(--sans);
  text-align: left;
  cursor: pointer;
}

.chip span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.chip.is-past { background: var(--mist); color: var(--ink); }
.chip.is-selected { background: var(--gold); color: var(--navy); }
.chip:hover:not(.is-selected) { background: var(--blue); color: #fff; }

/* Detail panel and "Up next", stacked beside the calendar. "Up next" takes up the slack. */
.calendar-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.event-detail {
  padding: 1.5rem;
  border-radius: 14px;
  background: var(--navy);
  color: #fff;
}

.detail-meta a { color: #fff; }

.detail-when {
  display: inline-block;
  margin-bottom: 0.9rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 700;
}

.event-detail h3 { margin-bottom: 0.75rem; font-size: 1.35rem; font-weight: 700; line-height: 1.25; }
.detail-meta { color: var(--on-navy); font-size: 0.92rem; }
.event-detail .event-actions { flex-wrap: wrap; }
.event-detail .btn-quiet { color: #fff; }

/* Add to calendar menu */
.add-calendar { position: relative; }

.add-calendar-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  min-width: 190px;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 12px 30px rgba(0, 40, 85, 0.18);
}

.add-calendar-menu[hidden] { display: none; }

.add-calendar-menu a,
.add-calendar-menu button {
  display: block;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--ink);
  font: 600 0.9rem/1.3 var(--sans);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.add-calendar-menu a:hover,
.add-calendar-menu button:hover { background: var(--tint); }

.up-next {
  flex: 1;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.up-next[hidden] { display: none; }
.up-next h3 { margin-bottom: 0.5rem; color: var(--navy); font: 400 1.25rem/1 var(--display); text-transform: uppercase; }
.up-next ol { margin: 0; padding: 0; list-style: none; }
.up-next li + li { border-top: 1px solid var(--line); }

.up-next-item {
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  padding: 0.7rem 0.5rem;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.up-next-item:hover { background: var(--tint); }
.up-next-item.is-selected { background: var(--gold-tint); }

.up-next-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.1;
}

.up-next-day { color: var(--navy); font: 400 1.6rem/1 var(--display); }
.up-next-text { display: flex; flex-direction: column; min-width: 0; }
.up-next-title { font-size: 0.92rem; font-weight: 700; line-height: 1.3; }
.up-next-when { color: var(--ink-soft); font-size: 0.8rem; }

/* -------------------------------------------------------------------------- */
/* Recaps                                                                     */
/* -------------------------------------------------------------------------- */
.recaps { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }

.recap {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.recap:nth-child(even) .recap-photos { order: 2; }
.recap-photos { display: grid; grid-template-columns: 1.6fr 1fr; gap: 10px; }

.recap-photos img {
  width: 100%;
  height: clamp(220px, 28vw, 340px);
  border-radius: 10px;
  object-fit: cover;
}

.recap-meta { margin-bottom: 0.4rem; color: var(--blue); font-size: 0.88rem; font-weight: 600; }

.recap h3 {
  margin-bottom: 0.75rem;
  color: var(--navy);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
}

.recap-text p:last-child { max-width: 32rem; color: var(--ink-soft); }

/* -------------------------------------------------------------------------- */
/* Partners: a scrolling strip of logos and names, one colour throughout      */
/* -------------------------------------------------------------------------- */
/* A slim band right under the hero. */
.partners-band { padding: clamp(2.5rem, 5vw, 3.5rem) 0; background: var(--tint); }

.partners-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 2rem;
  margin-bottom: 1.25rem;
}

.partners-head h2 {
  color: var(--navy);
  font: 400 clamp(1.6rem, 3vw, 2.1rem)/1 var(--display);
  text-transform: uppercase;
}

.partners-head p { margin: 0; color: var(--ink-soft); }
.partners-head a { font-weight: 600; }

/* Full-bleed strip. Fade the ends instead of cutting items off. */
.marquee {
  overflow: hidden;
  padding: 1rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  will-change: transform;
}

/* partners.js sets animation-duration from the track width. */
.marquee.is-ready .marquee-track {
  animation: marquee-scroll 60s linear infinite;
}

/* Sliding by exactly half the track lands on the duplicated copy. */
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.marquee-item {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  height: 64px;
  padding: 0 clamp(1.25rem, 2.5vw, 2rem);
}

/* Logos are pre-made navy silhouettes (assets/img/Logos/partners/), so they match the text names. */
.marquee-item img {
  width: auto;
  max-width: 220px;
  height: 52px;
  object-fit: contain;
  opacity: 0.85;
}

/* Icon-only marks carry their name beside them. */
.marquee-item img + .marquee-name { margin-left: 0.6rem; }

.marquee-name {
  color: var(--navy);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  opacity: 0.85;
}

.marquee-note { margin: 1rem 0 0; color: var(--ink-soft); font-size: 0.88rem; }

/* -------------------------------------------------------------------------- */
/* Social footer                                                              */
/* -------------------------------------------------------------------------- */
.socialbar {
  padding: 3.5rem 0 2rem;
  background: var(--navy);
  color: #fff;
}

.footer-line {
  margin-bottom: 1.5rem;
  font: 400 clamp(1.8rem, 4vw, 2.6rem)/1 var(--display);
  text-transform: uppercase;
}

.social {
  display: grid;
  /*  
  repeat (how many times, what size)
Used for modifying the number of columns in the footer

*/
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
}

.social a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.social a:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.social a img {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* Copyright line below the social links. */
.colophon {
  padding-top: 2rem;
  color: var(--mist);
  font-size: 0.85rem;
}

/* -------------------------------------------------------------------------- */
/* Smaller screens                                                            */
/* -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .social { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
  .calendar-wrap { grid-template-columns: 1fr; }
  .calendar-side { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
  .hero::before { background: linear-gradient(180deg, rgba(0, 40, 85, 0.15) 0%, rgba(0, 40, 85, 0.3) 30%, rgba(0, 40, 85, 0.88) 60%); }
  .section-head, .recap { grid-template-columns: 1fr; }
  .recap:nth-child(even) .recap-photos { order: 0; }
  .about { grid-template-columns: 1fr; }
  .social { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 700px) {
  .has-calendar .calendar-wrap { display: none; }
  .has-calendar .agenda { display: block; }
}

@media (max-width: 600px) {
  .pillars { grid-template-columns: 1fr; gap: 1.75rem; }
  .event { grid-template-columns: 3.5rem 1fr; gap: 1rem; padding: 1.25rem; }
  .event-day { font-size: 2.3rem; }
  .event-actions { grid-column: 1 / -1; flex-wrap: wrap; }
  .recap-photos img { height: 200px; }
  .marquee-item { height: 52px; }
  .marquee-item img { height: 42px; max-width: 180px; }
  .social { grid-template-columns: repeat(2, 1fr); }
}

/* Short, wide screens, like a phone held sideways: a smaller logo and
   tighter spacing so the whole hero fits on screen. */
@media (max-height: 500px) and (min-width: 600px) {
  .hero { padding: 1.5rem 0; }
  .hero-logo { margin-bottom: 0.75rem; }
  .hero-logo img { width: min(100%, 55vh); }
  .lede { margin-bottom: 1rem; font-size: 0.98rem; }
}

/* Reduced motion: no smooth scrolling or transitions. The hero video and the
   partner strip keep moving for everyone, by the club's choice (Nov 2026). */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* ========================================================================== */
/* Map page (map.html)                                                        */
/* The navy map is the page's bold element; the rail and panel stay plain.    */
/* ========================================================================== */
.mapapp {
  --tabbar: 62px;
  display: grid;
  grid-template-columns: 84px minmax(320px, 400px) minmax(0, 1fr);
  height: calc(100vh - var(--header));
  height: calc(100svh - var(--header));
  min-height: 520px;
  background: var(--paper);
}

/* Tabs: a rail on the left, a bar along the bottom on phones. */
.map-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem 0.6rem;
  border-right: 1px solid var(--line);
  background: var(--paper);
}
.map-tab {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  padding: 0.65rem 0.25rem;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--ink-soft);
  font: 700 0.68rem/1.15 var(--sans);
  text-align: center;
  cursor: pointer;
}
.map-tab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.map-tab:hover { color: var(--navy); background: var(--tint); }
.map-tab[aria-current] { color: var(--navy); background: var(--tint); }
.map-tab[aria-current]::before {
  content: "";
  position: absolute;
  left: -0.6rem;
  top: 18%;
  bottom: 18%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--gold);
}

/* The panel beside the map. */
.map-panel {
  overflow-y: auto;
  padding: 1.25rem 1.25rem 2rem;
  border-right: 1px solid var(--line);
  background: var(--paper);
  overscroll-behavior: contain;
}
.map-panel:focus { outline: none; }
.panel-view[hidden], .places-page[hidden] { display: none; }
.sheet-handle { display: none; }

.panel-title {
  color: var(--navy);
  font: 400 1.9rem/1 var(--display);
  text-transform: uppercase;
}
.panel-title:focus { outline: none; }
.panel-lede { margin: 0.55rem 0 0; color: var(--ink-soft); font-size: 0.88rem; line-height: 1.5; }
.map-meta { display: flex; flex-wrap: wrap; gap: 0.15rem 1rem; margin: 0.6rem 0 1rem; font-size: 0.8rem; }
.map-suggest { font-weight: 600; }
.map-note { color: var(--ink-soft); }

.map-stage { position: relative; min-width: 0; background: var(--navy); }
.map-canvas { position: absolute; inset: 0; }

/* Search and filters */
.map-controls { display: grid; gap: 0.6rem; }
.map-search,
.map-select {
  width: 100%;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font: 500 0.92rem var(--sans);
}
.map-search:focus-visible, .map-select:focus-visible { outline-offset: 0; }
.map-selects { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.map-select { min-height: 40px; font-size: 0.85rem; }
.map-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.map-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 34px;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: 600 0.8rem var(--sans);
  white-space: nowrap;
  cursor: pointer;
}
.map-chip:hover { border-color: var(--mist); }
.map-chip[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: #fff; }
.map-count { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.75rem; margin: 1rem 0 0.25rem; color: var(--ink-soft); font-size: 0.8rem; font-weight: 600; }
.map-count .btn { padding: 0; font-size: 0.8rem; }

.dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-right: 0.45em;
  border-radius: 50%;
}
.dot-startup { background: var(--gold); }
.dot-company { background: var(--red); }
.dot-support { background: var(--green); }

/* A list of places: initials in the category colour, then name and details. */
.place-list, .walk-cards, .walk-stops, .map-events, .place-walks ul { margin: 0; padding: 0; list-style: none; }
.place-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  width: 100%;
  padding: 0.75rem 0.5rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.place-row:hover { background: var(--tint); }
.place-row[aria-current] { background: var(--gold-tint); }
.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font: 700 0.8rem/1 var(--sans);
  letter-spacing: 0.02em;
}
.avatar-startup { background: var(--gold); color: var(--navy); }
.avatar-company { background: var(--red); color: #fff; }
.avatar-support { background: var(--green); color: #fff; }
.place-row-text { display: grid; gap: 0.1rem; min-width: 0; }
.place-row-name { font-weight: 700; line-height: 1.3; }
.place-row-meta { color: var(--ink-soft); font-size: 0.75rem; font-weight: 600; }
.place-row-blurb {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.83rem;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.map-empty { padding: 1.5rem 0.5rem; color: var(--ink-soft); font-size: 0.9rem; }

/* One place, and the stop on a walk. */
.panel-bar { display: flex; justify-content: space-between; margin-bottom: 1rem; }
.panel-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.panel-icon:hover { background: var(--tint); }
.panel-icon svg, .place-address svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.place-meta { display: flex; align-items: center; margin: 0 0 0.35rem; color: var(--ink-soft); font-size: 0.78rem; font-weight: 600; }
.place-name {
  color: var(--navy);
  font: 400 2rem/1.05 var(--display);
  text-transform: uppercase;
}
.place-name:focus { outline: none; }
.place-address { display: flex; gap: 0.4rem; align-items: flex-start; margin: 0.6rem 0 0; color: var(--ink-soft); font-size: 0.85rem; }
.place-address svg { flex: 0 0 auto; margin-top: 0.1rem; }
.place-blurb { margin: 0.8rem 0; font-size: 0.95rem; line-height: 1.55; }
.place-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; font-size: 0.9rem; font-weight: 600; }
.place-meta-line { margin: 0; color: var(--ink-soft); font-size: 0.8rem; }
.place-walks { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.place-walks h3 { margin-bottom: 0.3rem; color: var(--navy); font-size: 0.9rem; font-weight: 700; }
.place-walks .btn { padding: 0.35rem 0; text-align: left; white-space: normal; }
.place-source { margin-top: 1.25rem; color: var(--ink-soft); font-size: 0.78rem; }
.panel-status { margin: 0.5rem 0 0; color: var(--ink-soft); font-size: 0.82rem; }
.panel-status:empty { display: none; }

.btn-outline { border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--tint); }
.btn:disabled { opacity: 0.4; cursor: default; }

/* Walks */
.walk-cards { display: grid; gap: 0.75rem; margin-top: 1.25rem; }
.walk-card { padding: 1.1rem; border: 1px solid var(--line); border-radius: 14px; }
.walk-card h3 { margin: 0.2rem 0 0.4rem; color: var(--navy); font: 400 1.4rem/1.05 var(--display); text-transform: uppercase; }
.walk-card p:not(.walk-stats) { color: var(--ink-soft); font-size: 0.88rem; line-height: 1.5; }
.walk-card .btn { margin-top: 0.9rem; }
.walk-stats { margin: 0; color: var(--ink-soft); font-size: 0.76rem; font-weight: 600; }
.walk-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.5rem; align-items: start; }
.walk-name { color: var(--ink); font-size: 1rem; font-weight: 700; line-height: 1.3; }
.walk-name:focus { outline: none; }
.walk-progress { height: 4px; margin: 0.9rem 0 1.1rem; border-radius: 4px; background: var(--line); overflow: hidden; }
.walk-progress span { display: block; height: 100%; background: var(--gold); transition: width 0.3s var(--ease); }
.walk-step { margin: 0 0 0.3rem; color: var(--navy); font-size: 0.85rem; font-weight: 700; }
.walk-leg { margin: 1rem 0 0.75rem; font-size: 0.85rem; font-weight: 600; }
.walk-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.walk-buttons .btn { justify-content: center; padding-block: 0.85em; }
.walk-buttons .btn, .walk-card .btn { gap: 0.4em; }
.walk-actions { display: grid; justify-items: start; gap: 0.5rem; margin-top: 0.75rem; }
.walk-actions .btn-quiet { padding-inline: 0; }
.walk-stops { margin-top: 1.25rem; padding-top: 0.75rem; border-top: 1px solid var(--line); }
.walk-stops button {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  padding: 0.45rem 0.5rem;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--ink);
  font: 500 0.9rem/1.3 var(--sans);
  text-align: left;
  cursor: pointer;
}
.walk-stops button:hover { background: var(--tint); }
.walk-stops button[aria-current] { background: var(--gold-tint); font-weight: 700; }
.walk-stop-number {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}
[aria-current] > .walk-stop-number { background: var(--gold); color: var(--navy); }

/* Events: the home page's event rows, fitted to the panel. */
.map-events { margin-top: 1rem; }
.map-events .event { grid-template-columns: 3.25rem minmax(0, 1fr); gap: 0.4rem 0.9rem; padding: 1rem 0; }
.map-events .event-day { font-size: 2.1rem; }
.map-events .event h3 { font-size: 1rem; }
.map-events .event-actions { grid-column: 2; flex-wrap: wrap; }
.map-event-show { grid-column: 2; justify-self: start; padding: 0; font-size: 0.85rem; }

/* Buttons over the map */
.map-area-search,
.map-tilt {
  position: absolute;
  z-index: 3;
  border: 0;
  background: var(--paper);
  color: var(--navy);
  font: 700 0.82rem var(--sans);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}
.map-area-search { top: 14px; left: 50%; padding: 0.65rem 1.1rem; border-radius: 999px; transform: translateX(-50%); }
.map-area-search[hidden] { display: none; }
.map-tilt { right: 10px; bottom: 44px; width: 40px; height: 40px; border-radius: 8px; }
.map-tilt[aria-pressed="true"] { background: var(--gold); }
.maplibregl-ctrl-attrib { font-family: var(--sans); font-size: 0.7rem; }

/* All places: a full-width list instead of the panel and map. */
.places-page { grid-column: 2 / -1; overflow-y: auto; }
.places-inner { display: grid; gap: 0.75rem; width: min(980px, 100% - 2.5rem); margin: 0 auto; padding: 2rem 0 3rem; }
.places-title {
  color: var(--navy);
  font: 400 clamp(2.2rem, 4.5vw, 3.2rem)/1 var(--display);
  text-transform: uppercase;
}
.places-title:focus { outline: none; }
.places-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem; }
.places-bar .map-count { margin: 0; }
.places-tools { display: flex; gap: 0.5rem; }
.places-tools .btn { padding-inline: 0.25rem; }
.place-list-wide .place-row { grid-template-columns: 44px minmax(0, 1fr); padding: 0.85rem 0.5rem; }
.place-list-wide .avatar { width: 44px; height: 44px; }
.place-list-wide .place-row-blurb { -webkit-line-clamp: 1; }

[data-view="places"] .map-panel,
[data-view="places"] .map-stage { display: none; }

/* No WebGL: no map, the panel takes the room. */
.no-map .mapapp { grid-template-columns: 84px minmax(0, 1fr); }
.no-map .map-stage { display: none; }

/* -------------------------------------------------------------------------- */
/* Phones: the map fills the screen, the panel is a sheet over it that you    */
/* pull up by its handle (peek, half, full), and the tabs sit at the bottom.  */
/* -------------------------------------------------------------------------- */
@media (max-width: 760px) {
  .mapapp { position: relative; display: block; min-height: 0; overflow: hidden; }
  .map-stage { position: absolute; inset: 0 0 var(--tabbar); }
  .map-tabs {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 6;
    flex-direction: row;
    gap: 0;
    height: var(--tabbar);
    padding: 0.3rem 0.4rem;
    border-top: 1px solid var(--line);
    border-right: 0;
  }
  .map-tab { flex: 1; gap: 0.15rem; padding: 0.35rem 0.2rem; font-size: 0.66rem; }
  .map-tab svg { width: 20px; height: 20px; }
  .map-tab[aria-current]::before { left: 25%; right: 25%; top: -0.3rem; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px; }

  .map-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: var(--tabbar);
    z-index: 5;
    height: 200px;
    padding: 0 1rem 1.5rem;
    border: 0;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.3);
    transition: height 0.25s var(--ease);
  }
  [data-sheet="half"] .map-panel { height: 55%; }
  [data-sheet="full"] .map-panel { height: calc(100% - var(--tabbar) - 8px); }
  .sheet-handle {
    position: sticky;
    top: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    width: calc(100% + 2rem);
    height: 26px;
    margin: 0 -1rem 0.2rem;
    padding: 0;
    border: 0;
    background: var(--paper);
    cursor: grab;
    touch-action: none;
  }
  .sheet-handle span { width: 40px; height: 4px; border-radius: 4px; background: var(--mist); }

  .panel-title { font-size: 1.45rem; }
  .panel-lede, .map-note { display: none; }
  .map-meta { margin: 0.35rem 0 0.75rem; }
  .map-controls .map-chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -1rem; padding-inline: 1rem; scrollbar-width: none; }
  .place-name { font-size: 1.65rem; }

  .places-page { position: absolute; inset: 0 0 var(--tabbar); }
  .places-inner { width: auto; padding: 1.25rem 1rem 2rem; }
  .places-page .map-chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -1rem; padding-inline: 1rem; scrollbar-width: none; }

  .map-tilt { bottom: 40px; }
  .no-map .map-panel { position: static; height: auto; box-shadow: none; }
}

/* Short screens (phones sideways): let the app shrink to fit. */
@media (max-height: 500px) and (min-width: 761px) {
  .mapapp { grid-template-columns: 72px minmax(280px, 340px) minmax(0, 1fr); min-height: 0; }
  .map-tab { padding-block: 0.4rem; }
  .map-tabs { gap: 0.1rem; padding-block: 0.4rem; }
  .panel-lede, .map-note { display: none; }
}
