/* ---------------------------------------------------
   sharedspace.page — base structure & navigation
--------------------------------------------------- */

:root {
  --gap: 0px;
  --label-h: 18px;
  --font: Helvetica, Arial, sans-serif;

  --c-unlearn-bg: #E8E8E8;
  --c-unlearn-fg: #ffffff;

  --c-how-bg: #E8E8E8;
  --c-how-fg: #ffffff;

  --c-you-bg: #E8E8E8;
  --c-you-fg: #ffffff;

  --c-think-bg: #E8E8E8;
  --c-think-fg: #ffffff;

  --c-manifesto-bg: #E8E8E8;
  --c-manifesto-fg: #163409;

  --c-messageboard-bg: #E8E8E8;
  --c-messageboard-fg: #ffffff;

  --c-pastevents-bg: #E8E8E8;
  --c-pastevents-fg: #ffffff;

  --c-initiatives-bg: #E8E8E8;
  --c-initiatives-fg: #ffffff;

  --c-follow-bg: #E8E8E8;
  --c-follow-fg: #ffffff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font);
  background: #E8E8E8;
  overflow: hidden;
}

/* ---------------- grid ---------------- */

.grid,
.events-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--gap);
  width: 100vw;
  height: 100vh;
}

.panel,
.event-block {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  border-left: 1px solid rgba(255, 255, 255);
  border-bottom: 1px solid rgba(255, 255, 255);
}

.panel-title {
  display: block;
  padding: 0 0.85em;
  font-size: clamp(2.6rem, 7.4vw, 8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
  line-height: 1;
}

.panel-title:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

.panel-title:hover {
  color: #000
}

/* ---------------- label / dropdown trigger ---------------- */

.panel-label {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  display: flex;
  align-items: stretch;
  background: #b8b8b8;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: var(--label-h);
  transition: background 0.15s ease, color 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}

.panel.is-active .panel-label {
  background: #191919;
  color: #fff;
}

.label-text {
  padding: 0 4px;
  white-space: nowrap;
}

.label-toggle {
  appearance: none;
  border: 0;
  border-left: 1px solid rgba(0,0,0,0.25);
  background: transparent;
  color: inherit;
  width: 20px;
  cursor: pointer;
  font-size: 0.6rem;
}

.panel.is-active .label-toggle {
  border-left-color: rgba(255,255,255,0.3);
}

.label-toggle:hover {
  background: rgba(0,0,0,0.1);
}

.panel.is-active .label-toggle:hover {
  background: rgba(255,255,255,0.15);
}

/* ---------------- dropdown menu ---------------- */

.panel-menu {
  position: absolute;
  top: 100%;
  left: 100%;
  z-index: 6;
  min-width: 180px;
  background: #000000;
  padding: 2px 0;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  display: none;
}

.panel.menu-open .panel-menu,
.panel-label.menu-open .panel-menu {
  display: block;
}

.panel-menu ul {
  list-style: none;
  margin: 12px 2px 12px 2px;
  padding: 0;
}

.panel-menu li {
  position: relative;
  padding: 0 8px;
}

.panel-menu button {
  appearance: none;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  padding: 2px 10px 2px 20px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #E8E8E8;
  cursor: pointer;
}

.panel-menu button:hover,
.panel-menu button:focus-visible {
  color: #000;
  background: rgba(250, 250, 250, 0.5);
  border-radius: 2px;
}

.panel-menu li.is-current button {
  color: #fff;
}

.panel-menu li.is-current::before {
  content: "\203A";
  position: absolute;
  left: 14px;
  top: -2px;
  color: #E8E8E8;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  transform: translateY(-1px);
}

.panel-menu .menu-divider {
  border: none;
  border-top: 1.5px solid #E8E8E8;
  margin: 8px;
}

/* ---------------- status bar ---------------- */

.statusbar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: 40%;
  min-width: 510px; 
  max-width: calc(100vw - 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(6px, 1.2cqw, 12px);
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  box-shadow: -4px 4px 8px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 20;
  container-type: inline-size;
}

.statusbar-left,
.statusbar-right {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1.2cqw, 8px);
  flex-shrink: 0;
}

