/*
  FSEvents homepage — based on the Nexus System template by TemplateMo
  https://templatemo.com/tm-629-nexus-system
  Palette retuned to FSEvents: deep navy instead of carbon, FSE gold instead of acid volt.
*/

:root {
  --titanium: #F3F5F7;   /* light ground */
  --carbon: #0A1622;     /* deep FSE navy */
  --volt: #F0A500;       /* FSE gold accent */
  --volt-soft: #FFC94D;  /* gold for text on dark */
  --steel: #D6DEE5;      /* lines and borders */
  --graphite: #0B2638;   /* dark card ground */
  --fse-blue: #0D4361;
  --muted: #4B5563;
  --muted-2: #6A7480;
  --white: #FFFFFF;
  --hud-h: 60px;
  --ease-silk: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: auto; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--titanium);
  color: var(--carbon);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

.hidden { display: none !important; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--carbon);
  transition: background 0.4s var(--ease-silk), color 0.4s var(--ease-silk), border-color 0.4s var(--ease-silk);
  white-space: nowrap;
}

.btn-volt { background: var(--volt); color: var(--carbon); }
.btn-volt:hover { background: var(--carbon); color: var(--volt); }

.btn-line { background: transparent; color: var(--carbon); }
.btn-line:hover { background: var(--white); }

.btn-light { background: transparent; color: var(--titanium); border-color: rgba(243, 245, 247, 0.4); }
.btn-light:hover { background: var(--volt); color: var(--carbon); border-color: var(--volt); }

.btn-sm { padding: 10px 16px; font-size: 11px; }
.btn-block { width: 100%; }

.btn:focus-visible { outline: 2px solid var(--volt); outline-offset: 2px; }

/* ---------- scroll spacer creates the scroll track for the cards ---------- */
.scroll-spacer { height: 400vh; }

/* ---------- z-depth card engine ---------- */
.zcard {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  transform-origin: top center;
  will-change: transform, opacity;
  overflow: hidden;
}

.zcard[data-card="1"] { z-index: 10; }
.zcard[data-card="2"] { z-index: 20; transform: translateY(100%); }
.zcard[data-card="3"] { z-index: 30; transform: translateY(100%); }
.zcard[data-card="4"] { z-index: 40; transform: translateY(100%); }

/* ---------- card 1: the floating hero ---------- */
.card-hero {
  background: var(--titanium);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo {
  position: absolute;
  top: 28px;
  left: clamp(20px, 4vw, 40px);
  z-index: 5;
}

.hero-logo img { height: 30px; width: auto; filter: brightness(0); }

.hero-season {
  position: absolute;
  top: 34px;
  right: clamp(20px, 4vw, 40px);
  z-index: 5;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.hero-stage {
  position: relative;
  text-align: center;
  z-index: 5;
  padding: 0 24px;
}

.hero-eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--carbon);
  background: var(--volt);
  display: inline-block;
  padding: 7px 14px 7px 18px;
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(56px, 13vw, 180px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--carbon);
}

.hero-sub {
  margin: 32px auto 0;
  max-width: 500px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--muted);
}

.hero-sub strong { color: var(--carbon); font-weight: 700; }

.hero-ctas {
  margin-top: 36px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll-hint {
  position: absolute;
  bottom: calc(var(--hud-h) + 28px);
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted-2);
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.hero-scroll-hint::after {
  content: "";
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--carbon), transparent);
  animation: hint-drop 2.2s var(--ease-silk) infinite;
}

@keyframes hint-drop {
  0% { transform: scaleY(0); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: top; }
  56% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* floating translucent glass shapes */
.glass-shape {
  position: absolute;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--steel);
  z-index: 2;
}

.glass-a { width: 220px; height: 220px; top: 12%; left: 8%; border-radius: 32px; animation: bob-a 9s ease-in-out infinite; }
.glass-b { width: 150px; height: 150px; bottom: 18%; right: 10%; border-radius: 50%; animation: bob-b 7s ease-in-out infinite; }
.glass-c { width: 110px; height: 110px; top: 20%; right: 22%; border-radius: 20px; transform: rotate(18deg); animation: bob-c 11s ease-in-out infinite; }

