/* ============================================================
   THE RED PARTY
   Aesthetic: Soviet Propaganda Poster
   Palette: Aged parchment · Charcoal · #BB0000 · Gold
   Fonts: Cormorant Garamond (display) · Jost (body)
   ============================================================ */

:root {
  /* Core palette */
  --red:         #BB0000;
  --red-deep:    #990000;
  --red-light:   #E8A0A0;
  --red-blood:   #6B0000;
  --gold:        #C9A84C;
  --gold-light:  #E8D49A;

  /* Parchment — light mode */
  --paper:       #EDE0C4;
  --paper-dark:  #D9C9A3;
  --paper-deep:  #C8B48A;
  --ink:         #1C1810;
  --ink-mid:     #3A3228;
  --ink-soft:    rgba(28,24,16,0.55);
  --rule:        rgba(28,24,16,0.15);

  /* Dark mode surfaces (toggled via body.dark) */
  --surface:     var(--paper);
  --surface-alt: var(--paper-dark);
  --card:        var(--paper-dark);
  --text:        var(--ink);
  --text-mid:    var(--ink-mid);
  --text-soft:   var(--ink-soft);
  --divider:     var(--rule);

  --font-d: 'Cormorant Garamond', serif;
  --font-b: 'Jost', sans-serif;
  --nav-h:  66px;
  --ease:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

body.dark {
  --surface:     #1A1915;
  --surface-alt: #222018;
  --card:        #2A2820;
  --text:        #EDE0C4;
  --text-mid:    rgba(237,224,196,0.75);
  --text-soft:   rgba(237,224,196,0.42);
  --divider:     rgba(237,224,196,0.1);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-b);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

/* Grain texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font-b); border: none; background: none; }
input, select, textarea { font-family: var(--font-b); }

/* PAGE SYSTEM */
.page { display: none; }
.page.active { display: block; }

/* ── TYPOGRAPHY ── */
.section-title {
  font-family: var(--font-d);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.section-title em { font-style: italic; color: var(--red); }
.section-title.light { color: #EDE0C4; }
.section-title.light em { color: var(--gold-light); }

.body-text {
  font-size: 0.96rem;
  line-height: 1.88;
  color: var(--text-mid);
  font-weight: 400;
  margin-bottom: 1.1rem;
}
.body-text.light { color: rgba(237,224,196,0.78); }

.stamp-label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.stamp-label::before,
.stamp-label::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}
.stamp-label.light { color: var(--gold-light); }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--gold);
  color: #EDE0C4;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.95rem 2.4rem;
  border: 2px solid var(--red);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.btn-primary:hover {
  background: var(--red-deep);
  border-color: var(--red-deep);
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.95rem 2.4rem;
  border: 2px solid var(--divider);
  transition: all 0.2s;
}
.btn-secondary:hover {
  border-color: var(--red);
  color: var(--red);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  color: rgba(237,224,196,0.75);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.95rem 2.4rem;
  border: 2px solid rgba(237,224,196,0.3);
  transition: all 0.2s;
}
.btn-ghost:hover {
  border-color: rgba(237,224,196,0.65);
  color: #EDE0C4;
}

.btn-ghost-light {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: rgba(237,224,196,0.7);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  border: 1px solid rgba(237,224,196,0.3);
  margin-top: 1.5rem;
  transition: all 0.2s;
}
.btn-ghost-light:hover { color: #EDE0C4; border-color: rgba(237,224,196,0.65); }

.btn-text-link {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-top: 0.5rem;
  transition: opacity 0.2s;
}
.btn-text-link:hover { opacity: 0.7; }


/* ══════════════════════════════════════════
   NAVIGATION
══════════════════════════════════════════ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: #1C1810;
  z-index: 800;
  border-bottom: 3px solid var(--red);
}
.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
}

.nav-logo {
  font-family: var(--font-d);
  font-size: 1.3rem;
  font-weight: 600;
  color: #EDE0C4;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.04em;
  user-select: none;
  flex-shrink: 0;
}
.nav-logo em { font-style: italic; color: var(--red); }
.nav-star { color: var(--red); font-size: 0.9em; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-link {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(237,224,196,0.45);
  cursor: pointer;
  transition: color 0.2s;
  position: relative;
  padding-bottom: 2px;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--red);
  transition: width 0.25s var(--ease);
}
.nav-link:hover,
.nav-link.active { color: #EDE0C4; }
.nav-link.active::after,
.nav-link:hover::after { width: 100%; }

/* Cariño external link in nav */
.nav-carino-link {
  color: var(--gold) !important;
  text-decoration: none;
}
.nav-carino-link:hover { color: var(--gold-light) !important; }

.nav-menu-btn {
  display: none;
  color: #EDE0C4;
  font-size: 1.3rem;
  background: none;
  border: none;
}

/* ── MOBILE NAV ── */
@media (max-width: 860px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: #1C1810;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-bottom: 2px solid var(--red);
  }
  .nav-links.open { display: flex; }
  .nav-link {
    padding: 1rem 2.5rem;
    width: 100%;
    border-bottom: 1px solid rgba(237,224,196,0.07);
    font-size: 0.72rem;
  }
  .nav-link::after { display: none; }
  .nav-menu-btn { display: block; }
}


/* ══════════════════════════════════════════
   HERO
══════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  padding-top: var(--nav-h);
  background: var(--red);
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Grid texture over hero */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.08) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-bg-text {
  position: absolute;
  right: -0.05em;
  bottom: -0.12em;
  font-family: var(--font-d);
  font-size: clamp(18rem, 35vw, 48rem);
  font-weight: 700;
  font-style: italic;
  color: rgba(0,0,0,0.07);
  line-height: 1;
  user-select: none;
  pointer-events: none;
  letter-spacing: -0.04em;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2.5rem 5rem;
  width: 100%;
}