.pill {
  appearance: none;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(255, 255, 255, 1);
  border-radius: 999px;
  padding: clamp(2px, 0.8cqw, 4px) clamp(6px, 2cqw, 12px);
  font-size: clamp(0.65rem, 2cqw, 0.9rem);
  font-weight: 600;
  color: #2b2b2b;
  cursor: pointer;
  white-space: nowrap;
}

.pill:hover {
  background: #e9e9e9;
}

.pill--label,
.pill--stat {
  cursor: default;
  color: #4a4a4a;
  text-transform: none;
  letter-spacing: 0.03em;
  font-size: clamp(0.65rem, 2cqw, 0.9rem);
  font-weight: 600;
}

.dotcount {
  display: flex;
  align-items: center;
  gap: clamp(2px, 0.8cqw, 4px);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 999px;
  padding: clamp(3px, 1cqw, 6px) clamp(6px, 2cqw, 12px);
}

.dot {
  width: clamp(5px, 1.2cqw, 7px);
  height: clamp(5px, 1.2cqw, 7px);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  white-space: nowrap;
}

.count {
  margin-left: clamp(2px, 1cqw, 6px);
  font-size: clamp(0.6rem, 1.6cqw, 0.75rem);
  font-weight: 700;
  color: #2b2b2b;
}

.pill--label[data-action="events"] {
  cursor: pointer;
  pointer-events: auto;
}

.pill--label[data-action="events"]:hover {
  background: #e9e9e9;
}

/* Optional adjustment for small screens so the bar itself isn't too narrow */
@media (max-width: 768px) {
  .statusbar {
    width: 90%;
  }
}

/* ---------------- Upcoming Events Popup ---------------- */

