:root {
  /* Core Colors (removed unused color tokens) */
  --brutalist-black: #000000;
  --brutalist-white: #FFFFFF;
  --brutalist-red: #9D1020;

  /* Typography */
  --font-family-base: "Acumin Variable Concept", "Acumin Pro", "Inter", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-family-headline: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-family-mono: "Berkeley Mono", ui-monospace, SFMono-Regular, Menlo,
    Monaco, Consolas, monospace;
  /* Font sizes - simplified */
  --font-size-sm: 12px;
  --font-size-base: 14px;
  --font-size-lg: 16px;
  --font-size-xl: 18px;
  --font-size-2xl: 20px;
  --font-size-3xl: 24px;
  --font-size-4xl: 30px;
  /* Font weights - simplified */
  --font-weight-normal: 400;
  --font-weight-bold: 600;
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --letter-spacing-tight: -0.01em;

  /* Spacing - reduced to commonly used values */
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;

  /* Border Radius - simplified */
  --radius-sm: 6px;

  /* Animation */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --ease-standard: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base styles */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--brutalist-black);
  color: var(--brutalist-white);
  font-family: var(--font-family-base);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-family-headline);
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--brutalist-white);
  letter-spacing: var(--letter-spacing-tight);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }

p { margin: 0 0 var(--space-16) 0; }

a { 
  color: var(--brutalist-red); 
  text-decoration: none; 
  transition: color var(--duration-fast) var(--ease-standard); 
}
a:hover { color: var(--brutalist-white); }

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translateX(-50%) translateY(-50%);
  z-index: 1;
  filter: contrast(1.2) brightness(0.8);
  transition: opacity 0.35s ease, transform 0.35s ease, filter 0.35s ease;
}

.video-fallback {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  font-weight: 900;
  color: var(--brutalist-white);
  text-align: center;
  z-index: 2;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 2rem;
}

/* Reposition headline for better visibility */
.hero-headline {
  position: absolute;
  left: 2%;
  bottom: calc(2% + 1.25rem); /* match countdown: same outer offset (2%) plus inner gutter (1.25rem) from the bottom */
  transform: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  z-index: 20;
  padding: 0 1rem;
  padding-left: 1.25rem; /* Match countdown container left padding so the text aligns visually with the same side spacing */
  max-width: min(92vw, 640px);
}
.hero-headline, .hero-headline .line {
  font-family: var(--font-family-base);
}
.hero-headline .line {
  font-weight: 300;
  letter-spacing: 0.03em;
  text-shadow: none;
}
.hero-headline .line-1 { font-size: clamp(0.85rem, 2.6vw, 1.2rem); }
.hero-headline .line-2 { font-size: clamp(1rem, 3.8vw, 1.6rem); }
.hero-headline .line-4a,
.hero-headline .line-4b { font-size: clamp(0.85rem, 2.6vw, 1.1rem); }
.hero-headline .line-tickets {
  font-size: clamp(0.85rem, 2.6vw, 1.05rem);
  margin-top: 0.35rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  color: var(--brutalist-red);
  position: relative;
  text-transform: uppercase;
  display: inline-block;
}
.hero-headline .line-tickets::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 100%;
  background: var(--brutalist-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}
.hero-headline .line-tickets:hover::after,
.hero-headline .line-tickets:focus-visible::after { transform: scaleX(1); }
.hero-headline .line-tickets:focus-visible { outline: 2px dashed var(--brutalist-red); outline-offset: 4px; }

/* Improve rotated date line placement */
/* Rotated dates now positioned relative to the hero overlay so it scrolls with the section */
.hero-overlay .hero-date-line {
  color: var(--brutalist-red);
  font-family: var(--font-family-base);
  font-weight: 700;
  display: inline-block;
  white-space: nowrap;
  transform-origin: top right; /* anchor to top-right corner */
  transform: rotate(90deg);
  position: absolute; /* relative to .hero-overlay */
  top: 25%;
  right: 2%;
  left: auto;
  bottom: auto;
  margin: 3px;
  z-index: 30; /* ensure above overlays */
}

/* Remove the previous selector so there are no conflicting rules */
.hero-headline .hero-date-line { display: none; }

/* Video Transition Overlay */
.video-transition-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 200px;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 40%, rgba(0, 0, 0, 0.8) 100%);
  z-index: 5;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Countdown Timer - Left Side */
.countdown-container {
  position: absolute;
  top: 2%;
  left: 2%;
  padding: 1.25rem;
}

.countdown-timer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.time-block {
  text-align: left;
  width: max-content;
  padding: 0;
}

.time-block span {
  display: block;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 900;
  color: var(--brutalist-white);
  line-height: 0.95;
  font-family: var(--font-family-mono);
}

.time-block label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  margin-top: 0.1rem;
  color: var(--brutalist-white);
  opacity: 0.85;
  padding: 0;
}

/* Navigation Menu - Right Side */
.nav-container {
  position: absolute;
  top: 20%;
  right: 8%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.nav-item,
.nav-item:visited {
  padding: 0.25rem 0;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--brutalist-white);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  line-height: 1;
  position: relative;
}

.nav-item::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 0;
  background: var(--brutalist-white);
  transition: width 200ms ease;
}

.nav-item::before {
  position: absolute;
  left: -3rem;
  top: 0;
  font-family: var(--font-family-mono);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  color: var(--brutalist-white);
  opacity: 0.8;
}

.nav-container a:nth-child(1)::before { content: "01"; }
.nav-container a:nth-child(2)::before { content: "02"; }
.nav-container a:nth-child(3)::before { content: "03"; }
.nav-container a:nth-child(4)::before { content: "04"; }

.nav-item:hover,
.nav-item:focus-visible {
  color: var(--brutalist-white);
  -webkit-text-stroke: 0;
}

