:root {
  --ink: #0e1212;
  --muted: #5f5a53;
  --cream: #fff5e9;
  --cream-2: #efe4d4;
  --green: #2c5a3c;
  --green-bright: #3d7a52;
  --white: #fffdf8;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: 'Outfit', Arial, sans-serif;
  --sans: 'Manrope', Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

html,
body {
  min-height: 100%;
}

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

::selection {
  background: #c5d5c8;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 200;
  background: var(--white);
  color: var(--ink);
  padding: 8px 12px;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  color: #fff;
  background: linear-gradient(180deg, rgba(14, 18, 18, 0.55) 0%, rgba(14, 18, 18, 0) 100%);
  transition: background 0.35s var(--ease), color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.site-header.is-light {
  background: rgba(255, 245, 233, 0.94);
  color: var(--ink);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(14, 18, 18, 0.08);
}

.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
}

nav a {
  position: relative;
  color: inherit;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding-bottom: 5px;
}

nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-bottom: 1px dashed currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

nav a:hover::after,
nav a:focus-visible::after,
nav a.active::after {
  transform: scaleX(1);
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #161412;
  scroll-margin-top: 0;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('recycle.jpg') center / cover no-repeat;
  transform: scale(1.04);
  animation: heroZoom 18s var(--ease) alternate infinite;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(14, 18, 18, 0.72) 0%, rgba(14, 18, 18, 0.28) 48%, rgba(14, 18, 18, 0.12) 100%),
    linear-gradient(180deg, rgba(14, 18, 18, 0.4) 0%, rgba(14, 18, 18, 0.08) 32%, rgba(14, 18, 18, 0.62) 100%);
}

@keyframes heroZoom {
  from { transform: scale(1.04); }
  to { transform: scale(1.1); }
}

.overlay {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 80px));
  margin: 0 auto 0 40px;
  padding: 0 0 11vh;
}

.hero-kicker,
.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero-kicker {
  color: rgba(255, 245, 233, 0.82);
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.6rem, 6.2vw, 5.2rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.045em;
  color: #fff;
}

.hero-lead {
  margin-top: 22px;
  max-width: 34ch;
  color: rgba(255, 245, 233, 0.78);
  font-size: 1.05rem;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 32px;
}

.text-link {
  color: #fff;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-bottom: 1px dashed rgba(255, 245, 233, 0.7);
  padding-bottom: 4px;
}

.text-link:hover,
.text-link:focus-visible {
  border-bottom-style: solid;
}