.events-popup {
  position: fixed;
  z-index: 1000;
  width: 320px;
  max-width: 90vw;
  background: rgba(0, 0, 0, 1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 8px;
  box-shadow: -4px 4px 24px rgba(0, 0, 0, 0.15);
  color: #ffffff;
  padding: 16px 20px 20px;
  display: none;
  font-family: var(--font);
  box-sizing: border-box;
}

.events-popup.is-visible {
  display: block;
}

.events-popup-header {
  position: absolute;
  top: 16px;       
  right: 20px;     
  z-index: 2;
  cursor: move;
}

.events-popup-close {
  appearance: none;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;  
  line-height: 1;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
  margin: 0;
  transition: opacity 0.15s ease;
}

.events-popup-close:hover {
  opacity: 0.7;
}

.events-popup-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.event-card-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.event-card-title {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.event-card-date {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  opacity: 0.9;
}

.event-card-desc {
  margin: 4px 0 8px;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.02em;
  opacity: 0.85;
  text-transform: uppercase;
  word-break: break-word;
}

.event-card-countdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.countdown-timer {
  font-family: monospace;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.event-card-divider {
  border: none;
  border-top: 1.5px solid #b8b8b8;
  margin: 4px 0;
}

/* ---------------- full page overlay ---------------- */

.fullpage {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #f4f4f2;
  transform: translateY(100%);
  overflow-y: auto;
}

.fullpage.is-open {
  transform: translateY(0%);
}

.fullpage-label.panel-label {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 110;
  color: #fff;
  background: #000;
}

.fullpage-label .label-toggle {
  border-left-color: rgba(255, 255, 255, 0.3);
}

.fullpage-label .label-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
}

.fullpage-inner {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.fullpage-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  margin: 0 0 24px;
}

.fullpage-title:empty {
  display: none;
  margin: 0;
}

.fullpage-body {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #333;
}

/* ---------------- Primary Full-Page Centered Preview Styles ---------------- */

.fullpage[data-page="unlearn"] { background-color: var(--c-unlearn-bg); color: var(--c-unlearn-fg); }
.fullpage[data-page="how"]     { background-color: var(--c-how-bg);     color: var(--c-how-fg); }
.fullpage[data-page="you"]     { background-color: var(--c-you-bg);     color: var(--c-you-fg); }
.fullpage[data-page="think"]   { background-color: var(--c-think-bg);   color: var(--c-think-fg); }

.fullpage[data-page="unlearn"] .fullpage-inner,
.fullpage[data-page="how"] .fullpage-inner,
.fullpage[data-page="you"] .fullpage-inner,
.fullpage[data-page="think"] .fullpage-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.fullpage[data-page="unlearn"] .fullpage-title,
.fullpage[data-page="how"] .fullpage-title,
.fullpage[data-page="you"] .fullpage-title,
.fullpage[data-page="think"] .fullpage-title {
  display: block;
  padding: 0 0.85em;
  font-size: clamp(2.6rem, 7.4vw, 8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
  line-height: 1;
  margin: 0;
  text-align: center;
}

/* ---------------- Message Board ---------------- */

.msgboard {
  display: flex;
  margin: 0;
  padding: 0;
  background-color: #E8E8E8;
  font-family: Helvetica, Arial, sans-serif;
  height: 100vh;
  box-sizing: border-box;
  width: 100%;
  color: #000;
  overflow: hidden;
}

/* --- Sidebar (Left Column): collapses to a thin "CONTRIBUTE" strip,
   click expands it into the full contribution form + Network button --- */
.msgboard-sidebar {
  width: 8.25%;
  height: 100%;
  flex-shrink: 0;
  box-sizing: border-box;
  background-color: #33FF00;
  overflow: hidden;
  transition: width 0.15s ease;
}

.msgboard-sidebar.is-expanded {
  width: 33vw;
}

.msgboard-collapsed {
  all: unset;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  width: 100%;
  height: 100%;
  padding: 28px 0 24px;
  box-sizing: border-box;
  cursor: pointer;
  color: #000;
}

.msgboard-sidebar.is-expanded .msgboard-collapsed {
  display: none;
}

.msgboard-collapsed-chevron {
  font-size: 5rem;
  font-weight: 800;
  line-height: 1;
}

.msgboard-collapsed-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 4.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.msgboard-card {
  display: none;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  padding: 32px 28px 24px;
  position: relative;
  overflow-y: auto;
}

.msgboard-sidebar.is-expanded .msgboard-card {
  display: flex;
}

.msgboard-panel-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #000;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.msgboard-title {
  margin: 0 0 32px;
  font-size: 1.7rem;
  font-weight: 900;
  text-transform: uppercase;
  text-align: center;
}

.msgboard-heading {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* --- Ranking Section Data (packed-circle bubble chart) --- */
.school-bubble-chart {
  width: 100%;
  height: 100%;
  min-height: 200px;
}

.school-bubble-chart svg {
  display: block;
}

/* --- Form Styles --- */
.msgboard-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow-y: auto;
  min-height: 0;
}

.msgboard-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  gap: 4px;
}

.msgboard-question {
  text-transform: none;
  font-weight: 400;
  color: #1a1a1a;
  font-size: 0.75rem;
}

.msgboard-form input,
.msgboard-form textarea {
  background-color: #ffffff;
  background-image:
    linear-gradient(to right, #1a1a1a 50%, transparent 50%),
    linear-gradient(to right, #1a1a1a 50%, transparent 50%),
    linear-gradient(to bottom, #1a1a1a 50%, transparent 50%),
    linear-gradient(to bottom, #1a1a1a 50%, transparent 50%);
  background-position: left top, left bottom, left top, right top;
  background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
  background-size: 8px 1px, 8px 1px, 1px 8px, 1px 8px;
  border: none;
  border-radius: 2px;
  padding: 12px;
  font-family: inherit;
  color: #000;
  resize: vertical;
}

.msgboard-form input:focus,
.msgboard-form textarea:focus {
  outline: 2px solid #1a1a1a;
}

.msgboard-form button {
  all: unset;
  display: block;
  padding-top: 48px; 
  text-align: center;
  font-size: 1.6rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #000;
  cursor: pointer;
}

.msgboard-form button:hover {
  text-decoration: underline;
}

/* "Network" trigger button â€” opens the school-participation popup.
   Sits below the form, same bold weight as the CONTRIBUTE heading. */
.msgboard-network-btn {
  all: unset;
  display: block;
  margin-top: auto;
  padding-bottom: 24px;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #000;
  cursor: pointer;
}

.msgboard-network-btn:hover {
  text-decoration: underline;
}

/* --- Main Table Area (Right Column) --- */
.msgboard-table-wrap {
  flex-grow: 1;
  height: 100%;
  box-sizing: border-box;
  padding: 40px 48px 40px 40px;
  overflow-y: auto;
}

.msgboard-table-header,
.msgboard-entry {
  display: grid;
  grid-template-columns: 3fr 1.5fr 1.5fr 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.msgboard-table-header {
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  padding-bottom: 24px;
}

.msgboard-entry {
  font-size: 0.85rem;
  line-height: 1.4;
  padding-bottom: 40px;
}

.msgboard-entry a {
  color: #000;
  text-decoration: underline;
}

@media (max-width: 834px) {
  .msgboard-sidebar.is-expanded {
    width: min(340px, 82vw);
  }

  .msgboard-table-wrap {
    padding: 28px 20px;
  }

  .msgboard-table-header,
  .msgboard-entry {
    grid-template-columns: 2fr 1.2fr 1.2fr 1fr 1fr;
    gap: 14px;
  }
}

/* ---------------- Manifesto (Google Slides embed) ---------------- */

.manifesto-embed {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 24px 24px;
  background: #f4f4f2;
  box-sizing: border-box;
}

.manifesto-embed-frame {
  position: relative;
  width: max(1600px, 100%);
  aspect-ratio: 16 / 9;
}

.manifesto-embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------------- Video panel ---------------- */

.video-embed {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 72px 32px 48px;
  background: #000;
  box-sizing: border-box;
}

.video-embed-frame {
  position: relative;
  width: min(1100px, 100%);
  aspect-ratio: 16 / 9;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.video-embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------------- Past Events / Initiatives ---------------- */

.events-row {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.event-block {
  flex: 1;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  transition: flex 0.35s ease;
  overflow: hidden;
}

.event-block.is-expanded {
  flex: 8;
  cursor: default;
}

.event-collapsed-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-weight: 800;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #000;
  padding: 72px 0 24px;
  margin: 0 auto;
  white-space: nowrap;
}

.event-content {
  width: 100%;
  padding: 96px 48px 64px;
  text-align: center;
  color: #000;
  box-sizing: border-box;
}

.event-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  text-transform: uppercase;
  margin: 0 0 24px;
  font-weight: 800;
}

.event-description {
  max-width: 640px;
  margin: 0 auto 40px;
  font-weight: 700;
  line-height: 1.5;
}

.event-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto 40px;
}

.event-image {
  aspect-ratio: 1;
  background: #d9d9d9;
  overflow: hidden;
  border-radius: 4px;
}

.event-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.event-credits {
  max-width: 640px;
  margin: 0 auto;
  font-weight: 700;
  opacity: 0.85;
}

.events-status {
  margin: 0 auto;
  padding: 120px 24px;
  text-align: center;
  font-weight: 700;
  opacity: 0.7;
}

/* ---------------- tablet ---------------- */

@media (max-width: 834px) {
  .panel-title { font-size: clamp(1.6rem, 7vw, 3rem); }

  .manifesto-embed,
  .video-embed {
    padding: 64px 16px 32px;
  }

  .event-content {
    padding: 80px 20px 48px;
  }

  .event-images {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .event-collapsed-label {
    font-size: 0.9rem;
    padding: 64px 0 16px;
  }
}

/* ---------------- physics drop effect ---------------- */

.is-broken .panel-title {
  position: fixed !important;
  z-index: 1000 !important;
  pointer-events: none;
  will-change: transform;
  transition: transform 0.05s linear;
}


/* Force fullpage modal overlay to fill viewport */
.fullpage[data-page="follow"] {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  z-index: 9999;
}

.fullpage[data-page="follow"] .fullpage-inner,
.fullpage[data-page="follow"] .fullpage-body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  max-width: none;
  display: block;
}

/* Hide default title element on follow page */
.fullpage[data-page="follow"] .fullpage-title {
  display: none;
}

/* 50/50 Grid Container */
.follow-page-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
}

/* Left Panel (Grey) */
.follow-left {
  background-color: #e8e8e8;
  color: #000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  box-sizing: border-box;
}

/* Right Panel (Yellow) */
.follow-right {
  background-color: #ffff00;
  color: #000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  text-align: center;
  box-sizing: border-box;
}

/* Typography */
.follow-left h2,
.follow-right h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 2.5rem;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

/* Link Row Layout */
.follow-left-links {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 10rem;
}

.follow-left-links a {
  font-size: 1.1rem;
  font-weight: 800;
  color: #000;
  text-decoration: underline;
  text-transform: uppercase;
  white-space: nowrap;
}

.follow-right p {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.35;
  max-width: 400px;
  margin: 0 auto;
  text-transform: uppercase;
}

/* Responsive Fallback */
@media (max-width: 768px) {
  .follow-page-container {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
  }
  .follow-left, 
  .follow-right {
    min-height: 50vh;
  }
}



/* --- Message Board Overlay & Modal Card --- */
#school-popup {
  width: 40vw;
  height: 50vh;
  resize: both;
  overflow: auto;
  min-width: 220px;
  min-height: 180px;
  max-width: 90vw;
  max-height: 90vh;
}

#school-popup .msgboard-card {
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 24px;
  max-height: none;
}

#school-popup-header {
  top: 0;
  left: 0;
  right: 0;
  height: 24px;
  display: flex;
  align-items: center;
  padding: 24px;
  justify-content: space-between;
  align-items: center; /* Vertically centers the elements */
  width: 100%;          /* Ensures header spans full container width */
  box-sizing: border-box;
}


#school-popup .msgboard-ranking {
  flex: 1;
  min-height: 0;
}