.nav-item:hover::after,
.nav-item:focus-visible::after {
  width: 100%;
}

.nav-item:focus-visible {
  outline: 2px dashed var(--brutalist-red);
  outline-offset: 6px;
}

/* Nav badge to highlight tickets next to Schedule */
.nav-item .nav-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--brutalist-red);
  color: var(--brutalist-white);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  vertical-align: middle;
  -webkit-text-stroke: 0; /* ensure badge text renders filled */
  border: 1px solid rgba(255,255,255,0.25);
}

/* Keep badge readable on hover/focus */
.nav-item:hover .nav-badge,
.nav-item:focus-visible .nav-badge {
  background: var(--brutalist-red);
  color: var(--brutalist-white);
}

/* Minimal nav indicator (red exclamation) */
.nav-item .nav-indicator {
  display: inline-block;
  margin-left: 6px;
  color: var(--brutalist-red);
  font-weight: 900;
  font-size: 0.9em; /* scale with nav text */
  line-height: 1;
  vertical-align: baseline;
  -webkit-text-stroke: 0; /* ensure solid red fill, no outline */
}

/* Keep indicator visible on hover/focus */
.nav-item:hover .nav-indicator,
.nav-item:focus-visible .nav-indicator {
  color: var(--brutalist-red);
}

@media (max-width: 640px) {
  .nav-item .nav-indicator { font-size: 0.85em; margin-left: 4px; }
}

/* Audio Control Button */
.audio-control-btn {
  position: fixed;
  bottom: 40px;
  right: 40px;
  background: none;
  border: 0;
  padding: 0;
  color: var(--brutalist-white);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 900;
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-standard);
}
.audio-control-btn::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 0;
  background: var(--brutalist-white);
  transition: width 200ms ease;
}
.audio-control-btn:hover,
.audio-control-btn:focus-visible {
  color: var(--brutalist-white);
}
.audio-control-btn:hover::after,
.audio-control-btn:focus-visible::after {
  width: 100%;
}
.audio-control-btn.muted { opacity: 0.9; }
.audio-control-btn .audio-icon { display: none; }
.audio-control-btn .audio-text { 
  font-size: 0.95rem; 
  letter-spacing: 0.18em; 
}

/* About Section */
.about-section {
  padding: 5rem 0;
  background: var(--brutalist-black);
  color: var(--brutalist-white);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
}

.section-title {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.05;
  color: var(--brutalist-white);
  font-family: var(--font-family-headline);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.description-text {
  max-width: 720px; /* smaller max width */
}

.description-text p {
  font-size: clamp(0.85rem, 1.8vw, 1rem); /* smaller font size */
  line-height: 1.5; /* tighter line spacing */
  margin-bottom: 1rem; /* smaller bottom margin */
  font-weight: 400; /* lighter weight */
  font-family: var(--font-family-base);
  text-align: justify; /* justified text for rectangular fill */
  text-justify: inter-word; /* better word spacing for justification */
}

/* Remove the larger first paragraph styling */
.description-text p:first-of-type {
  font-size: clamp(0.85rem, 1.8vw, 1rem); /* same size as other paragraphs */
}

/* Keep highlight styling but tone down weight for flow */
.highlight {
  color: var(--brutalist-red);
  font-weight: 700;
  text-transform: none;
  font-family: var(--font-family-base);
}

/* About visual under the About section */
.about-visual { 
  margin-top: 1.75rem; 
}
.about-visual img { 
  width: 100%; 
  height: auto; 
  display: block; 
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.12);
}
.about-visual-caption { 
  margin-top: 0.6rem; 
}
.about-visual-title { 
  font-family: var(--font-family-headline); 
  font-weight: 900; 
  font-size: clamp(1.5rem, 6vw, 3.5rem); 
  letter-spacing: 0.04em; 
  text-transform: uppercase;
}
.about-visual-copy { 
  margin-top: 0.5rem; 
  font-size: clamp(0.95rem, 1.8vw, 1.1rem); 
  line-height: 1.4; 
  opacity: 0.92; 
}

/* About visual — final text styling */
.about-visual { margin-top: 1.75rem; }
.about-visual-caption { max-width: 720px; }
.about-visual-title {
  font-family: var(--font-family-headline);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 0.95;
  font-size: clamp(1.5rem, 6vw, 3.5rem);
  margin: 0 0 0.5rem;
}
.about-visual-copy {
  font-family: var(--font-family-base);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.92);
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  line-height: 1.45;
}

@media (max-width: 640px) {
  .about-visual { margin-top: 1.25rem; }
  .about-visual-title { letter-spacing: 0.1em; }
}

/* About visual under the About section (text-only variant) */
.about-visual { margin-top: 1.25rem; }
.about-visual-caption { margin-top: 0.2rem; }
.about-visual-title { 
  font-family: var(--font-family-headline);
  font-weight: 900;
  font-size: clamp(1.5rem, 6vw, 3.5rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.about-visual-copy {
  margin-top: 0.4rem;
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  line-height: 1.4;
  opacity: 0.92;
}

/* Schedule Section */
.schedule-section {
  padding: 5rem 0;
  background: var(--brutalist-black);
  color: var(--brutalist-white);
}

.schedule-section .section-title {
  text-align: center;
  text-transform: uppercase;
}

/* Schedule search */
.schedule-search {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.schedule-search input[type="search"] {
  flex: 1 1 320px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,0.25);
  color: var(--brutalist-white);
  padding: 10px 2px;
  font-weight: 800;
  letter-spacing: 0.06em;
  outline: none;
}
.schedule-search input[type="search"]::placeholder { color: rgba(255,255,255,0.5); }
.schedule-search input[type="search"]:focus { border-bottom-color: var(--brutalist-white); }
.schedule-search .clear-btn {
  background: none;
  border: 0;
  color: var(--brutalist-white);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 900;
  cursor: pointer;
  position: relative;
}
.schedule-search .clear-btn::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px; height: 2px; width: 0; background: var(--brutalist-white);
  transition: width 200ms ease;
}
.schedule-search .clear-btn:hover { 
  color: var(--brutalist-white); 
}
.schedule-search .clear-btn:hover::after { width: 100%; }
.schedule-search .search-count { margin-left: auto; font-size: 0.85rem; opacity: 0.7; }

/* Bankitó-style schedule grid */
#schedule-timeline.schedule-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 820px) {
  #schedule-timeline.schedule-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1180px) {
  #schedule-timeline.schedule-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.schedule-day { 
  position: relative; 
}