.hero-label {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(237,224,196,0.6);
  margin-bottom: 2rem;
}

.hero-title {
  font-family: var(--font-d);
  font-size: clamp(3.8rem, 9vw, 8rem);
  font-weight: 700;
  color: #EDE0C4;
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin-bottom: 0;
  max-width: 14em;
  animation: heroIn 0.9s var(--ease) 0.1s both;
}
.hero-title-accent {
  color: var(--gold-light);
  font-style: italic;
}

.hero-title-love {
  font-weight: 900;
  font-style: italic;
  color: var(--red-blood);
  letter-spacing: 0.05em;
}

@keyframes heroIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-rule {
  width: min(500px, 80%);
  height: 2px;
  background: rgba(237,224,196,0.25);
  margin: 2.5rem 0;
  animation: ruleIn 0.8s var(--ease) 0.5s both;
}
@keyframes ruleIn {
  from { transform: scaleX(0); transform-origin: left; }
  to   { transform: scaleX(1); transform-origin: left; }
}

.hero-sub {
  font-size: 1.02rem;
  line-height: 1.85;
  color: rgba(237,224,196,0.75);
  max-width: 52ch;
  margin-bottom: 2.8rem;
  animation: heroIn 0.8s var(--ease) 0.6s both;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: heroIn 0.8s var(--ease) 0.75s both;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 2.5rem;
  font-size: 0.58rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(237,224,196,0.3);
}


/* ══════════════════════════════════════════
   TOOL TEASER SECTION
══════════════════════════════════════════ */
.tool-section {
  background: var(--surface);
  border-top: 4px solid var(--red);
  padding: 6rem 2.5rem;
}
.tool-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.tool-copy .section-title { margin-bottom: 1.5rem; }
.tool-copy .btn-primary { margin-top: 1.5rem; }

