:root {
  --fg: #1d1d1b;
  --muted: #6b6b66;
  --line: #ddddd6;
  --panel-solid: #fbfbf8;
  --accent: #2f5d50;
  --error: #a3271f;
  --scrim: rgba(10, 16, 28, .52);
}
@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e8e8e2;
    --muted: #a0a09a;
    --line: #3a3a36;
    --panel-solid: #161615;
    --accent: #7fb8a6;
    --error: #f08a80;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: #1b2333;
  color: var(--fg);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Background photo: a fixed layer (background-attachment: fixed is broken on iOS). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(var(--scrim), var(--scrim)),
    url("img/hero-2400.jpg") 40% 35% / cover no-repeat;
}
body.inner { --scrim: rgba(10, 16, 28, .6); }
@media (max-width: 900px) {
  body::before {
    background:
      linear-gradient(var(--scrim), var(--scrim)),
      url("img/hero-1280.jpg") 40% 35% / cover no-repeat;
  }
}

/* Menu buttons, shared by the landing menu and the inner-page bar. */
.hero-menu a, .nav nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .55rem 1.1rem;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  text-shadow: none;
  border: 1.5px solid rgba(255, 255, 255, .7);
  border-radius: 999px;
  background: rgba(0, 0, 0, .35);
  transition: background .15s, color .15s;
}
.hero-menu a:hover, .nav nav a:hover,
.hero-menu a:focus-visible, .nav nav a:focus-visible { background: rgba(255, 255, 255, .18); }
.hero-menu a.primary, .nav nav a.primary,
.nav nav a[aria-current="page"] { color: #111; background: #fff; border-color: #fff; }
.hero-menu a.primary:hover, .nav nav a.primary:hover { background: #e8e8e2; }

/* Inner pages: a solid bar, so the menu never sits directly on the photo. */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  padding: .75rem 1rem;
  background: rgba(8, 10, 14, .9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.brand { color: #fff; font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; text-decoration: none; }
.nav nav { display: flex; flex-wrap: wrap; gap: .5rem; }
.nav nav a { min-height: 40px; padding: .4rem .95rem; font-size: .95rem; }

/* Landing: tagline over the photo, menu at the bottom over a fade to black. */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  color: #fff;
  text-align: center;
}
.hero-text {
  align-self: center;
  padding: 3rem 1rem 1rem;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .55);
}
.hero .kicker { margin: 0 0 .5rem; font-size: clamp(.95rem, 2.2vw, 1.15rem); font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(2.2rem, 7vw, 4.5rem); line-height: 1.1; letter-spacing: -.01em; }
.hero-text p:last-child { margin: .75rem 0 0; font-size: clamp(1rem, 2.5vw, 1.25rem); }
.hero-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
  padding: 5rem 1rem 2.5rem;
  padding-bottom: max(2.5rem, env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(0, 0, 0, .92) 0%, rgba(0, 0, 0, .75) 55%, transparent 100%);
}
.hero-menu a { min-height: 52px; padding: .7rem 1.5rem; font-size: 1.1rem; }

@media (max-width: 640px) {
  /* Two-column button grid; Expression of Interest spans the full width. */
  .hero-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem;
    padding: 4rem 16px 1.5rem;
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  }
  .hero-menu a { padding: .7rem .5rem; font-size: 1.05rem; }
  .hero-menu a.primary { grid-column: 1 / -1; order: -1; }
  /* Inner pages: menu scrolls with the page rather than eating the screen. */
  .nav { position: static; padding: .75rem 16px; }
  .nav nav { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .nav nav a.primary { grid-column: 1 / -1; }
}

/* Inner pages */
.panel {
  max-width: 60rem;
  margin: 2rem auto 4rem;
  padding: 1.5rem 1.25rem 2rem;
  background: var(--panel-solid);
  border-radius: 6px;
}
@media (max-width: 640px) {
  .panel { margin: 1rem 16px 2rem; padding: 1.25rem 1rem; }
}
.panel h1 { margin: 0 0 1rem; font-size: 1.6rem; }
.panel h2 { margin: 1.75rem 0 .4rem; font-size: 1.15rem; }
.panel h1 + h2 { margin-top: 0; }
.panel p { margin: 0 0 .75rem; max-width: 46rem; }
.panel a { color: var(--accent); }
.scroll { overflow-x: auto; }
.scroll-wrap { position: relative; margin-bottom: 1.5rem; }
.scroll-wrap .scroll table { margin-bottom: 0; }
/* Fade at the right edge while more columns are hidden off-screen. */
.scroll-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 3rem;
  pointer-events: none;
  background: linear-gradient(to right, transparent, var(--panel-solid));
  opacity: 0;
  transition: opacity .2s;
}
.scroll-wrap.more::after { opacity: 1; }
.scroll-hint { margin: 0 0 .5rem; font-size: .85rem; font-weight: 600; color: var(--accent); }
/* Schedule: date stays put while scrolling; distance and vert stand out. */
.schedule th:first-child, .schedule td:first-child { position: sticky; left: 0; z-index: 1; background: var(--panel-solid); }
.schedule td { min-width: 7rem; }
.schedule td:nth-child(-n+3) { min-width: 0; }
.metric { font-weight: 700; font-size: 1.05rem; color: var(--accent); }
tr.total td { font-weight: 700; border-top: 2px solid var(--fg); }
.panel ul { margin: 0 0 1rem; padding-left: 1.25rem; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; margin-bottom: 1.5rem; }
table.narrow { width: auto; }
th, td { text-align: left; vertical-align: top; padding: .4rem .6rem; border-bottom: 1px solid var(--line); }
th { font-weight: 600; color: var(--muted); }
.n { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

/* EOI form */
form { display: grid; gap: .9rem; max-width: 32rem; }
label { display: grid; gap: .25rem; font-size: .9rem; }
input, textarea {
  font: inherit;
  padding: .5rem;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
}
button {
  justify-self: start;
  font: inherit;
  padding: .5rem 1.25rem;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}
@media (prefers-color-scheme: dark) { button { color: #111; } }
button:disabled { opacity: .6; cursor: default; }
.hp { position: absolute; left: -9999px; }
#status { margin: 0; }
#status.error { color: var(--error); }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem; }
.gallery img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; }
dialog { padding: 0; border: 0; background: transparent; max-width: 95vw; }
dialog img { display: block; max-width: 95vw; max-height: 90vh; }
dialog::backdrop { background: rgba(0, 0, 0, .85); }