.day-title {
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  letter-spacing: 0.12em;
  margin: 0 0 10px 0;
  text-transform: uppercase;
}
.day-title::after {
  height: 2px;
  width: 80px;
  background: rgba(255, 255, 255, 0.35);
}

.schedule-list { 
  display: flex; 
  flex-direction: column; 
  gap: 0; 
  border-top: 1px solid rgba(255,255,255,0.12);
}
.schedule-row {
  background: transparent;
  color: var(--brutalist-white);
  border: 0;
  outline: 0;
  box-shadow: none;
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: start;
  padding: 12px 0;
  min-height: auto;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (max-width: 520px) { .schedule-row { grid-template-columns: 100px 1fr; } }

.schedule-time {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 8px 12px 0;
  font-weight: 800;
  font-family: var(--font-family-mono);
  letter-spacing: 0.04em;
  font-size: 0.95rem;
  border: 0;
  opacity: 0.85;
}

.schedule-info { padding: 8px 0 8px 0; gap: 6px; }
.schedule-title { font-weight: 900; text-transform: none; line-height: 1.2; }
.schedule-meta { font-size: 0.9rem; opacity: 0.7; }

/* Links as minimal underlines */
.schedule-link {
  align-self: flex-start;
  margin-top: 2px;
  padding: 0;
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: transparent;
  color: var(--brutalist-white);
  border: 0;
  position: relative;
}
.schedule-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 1px;
  width: 100%;
  background: var(--brutalist-white);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}
.schedule-link:hover::after { transform: scaleX(1); }

/* Remove category color accents */
.schedule-row.cat-show,
.schedule-row.cat-live,
.schedule-row.cat-shop,
.schedule-row.cat-special { box-shadow: none; }

/* Room Ā events highlighting */
.schedule-row.cat-room_a {
  box-shadow: inset 3px 0 0 var(--brutalist-red);
  background: rgba(157, 16, 32, 0.1);
  border-left: 3px solid var(--brutalist-red);
}

.schedule-row.cat-room_a .schedule-title {
  font-weight: 900;
  color: var(--brutalist-white);
}

/* Past events styling */
.schedule-row.past-event {
  opacity: 0.5;
  color: rgba(255, 255, 255, 0.6);
}

.schedule-row.past-event .schedule-title,
.schedule-row.past-event .schedule-meta,
.schedule-row.past-event .schedule-time {
  color: rgba(255, 255, 255, 0.6);
}

.schedule-row.past-event .schedule-link {
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

/* Past entire day styling */
.tab-btn.past-day:not(.active) { opacity: 0.45; }
.schedule-day.past-day .day-title { opacity: 0.55; }
.schedule-day.past-day .schedule-row:not(.past-event) { opacity: 0.5; }

/* Room Ā Information Section */
.room-a-info {
  background: rgba(157, 16, 32, 0.15);
  border: 2px solid var(--brutalist-red);
  padding: 24px;
  /* previously only margin-bottom; add top margin for separation below schedule */
  margin: 48px 0 32px;
  border-radius: var(--radius-sm);
}

.room-a-title {
  font-family: var(--font-family-headline);
  font-size: var(--font-size-3xl);
  font-weight: 900;
  color: var(--brutalist-red);
  margin: 0 0 12px 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.room-a-description {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--brutalist-white);
  margin: 0 0 16px 0;
  line-height: var(--line-height-normal);
}

.room-a-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.room-a-text {
  max-width: 480px;
}

.room-a-map { position: relative; overflow:hidden; border-radius: var(--radius-sm); }
.room-a-map .map-frame { filter: grayscale(100%) contrast(1.05) brightness(0.9); border-radius: var(--radius-sm); }

@media (min-width: 900px) {
  .room-a-details {
    flex-direction: row;
    align-items: flex-start;
    gap: 28px;
  }
  .room-a-text {
    flex: 0 0 380px;
  }
  .room-a-map {
    flex: 1 1 auto;
    margin-top: 0 !important;
  }
  .room-a-map iframe {
    height: 260px !important;
    width: 100%;
  }
  .room-a-info {
    margin-right: -10px;
  }
}

.room-a-location,
.room-a-hours {
  font-family: var(--font-family-base); /* changed from mono to base for consistency */
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--brutalist-white);
  margin: 0;
  letter-spacing: 0.04em;
}

@media (max-width: 768px) {
  .room-a-info {
    padding: 18px;
    margin-bottom: 24px;
  }
  
  .room-a-title {
    font-size: var(--font-size-2xl);
  }
  
  .room-a-description {
    font-size: var(--font-size-base);
  }
}

/* Schedule Tabs — text-only chips with underline and active fill */
.schedule-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 12px;
  margin-bottom: 24px;
}

.tab-btn {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--brutalist-white);
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 0;
  cursor: pointer;
  position: relative;
}
.tab-btn::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 0;
  background: var(--brutalist-white);
  transition: width 200ms ease;
}
.tab-btn:hover,
.tab-btn:focus-visible {
  color: var(--brutalist-white);
}
.tab-btn:hover::after,
.tab-btn:focus-visible::after { width: 100%; }
.tab-btn.active { 
  color: var(--brutalist-white); 
}
.tab-btn.active::after { width: 100%; }