/* Preview widget */
.tool-preview {
  border: 2px solid var(--divider);
  overflow: hidden;
  background: var(--surface-alt);
}
.preview-header {
  background: #1C1810;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.preview-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(237,224,196,0.15);
  display: inline-block;
}
.preview-title {
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(237,224,196,0.35);
  margin-left: 0.5rem;
}
.preview-cards {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--divider);
}
.preview-card {
  background: var(--surface);
  padding: 0.9rem 1rem;
  cursor: pointer;
  transition: background 0.15s;
}
.preview-card:hover { background: var(--red); }
.preview-card:hover .preview-card-title { color: #EDE0C4; }
.preview-card:hover .preview-card-meta { color: rgba(237,224,196,0.5); }
.preview-card:hover .preview-badge { opacity: 0.85; }
.preview-badge {
  font-size: 0.54rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border: 1px solid;
  display: inline-block;
  margin-bottom: 0.4rem;
}
.preview-badge.offer { color: var(--red); border-color: rgba(187,0,0,0.3); background: rgba(187,0,0,0.06); }
.preview-badge.need  { color: var(--gold); border-color: rgba(201,168,76,0.35); background: rgba(201,168,76,0.07); }
.preview-card-title {
  font-family: var(--font-d);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.preview-card-meta { font-size: 0.66rem; color: var(--text-soft); }
.preview-footer {
  padding: 0.8rem 1rem;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  cursor: pointer;
  border-top: 1px solid var(--divider);
  transition: background 0.15s;
}
.preview-footer:hover { background: var(--surface-alt); }


/* ══════════════════════════════════════════
   VALUES TEASER
══════════════════════════════════════════ */
.values-teaser {
  background: var(--surface-alt);
  border-top: 1px solid var(--divider);
  padding: 6rem 2.5rem;
}
.values-teaser-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.values-teaser-header {
  margin-bottom: 3rem;
  max-width: 600px;
}
.values-teaser-header .section-title { margin-bottom: 0.75rem; }
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1px;
  background: var(--divider);
  border: 1px solid var(--divider);
}
.value-tile {
  background: var(--surface);
  padding: 2rem 1.5rem;
  transition: background 0.2s;
  position: relative;
}
.value-tile:hover { background: var(--red); }
.value-tile:hover .value-tile-title { color: #EDE0C4; }
.value-tile:hover .value-tile-body { color: rgba(237,224,196,0.75); }
.value-tile:hover .value-numeral { color: rgba(237,224,196,0.15); }

.value-numeral {
  font-family: var(--font-d);
  font-size: 3.5rem;
  font-weight: 700;
  color: rgba(28,24,16,0.08);
  line-height: 1;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}
body.dark .value-numeral { color: rgba(237,224,196,0.06); }
.value-tile-title {
  font-family: var(--font-d);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
  line-height: 1.2;
  transition: color 0.2s;
}
.value-tile-body {
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-soft);
  transition: color 0.2s;
}


/* ══════════════════════════════════════════
   ABOUT TEASER
══════════════════════════════════════════ */
.about-teaser {
  background: #1C1810;
  padding: 7rem 2.5rem;
  position: relative;
  overflow: hidden;
}
.about-teaser::before {
  content: '★';
  position: absolute;
  right: -0.1em;
  bottom: -0.2em;
  font-size: clamp(20rem, 40vw, 55rem);
  color: rgba(255,255,255,0.015);
  pointer-events: none;
  line-height: 1;
}
.about-teaser-inner {
  max-width: 780px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.about-teaser-inner .section-title { margin-bottom: 2rem; }
.about-closing {
  font-family: var(--font-d);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--gold-light);
  margin: 2rem 0 0;
  line-height: 1.5;
}


/* ══════════════════════════════════════════
   JOIN SECTION
══════════════════════════════════════════ */
.join-section {
  background: var(--surface);
  border-top: 4px solid var(--red);
  padding: 6rem 2.5rem;
  text-align: center;
}
.join-inner {
  max-width: 640px;
  margin: 0 auto;
}
.join-inner .stamp-label { justify-content: center; }
.join-inner .section-title { margin: 0.5rem auto 1.2rem; }
.join-inner .body-text { color: var(--text-soft); margin-bottom: 0; }

.join-form {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.join-fields {
  display: flex;
  gap: 1rem;
  width: 100%;
  flex-wrap: wrap;
}
.join-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 200px;
  text-align: left;
}
.join-label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.join-input {
  padding: 0.75rem 1rem;
  background: var(--surface-alt);
  border: 1px solid var(--divider);
  color: var(--text);
  font-family: var(--font-b);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.join-input::placeholder { color: var(--text-soft); opacity: 0.6; }
.join-input:focus { border-color: var(--red); }
.join-submit { margin-top: 0.5rem; cursor: pointer; }
.join-note {
  font-size: 0.68rem;
  color: var(--text-soft);
  opacity: 0.6;
  margin-top: 0.75rem;
  letter-spacing: 0.04em;
}


/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
.site-footer {
  background: #1C1810;
  border-top: 2px solid var(--red);
  padding: 2rem 2.5rem;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-logo {
  font-family: var(--font-d);
  font-size: 1rem;
  color: rgba(237,224,196,0.55);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.footer-logo .nav-star { color: var(--gold); }
.footer-note { font-size: 0.68rem; color: rgba(237,224,196,0.3); letter-spacing: 0.08em; }


/* ══════════════════════════════════════════
   PAGE HERO (inner pages)
══════════════════════════════════════════ */
.page-hero-sm {
  padding-top: var(--nav-h);
  background: var(--red);
  position: relative;
  overflow: hidden;
}
.page-hero-sm::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.08) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.page-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 2.5rem 3rem;
  position: relative;
  z-index: 2;
}
.page-hero-title {
  font-family: var(--font-d);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
  color: #EDE0C4;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-top: 0.5rem;
}
.page-hero-title em { font-style: italic; color: var(--gold-light); }
.page-hero-sub {
  font-size: 0.95rem;
  color: rgba(237,224,196,0.65);
  margin-top: 0.75rem;
  max-width: 55ch;
}


/* ══════════════════════════════════════════
   DOC BODY (Values, Platform, About)
══════════════════════════════════════════ */
.doc-body {
  max-width: 780px;
  margin: 0 auto;
  padding: 4rem 2.5rem 6rem;
}
.doc-section {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--divider);
}
.doc-section:first-child { padding-top: 0; }
.doc-section:last-child { border-bottom: none; }
.doc-heading {
  font-family: var(--font-d);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.1rem;
  line-height: 1.15;
}
.doc-para {
  font-size: 0.97rem;
  line-height: 1.92;
  color: var(--text-mid);
  margin-bottom: 1.1rem;
}
.doc-para:last-child { margin-bottom: 0; }
.doc-closing {
  font-family: var(--font-d);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--red);
  line-height: 1.75;
}
body.dark .doc-closing { color: var(--red-light); }