.scroll-cue {
  position: absolute;
  right: 40px;
  bottom: 40px;
  z-index: 1;
  color: rgba(255, 245, 233, 0.72);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.scroll-cue::after {
  content: '';
  display: block;
  width: 1px;
  height: 42px;
  margin: 10px auto 0;
  background: linear-gradient(180deg, rgba(255, 245, 233, 0.8), transparent);
}

.ticker {
  overflow: hidden;
  background: var(--ink);
  color: var(--cream);
  border-top: 1px solid rgba(255, 245, 233, 0.08);
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 0;
  animation: ticker 28s linear infinite;
}

.ticker-track span {
  flex: none;
  padding: 14px 36px;
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.78;
}

.ticker-track span::before {
  content: '·';
  margin-right: 36px;
  opacity: 0.45;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

main {
  background: var(--cream);
}

#main-content,
#events,
#game {
  scroll-margin-top: var(--header-h);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

.eyebrow {
  color: var(--green);
}

.intro {
  width: min(720px, calc(100% - 80px));
  margin: 0 auto;
  padding: 108px 0 96px;
}

.intro h2,
.impact-copy h2,
.join h2 {
  font-family: var(--display);
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  line-height: 1.14;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin-bottom: 22px;
  max-width: 16ch;
}

.section-banner h2 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 600;
}

.intro p,
.impact-text p,
.conditions-sub,
.game-intro {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 58ch;
}

.impact-section {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-height: 78vh;
  background: var(--cream-2);
}

.impact-copy {
  padding: 72px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.impact-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 8px 0 32px;
}

.impact-stat {
  padding-right: 12px;
}

.impact-stat-number {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.impact-stat-value {
  font-family: var(--display);
  font-size: clamp(2.1rem, 3.8vw, 3rem);
  font-weight: 600;
  line-height: 1;
}

.impact-stat-unit {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.impact-stat-label {
  margin-top: 8px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.impact-text p {
  margin-bottom: 14px;
}

.impact-photo {
  position: relative;
  min-height: 520px;
  overflow: hidden;
}

.impact-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 520px;
  transform: scale(1.02);
  transition: transform 0.8s var(--ease);
}

.impact-photo:hover .impact-image {
  transform: scale(1.06);
}

.impact-photo figcaption {
  position: absolute;
  left: 20px;
  bottom: 20px;
  padding: 8px 12px;
  background: rgba(14, 18, 18, 0.72);
  color: var(--cream);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.join {
  background: var(--ink);
  color: var(--cream);
  text-align: left;
  padding: 96px 56px;
}

.join .eyebrow {
  color: #c8dccf;
}

.join h2 {
  max-width: 14ch;
}

.join p {
  color: rgba(255, 245, 233, 0.7);
  font-size: 1.08rem;
  margin-bottom: 36px;
}

.contact-icons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.social {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 245, 233, 0.22);
  color: var(--cream);
  text-decoration: none;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

.social svg {
  width: 20px;
  height: 20px;
}

.social:hover,
.social:focus-visible {
  background: var(--cream);
  color: var(--ink);
  transform: translateY(-3px);
}

.page-section {
  padding: 88px 0 48px;
}

.section-banner {
  width: min(1080px, calc(100% - 80px));
  margin: 0 auto 40px;
}

.campus-conditions,
.calendar,
.past-events-section {
  width: min(1080px, calc(100% - 80px));
  margin: 0 auto 64px;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  text-align: left;
}

.campus-conditions {
  padding: 36px 36px 40px;
  background: var(--cream-2);
}

.campus-conditions h3,
.calendar h3,
.past-events-section h3,
.leaderboard-card h3 {
  font-family: var(--display);
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 6px 0 16px;
}

.conditions-sub {
  margin-bottom: 24px;
}

.conditions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.condition-card,
.upcoming-event-card,
.countdown-banner,
.game-board,
.leaderboard-card {
  background: var(--white);
  border: 1px solid rgba(14, 18, 18, 0.08);
  padding: 26px 24px;
}

.condition-card {
  border-left: 3px solid var(--green);
}

.condition-kicker,
.countdown-kicker {
  margin: 0 0 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}

.condition-value,
.countdown-title {
  font-family: var(--display);
  font-size: 2.35rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
}

.condition-label,
.condition-meta {
  margin-top: 8px;
  color: var(--muted);
}

.aqi-pill {
  display: inline-block;
  padding: 4px 0;
  font-size: 0.9rem;
}

.aqi-good { color: var(--green); }
.aqi-moderate { color: #8d6e00; }
.aqi-usg { color: #e65100; }
.aqi-unhealthy { color: #b71c1c; }
.aqi-severe { color: #6a1b9a; }
.aqi-unknown { color: var(--muted); }

.conditions-tip {
  margin: 22px 0 8px;
  font-weight: 600;
  color: var(--green);
}

.countdown-banner {
  background: var(--ink);
  color: var(--cream);
  margin-bottom: 20px;
}

.countdown-kicker {
  color: #c8dccf;
}

.countdown-title {
  color: var(--cream);
  font-size: 1.35rem;
  margin-bottom: 18px;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.countdown-unit {
  background: rgba(255, 245, 233, 0.08);
  padding: 12px 6px;
  text-align: center;
}

.countdown-unit strong {
  display: block;
  font-family: var(--display);
  font-size: 1.3rem;
}

.countdown-unit span {
  display: block;
  margin-top: 6px;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
}

.upcoming-event-card {
  margin-bottom: 16px;
}

.upcoming-event-card h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.upcoming-meta {
  color: var(--green);
  font-weight: 700;
  margin-bottom: 8px;
}

.empty-events,
.conditions-status {
  color: var(--muted);
}

.past-event-item {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 36px;
  align-items: center;
  margin-bottom: 56px;
}

.past-event-item:nth-child(even) {
  grid-template-columns: 1.15fr 1fr;
}

.past-event-item:nth-child(even) .past-events-text {
  order: 2;
}

.past-events-text p {
  font-size: 1.2rem;
  color: var(--ink);
  line-height: 1.45;
}

.event-date {
  display: block;
  margin-bottom: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}

.past-events-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.game-intro {
  width: min(640px, calc(100% - 80px));
  margin: 0 auto 12px;
}

.game-keys {
  width: min(640px, calc(100% - 80px));
  margin: 0 auto 28px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}

.eco-catch {
  --eco-ink: #1a2e24;
  --eco-paper: #f7f4ec;
  --eco-muted: #5b6d63;
  --eco-line: rgba(26, 46, 36, 0.12);
  --eco-accent: #1f6b3a;
  width: min(400px, calc(100% - 80px));
  margin: 0 auto 80px;
  color: var(--eco-ink);
  font-family: var(--sans);
  user-select: none;
  -webkit-user-select: none;
}

.eco-stage {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(26, 46, 36, 0.18);
}

.eco-catch canvas {
  display: block;
  width: 100%;
  height: auto;
}

.eco-hud {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  pointer-events: none;
}

.eco-lives {
  display: flex;
  gap: 6px;
}

.eco-lives i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
  box-shadow: 0 1px 0 rgba(26, 46, 36, 0.2);
}

.eco-lives i.on {
  background: #fff;
}

.eco-score {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 2px rgba(26, 46, 36, 0.45);
}

.eco-combo {
  text-align: right;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(26, 46, 36, 0.45);
}

.eco-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 32, 26, 0.28);
}

.eco-overlay[hidden],
.eco-hud[hidden],
.eco-panel[hidden],
.eco-save-form[hidden],
.eco-saved-note[hidden],
.eco-board-empty[hidden] {
  display: none;
}

.eco-panel {
  width: min(100%, 292px);
  padding: 28px 24px 22px;
  border-radius: 4px;
  background: var(--eco-paper);
  text-align: center;
  box-shadow: 0 8px 24px rgba(18, 32, 26, 0.12);
}

.eco-panel h3 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 10px;
  text-transform: none;
}

.eco-lede {
  color: var(--eco-muted);
  margin-bottom: 14px;
}

.eco-rules {
  margin: 0 0 18px;
  text-align: left;
}

.eco-rules p {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.eco-rules p.catch {
  color: #1f6b3a;
}

.eco-rules p.skip {
  color: #9a3b2a;
  margin-top: 10px;
}

.eco-rules-row {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

.eco-rules-row canvas {
  width: 40px;
  height: 40px;
}

.eco-score-lg {
  font-family: var(--display);
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.eco-best {
  margin: 6px 0 18px;
  color: var(--eco-muted);
  font-size: 14px;
}

.eco-best strong {
  color: var(--eco-ink);
  font-weight: 700;
}

.eco-fact {
  margin: 0 0 20px;
  padding: 12px 0 0;
  border-top: 1px solid var(--eco-line);
  color: var(--eco-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 14px;
  line-height: 1.45;
}

.eco-save-form {
  margin-bottom: 14px;
}

.eco-save-row {
  display: flex;
  gap: 8px;
}

.eco-catch input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--eco-line);
  border-radius: 4px;
  padding: 9px 10px;
  font: inherit;
  color: var(--eco-ink);
  background: #fff;
}

.eco-catch input:focus {
  outline: 2px solid rgba(31, 107, 58, 0.35);
  outline-offset: 1px;
}

.eco-saved-note {
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--eco-accent);
}

.eco-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.eco-catch button {
  appearance: none;
  border: 0;
  border-radius: 4px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--eco-accent);
  cursor: pointer;
}

.eco-catch button.ghost {
  color: var(--eco-ink);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--eco-line);
}

.eco-catch button:active {
  transform: translateY(1px);
}

.eco-board {
  list-style: none;
  margin: 8px 0 18px;
  text-align: left;
}

.eco-board li {
  display: grid;
  grid-template-columns: 1.5rem 1fr auto;
  gap: 8px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--eco-line);
  font-size: 15px;
}

.eco-board li.me {
  font-weight: 700;
}

.eco-board .place {
  color: var(--eco-muted);
}

.eco-board-empty {
  color: var(--eco-muted);
  margin: 8px 0 18px;
}

footer {
  background: var(--ink);
  color: var(--cream);
  padding: 28px 40px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 860px) {
  :root {
    --header-h: 92px;
  }

  .site-header {
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 20px;
  }

  .overlay,
  .intro,
  .section-banner,
  .campus-conditions,
  .calendar,
  .past-events-section,
  .game-intro,
  .game-keys,
  .eco-catch {
    width: calc(100% - 40px);
  }

  .overlay {
    margin-left: 20px;
  }

  .hero {
    min-height: 86vh;
  }

  .hero::before {
    animation: none;
  }

  .scroll-cue {
    right: 20px;
    bottom: 24px;
  }

  .impact-section,
  .conditions-grid,
  .past-event-item,
  .past-event-item:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .past-event-item:nth-child(even) .past-events-text {
    order: 0;
  }

  .impact-copy,
  .join {
    padding: 52px 24px;
  }

  .impact-image {
    min-height: 280px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .hero::before,
  .ticker-track {
    animation: none;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
