:root {
  /* Palette: Cardboard Gatherings */
  --bg-canvas: #3b0d1a; /* Rich burgundy base */
  --bg-surface: #4d1122; /* Slightly lighter module background */
  --bg-surface-hover: #5f152a;
  --text-primary: #fbf9f6; /* Cream text */
  --text-muted: #d4c5c9;
  --accent-primary: #e8d5a8; /* Shimmering champagne */
  --accent-text: #2a0912;
  
  /* Typography */
  --font-sans: system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, 'Courier New', monospace;
  
  /* Kinetics */
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --glass-backdrop: transparent; /* No gradients per style rule */
}

/* Global Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  hyphens: auto;
}

/* Typography Elements */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
}

h1 { font-size: 3rem; text-transform: uppercase; letter-spacing: -1px; }
h2 { font-size: 2rem; color: var(--accent-primary); }
p { margin-bottom: 1.5rem; }

.digit-mono {
  font-family: var(--font-mono);
  font-weight: bold;
}

/* Links & Buttons */
a {
  color: var(--accent-primary);
  text-decoration: underline;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.8;
}

a.nav-link, a.brand-link {
  text-decoration: none;
  color: var(--text-primary);
}

a.nav-link:hover {
  color: var(--accent-primary);
}

button.primary, a.button-primary {
  display: inline-block;
  background-color: var(--accent-primary);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-weight: bold;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border: none;
  cursor: pointer;
  border-radius: 0; /* Rigid square */
  transition: transform 0.3s var(--ease-kinetic), background-color 0.3s;
}

button.primary:hover, a.button-primary:hover {
  transform: translateY(-2px);
  background-color: #fcebc0;
}

/* Header (Absolute + Glassy to Solid) */
header {
  position: absolute; /* Moves up out of view on scroll */
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 2rem;
  z-index: 100;
  background-color: transparent;
  transition: background-color 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header.scrolled {
  background-color: var(--bg-canvas); /* Solid burgundy */
  border-bottom: 1px solid var(--bg-surface);
}

.brand {
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

nav.desktop-nav {
  display: flex;
  gap: 2rem;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Layout Wrappers */
.main-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.content-narrow {
  max-width: 72ch;
  margin: 0 auto;
}

/* Extremely Short Hero */
.hero {
  padding-top: 6rem; /* Clear absolute header */
  padding-bottom: 2rem;
  text-align: center;
}

.hero h1 {
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
}

/* Grid & Bento Modules */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.module-card {
  background-color: var(--bg-surface);
  border-radius: 0; /* Rigid square */
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s var(--ease-kinetic);
}

.module-card:hover {
  transform: translateY(-5px) scale(1.015);
  background-color: var(--bg-surface-hover);
}

/* Card Imagery & Badges */
.card-image-wrapper {
  width: 100%;
  height: 200px;
  position: relative;
  overflow: hidden;
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.champagne-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--accent-primary);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 0;
  z-index: 10;
}

.card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* Dense Tabbed Data Zones */
.data-zone {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(232, 213, 168, 0.2);
  margin-top: 1rem;
  padding-top: 1rem;
  font-size: 0.9rem;
}

.data-item {
  display: flex;
  flex-direction: column;
}

.data-label {
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Avatars */
.player-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--accent-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-weight: bold;
  margin-right: 0.5rem;
}

.avatar-group {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.7s var(--ease-kinetic);
}

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

/* Tool Form */
.matchmaker-form {
  background-color: var(--bg-surface);
  padding: 2rem;
  margin: 2rem 0;
}

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

label {
  display: block;
  font-family: var(--font-mono);
  margin-bottom: 0.5rem;
  color: var(--accent-primary);
}

input, select, textarea {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--bg-canvas);
  border: 1px solid var(--text-muted);
  color: var(--text-primary);
  font-family: var(--font-sans);
  border-radius: 0;
}

input:focus, select:focus {
  outline: 2px solid var(--accent-primary);
  border-color: transparent;
}

.tool-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* Mobile Nav Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--bg-canvas);
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  transform: translateY(-100%);
  transition: transform 0.4s var(--ease-kinetic);
}

.mobile-menu-overlay.active {
  transform: translateY(0);
}

.mobile-menu-overlay a {
  font-size: 2rem;
  font-weight: bold;
}

/* Footer */
footer {
  margin-top: 4rem;
  padding: 3rem 2rem 1.5rem;
  background-color: var(--bg-surface);
  border-top: 4px solid var(--accent-primary);
  font-size: 0.85rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 2rem;
}

.footer-col h4 {
  color: var(--accent-primary);
  margin-bottom: 1rem;
  font-family: var(--font-mono);
}

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

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

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid rgba(232, 213, 168, 0.2);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  color: var(--text-muted);
}

.footer-legals {
  display: flex;
  gap: 1rem;
}

.table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 1rem;
  border: 1px solid rgba(232, 213, 168, 0.2);
  text-align: left;
}

th {
  background-color: var(--bg-surface);
  color: var(--accent-primary);
  font-family: var(--font-mono);
}

/* Media Queries */
@media (max-width: 768px) {
  nav.desktop-nav { display: none; }
  .mobile-menu-btn { display: block; }
  .hero h1 { font-size: 2rem; }
  .tool-actions { flex-direction: column; }
}

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