:root {
  --bg-canvas: #0b0b0d;
  --bg-surface: #202024;
  --bg-surface-alt: #161619;
  --bg-crimson: #dc2626;
  --bg-crimson-dark: #881313;
  --text-primary: #f5f4f2;
  --text-muted: #c0c4cc;
  --accent-primary: #dc2626;
  --accent-secondary: #f87171;
  --border-subtle: rgba(245, 244, 242, 0.12);
  --border-crimson: rgba(220, 38, 38, 0.35);
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 14px 30px rgba(0, 0, 0, 0.55);
  --glass-fallback: #202024;
  --glass-backdrop: blur(14px) saturate(160%);
}

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

html {
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.68;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  overflow-wrap: anywhere;
  hyphens: auto;
  position: relative;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

a:hover {
  color: var(--accent-secondary);
}

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

.shell {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.narrow-text {
  max-width: 70ch;
  margin: 0 auto;
}

/* Header & Navigation */
.header-wrapper {
  padding: 1.25rem 1rem 0.5rem;
}

.site-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 0.75rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
}

.brand-symbol {
  width: 28px;
  height: 28px;
  background: var(--bg-crimson);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
  color: #fff;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.nav-desktop a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  padding: 0.35rem 0.25rem;
  border-bottom: 2px solid transparent;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent-primary);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
}

.nav-mobile-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.65rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 1.25rem;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 100;
  box-shadow: var(--shadow-elevation);
}

.nav-mobile-panel.is-open {
  display: flex;
}

.nav-mobile-panel a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-mobile-panel a:last-child {
  border-bottom: none;
}

/* Shallow Dark Band Hero */
.hero-shallow {
  background-color: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
  padding: 3rem 0 2rem;
  text-align: left;
}

.hero-shallow .tagline {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-secondary);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.hero-shallow h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  max-width: 900px;
}

.hero-shallow p {
  margin-top: 1rem;
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 72ch;
}

.hero-shallow .hero-actions {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Band Styles */
.band-dark {
  background-color: var(--bg-canvas);
  padding: 4rem 0;
}

.band-surface {
  background-color: var(--bg-surface-alt);
  padding: 4rem 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.band-crimson {
  background-color: var(--bg-crimson);
  color: #fff;
  padding: 4rem 0;
}

.band-crimson p,
.band-crimson h2,
.band-crimson h3 {
  color: #ffffff;
}

/* Section Header standard */
.section-intro {
  margin-bottom: 2.25rem;
}

.section-intro .label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-primary);
  font-weight: 700;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.band-crimson .section-intro .label {
  color: #fca5a5;
}

.section-intro h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-intro p {
  margin-top: 0.65rem;
  color: var(--text-muted);
  max-width: 68ch;
}

.band-crimson .section-intro p {
  color: #fee2e2;
}

/* Square Corners & Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.habitat-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: transform 0.25s var(--ease-kinetic), border-color 0.25s ease;
}

.habitat-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
}

.habitat-media {
  width: 100%;
  height: 220px;
  background-color: #121214;
}

.habitat-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.habitat-body {
  padding: 1.5rem;
}

.habitat-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.habitat-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* Translucent Blurred Panels over Crimson Bands */
.glass-panel {
  background-color: rgba(22, 22, 26, 0.88);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 2rem;
  color: var(--text-primary);
}

.glass-panel h3 {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.glass-panel p {
  color: #e2e8f0;
  font-size: 0.98rem;
  line-height: 1.6;
}

/* Round Species Badges & Contributor Avatars */
.badge-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid var(--accent-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  text-align: center;
  padding: 0.25rem;
  flex-shrink: 0;
}

.avatar-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent-primary);
  flex-shrink: 0;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Buttons: square-ended, outlined, uppercase */
.btn {
  display: inline-block;
  padding: 0.85rem 1.65rem;
  border-radius: 0;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-primary {
  background: var(--bg-crimson);
  color: #ffffff;
  border: 1px solid var(--bg-crimson);
}

.btn-primary:hover {
  background: transparent;
  color: #ffffff;
  border-color: #ffffff;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-outline:hover {
  border-color: var(--accent-primary);
  color: var(--accent-secondary);
}

.btn-outline-white {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.btn-outline-white:hover {
  background: #ffffff;
  color: var(--bg-canvas);
  border-color: #ffffff;
}

/* Do and Don't Rows */
.rule-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.rule-col {
  background: var(--bg-surface);
  border-left: 4px solid var(--accent-primary);
  padding: 1.5rem;
}

.rule-col.safe {
  border-left-color: #10b981;
}

.rule-col h4 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rule-col ul {
  list-style: none;
}

.rule-col li {
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.94rem;
  color: var(--text-muted);
}

.rule-col li:last-child {
  border-bottom: none;
}

/* Ecosystem Diagram Blocks */
.eco-chain {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.eco-step {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 1.25rem;
  position: relative;
}

.eco-step-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.eco-step h4 {
  font-size: 1.05rem;
  margin: 0.35rem 0 0.5rem;
}

.eco-step p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Checklist */
.pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.pack-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 1.25rem;
}

.pack-card h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.pack-card ul {
  list-style-type: square;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.pack-card li {
  margin-bottom: 0.35rem;
}

/* Form Styles */
.form-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 2rem;
  max-width: 680px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  border-radius: 0;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.preview-box {
  margin-top: 1.5rem;
  background: var(--bg-canvas);
  border: 1px dashed var(--border-subtle);
  padding: 1rem;
  font-family: monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  color: var(--text-muted);
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.25rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
}

.faq-icon {
  font-size: 1.2rem;
  color: var(--accent-primary);
  transition: transform 0.25s ease;
}

.faq-answer {
  display: none;
  padding: 0 1.5rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

/* Reveal Transitions */
.reveal-item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease-kinetic), transform 0.6s var(--ease-kinetic);
}

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

/* Footer */
.site-footer {
  background-color: var(--bg-canvas);
  border-top: 1px solid var(--border-subtle);
  padding: 3.5rem 0 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-title {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.footer-nav {
  list-style: none;
}

.footer-nav li {
  margin-bottom: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
}

/* Responsive Rules */
@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .rule-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .site-header {
    border-radius: 12px;
    padding: 0.75rem 1rem;
  }
  .hero-shallow h1 {
    font-size: 1.85rem;
  }
  .form-actions {
    flex-direction: column;
  }
  .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