/* a gold question mark hiding in one of the glass shapes */
.glass-b::after {
  content: "?";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  font-weight: 800;
  color: var(--volt);
}

@keyframes bob-a { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-26px); } }
@keyframes bob-b { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(22px); } }
@keyframes bob-c { 0%, 100% { transform: translateY(0) rotate(18deg); } 50% { transform: translateY(-18px) rotate(24deg); } }

/* faint engineering grid behind the hero */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--steel) 1px, transparent 1px), linear-gradient(90deg, var(--steel) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.35;
  z-index: 1;
}

/* ---------- card 2: next quiz night ---------- */
.card-macro { background: var(--carbon); }

.macro-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.macro-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 22, 34, 0.35), rgba(10, 22, 34, 0.1) 40%, rgba(10, 22, 34, 0.75));
}

.crosshair-v, .crosshair-h { position: absolute; background: rgba(255, 255, 255, 0.4); }
.crosshair-v { top: 0; bottom: 0; left: 62%; width: 1px; }
.crosshair-h { left: 0; right: 0; top: 36%; height: 1px; }

.node-dot {
  position: absolute;
  left: 62%;
  top: 36%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--volt);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 6px rgba(240, 165, 0, 0.25), 0 0 24px 4px rgba(240, 165, 0, 0.8);
  animation: node-pulse 2.6s ease-in-out infinite;
}

@keyframes node-pulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(240, 165, 0, 0.25), 0 0 24px 4px rgba(240, 165, 0, 0.8); }
  50% { box-shadow: 0 0 0 12px rgba(240, 165, 0, 0.12), 0 0 36px 8px rgba(240, 165, 0, 0.95); }
}

.node-box {
  position: absolute;
  left: calc(62% + 28px);
  top: calc(36% + 28px);
  width: 290px;
  max-width: calc(100vw - 48px);
  background: rgba(10, 22, 34, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(214, 222, 229, 0.3);
  color: var(--titanium);
  padding: 20px;
}

.node-box-tag {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--volt);
  margin-bottom: 14px;
  text-transform: uppercase;
}

.node-stat {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(214, 222, 229, 0.15);
}

.node-stat:last-of-type { border-bottom: none; }

.node-stat span:last-child { color: var(--volt-soft); font-variant-numeric: tabular-nums; }

.node-box .btn { margin-top: 14px; }

.macro-caption {
  position: absolute;
  left: 40px;
  bottom: calc(var(--hud-h) + 36px);
  color: var(--titanium);
  max-width: 520px;
}

.macro-caption .mono {
  font-size: 11px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--volt-soft);
  display: block;
  margin-bottom: 14px;
}

.macro-caption h2 {
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.macro-date {
  margin-top: 12px;
  font-size: 15px;
  color: rgba(243, 245, 247, 0.8);
}

/* ---------- card 3: the season accordion ---------- */
.card-fold { background: var(--white); display: flex; flex-direction: column; }

.fold-head {
  padding: 28px 40px 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.fold-head h2 { font-size: clamp(22px, 3vw, 34px); font-weight: 700; letter-spacing: -0.02em; }

.fold-head .mono { font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted-2); }

.accordion {
  flex: 1;
  display: flex;
  width: 100%;
  margin-top: 24px;
  border-top: 1px solid var(--steel);
}

.slice {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid var(--steel);
  background: var(--white);
  transition: flex-grow 1.2s var(--ease-silk);
  cursor: pointer;
  text-align: left;
  padding: 0;
}

.slice:last-child { border-right: none; }

.slice.active { flex-grow: 3.7; }

.slice-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.2s var(--ease-silk), transform 1.2s var(--ease-silk);
}

.slice.active .slice-img { opacity: 1; transform: scale(1); }

.slice-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 22, 34, 0.85), rgba(10, 22, 34, 0) 60%);
  opacity: 0;
  transition: opacity 1.2s var(--ease-silk);
}

.slice.active .slice-shade { opacity: 1; }

.slice-idle {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 0 calc(var(--hud-h) + 28px);
  align-items: center;
  transition: opacity 0.6s var(--ease-silk);
}