.founder-sig {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--divider);
}
.sig-name {
  font-family: var(--font-d);
  font-size: 1.6rem;
  font-style: italic;
  color: var(--text);
}
.sig-title {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-top: 0.2rem;
}


/* ══════════════════════════════════════════
   COMMUNITY BOARD
══════════════════════════════════════════ */
.board-shell {
  min-height: calc(100vh - var(--nav-h) - 200px);
}

.board-topbar {
  position: sticky;
  top: var(--nav-h);
  z-index: 300;
  background: var(--surface-alt);
  border-bottom: 2px solid var(--red);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 2rem;
  height: 54px;
}

.board-tabs {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 0;
}
.board-tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 1.2rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
  border: none;
  background: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  margin-bottom: -2px;
}
.board-tab.active { color: var(--text); border-bottom-color: var(--red); }
.board-tab:hover { color: var(--text); }

.board-search-wrap {
  position: relative;
  flex: 1;
  max-width: 280px;
}
.search-ico {
  position: absolute;
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-soft);
  font-size: 1rem;
  pointer-events: none;
}
.board-search {
  width: 100%;
  padding: 0.38rem 0.7rem 0.38rem 2rem;
  background: #1C1810;
  border: 1px solid rgba(28,24,16,0.35);
  font-size: 0.78rem;
  color: #EDE0C4;
  outline: none;
  transition: border-color 0.2s;
}
.board-search::placeholder { color: rgba(237,224,196,0.3); }
.board-search:focus { border-color: var(--red); }
body.dark .board-search { border-color: rgba(237,224,196,0.15); }

.board-sort {
  padding: 0.38rem 2rem 0.38rem 0.7rem;
  background: #1C1810;
  border: 1px solid rgba(28,24,16,0.35);
  font-size: 0.72rem;
  color: #EDE0C4;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23EDE0C4' opacity='.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
}
.board-sort:focus { border-color: var(--red); }
.board-sort option { background: #1C1810; }
body.dark .board-sort { border-color: rgba(237,224,196,0.15); }

.board-body {
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - var(--nav-h) - 54px);
}