/* Panels */
.schedule-panels { position: relative; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Results tab visibility tweaks */
.results-tab { display: none; }
.results-tab.active { display: inline-block !important; }

/* Utility classes */
.loading {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--brutalist-white);
  padding: 3rem;
}

.hidden {
  display: none;
}

/* Visually hidden (for accessible labels) */
.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
  clip-path: inset(50%);
  border: 0;
  padding: 0;
  margin: -1px;
}

/* Emphasize RSVP and Tickets links with red accents */
.schedule-link.is-rsvp,
.schedule-link.is-tickets {
  color: var(--brutalist-white);
}
.schedule-link.is-rsvp::after,
.schedule-link.is-tickets::after {
  background: var(--brutalist-red);
  height: 2px;
}
.schedule-link.is-rsvp::before,
.schedule-link.is-tickets::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--brutalist-red);
  border-radius: 50%;
}
.schedule-link.is-tickets { color: var(--brutalist-red); }
.schedule-link.is-tickets:hover { color: var(--brutalist-white); }

/* Minimal highlight styling for search matches */
mark.search-highlight {
  background: none;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--brutalist-red);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

/* Empty state for Results view */
.results-empty {
  padding: 18px 0;
  font-weight: 800;
  letter-spacing: 0.06em;
  opacity: 0.8;
}

/* Values Section (image + values list side-by-side) */
.values-section {
  display: grid;
  grid-template-columns: minmax(220px, 380px) 1fr;
  gap: 28px;
  align-items: start;
  margin-top: 2.5rem;
}
.values-media img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  mix-blend-mode: screen;
  opacity: 0.85;
  filter: contrast(1.1) brightness(0.9);
}
.values-content { display: flex; flex-direction: column; gap: 10px; }
.values-title {
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 0.5rem 0;
}
.values-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.values-list li { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 12px; }

/* VALUES: prevent intrinsic overflow */
.values-section > *,
.values-content,
.values-list,
.values-list li {
  min-width: 0;
}

/* VALUES: mobile-friendly single column */
@media (max-width: 900px) {
  .values-list { grid-template-columns: 1fr !important; gap: 16px !important; }
  .values-list li { margin-top: 0 !important; padding: 24px 20px !important; min-height: 100px !important; }
  .values-list h4 { padding: 0 !important; font-size: clamp(1rem, 4vw, 1.2rem) !important; }
}

/* VALUES: extra-tight typography on very small devices */
@media (max-width: 480px) {
  .values-list h4 { font-size: clamp(0.95rem, 4.2vw, 1.1rem) !important; }
  .values-list li { padding: 20px 16px !important; min-height: 90px !important; }
}

/* Values: enhanced stylish layout */
.values-section { align-items: stretch; gap: 36px; }
.values-media { position: sticky; top: 92px; align-self: start; }

/* Stylish values display - clean cards with elegant typography */
.values-list { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
  gap: 20px; 
  list-style: none; 
  counter-reset: values; 
}
.values-list li {
  position: relative;
  padding: 32px 24px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  border-radius: 12px;
  transition: all var(--duration-normal) var(--ease-standard);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  text-align: center;
}

.values-list li::before {
  counter-increment: values;
  content: counter(values, decimal-leading-zero);
  position: absolute;
  top: 16px; right: 16px;
  font-family: var(--font-family-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--brutalist-red);
  opacity: 0.6;
  font-weight: 700;
}

.values-list h4 { 
  padding: 0;
  margin: 0;
  font-size: clamp(1.1rem, 2.8vw, 1.4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--brutalist-white);
  text-transform: uppercase;
}

.values-list li:hover { 
  border-color: rgba(255,255,255,0.2); 
  background: rgba(255,255,255,0.04);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

/* Remove stagger for cleaner look */
.values-list li:nth-child(odd),
.values-list li:nth-child(3n) { 
  margin-top: 0; 
}

/* MOBILE RESPONSIVE OVERRIDES */
@media (max-width: 900px) {
  .values-section { 
    grid-template-columns: 1fr; 
  }
  .values-media { 
    position: relative; 
    top: 0; 
    align-self: auto; 
    margin-bottom: 10px; 
  }
  .values-list { 
    grid-template-columns: 1fr; 
    gap: 16px; 
  }
  .values-list li { 
    margin-top: 0; 
    min-height: 100px;
    padding: 24px 20px;
  }
  .values-list h4 { 
    padding: 0;
    font-size: clamp(1rem, 4vw, 1.2rem);
  }
  
  .community-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .community-board {
    position: static;
    top: auto;
    margin-top: 4px;
  }
}

/* COMMUNITY — Digital magazine meets community board */
.community-section {
  padding: 5rem 0;
  background: var(--brutalist-black);
  color: var(--brutalist-white);
}

.community-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 44px;
  align-items: start;
  margin-bottom: 3rem;
}

/* Join Us (Apply) block inside Community */
.join-us {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm);
  padding: 16px;
}

/* On desktop, keep side-by-side via grid. On mobile, it will stack automatically due to .community-grid rules */
@media (min-width: 901px) {
  .community-grid { grid-template-columns: 1.15fr 0.85fr; }
}

/* Editorial ledes */
.community-editorial { display: grid; gap: 1rem; }
.editorial-lede {
  margin: 0;
  font-family: var(--font-family-base);
  font-weight: 600; /* lighter weight */
  text-transform: none; /* changed from uppercase */
  letter-spacing: 0.04em; /* tighter letter spacing */
  line-height: 1.3; /* slightly taller line height */
  font-size: clamp(0.75rem, 1.5vw, 0.9rem); /* smaller font size */
  text-align: justify; /* justified text for rectangular fill */
  text-justify: inter-word;
  max-width: 100%; /* ensure it fills the available width */
}
.editorial-lede .lede-line { 
  display: inline; /* change from block to inline for justified text */
}
.editorial-lede .lede-line + .lede-line { 
  margin-top: 0; /* remove margin since they're inline now */
}