@media (max-width: 500px) {
  .mobile-homepage {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: #e5e5e5;
    padding: 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .mobile-header {
    display: flex;
    justify-content: flex-end;
  }

  .hamburger-btn, .close-menu-btn {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
  }

  .hamburger-btn {
  display: block;
}

.close-menu-btn {
  display: none;
}

/* When the menu is active, reverse their visibility */
.mobile-homepage.menu-open .hamburger-btn {
  display: none;
}

.mobile-homepage.menu-open .close-menu-btn {
  display: block;
}

  .mobile-title {
    font-size: 72px;
    font-weight: 900;
    line-height: 1.05;
    margin-top: 0;
    margin-bottom: 16px;
    letter-spacing: -1px;
  }

  .mobile-content {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Aligns contents to the top/left */
  justify-content: flex-start; /* Prevents vertical centering if applied to parent */
}

  .mobile-image-placeholder {
    width: 100%;
    height: 300px;
    background: #ff0000;
    margin: 16px 0;
  }

  .mobile-catchphrase {
    font-size: 20px;
    font-weight: 700;
    margin-top: auto;
    line-height: 1.2;
  }

  /* Overlay Navigation Styles */
  .mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(229, 229, 229, 0.0);
    display: none;
    flex-direction: column;
    padding: 24px;
    z-index: 1000;
  }

  .mobile-nav-overlay.is-active {
    display: flex;
  }

  .mobile-nav-overlay .close-menu-btn {
    align-self: flex-end;
  }

  .mobile-nav-buttons {
    margin: auto 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
  }

  .pill-nav-btn {
  background: #ffffff;
  border: none;
  padding: 0.6em 1.5em; 
  border-radius: 40px;
  font-size: clamp(1rem, 5vw, 1.375rem); 
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.16);
  display: inline-flex;
  width: max-content;
  max-width: 280px;
  text-align: center;
  transition: transform 0.1s ease;
}

  .pill-nav-btn:active {
    transform: scale(0.98);
  }
}

@media (max-width: 500px) {
  /* Hide the desktop grid and status bar on mobile */
  .grid, .statusbar {
    display: none !important;
  }
  
  /* Ensure mobile homepage structure displays */
  .mobile-homepage {
    display: flex !important;
  }
  
  /* (Rest of your existing @media (max-width: 500px) styles follow here...) */
}