:root {
  /* Two-tone beige palette */
  --void: #1f1c18;
  --panel: #292520;
  --panel-2: #332e28;
  --line: rgba(244, 240, 225, 0.1);
  --line-strong: rgba(244, 240, 225, 0.18);
  --paper: #f4f0e1;
  --dim: #f4f0e1;
  --dimmer: #f4f0e1;
  --accent: #f4f0e1;
  --accent-hover: #f4f0e1;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --wrap: 1040px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px; 
}

body {
  margin: 0;
  background: var(--void);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent); 
  outline-offset: 3px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }

.status-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(244, 240, 225, 0.06);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 6px 14px;
}

h1, h2, h3, h4 {
  font-family: var(--font-body);
  font-weight: 600;
  margin: 0;
  letter-spacing: -.02em;
}

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10000;
  background: rgba(31, 28, 24, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: 100%;
  padding: 0 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--paper);
}
.logo-img {
  width: 36px; height: 36px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 4px;
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  color: var(--dim);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .05em;
  transition: color .2s ease;
}
.nav-links a:hover { color: var(--paper); }
.nav-links a.active {
  color: var(--void);
  font-weight: 700;
  background: var(--paper);
  padding: 8px 16px;
  border-radius: 6px;
}
@media (max-width: 760px){ .nav-links { display: none; } }

/* ---------- HERO ---------- */
.hero {
  padding: 160px 0 90px;
  border-bottom: 1px solid var(--line);
  background: var(--void);
  text-align: center;
}

.hero-content {
  max-width: 760px;
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(36px, 4.5vw, 54px);
  line-height: 1.1;
  margin: 16px 0 16px;
}
.hero p.lede {
  font-size: 18px;
  color: var(--dim);
  margin: 0 auto 32px;
  max-width: 62ch;
  line-height: 1.7;
}
.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 48px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.btn-donate { background: var(--paper); color: var(--void); }
.btn-donate:hover { background: var(--accent-hover); }

.btn-bmc {
  background: var(--accent);
  color: var(--void);
  font-weight: 600;
  width: 150px !important;
  height: 150px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.3;
  padding: 14px;
  gap: 4px;
}
.btn-bmc .bmc-emoji {
  font-size: 26px;
  line-height: 1;
}
.btn-bmc .bmc-text {
  font-size: 14px;
}
.btn-bmc:hover { background: var(--accent-hover); }

.btn-outline { background: var(--panel); border-color: var(--line-strong); color: var(--paper); }
.btn-outline:hover { border-color: var(--accent); background: var(--panel-2); }

/* ---------- FRAMES ---------- */
.frame { 
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  margin: 0 auto;
  width: 100%;
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.frame:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.frame-inner {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.frame-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.frame-inner svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: block;
}
.frame-cap {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dimmer);
  padding: 10px 4px 0;
}

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(20, 18, 16, 0.97);
  z-index: 20000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  backdrop-filter: blur(12px);
}
.lightbox.is-active {
  display: flex;
}
.lightbox-content {
  max-width: 960px;
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 14px;
  position: relative;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}
.lightbox-content svg,
.lightbox-content img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}
.lightbox-close {
  position: absolute;
  top: -40px; right: 0;
  background: none;
  border: none;
  color: #e74c3c;
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  transition: color .2s ease, transform .15s ease;
}
.lightbox-close:hover {
  color: #ff6b5a;
  transform: scale(1.15);
}

/* ---------- SECTIONS ---------- */
.section { padding: 90px 0; border-bottom: 1px solid var(--line); }
.section-alt { background: var(--panel); }
.section-head { max-width: 740px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(28px, 3vw, 36px); margin-bottom: 16px; text-transform: uppercase; letter-spacing: .05em; }
.section-head p { margin: 10px 0 0; font-size: 17px; color: var(--dim); line-height: 1.7; }

/* ---------- ABOUT ---------- */
.about-body { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 48px; 
  align-items: stretch;
}

.about-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
}

.about-card-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

#philosophy .about-card-label {
  text-align: center;
}

#about .about-card-label {
  text-align: center;
}

.about-bio {
  font-size: 15.5px;
  color: var(--dim);
  line-height: 1.7;
  margin: 0 0 24px;
}

.about-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.about-list li {
  font-size: 15.5px;
  color: var(--dim);
  padding-left: 16px;
  position: relative;
  line-height: 1.6;
}
.about-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.about-photo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  position: relative;
}