/* SIDEBAR */
.board-sidebar {
  width: 270px;
  flex-shrink: 0;
  border-right: 2px solid var(--red);
  background: var(--surface-alt);
  position: sticky;
  top: calc(var(--nav-h) + 54px);
  max-height: calc(100vh - var(--nav-h) - 54px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.sidebar-hd {
  padding: 1rem 1.2rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--divider);
  background: #1C1810;
  flex-shrink: 0;
}
.sidebar-hd span {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(237,224,196,0.4);
}
.sidebar-add-btn {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--red-light);
  background: none;
  border: 1px solid rgba(187,0,0,0.35);
  padding: 0.18rem 0.55rem;
  cursor: pointer;
  transition: all 0.15s;
}
.sidebar-add-btn:hover { background: var(--red); color: #EDE0C4; border-color: var(--red); }

.sidebar-org {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
  transition: background 0.15s;
}
.sidebar-org:hover { background: var(--red); }
.sidebar-org:hover .so-name { color: #EDE0C4; }
.sidebar-org:hover .so-desc { color: rgba(237,224,196,0.65); }
.sidebar-org:hover .so-count { color: rgba(237,224,196,0.45); }
.so-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.15rem;
  line-height: 1.3;
  transition: color 0.15s;
}
.so-desc {
  font-size: 0.72rem;
  color: var(--text-soft);
  line-height: 1.4;
  margin-bottom: 0.35rem;
  transition: color 0.15s;
}
.so-count {
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
  transition: color 0.15s;
}

.sidebar-browse {
  padding: 0.9rem 1.2rem;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  cursor: pointer;
  transition: background 0.15s;
  margin-top: auto;
  border-top: 1px solid var(--divider);
}
.sidebar-browse:hover { background: var(--surface); }

/* BOARD MAIN */
.board-main {
  flex: 1;
  padding: 2rem 2rem 4rem;
  min-width: 0;
}

.board-panel-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--divider);
  flex-wrap: wrap;
}
.board-panel-hd h2 {
  font-family: var(--font-d);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}
.board-panel-hd h2 em { font-style: italic; color: var(--red); }
.board-panel-hd p { font-size: 0.78rem; color: var(--text-soft); margin-top: 0.2rem; }
.panel-btns { display: flex; gap: 0.6rem; flex-shrink: 0; flex-wrap: wrap; }