/* Community board panel */
.community-board {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm);
  padding: 16px;
  position: sticky;
  top: 92px;
}
/* Compact, visual org structure */
.board-structure {
  display: grid;
  grid-template-rows: auto 20px auto;
  gap: 12px;
}
.board-structure .node-directors {
  justify-self: center;
}
.board-structure .connector {
  height: 20px;
  width: 2px;
  background: rgba(255,255,255,0.18);
  justify-self: center;
}
.board-structure .node-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
}
.node {
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.node-directors {
  padding: 12px 16px;
  background: rgba(157,16,32,0.12);
  border-color: rgba(157,16,32,0.6);
}
/* Hover affordance consistent with cards */
.node:hover { border-color: rgba(255,255,255,0.35); background: rgba(255,255,255,0.06); transform: translateY(-1px); transition: all var(--duration-fast) var (--ease-standard); }

/* Mobile layout */
@media (max-width: 600px) {
  .board-structure { grid-template-rows: auto 16px auto; gap: 10px; }
  .board-structure .node-grid { grid-template-columns: 1fr; }
}

/* Community board panel */
.community-board {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.02);
  border-radius: var (--radius-sm);
  padding: 16px;
}

.board-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.board-title {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  letter-spacing: 0.12em;
  font-weight: 900;
  text-transform: uppercase;
}

.board-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(200px, 1fr));
  gap: 12px;
}
.board-card {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm);
  padding: 16px 16px 14px;
  transition: border-color var(--duration-fast) var (--ease-standard), background var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var (--ease-standard);
}
.board-card:hover { border-color: rgba(255,255,255,0.35); transform: translateY(-2px); background: rgba(255,255,255,0.04); }
.board-card:first-child { grid-column: 1 / -1; }

.card-title {
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.card-copy { font-size: 0.95rem; line-height: 1.5; opacity: 0.9; }
.card-bullets { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.card-bullets li { position: relative; padding-left: 16px; }
.card-bullets li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 8px; height: 2px; background: var(--brutalist-red); }

/* Objective strip */
.objective { margin: 2.5rem 0 1.5rem; }
.objective-title {
  font-size: clamp(0.9rem, 1.6vw, 1rem);
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
  font-weight: 900;
  padding: 10px 12px;
  border-top: 2px solid rgba(255,255,255,0.2);
  border-bottom: 2px solid rgba(255,255,255,0.2);
}

/* Stakeholders grid */
.stakeholders-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
}
.stakeholder-card {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.02);
  border-radius: var (--radius-sm);
  padding: 16px 16px 14px;
  transition: border-color var(--duration-fast) var(--ease-standard), background var (--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard);
}
.stakeholder-card:hover { border-color: rgba(255,255,255,0.35); transform: translateY(-2px); background: rgba(255,255,255,0.04); }

/* Prevent grid-item intrinsic sizing from causing overflow */
.community-grid > *,
.board-cards,
.board-card,
.stakeholders-grid,
.stakeholder-card {
  min-width: 0;
}

@media (max-width: 600px) {
  .board-cards { 
    grid-template-columns: 1fr; 
  }
  .stakeholders-grid { 
    grid-template-columns: 1fr; 
  }
}

@media (max-width: 720px) {
  .community-board { 
    padding: 12px; 
  }
  .board-cards { 
    gap: 10px; 
  }
  .board-card, .stakeholder-card { 
    padding: 12px; 
  }
  .editorial-lede { 
    font-size: clamp(0.7rem, 2.5vw, 0.85rem); /* smaller on mobile too */
  }
  .site-footer .footer-grid { 
    grid-template-columns: 1fr; 
    gap: 6px; 
  }
}

@media (max-width: 480px) {
  .container { 
    padding: 0 1rem; 
  }
}

/* Accordion styles for Community dropdowns */
.board-card[open], .stakeholder-card[open] { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.35); }

.board-card summary,
.stakeholder-card summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.board-card summary::-webkit-details-marker,
.stakeholder-card summary::-webkit-details-marker { display: none; }

.card-summary::after {
  content: "+";
  font-family: var(--font-family-mono);
  font-weight: 900;
  margin-left: 10px;
  transition: transform var(--duration-fast) var(--ease-standard);
}
.board-card[open] .card-summary::after,
.stakeholder-card[open] .card-summary::after { content: "–"; }

.card-body { margin-top: 8px; }

/* first directors card spans full width */
.board-cards details:first-child { grid-column: 1 / -1; }

/* focus state */
.board-card summary:focus-visible,
.stakeholder-card summary:focus-visible {
  outline: 2px dashed var(--brutalist-red);
  outline-offset: 4px;
}

/* Prevent cards from stretching to tallest item in the row */
.board-cards, .stakeholders-grid { align-items: start; }
.board-card, .stakeholder-card { align-self: start; height: auto; }

/* Animated accordion reveal for Community dropdowns */
.board-card .card-body,
.stakeholder-card .card-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: max-height var(--duration-normal) var(--ease-standard),
              opacity var(--duration-fast) var(--ease-standard),
              transform var(--duration-normal) var(--ease-standard);
}
.board-card[open] .card-body,
.stakeholder-card[open] .card-body {
  max-height: 1000px; /* large enough for our content */
  opacity: 1;
  transform: translateY(0);
}

