:root {
  color-scheme: light;
  --bg: #f6f1e7;
  --bg-alt: #f0e5d4;
  --ink: #1e1914;
  --muted: #6c5f52;
  --accent: #d6a24a;
  --accent-dark: #8b5721;
  --panel: #ffffff;
  --shadow: 0 24px 50px rgba(30, 25, 20, 0.12);
  --radius: 18px;
  --radius-lg: 28px;
  --font-body: "Manrope", "Avenir", "Helvetica Neue", Arial, sans-serif;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  background-image: url("assets/bg-texture.svg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: grid;
  pointer-events: none;
}

.bg-cell {
  border-radius: 14px;
  background: rgba(120, 120, 120, 0);
  transition: background-color 0.25s ease;
}

.bg-cell.soft {
  background: rgba(120, 120, 120, 0.18);
}

.bg-cell.strong {
  background: rgba(120, 120, 120, 0.45);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 6vw;
  background: rgba(253, 250, 243, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(30, 25, 20, 0.08);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(140deg, #f5c96a, #ad6a1b);
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 1px;
}

.brand-title {
  font-size: 1.1rem;
  letter-spacing: 1.6px;
}

.brand-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

.site-nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.site-nav a {
  font-size: 0.95rem;
  position: relative;
}

.site-nav a.active::after,
.site-nav a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

.menu-toggle {
  display: none;
  border: 1px solid rgba(30, 25, 20, 0.2);
  background: transparent;
  padding: 8px 14px;
  border-radius: 999px;
}

main {
  display: block;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.hero,
.section,
.page-hero {
  padding: 80px 6vw;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  align-items: stretch;
}

.page-hero {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  align-items: center;
}

.hero h1,
.page-hero h1 {
  font-size: clamp(2.3rem, 4vw, 3.4rem);
  margin: 12px 0 16px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.75rem;
  color: var(--muted);
}

.lead {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 650px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin: 26px 0;
  flex-wrap: wrap;
}

.btn {
  border: none;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(30, 25, 20, 0.15);
}

.btn.primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-dark));
  color: #1b1206;
}

.btn.secondary {
  background: #241a13;
  color: #f5e9d4;
}

.btn.ghost {
  background: transparent;
  border: 1px solid rgba(30, 25, 20, 0.2);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.stat-card {
  background: var(--panel);
  padding: 16px;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
}

.stat-label {
  color: var(--muted);
  font-size: 0.85rem;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100%;
}

.hero-panel .card:last-child {
  flex: 1;
}

.card {
  background: var(--panel);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card.glass {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(30, 25, 20, 0.1);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.pill {
  background: #1e140b;
  color: #f2d9a6;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
}

.pill.muted {
  background: #e8dcc8;
  color: #6b5c4d;
}

.metric-list {
  list-style: none;
  display: grid;
  gap: 10px;
}

.metric-list li {
  display: flex;
  justify-content: space-between;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.summary-block h4 {
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--muted);
}

.summary-list {
  list-style: none;
  display: grid;
  gap: 8px;
}

.summary-list li {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.summary-progress {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--muted);
}

.link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--accent-dark);
  font-weight: 600;
}

.section.alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 700px;
  margin-bottom: 32px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin: 10px 0 14px;
}

.grid-2,
.grid-3,
.filter-grid,
.media-grid {
  display: grid;
  gap: 24px;
}

.archive-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.archive-card {
  background: var(--panel);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.archive-card:hover {
  transform: translateY(-4px);
}

.empty-state {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.tag {
  background: var(--bg-alt);
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
}

.timeline {
  display: grid;
  gap: 20px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(30, 25, 20, 0.1);
}

.timeline-date {
  font-weight: 700;
  color: var(--accent-dark);
}

.progress {
  background: #f0e5d3;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
  margin-top: 12px;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(120deg, var(--accent), var(--accent-dark));
}

.wave {
  display: flex;
  gap: 6px;
  margin: 16px 0;
}

.wave span {
  width: 8px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(180deg, #f7c464, #a05b1d);
  animation: wave 1.4s ease-in-out infinite;
}

.wave span:nth-child(2) { animation-delay: 0.1s; }
.wave span:nth-child(3) { animation-delay: 0.2s; }
.wave span:nth-child(4) { animation-delay: 0.3s; }
.wave span:nth-child(5) { animation-delay: 0.4s; }
.wave span:nth-child(6) { animation-delay: 0.5s; }
.wave span:nth-child(7) { animation-delay: 0.6s; }
.wave span:nth-child(8) { animation-delay: 0.7s; }
.wave span:nth-child(9) { animation-delay: 0.8s; }
.wave span:nth-child(10) { animation-delay: 0.9s; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1.2); }
}

.search-box {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.search-box input {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(30, 25, 20, 0.2);
  min-width: 240px;
}

.meta {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.list {
  margin-top: 12px;
  padding-left: 18px;
  color: var(--muted);
}

.filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.filter-card {
  background: var(--panel);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}

.tabs {
  display: flex;
  gap: 12px;
}

.tab {
  border: 1px solid rgba(30, 25, 20, 0.2);
  background: transparent;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
}

.tab.active {
  background: #1f1510;
  color: #f4e2bf;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.media-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.media-card {
  background: var(--panel);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.media-card:hover {
  transform: translateY(-4px);
}

.media-card h3 {
  padding: 16px 20px 0;
}

.media-card p {
  padding: 0 20px 20px;
  color: var(--muted);
}

.media-thumb {
  width: 100%;
  height: 180px;
  display: block;
  object-fit: cover;
}

.media-view {
  width: 100%;
  height: auto;
  border-radius: 14px;
  margin-bottom: 16px;
  display: block;
}

.image-card {
  min-height: 220px;
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.image-card.map {
  background-image: url("assets/map.svg");
}

.image-card.hero {
  background-image: url("assets/hero-panel.svg");
}

.status-panel {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

.metric {
  font-size: 1.4rem;
  font-weight: 700;
}

.log-board {
  display: grid;
  gap: 16px;
}

.log-item {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 20px;
  background: var(--panel);
  padding: 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.log-time {
  font-weight: 700;
  color: var(--accent-dark);
}

.forum-list {
  display: grid;
  gap: 16px;
}

.forum-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.newsletter-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.newsletter-form input {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(30, 25, 20, 0.2);
  min-width: 220px;
}

.newsletter-form.wide input {
  flex: 1 1 220px;
}

.site-footer {
  padding: 40px 6vw;
  background: #1f1510;
  color: #f6e8c9;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-meta {
  color: rgba(246, 232, 201, 0.7);
  font-size: 0.85rem;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(18, 12, 8, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 20;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--panel);
  padding: 28px;
  border-radius: var(--radius);
  max-width: 500px;
  width: 100%;
}

.modal-content.video {
  background: #0f0d0a;
  max-width: 920px;
}

.modal-content.video video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}

.modal-close {
  border: none;
  background: transparent;
  font-size: 1.6rem;
  float: right;
  cursor: pointer;
}

.muted {
  color: var(--muted);
}

@media (max-width: 900px) {
  .site-nav {
    position: fixed;
    inset: 70px 18px auto 18px;
    background: var(--panel);
    border-radius: 18px;
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: var(--shadow);
    display: none;
  }

  .site-nav.open {
    display: flex;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero,
  .section,
  .page-hero {
    padding: 60px 6vw;
  }
}

@media (max-width: 600px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .log-item {
    grid-template-columns: 1fr;
  }

  .status-panel {
    flex-direction: column;
    align-items: flex-start;
  }
}
