:root {
  /* Playful Panels Palette (Strictly No Blue) */
  --bg-paper: #f7f5f0;
  --bg-surface: #ffffff;
  --text-ink: #111111;
  --accent-red: #d62828;
  --text-on-red: #ffffff;
  --border-color: #111111;

  /* Typography */
  --font-heading: Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-paper);
  color: var(--text-ink);
  line-height: 1.6;
  overflow-wrap: anywhere;
  hyphens: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; }

p { margin-bottom: 1rem; }

a {
  color: var(--text-ink);
  text-decoration: none;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-padding {
  padding: 4rem 0;
}

.red-block-bg {
  background-color: var(--accent-red);
  color: var(--text-on-red);
}

.red-block-bg a {
  color: var(--text-on-red);
}

/* Header & Navigation */
.site-header {
  background-color: var(--bg-surface);
  border-bottom: 2px solid var(--border-color);
  padding: 1rem 0;
  position: relative; /* Scrolls out of view naturally */
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.nav-link {
  font-weight: 600;
  font-size: 1rem;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent-red);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-ink);
  line-height: 1;
}

.mobile-nav-overlay {
  display: none;
  background-color: var(--bg-surface);
  border-bottom: 2px solid var(--border-color);
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 50;
  padding: 1rem 20px;
}

.mobile-nav-overlay.active {
  display: block;
}

.mobile-nav-overlay .nav-link {
  display: block;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}

/* Hero Section */
.hero-section {
  position: relative;
  background-color: var(--bg-surface);
  border-bottom: 2px solid var(--border-color);
  overflow: hidden;
}

.hero-image-container {
  width: 100%;
  height: 60vh;
  min-height: 400px;
  position: relative;
}

.hero-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-floating-card {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  background-color: var(--bg-paper);
  border: 2px solid var(--border-color);
  padding: 2rem;
  max-width: 400px;
  box-shadow: 8px 8px 0px var(--accent-red);
}

.hero-facts {
  list-style: none;
  margin-top: 1rem;
}

.hero-facts li {
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border-color);
  font-weight: 600;
  display: flex;
  align-items: center;
}
.hero-facts li::before {
  content: '🎲';
  margin-right: 10px;
}

/* Buttons */
.btn-primary {
  display: inline-block;
  background-color: var(--accent-red);
  color: var(--text-on-red);
  padding: 0.75rem 1.5rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 2px solid var(--accent-red);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--accent-red);
}

.text-btn {
  display: inline-block;
  font-weight: bold;
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 1rem;
}
.text-btn::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent-red);
  transition: width 0.3s ease;
}
.text-btn:hover::after { width: 100%; }

/* Panels & Cards (Playful Panels Style) */
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.panel-card {
  background-color: var(--bg-surface);
  border: 2px solid var(--border-color);
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}

.panel-card:hover {
  transform: translateY(-5px);
  box-shadow: 4px 4px 0px var(--accent-red);
}

.card-img-wrapper {
  position: relative;
  height: 200px;
  border-bottom: 2px solid var(--border-color);
}

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

.card-badge {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 60px;
  height: 60px;
  background-color: var(--accent-red);
  color: var(--text-on-red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8rem;
  text-transform: uppercase;
  border: 2px solid var(--border-color);
  transform: rotate(15deg);
  z-index: 2;
  text-align: center;
  line-height: 1.1;
}

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

/* Stat Strips */
.stat-strip {
  display: flex;
  align-items: center;
  background-color: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-left: 8px solid var(--accent-red);
  padding: 1rem;
  margin-bottom: 1rem;
}
.stat-strip-label {
  font-weight: bold;
  text-transform: uppercase;
  width: 120px;
}
.stat-strip-value {
  font-family: var(--font-heading);
  font-size: 1.2rem;
}

/* Tabbed Panels */
.tab-container {
  border: 2px solid var(--border-color);
  background-color: var(--bg-surface);
}

.tab-headers {
  display: flex;
  border-bottom: 2px solid var(--border-color);
  overflow-x: auto;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 1rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  border-right: 2px solid var(--border-color);
  transition: background-color 0.2s;
  white-space: nowrap;
}

.tab-btn:last-child {
  border-right: none;
}

.tab-btn.active {
  background-color: var(--accent-red);
  color: var(--text-on-red);
}

.tab-content {
  display: none;
  padding: 2rem;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* Accordions */
.accordion-item {
  border: 2px solid var(--border-color);
  margin-bottom: 1rem;
  background-color: var(--bg-surface);
}

.accordion-header {
  width: 100%;
  text-align: left;
  padding: 1.5rem;
  background: none;
  border: none;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-header::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--accent-red);
}

.accordion-item.active .accordion-header::after {
  content: '−';
}

.accordion-body {
  display: none;
  padding: 0 1.5rem 1.5rem 1.5rem;
  border-top: 2px dashed var(--border-color);
  margin-top: 1rem;
  padding-top: 1rem;
}

.accordion-item.active .accordion-body {
  display: block;
}

/* Tools Form (Game Night Inviter) */
.tool-panel {
  background-color: var(--bg-surface);
  border: 2px solid var(--border-color);
  padding: 2rem;
  max-width: 600px;
  margin: 0 auto;
}

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

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  background-color: var(--bg-paper);
  font-family: var(--font-body);
  font-size: 1rem;
}

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

/* Footer */
.site-footer {
  padding: 4rem 0;
  border-top: 2px solid var(--border-color);
}

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

.footer-col h4 {
  text-transform: uppercase;
  border-bottom: 1px solid var(--text-on-red);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

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

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

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

/* Text Content Reading Width */
.reading-content {
  max-width: 72ch;
  margin: 0 auto;
}

/* Table styling */
.table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border: 2px solid var(--border-color);
}
table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-surface);
}
th, td {
  padding: 1rem;
  border: 1px solid var(--border-color);
  text-align: left;
}
th {
  background-color: var(--bg-paper);
  font-family: var(--font-heading);
}

/* Media Queries */
@media (max-width: 768px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
  .hero-floating-card {
    position: static;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    border-top: none;
    box-shadow: none;
  }
  .tab-headers {
    flex-direction: column;
  }
  .tab-btn {
    border-right: none;
    border-bottom: 2px solid var(--border-color);
  }
  .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}}