/* Improve summary hit-area and hover affordance */
.card-summary {
  padding: 6px 2px;
}
.board-card:hover, .stakeholder-card:hover { background: rgba(255,255,255,0.03); }

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .board-card .card-body,
  .stakeholder-card .card-body { transition: none; transform: none; }
}

/* Section header with CTA (used in Community) */
.community-section .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 1.5rem;
}
.community-section .section-header .section-title { margin-bottom: 0; }

/* APPLY NOW button */
.apply-btn,
.apply-btn:visited {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 2px solid var(--brutalist-red);
  border-radius: var(--radius-sm);
  background: var(--brutalist-red);
  color: var(--brutalist-white);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 900;
  line-height: 1;
  box-shadow: none;
  transition: background var(--duration-fast) var(--ease-standard),
              color var(--duration-fast) var(--ease-standard),
              border-color var(--duration-fast) var (--ease-standard),
              transform var(--duration-fast) var(--ease-standard);
}
.apply-btn:hover,
.apply-btn:focus-visible {
  background: var(--brutalist-black);
  border-color: var(--brutalist-white);
  color: var(--brutalist-white);
  transform: translateY(-1px);
}
.apply-btn:focus-visible {
  outline: 2px dashed var(--brutalist-red);
  outline-offset: 4px;
}

/* Stack header content on small screens */
@media (max-width: 640px) {
  .community-section .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* Desktop layout: put Community title and Join us button on one line */
@media (min-width: 641px) {
  .community-section .container {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "header cta"
      "grid grid";
    align-items: start;
  }
  .community-section .section-header { grid-area: header; }
  .community-section .community-grid { grid-area: grid; }
  .community-section .community-cta {
    grid-area: cta;
    align-self: center;
    justify-self: end;
    position: static; /* override any absolute positioning */
    margin: 0; /* align neatly with the header */
  }
}

/* Footer (subtle) */
.site-footer {
  margin-top: 3rem;
  padding: 1.25rem 0 2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: var(--brutalist-black);
  color: var(--brutalist-white);
}
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px 18px;
  align-items: center;
}
.site-footer .footer-link,
.site-footer .footer-location {
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
}
.site-footer .footer-link:hover,
.site-footer .footer-link:focus-visible {
  color: var(--brutalist-white);
}
.site-footer .footer-link:focus-visible {
  outline: 2px dashed var(--brutalist-red);
  outline-offset: 4px;
}

/* Floating Values that run away from mouse */
.floating-values {
  position: relative;
  height: 300px;
  width: 100%;
  overflow: hidden;
  margin: 2rem 0;
  pointer-events: none;
}

.floating-value {
  position: absolute;
  padding: 8px 16px;
  background: rgba(157, 16, 32, 0.8);
  color: var(--brutalist-white);
  border-radius: var(--radius-sm);
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: none; /* changed from uppercase - decorative, not a title/click target */
  white-space: nowrap;
  cursor: default;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
}

.floating-value:hover {
  background: rgba(157, 16, 32, 1);
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.floating-value:nth-child(1) {
  top: 20%;
  left: 15%;
  animation: float1 6s ease-in-out infinite;
}

.floating-value:nth-child(2) {
  top: 60%;
  right: 20%;
  animation: float2 7s ease-in-out infinite;
}

.floating-value:nth-child(3) {
  top: 40%;
  left: 60%;
  animation: float3 5s ease-in-out infinite;
}

.floating-value:nth-child(4) {
  top: 10%;
  right: 40%;
  animation: float4 8s ease-in-out infinite;
}

.floating-value:nth-child(5) {
  top: 70%;
  left: 25%;
  animation: float5 6.5s ease-in-out infinite;
}

/* Floating animations */
@keyframes float1 {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

@keyframes float2 {
  0%, 100% { transform: translateY(0px) translateX(0px); }
  50% { transform: translateY(-15px) translateX(10px); }
}

@keyframes float3 {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-25px); }
}

@keyframes float4 {
  0%, 100% { transform: translateY(0px) translateX(0px); }
  50% { transform: translateY(-18px) translateX(-8px); }
}

@keyframes float5 {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-22px); }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .floating-values {
    height: 250px;
  }
  
  .floating-value {
    font-size: 0.75rem;
    padding: 6px 12px;
  }
}

@media (max-width: 480px) {
  .floating-values {
    height: 200px;
  }
  
  .floating-value {
    font-size: 0.7rem;
    padding: 4px 8px;
  }
}

.values-intro {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
  letter-spacing: 0.03em;
}

.values-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.value-tag {
  background: rgba(157, 16, 32, 0.8);
  color: var(--brutalist-white);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: clamp(0.8rem, 1.2vw, 0.95rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: none; /* changed from uppercase - these are descriptive tags, not titles/click targets */
  transition: all var(--duration-normal) var(--ease-standard);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.value-tag:hover {
  background: rgba(157, 16, 32, 1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(157, 16, 32, 0.3);
}

.value-highlight {
  color: var(--brutalist-red);
  font-weight: 600;
}

/* Mobile responsiveness for values integration */
@media (max-width: 768px) {
  .values-inline {
    gap: 0.6rem;
  }
  
  .value-tag {
    font-size: 0.75rem;
    padding: 6px 12px;
  }
}

@media (max-width: 480px) {
  .values-inline {
    gap: 0.5rem;
  }
  
  .value-tag {
    font-size: 0.7rem;
    padding: 4px 10px;
  }
}

/* OLD FLOATING VALUES - REMOVED 
.about-section .container {
  position: relative;
}

.floating-value {
  position: absolute;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--brutalist-black);
  border-radius: var(--radius-sm);
  font-size: clamp(0.7rem, 1.2vw, 0.9rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: default;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
  backdrop-filter: blur(10px);
}

.floating-value:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
END OLD FLOATING VALUES */

/* Initial positions on the right side */
.floating-value:nth-child(1) {
  top: 15%;
  right: 20%;
  animation: float1 6s ease-in-out infinite;
}

.floating-value:nth-child(2) {
  top: 45%;
  right: 10%;
  animation: float2 7s ease-in-out infinite;
}

.floating-value:nth-child(3) {
  top: 25%;
  right: 35%;
  animation: float3 5s ease-in-out infinite;
}

.floating-value:nth-child(4) {
  top: 65%;
  right: 25%;
  animation: float4 8s ease-in-out infinite;
}

.floating-value:nth-child(5) {
  top: 85%;
  right: 15%;
  animation: float5 6.5s ease-in-out infinite;
}

/* Floating animations */
@keyframes float1 {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

@keyframes float2 {
  0%, 100% { transform: translateY(0px) translateX(0px); }
  50% { transform: translateY(-15px) translateX(-10px); }
}

@keyframes float3 {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-25px); }
}

@keyframes float4 {
  0%, 100% { transform: translateY(0px) translateX(0px); }
  50% { transform: translateY(-18px) translateX(8px); }
}

@keyframes float5 {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-22px); }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .floating-values {
    height: 300px;
    width: 60%;
  }
  
  .floating-value {
    font-size: 0.65rem;
    padding: 6px 12px;
  }
}