.slice.active .slice-idle { opacity: 0; }

.slice-num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--carbon);
  letter-spacing: 0.2em;
}

.slice-idle-title {
  writing-mode: vertical-rl;
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--carbon);
}

.slice.tba .slice-idle-title { color: var(--muted-2); }

.slice-badge {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: var(--volt);
  color: var(--carbon);
  padding: 4px 8px;
  display: inline-block;
  margin-left: 10px;
  vertical-align: middle;
}

.slice-reveal {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: calc(var(--hud-h) + 28px);
  color: var(--titanium);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1.2s var(--ease-silk), transform 1.2s var(--ease-silk);
}

.slice.active .slice-reveal { opacity: 1; transform: translateY(0); }

.slice-reveal .mono {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--volt-soft);
  display: block;
  margin-bottom: 10px;
}

.slice-reveal h3 { font-size: clamp(22px, 3vw, 40px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; white-space: nowrap; }

.slice-reveal .slice-date { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; letter-spacing: 0.08em; color: var(--titanium); margin-bottom: 10px; }

.slice-reveal p { font-size: 14px; line-height: 1.6; max-width: 400px; color: rgba(243, 245, 247, 0.85); }

.slice:focus-visible { outline: 2px solid var(--carbon); outline-offset: -2px; }

/* ---------- card 4: prepare — matrix tabs ---------- */
.card-matrix {
  background: var(--graphite);
  color: var(--titanium);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.matrix-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px clamp(28px, 5vw, 80px) calc(var(--hud-h) + 40px);
}

.matrix-left .mono-tag {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--volt);
  margin-bottom: 20px;
}

.matrix-left h2 {
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 40px;
}

.matrix-tab {
  display: block;
  width: 100%;
  text-align: left;
  padding: 22px 24px;
  border-left: 2px solid rgba(214, 222, 229, 0.2);
  transition: border-color 0.5s var(--ease-silk), background 0.5s var(--ease-silk);
}

.matrix-tab .tab-line { display: flex; align-items: baseline; gap: 16px; }

.matrix-tab .tab-num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  color: #7F8E9B;
  transition: color 0.5s var(--ease-silk);
}

.matrix-tab .tab-name {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(243, 245, 247, 0.55);
  transition: color 0.5s var(--ease-silk);
}

.matrix-tab p {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(243, 245, 247, 0.65);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.7s var(--ease-silk), opacity 0.7s var(--ease-silk);
}

.matrix-tab.active { border-left-color: var(--volt); background: rgba(240, 165, 0, 0.08); }
.matrix-tab.active .tab-num { color: var(--volt); }
.matrix-tab.active .tab-name { color: var(--titanium); }
.matrix-tab.active p { max-height: 120px; opacity: 1; }
.matrix-tab:hover:not(.active) .tab-name { color: rgba(243, 245, 247, 0.8); }

.matrix-tab:focus-visible { outline: 2px solid var(--volt); outline-offset: -2px; }

.matrix-right { position: relative; overflow: hidden; }

.matrix-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1s var(--ease-silk), transform 1.4s var(--ease-silk);
}

.matrix-img.active { opacity: 1; transform: scale(1); }

.matrix-img-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(11, 38, 56, 0.7), rgba(11, 38, 56, 0.25) 60%);
  pointer-events: none;
}

/* the interactive panel floating over the image */
.matrix-panel {
  position: absolute;
  left: clamp(20px, 4vw, 48px);
  right: clamp(20px, 4vw, 48px);
  top: 48px;
  bottom: calc(var(--hud-h) + 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.7s var(--ease-silk), transform 0.7s var(--ease-silk), visibility 0s linear 0.7s;
}

.matrix-panel.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.7s var(--ease-silk) 0.15s, transform 0.7s var(--ease-silk) 0.15s, visibility 0s;
}

.panel-box {
  width: 100%;
  max-width: 470px;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(10, 22, 34, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(214, 222, 229, 0.25);
  padding: 28px;
}

.panel-tag {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--volt);
  margin-bottom: 14px;
}

.practice-question { font-size: clamp(17px, 1.8vw, 21px); font-weight: 600; line-height: 1.45; }