.photo-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px;
  background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0));
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: .02em;
  text-align: center;
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  min-height: 280px;
  background: var(--panel-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-placeholder span {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--dimmer);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.photo-placeholder-frame {
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-placeholder-frame span {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--dimmer);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.feature-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  height: 100%;
}
.feature-cols ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feature-cols li {
  font-size: 15.5px;
  color: var(--dim);
  padding-left: 16px;
  position: relative;
  line-height: 1.6;
}
.feature-cols li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.stat-list { 
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}
.stat-row {
  display: flex; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.stat-row:last-child { border-bottom: none; }
.stat-row .label {
  font-family: var(--font-mono); font-size: 13.5px; letter-spacing: .02em;
  color: var(--dimmer);
}
.stat-row .value { font-family: var(--font-mono); font-size: 14.5px; color: var(--paper); }

.note-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 28px 36px;
  margin-top: 36px;
  text-align: center;
}
.note-panel h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; color: #e74c3c; text-transform: uppercase; letter-spacing: .05em; }
.note-panel p { margin: 0 auto; font-size: 16px; color: var(--dim); max-width: 64ch; line-height: 1.7; }

/* ---------- GALLERY ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 640px){ .gallery-grid { grid-template-columns: 1fr; } }

/* ---------- DEVLOG ---------- */
.log { max-width: 720px; margin: 0 auto; }
.log-entry {
  display: grid; 
  grid-template-columns: 120px 1fr; 
  gap: 32px;
  padding: 24px 0; 
  border-bottom: 1px solid var(--line);
}
.log-entry:first-child { padding-top: 0; }
.log-entry:last-child { border-bottom: none; }
.log-date {
  font-family: var(--font-mono); 
  font-size: 13.5px; 
  color: var(--dimmer);
  line-height: 1.5;
}
.log-tag {
  display: inline-block; 
  font-family: var(--font-mono); 
  font-size: 11.5px;
  letter-spacing: .04em; 
  text-transform: uppercase; 
  color: var(--accent);
  margin-bottom: 6px;
}
.log-entry h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.log-entry p { margin: 0; font-size: 15.5px; color: var(--dim); line-height: 1.65; }

/* ---------- SUPPORT ---------- */
.support-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; max-width: 860px; margin: 0 auto; }
@media (max-width: 680px){ .support-grid { flex-direction: column; align-items: center; } }
.support-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 400px;
  width: 100%;
  max-width: 340px;
}
.support-card h3 { font-size: 20px; font-weight: 600; margin-bottom: 10px; }
.support-card > p { color: var(--dim); font-size: 15.5px; margin: 0 0 24px; line-height: 1.65; }
.roles {
  list-style: none; margin: 0 0 28px; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
  width: 100%;
  text-align: center;
  background: var(--panel);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.roles li {
  font-family: var(--font-mono);
  font-size: 14px; color: var(--paper);
}
.support-card .btn { margin: auto 0; }

/* ---------- PAGE HERO (for devlog/join pages) ---------- */
.page-hero {
  padding: 160px 0 60px;
  border-bottom: 1px solid var(--line);
  background: var(--void);
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(36px, 4.5vw, 54px);
  line-height: 1.1;
  margin: 16px 0 16px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.page-hero p {
  font-size: 18px;
  color: var(--dim);
  margin: 0 auto 32px;
  max-width: 62ch;
  line-height: 1.7;
}

/* ---------- ROLES GRID (for join page) ---------- */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 860px;
  margin: 0 auto;
}
@media (max-width: 680px){ .roles-grid { grid-template-columns: 1fr; } }
.role-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.role-card h3 {
  font-family: var(--font-mono);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 12px;
  color: var(--accent);
}
.role-card p {
  font-size: 15px;
  color: var(--dim);
  line-height: 1.6;
  margin: 0;
}

/* ---------- FORM (for join page) ---------- */
.apply-form {
  max-width: 640px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 48px;
}
.form-group {
  margin-bottom: 24px;
}
.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--dimmer);
  margin-bottom: 8px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 12px 16px;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color .2s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-group textarea {
  resize: vertical;
  min-height: 120px;
}
.form-submit {
  width: 100%;
  background: var(--paper);
  color: var(--void);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .05em;
  transition: background .2s ease;
}
.form-submit:hover {
  background: var(--accent-hover);
}

/* ---------- FOOTER ---------- */
footer { padding: 40px 0; background: var(--void); border-top: 1px solid var(--line); }
footer .wrap {
  display: flex; 
  justify-content: center; 
  align-items: center;
  font-family: var(--font-mono);
  font-size: 13.5px; 
  color: var(--dimmer);
}

/* ---------- REVEAL ---------- */
.reveal { 
  opacity: 0; 
  transform: translateY(16px); 
  transition: opacity 0.6s ease, transform 0.6s ease; 
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce){
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- ROADMAP ---------- */
.roadmap {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.roadmap-entry {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: border-color .2s ease, transform .2s ease;
}
.roadmap-entry:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
.roadmap-date {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  padding-top: 2px;
}
.roadmap-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--paper);
}
.roadmap-content p {
  margin: 0;
  font-size: 15.5px;
  color: var(--dim);
  line-height: 1.65;
}
@media (max-width: 680px) {
  .roadmap-entry {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* ---------- PAGE TRANSITION ---------- */
.page-transition {
  position: fixed;
  top: 72px; left: 0;
  width: 100%; height: calc(100% - 72px);
  background: var(--void);
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.page-transition.active {
  opacity: 1;
  pointer-events: all;
}

#pageContent {
  opacity: 1;
  transition: opacity 0.4s ease;
}
#pageContent.loading {
  opacity: 0;
}

@media (max-width: 820px) {
  .about-body { grid-template-columns: 1fr; gap: 32px; }
  .feature-cols { margin-top: 24px; }
  .section { padding: 60px 0; }
  .apply-form { padding: 32px 24px; }
  .log-entry { grid-template-columns: 1fr; gap: 8px; }
}