@media (max-width: 480px) {
  .floating-values {
    height: 250px;
    width: 70%;
  }
  
  .floating-value {
    font-size: 0.6rem;
    padding: 4px 8px;
  }
}

/* Mobile: stack community content with board under editorial */
@media (max-width: 640px) {
  .community-grid {
    display: flex; /* override grid on phones */
    flex-direction: column;
    gap: 20px; /* preserve spacing */
  }
  .community-editorial { order: 1; }
  .community-board {
    order: 2;
    position: static; /* ensure it doesn’t stick on mobile */
    top: auto;
  }
  /* Ensure Join us appears after the editorial text on phones */
  .join-us { order: 2; }
}

/* Community CTA spacing + responsiveness */
.community-cta { display: flex; }
.community-cta .apply-btn { align-self: flex-start; }

/* Desktop: bring CTA closer to preceding text */
@media (min-width: 641px) {
  .community-section .community-grid { margin-bottom: 1.25rem; }
}

/* Phone: make CTA/button wider */
@media (max-width: 640px) {
  .community-cta { margin-top: 0.5rem; }
  .community-cta .apply-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  /* Make Join us button full-width on phones */
  .community-cta .apply-btn {
    display: flex; /* override inline-flex */
    width: 100%;
  }
  /* Phone: stack contacts in footer (not fixed) */
  .site-footer {
    background: var(--brutalist-black);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 1.25rem 0 2rem;
    margin-top: 3rem;
  }
  .site-footer .footer-grid {
    position: static; /* no fixed overlay */
    bottom: auto;
    left: auto;
    grid-template-columns: 1fr; /* stack vertically */
    gap: 6px;
    width: 100%;
    z-index: auto;
    justify-items: start; /* align to left */
  }
  .site-footer .footer-link,
  .site-footer .footer-location {
    justify-self: start;
    text-align: left;
  }
}

/* Desktop: place CTA inline with the Community title */
@media (min-width: 641px) {
  /* ensure positioning context */
  .community-section .container { position: relative; }
  .community-cta {
    position: absolute;
    top: 0;           /* align with the section header */
    right: 2rem;      /* match container side padding */
    margin-top: 0;    /* override mobile spacing */
  }
}

/* Mobile: increase right-side offset for rotated nav */
@media (max-width: 640px) {
  .nav-container {
    /* fallback then safe-area aware */
    right: 24px;
    right: calc(24px + env(safe-area-inset-right));
  }
}

/* Community CTA spacing + responsiveness */
.community-cta { display: flex; }
.community-cta .apply-btn { align-self: flex-start; }

/* Desktop: bring CTA closer to preceding text */
@media (min-width: 641px) {
  .community-section .community-grid { margin-bottom: 1.25rem; }
}

/* Phone: make CTA/button wider */
@media (max-width: 640px) {
  .community-cta { margin-top: 0.5rem; }
  .community-cta .apply-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  /* Make Join us button full-width on phones */
  .community-cta .apply-btn {
    display: flex; /* override inline-flex */
    width: 100%;
  }
  /* Phone: stack contacts in footer (not fixed) */
  .site-footer {
    background: var(--brutalist-black);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 1.25rem 0 2rem;
    margin-top: 3rem;
  }
  .site-footer .footer-grid {
    position: static; /* no fixed overlay */
    bottom: auto;
    left: auto;
    grid-template-columns: 1fr; /* stack vertically */
    gap: 6px;
    width: 100%;
    z-index: auto;
    justify-items: start; /* align to left */
  }
  .site-footer .footer-link,
  .site-footer .footer-location {
    justify-self: start;
    text-align: left;
  }
}

/* Mobile: compact hero nav so it doesn’t take over the screen */
@media (max-width: 640px) {
  .nav-container {
    position: absolute;
    top: 50%;
    right: calc(20px + env(safe-area-inset-right));
    left: auto;
    bottom: auto;
    display: flex;
    flex-direction: row; /* will appear vertical after rotation */
    gap: 14px;          /* comfortable spacing between items */
    transform-origin: right center;
    transform: translateY(-50%) rotate(90deg);
    z-index: 60;
    /* remove previous pill background */
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    padding: 0;
    pointer-events: auto;
  }
  .nav-container .nav-item {
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    -webkit-text-stroke: 1px var(--brutalist-white);
    padding: 0;
    white-space: nowrap; /* prevent wrapping when rotated */
  }
  .nav-container .nav-item::before { 
    display: none; /* hide the 01/02/03 prefixes on mobile */ 
  }
  .nav-container .nav-item::after { 
    bottom: -3px; 
    height: 1px; 
  }
}