.practice-answer {
  margin-top: 16px;
  padding: 12px 14px;
  border-left: 2px solid var(--volt);
  background: rgba(240, 165, 0, 0.1);
  color: var(--volt-soft);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px;
}

.practice-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.practice-counter {
  margin-top: 16px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(243, 245, 247, 0.5);
}

.res-group-title {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #8FA3B3;
  margin: 20px 0 4px;
}

.res-group-title:first-of-type { margin-top: 0; }

.res-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(214, 222, 229, 0.12);
}

.res-link strong { display: block; font-size: 14px; font-weight: 600; }
.res-link small { display: block; font-size: 12px; color: rgba(243, 245, 247, 0.6); margin-top: 2px; }
.res-link .arrow { color: var(--volt); font-family: 'JetBrains Mono', ui-monospace, monospace; transition: transform 0.4s var(--ease-silk); }
.res-link:hover strong { color: var(--volt-soft); }
.res-link:hover .arrow { transform: translateX(4px); }
.res-link:focus-visible { outline: 2px solid var(--volt); outline-offset: 2px; }

.lead-title { font-size: clamp(26px, 3vw, 38px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; margin-bottom: 14px; }
.lead-text { font-size: 14px; line-height: 1.7; color: rgba(243, 245, 247, 0.75); margin-bottom: 22px; }

.matrix-caption {
  position: absolute;
  right: 28px;
  bottom: calc(var(--hud-h) + 24px);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--titanium);
  background: rgba(11, 38, 56, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(214, 222, 229, 0.25);
  padding: 10px 16px;
}

/* ---------- normal-flow content that slides over the card stack ---------- */
.flow { position: relative; z-index: 50; background: var(--titanium); }

.section-cal {
  padding: 96px clamp(20px, 5vw, 80px);
  border-top: 1px solid var(--steel);
}

.section-inner { max-width: 1200px; margin: 0 auto; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px 48px;
  flex-wrap: wrap;
}

.section-head .hero-eyebrow { font-size: 11px; margin-bottom: 18px; }

.section-head h2 { font-size: clamp(36px, 6vw, 72px); font-weight: 800; letter-spacing: -0.035em; line-height: 0.95; }

.section-head p { max-width: 420px; font-size: 15px; line-height: 1.7; color: var(--muted); }

.calendar-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 48px 0 16px;
}

.calendar-nav-row h3 { font-size: clamp(18px, 2.4vw, 26px); font-weight: 700; letter-spacing: -0.01em; text-align: center; }

.calendar-wrapper { border: 1px solid var(--steel); background: var(--steel); }

.calendar-day-headers,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
}

.calendar-day-headers { border-bottom: 1px solid var(--steel); }

.cal-hdr {
  background: var(--titanium);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-2);
  padding: 12px 10px;
}

.cal-day {
  background: var(--white);
  min-height: 112px;
  padding: 8px;
  min-width: 0;
  transition: background 0.3s var(--ease-silk);
}