.btn-need {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem 1.1rem;
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(201,168,76,0.4);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-need:hover { background: var(--gold); color: #1C1810; border-color: var(--gold); }

.btn-offer {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem 1.1rem;
  background: var(--red);
  color: #EDE0C4;
  border: 1px solid var(--red);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-offer:hover { background: var(--red-deep); border-color: var(--red-deep); }

/* Filters */
.board-filters {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.filter-chip {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--divider);
  color: var(--text-soft);
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
}
.filter-chip:hover { border-color: var(--red); color: var(--red); }
.filter-chip.active { background: var(--red); border-color: var(--red); color: #EDE0C4; }

/* Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--divider);
  border: 1px solid var(--divider);
}
.card {
  background: var(--surface);
  padding: 1.4rem;
  transition: background 0.18s;
  border-left: 3px solid transparent;
  cursor: default;
}
.card:hover {
  background: var(--red);
  border-left-color: var(--red-deep);
}
.card:hover .card-title  { color: #EDE0C4; }
.card:hover .card-body   { color: rgba(237,224,196,0.72); }
.card:hover .card-time   { color: rgba(237,224,196,0.45); }
.card:hover .card-footer { border-top-color: rgba(237,224,196,0.18); }
.card:hover .card-meta   { color: rgba(237,224,196,0.45); }
.card:hover .card-meta strong { color: rgba(237,224,196,0.85); }
.card:hover .card-cta    { color: #EDE0C4; border-color: rgba(237,224,196,0.4); }
.card:hover .badge-offer { background: rgba(255,255,255,0.12); color: #EDE0C4; border-color: rgba(255,255,255,0.25); }
.card:hover .badge-need  { background: rgba(201,168,76,0.18); color: var(--gold-light); border-color: rgba(201,168,76,0.35); }

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.badge {
  font-size: 0.54rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.18rem 0.5rem;
  border: 1px solid;
  transition: all 0.18s;
}
.badge-offer { color: var(--red); border-color: rgba(187,0,0,0.3); background: rgba(187,0,0,0.06); }
.badge-need  { color: var(--gold); border-color: rgba(201,168,76,0.3); background: rgba(201,168,76,0.07); }
.card-time {
  font-size: 0.61rem;
  color: var(--text-soft);
  transition: color 0.18s;
}
.card-title {
  font-family: var(--font-d);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 0.5rem;
  transition: color 0.18s;
}
.card-body {
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--text-mid);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.18s;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--divider);
  transition: border-color 0.18s;
}
.card-meta { font-size: 0.65rem; color: var(--text-soft); transition: color 0.18s; }
.card-meta strong { font-weight: 500; color: var(--text-mid); transition: color 0.18s; }
.card-cta {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  border: 1px solid rgba(187,0,0,0.3);
  padding: 0.22rem 0.65rem;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
}
.card-cta:hover { background: var(--red); color: #EDE0C4; border-color: var(--red); }
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-soft);
  font-size: 0.85rem;
  background: var(--surface);
}


/* ══════════════════════════════════════════
   ORGANIZATIONS PAGE
══════════════════════════════════════════ */
.orgs-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 0 5rem;
}
.orgs-topbar {
  position: sticky;
  top: var(--nav-h);
  z-index: 300;
  background: var(--surface-alt);
  border-bottom: 2px solid var(--red);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 2rem;
  height: 54px;
}
.orgs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1px;
  background: var(--divider);
  border: 1px solid var(--divider);
  margin: 2rem;
}
.org-card {
  background: var(--surface);
  padding: 1.75rem;
  cursor: pointer;
  transition: background 0.18s;
  border-left: 3px solid transparent;
}
.org-card:hover {
  background: var(--red);
  border-left-color: var(--red-deep);
}
.org-card:hover .org-name { color: #EDE0C4; }
.org-card:hover .org-desc { color: rgba(237,224,196,0.72); }
.org-card:hover .org-meta { color: rgba(237,224,196,0.45); }
.org-card:hover .org-tag { background: rgba(255,255,255,0.12); color: #EDE0C4; border-color: rgba(255,255,255,0.2); }
.org-emoji { font-size: 1.8rem; margin-bottom: 0.75rem; }
.org-name {
  font-family: var(--font-d);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
  line-height: 1.2;
  transition: color 0.18s;
}
.org-desc {
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--text-mid);
  margin-bottom: 1rem;
  transition: color 0.18s;
}
.org-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.org-meta {
  font-size: 0.62rem;
  color: var(--text-soft);
  transition: color 0.18s;
}
.org-tag {
  font-size: 0.54rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.18rem 0.5rem;
  border: 1px solid var(--divider);
  color: var(--text-soft);
  transition: all 0.18s;
}


/* ══════════════════════════════════════════
   ORG DETAIL PAGE
══════════════════════════════════════════ */
.org-detail-body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2.5rem 6rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 4rem;
  align-items: flex-start;
}
.org-detail-back {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(237,224,196,0.5);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
}
.org-detail-back:hover { color: #EDE0C4; }

.od-section-title {
  font-family: var(--font-d);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--divider);
}
.od-about {
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--text-mid);
  margin-bottom: 2.5rem;
}
.od-events { display: flex; flex-direction: column; gap: 1px; background: var(--divider); border: 1px solid var(--divider); }
.od-event {
  background: var(--surface);
  padding: 1.3rem 1.2rem;
  transition: background 0.15s;
}
.od-event:hover { background: var(--surface-alt); }
.od-event-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}
.od-event-badge {
  font-size: 0.54rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.18rem 0.5rem;
  border: 1px solid;
}
.ev-volunteer { color: var(--gold); border-color: rgba(201,168,76,0.35); background: rgba(201,168,76,0.07); }
.ev-recurring { color: var(--red);  border-color: rgba(187,0,0,0.3);   background: rgba(187,0,0,0.06); }
.ev-workshop  { color: #5a7a5e;     border-color: rgba(90,122,94,0.3); background: rgba(90,122,94,0.06); }
.ev-meeting   { color: var(--text-mid); border-color: var(--divider); background: transparent; }
.od-event-time { font-size: 0.65rem; color: var(--text-soft); }
.od-event-title {
  font-family: var(--font-d);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.od-event-date {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.5rem;
}
.od-event-desc { font-size: 0.83rem; line-height: 1.65; color: var(--text-mid); }

/* Org detail aside */
.org-detail-aside { position: sticky; top: calc(var(--nav-h) + 2rem); }
.od-aside-box {
  border: 1px solid var(--divider);
  background: var(--surface-alt);
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.od-aside-emoji { font-size: 2rem; margin-bottom: 0.5rem; }
.od-aside-name {
  font-family: var(--font-d);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
  line-height: 1.2;
}
.od-aside-count {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 1.2rem;
}
.od-aside-join {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background: var(--red);
  color: #EDE0C4;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  border: none;
  cursor: pointer;
  margin-bottom: 0.5rem;
  transition: background 0.2s;
}
.od-aside-join:hover { background: var(--red-deep); }
.od-aside-msg {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background: transparent;
  color: var(--text);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  border: 1px solid var(--divider);
  cursor: pointer;
  transition: all 0.2s;
}
.od-aside-msg:hover { border-color: var(--red); color: var(--red); }
.od-aside-lbl {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 0.25rem;
  margin-top: 0.8rem;
}
.od-aside-val { font-size: 0.82rem; color: var(--text-mid); }


/* ══════════════════════════════════════════
   MODAL
══════════════════════════════════════════ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(28,24,16,0.7);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-top: 3px solid var(--red);
  padding: 2.5rem;
  width: 100%;
  max-width: 540px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 1rem; right: 1.2rem;
  font-size: 1.5rem;
  color: var(--text-soft);
  line-height: 1;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text); }
.modal-title {
  font-family: var(--font-d);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
}
.form-field {
  margin-bottom: 1.1rem;
}
.form-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 0.4rem;
}
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--surface-alt);
  border: 1px solid var(--divider);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus { border-color: var(--red); }
.form-textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.form-select option { background: var(--surface); }
.form-submit {
  width: 100%;
  padding: 0.85rem;
  background: var(--red);
  color: #EDE0C4;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.2s;
}
.form-submit:hover { background: var(--red-deep); }


/* ══════════════════════════════════════════
   TOAST
══════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1C1810;
  color: #EDE0C4;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  padding: 0.75rem 1.8rem;
  border-left: 3px solid var(--red);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }


/* ══════════════════════════════════════════
   SCROLLBAR
══════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(28,24,16,0.15); }
::-webkit-scrollbar-thumb:hover { background: var(--red); }
body.dark ::-webkit-scrollbar-thumb { background: rgba(237,224,196,0.12); }


/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .tool-inner { grid-template-columns: 1fr; gap: 3rem; }
  .org-detail-body { grid-template-columns: 1fr; gap: 2.5rem; }
  .org-detail-aside { position: relative; top: 0; }
}

@media (max-width: 768px) {
  .board-body { flex-direction: column; }
  .board-sidebar {
    width: 100%;
    position: relative;
    top: 0;
    max-height: 40vh;
    border-right: none;
    border-bottom: 2px solid var(--red);
  }
  .board-topbar { flex-wrap: wrap; height: auto; padding: 0.6rem 1rem; }
  .hero-btns { flex-direction: column; align-items: flex-start; }
  .values-grid { grid-template-columns: 1fr 1fr; }
  .join-btns { flex-direction: column; align-items: center; }
}

@media (max-width: 540px) {
  .hero-inner { padding: 5rem 1.2rem 4rem; }
  .tool-section, .values-teaser, .about-teaser, .join-section { padding: 4rem 1.2rem; }
  .doc-body { padding: 2.5rem 1.2rem 4rem; }
  .values-grid { grid-template-columns: 1fr; }
  .board-main { padding: 1.5rem 1rem 3rem; }
  .orgs-grid { margin: 1rem; grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .page-hero-inner { padding: 2.5rem 1.2rem 2rem; }
  .modal { padding: 1.75rem; }
  .nav-inner { padding: 0 1.2rem; }
}