/* Apply Section */
.apply-section {
  padding: 5rem 0;
  background: var(--brutalist-black);
  color: var(--brutalist-white);
}
.apply-section .section-title { text-align: center; }

.apply-links-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 1rem;
}
@media (min-width: 720px) {
  .apply-links-grid { grid-template-columns: repeat(2, 1fr); }
}

.apply-link,
.apply-link:visited {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
  color: var(--brutalist-white);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: none;
  position: relative;
  transition: background var(--duration-fast) var(--ease-standard),
              border-color var(--duration-fast) var(--ease-standard),
              transform var(--duration-fast) var(--ease-standard);
}
.apply-link::after {
  content: "→";
  font-family: var(--font-family-mono);
  color: var(--brutalist-red);
}
.apply-link:hover,
.apply-link:focus-visible {
  background: rgba(255,255,255,0.06);
  border-color: var(--brutalist-red);
  transform: translateY(-1px);
}
.apply-link:focus-visible {
  outline: 2px dashed var(--brutalist-red);
  outline-offset: 4px;
}

/* Cast section — align with other sections and keep two small cards left-aligned */
.cast-section .container {
  max-width: 1200px; /* match global container so left edge aligns */
}
.cast-section .board-cards {
  display: flex;            /* override grid for this section */
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: stretch;
  gap: 10px;
}
.cast-section .board-card {
  width: 220px;             /* keep them “little” and prevent stretching */
}
@media (max-width: 600px) {
  .cast-section .board-cards { flex-direction: column; }
  .cast-section .board-card { width: 100%; }
}

/* --- About typography normalization: make KAUPAPA copy match About body text --- */
.about-section .about-visual-copy {
  /* match .description-text p */
  font-family: var(--font-family-base);
  font-weight: 400;
  letter-spacing: 0;
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  line-height: 1.5;
  text-align: justify;
  text-justify: inter-word;
  color: var(--brutalist-white);
  opacity: 1; /* override earlier 0.92 for consistent tone */
}

/* Community Header Row */
.community-header-row {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 48px;
  align-items: start;
  margin-bottom: 2.5rem;
}
@media (max-width: 940px) {
  .community-header-row { grid-template-columns: 1fr 340px; }
}
@media (max-width: 780px) {
  .community-header-row { grid-template-columns: 1fr; }
  .community-header-row .join-us { order: 2; }
}
.community-header-row .section-title { margin: 0; }
.community-header-row .join-us { margin: 0; }

/* Community Layout */
.community-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 56px;
  align-items: start;
}
.community-layout .community-left { display: flex; flex-direction: column; gap: 1.75rem; }
.community-layout .section-title { margin: 0; }
.community-layout .join-us { align-self: stretch; position: sticky; top: 100px; }
@media (max-width: 1080px) { .community-layout { grid-template-columns: minmax(0,1fr) 340px; gap: 48px; } }
@media (max-width: 900px) { .community-layout { grid-template-columns: 1fr; } .community-layout .join-us { position: static; top: auto; } }

/* Popup Modal */
.popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4); /* reduced opacity, no blur */
  /* removed backdrop-filter */
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms var(--ease-standard), visibility 200ms var(--ease-standard);
}
.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  width: min(92vw, 520px);
  background: #000; /* solid black to match site */
  border: 2px solid var(--brutalist-white); /* neutral border */
  padding: 28px 28px 32px;
  z-index: 1010;
  border-radius: 14px;
  box-shadow: 0 18px 60px -10px rgba(0,0,0,0.75), 0 0 0 1px rgba(255,255,255,0.06);
  opacity: 0;
  visibility: hidden;
  transition: opacity 240ms var(--ease-standard), transform 280ms var(--ease-standard), visibility 240ms var(--ease-standard);
}
.popup-heading {
  margin: 0 0 12px;
  font-size: clamp(1.3rem, 4.5vw, 2rem);
  line-height: 1.05;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brutalist-white); /* unify heading color */
  text-align: center;
}
.popup-message {
  margin: 0;
  text-align: center;
  font-size: clamp(0.9rem, 2.2vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.4;
}
.popup-now { color: var(--brutalist-red); font-weight: 900; }
.popup-cta {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 18px 11px;
  background: transparent;
  color: var(--brutalist-red);
  font-weight: 900;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  text-transform: uppercase;
  border-radius: 8px;
  border: 2px solid var(--brutalist-red);
  position: relative;
  transition: background 160ms var(--ease-standard), transform 160ms var(--ease-standard);
}
.popup-cta:hover,
.popup-cta:focus-visible { background: var(--brutalist-red); color: var(--brutalist-white); transform: translateY(-2px); }
.popup-cta:focus-visible { outline: 2px dashed var(--brutalist-red); outline-offset: 4px; }
.popup-close {
  position: absolute;
  top: 4px;
  right: 6px;
  background: none;
  color: var(--brutalist-white);
  border: 0;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  font-weight: 300;
  padding: 4px 10px;
  transition: color 160ms ease, transform 160ms ease;
}
.popup-close:hover,
.popup-close:focus-visible { color: var(--brutalist-red); transform: scale(1.15); }
.popup-close:focus-visible { outline: 2px dashed var(--brutalist-red); outline-offset: 4px; }
.popup-backdrop.is-visible { opacity: 1; visibility: visible; }
.popup.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
@media (max-width: 520px) {
  .popup { padding: 22px 20px 28px; }
  .popup-heading { letter-spacing: 0.1em; }
  .popup-cta { width: 100%; font-size: 0.65rem; }
}
@media (prefers-reduced-motion: reduce) {
  .popup, .popup-backdrop { transition: none; }
}
/* End Popup Modal */