.cal-day.other-month { background: #F8F9FA; color: #B5BCC3; }

.cal-day.has-events { cursor: pointer; }
.cal-day.has-events:hover { background: #FFF8E6; }

.day-num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cal-day.today .day-num { background: var(--carbon); color: var(--volt); }

.event-chip {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  padding: 4px 6px;
  background: var(--volt);
  color: var(--carbon);
  border-left: 2px solid var(--carbon);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.event-chip.ics { background: #4A7FA3; color: var(--white); border-left-color: var(--fse-blue); }

.event-chip.more {
  background: transparent;
  border-left: none;
  padding-left: 0;
  color: var(--muted);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 500;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 16px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--muted-2);
}

.calendar-legend span { display: inline-flex; align-items: center; gap: 8px; }
.calendar-legend i { width: 12px; height: 12px; display: inline-block; background: var(--volt); border-left: 2px solid var(--carbon); }
.calendar-legend i.ics { background: #4A7FA3; border-left-color: var(--fse-blue); }

.loading, .empty {
  grid-column: 1 / -1;
  background: var(--white);
  padding: 48px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--muted-2);
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--steel);
  border-top-color: var(--carbon);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- footer ---------- */
.site-footer {
  background: var(--carbon);
  color: var(--titanium);
  padding: 88px clamp(20px, 5vw, 80px) calc(var(--hud-h) + 40px);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: end;
}

.footer-logo { height: 34px; width: auto; margin-bottom: 28px; }

.footer-tagline { font-size: clamp(36px, 6vw, 76px); font-weight: 800; letter-spacing: -0.035em; line-height: 0.95; }

.footer-tagline em { font-style: normal; color: var(--volt); }

.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }

.footer-links a {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(214, 222, 229, 0.15);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.4s var(--ease-silk);
}

.footer-links a::after { content: "\2192"; color: var(--volt); }
.footer-links a:hover { color: var(--volt-soft); }

.footer-smallprint {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid rgba(214, 222, 229, 0.15);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 32px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(243, 245, 247, 0.55);
}

.footer-smallprint a { color: var(--titanium); border-bottom: 1px solid var(--volt); }

/* ---------- the permanent hud bar ---------- */
.hud {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--hud-h);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(16px, 4vw, 40px);
  background: rgba(243, 245, 247, 0.84);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--steel);
}

.hud-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.hud-brand img { height: 20px; width: auto; filter: brightness(0); }

.hud-brand .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--volt); box-shadow: 0 0 0 1px rgba(10, 22, 34, 0.35); }

.hud-links { display: flex; align-items: center; gap: 22px; }

.hud-links a {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--carbon);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease-silk), background 0.4s var(--ease-silk), color 0.4s var(--ease-silk);
  white-space: nowrap;
}

.hud-links a:hover { border-bottom-color: var(--volt); }

.hud-links a.hud-cta { background: var(--carbon); color: var(--titanium); padding: 8px 14px; border-bottom: none; }
.hud-links a.hud-cta:hover { background: var(--volt); color: var(--carbon); }

.hud-progress { flex: 1; max-width: 280px; display: flex; align-items: center; gap: 14px; }

.hud-track { flex: 1; height: 2px; background: var(--steel); position: relative; overflow: hidden; }

.hud-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0%; background: var(--volt); }

.hud-pct { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; color: var(--carbon); min-width: 44px; text-align: right; }

.hud-nav { display: flex; align-items: center; gap: 8px; padding-left: 20px; border-left: 1px solid var(--steel); }

.hud-arrow {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--steel);
  background: var(--white);
  color: var(--carbon);
  transition: background 0.4s var(--ease-silk), border-color 0.4s var(--ease-silk), color 0.4s var(--ease-silk), opacity 0.4s var(--ease-silk);
}

.hud-arrow svg { width: 14px; height: 14px; display: block; }
.hud-arrow:hover:not(:disabled) { background: var(--volt); border-color: var(--carbon); color: var(--carbon); }
.hud-arrow:disabled { opacity: 0.3; cursor: default; }
.hud-arrow:focus-visible, .hud-links a:focus-visible { outline: 2px solid var(--carbon); outline-offset: 2px; }

/* ---------- event modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(10, 22, 34, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open { display: flex; }

.modal {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--white);
  border-top: 4px solid var(--volt);
  padding: 36px 32px 32px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--steel);
  font-size: 14px;
  transition: background 0.4s var(--ease-silk);
}

.modal-close:hover { background: var(--volt); }

.modal h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin-right: 44px; }

.modal-date {
  margin: 12px 0 18px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.modal-desc { font-size: 15px; line-height: 1.7; color: #2B3440; white-space: pre-line; margin-bottom: 24px; }

.modal-desc:empty { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .hud-pct { display: none; }
}

@media (max-width: 900px) {
  .glass-a { width: 140px; height: 140px; left: 4%; }
  .glass-b { width: 100px; height: 100px; right: 6%; }
  .glass-b::after { font-size: 44px; }
  .glass-c { width: 80px; height: 80px; right: 12%; }
  .hero-season { display: none; }
  .crosshair-v { left: 50%; }
  .node-dot { left: 50%; top: 24%; }
  .crosshair-h { top: 24%; }
  .node-box { left: 24px; right: 24px; width: auto; top: calc(24% + 24px); }
  .macro-caption { left: 24px; right: 24px; }
  .card-fold { padding-bottom: var(--hud-h); }
  .accordion { flex-direction: column; }
  .slice { border-right: none; border-bottom: 1px solid var(--steel); }
  .slice:last-child { border-bottom: none; }
  .slice-idle { flex-direction: row; align-items: center; justify-content: space-between; padding: 0 24px; }
  .slice-idle-title { writing-mode: horizontal-tb; letter-spacing: 0.08em; }
  .slice-reveal { left: 24px; right: 24px; bottom: 16px; }
  .slice-reveal h3 { white-space: normal; }
  .slice-reveal p { display: none; }
  .fold-head { padding: 20px 24px 0; flex-direction: column; gap: 6px; }
  .accordion { margin-top: 16px; }
  .card-matrix { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .matrix-left { padding: 28px 24px 16px; justify-content: flex-start; min-width: 0; }
  .matrix-left .mono-tag { margin-bottom: 10px; }
  .matrix-left h2 { font-size: 26px; margin-bottom: 14px; }
  .matrix-tabs { display: flex; }
  .matrix-tab { flex: 1 1 0; min-width: 0; padding: 10px 4px; text-align: center; border-left: none; border-bottom: 2px solid rgba(214, 222, 229, 0.2); }
  .matrix-tab.active { border-bottom-color: var(--volt); }
  .matrix-tab .tab-line { justify-content: center; gap: 8px; }
  .matrix-tab .tab-num { display: none; }
  .matrix-tab .tab-name { font-size: 13px; }
  .matrix-tab p { display: none; }
  .matrix-panel { left: 16px; right: 16px; top: 16px; bottom: calc(var(--hud-h) + 16px); }
  .panel-box { padding: 20px; }
  .matrix-caption { display: none; }
  .footer-top { grid-template-columns: 1fr; }
  .hud-progress { display: none; }
}

@media (max-width: 900px) and (max-height: 720px) {
  .node-stat { padding: 5px 0; }
  .macro-caption h2 { font-size: 28px; }
  .macro-date { font-size: 13px; }
}

@media (max-width: 640px) {
  .hud { gap: 12px; }
  .hud-brand { display: none; }
  .hud-links { gap: 14px; }
  .hud-links a { font-size: 10px; letter-spacing: 0.08em; }
  .hud-links a.hud-cta { display: none; }
  .hud-nav { padding-left: 12px; }
  .hero-ctas .btn { padding: 12px 16px; }
  .section-cal { padding-block: 64px; }
  .calendar-nav-row .btn { padding: 8px 10px; letter-spacing: 0.06em; }
  .cal-hdr { padding: 8px 2px; text-align: center; letter-spacing: 0.05em; }
  .cal-day { min-height: 60px; padding: 4px; }
  .day-num { width: 22px; height: 22px; font-size: 11px; }
  /* chips turn into colour bars on narrow screens — tap the day to open */
  .event-chip { font-size: 0; height: 6px; padding: 0; margin-top: 4px; border-left: none; }
  .event-chip.more { display: none; }
  .footer-links { grid-template-columns: 1fr; }
  .modal { padding: 32px 20px 24px; }
}

@media (max-height: 640px) {
  .hero-scroll-hint { display: none; }
}

@media (max-height: 540px) {
  .hero-title { font-size: clamp(40px, 10vh, 90px); }
  .hero-sub { display: none; }
  .matrix-tab p { display: none; }
}

/* ---------- reduced motion: collapse to a calm static document ---------- */
@media (prefers-reduced-motion: reduce) {
  .scroll-spacer { display: none; }
  .zcard {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 100vh;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  .glass-a, .glass-b, .glass-c, .node-dot, .hero-scroll-hint::after, .spinner { animation: none !important; }
  .slice, .slice-img, .slice-shade, .slice-reveal, .matrix-img, .matrix-tab p, .matrix-panel { transition: none !important; }
  .card-macro, .matrix-right { min-height: 100vh; }
  .card-fold .accordion { min-height: 80vh; }
}
