/* ==========================================================================
   Halloween: The Game — Unofficial Field Guide
   Base Styling, Responsive Layout & Atmospheric Dark Horror Theme
   ========================================================================== */

:root {
  --bg-base: #07090d;
  --bg-surface: #0e1218;
  --bg-card: #141a23;
  --bg-card-hover: #1a222e;
  --bg-overlay: rgba(7, 9, 13, 0.85);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-glow: rgba(255, 119, 0, 0.35);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --accent-orange: #ff7700;
  --accent-orange-hover: #ff881a;
  --accent-orange-dim: #b35500;
  --accent-orange-glow: rgba(255, 119, 0, 0.15);

  --status-verified: #22c55e;
  --status-verified-bg: rgba(34, 197, 94, 0.12);
  --status-caution: #f59e0b;
  --status-caution-bg: rgba(245, 158, 11, 0.12);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  --container-max: 1180px;
  --header-height: 68px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition-fast: 0.2s ease;
}

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(255, 119, 0, 0.08), transparent 70%),
    linear-gradient(to bottom, #07090d 0%, #090c12 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

a {
  color: var(--accent-orange);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover, a:focus-visible {
  color: var(--accent-orange-hover);
  text-decoration: underline;
}

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

h1, h2, h3, h4 {
  color: #ffffff;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 4vw + 1rem, 2.75rem); }
h2 { font-size: clamp(1.5rem, 2.5vw + 0.5rem, 2rem); margin-bottom: 0.75rem; }
h3 { font-size: clamp(1.2rem, 1.5vw + 0.3rem, 1.45rem); margin-bottom: 0.5rem; }
h4 { font-size: 1.1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

p:last-child {
  margin-bottom: 0;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 9, 13, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  height: var(--header-height);
}

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

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #ffffff;
}

.brand-link:hover, .brand-link:focus-visible {
  text-decoration: none;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-orange);
  box-shadow: 0 0 10px rgba(255, 119, 0, 0.3);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
  line-height: 1.1;
}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-orange);
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 6px;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link:focus-visible {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
}

/* Buttons & Badges */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--accent-orange);
  color: #0b0d10;
}

.btn-primary:hover, .btn-primary:focus-visible {
  background-color: var(--accent-orange-hover);
  color: #0b0d10;
  text-decoration: none;
  box-shadow: 0 0 16px rgba(255, 119, 0, 0.4);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.btn-outline:hover, .btn-outline:focus-visible {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: var(--text-primary);
  text-decoration: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid var(--border-subtle);
}

.badge-verified {
  background-color: var(--status-verified-bg);
  border-color: rgba(34, 197, 94, 0.3);
  color: var(--status-verified);
}

.badge-orange {
  background-color: var(--accent-orange-glow);
  border-color: rgba(255, 119, 0, 0.3);
  color: var(--accent-orange);
}

/* Hero Section */
.hero-section {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-disclaimer-pill {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  background: rgba(255, 119, 0, 0.08);
  border: 1px solid rgba(255, 119, 0, 0.25);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.82rem;
  color: var(--accent-orange);
}

.hero-disclaimer-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-orange);
  box-shadow: 0 0 6px var(--accent-orange);
}

.hero-lead {
  font-size: 1.12rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.hero-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.hero-meta-item strong {
  color: #ffffff;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.hero-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  background: var(--bg-surface);
}

.hero-visual img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-caption {
  padding: 10px 14px;
  background: rgba(14, 18, 24, 0.95);
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
}

/* Content Sections */
.content-section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  margin-bottom: 32px;
}

.section-tag {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-orange);
  margin-bottom: 6px;
  display: inline-block;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 720px;
}

/* Keep long-form guide copy readable while allowing tables, cards and media to use the full container. */
.article-page .content-section > .container > p,
.article-page .content-section > .container > ul,
.article-page .content-section > .container > ol,
.article-page .content-section > .container > .callout {
  max-width: 75ch;
}

/* Trust pages reuse the shared shell while keeping a readable text column. */
.trust-page .trust-copy {
  max-width: 760px;
}

.trust-page .trust-copy h2 {
  margin-top: 2rem;
}

.trust-page .trust-copy ul {
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
  list-style: disc;
}

.trust-page .trust-copy li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

/* Make a real external destination visible without turning links into cards. */
.content-section a[href^="http://"]::after,
.content-section a[href^="https://"]::after {
  content: " ↗";
  white-space: nowrap;
  font-size: 0.86em;
}

/* Card Grids */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.card-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .card-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

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

.card-body {
  flex: 1;
}

.card-list {
  list-style: none;
  margin: 12px 0;
}

.card-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.card-list li::before {
  content: "•";
  position: absolute;
  left: 6px;
  color: var(--accent-orange);
  font-weight: bold;
}

/* Image Feature Block */
.feature-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
}

@media (min-width: 860px) {
  .feature-block {
    grid-template-columns: 1fr 1fr;
  }
}

.feature-media {
  position: relative;
  overflow: hidden;
  height: 100%;
}

.feature-media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.feature-body {
  padding: 28px;
}

.feature-caption {
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.6);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  margin: 20px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

th, td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  background: var(--bg-surface);
  color: #ffffff;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Callout Box */
.callout {
  padding: 18px 22px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--accent-orange);
  background: rgba(255, 119, 0, 0.05);
  border-top: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin: 20px 0;
}

.callout-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-orange);
  margin-bottom: 6px;
}

.callout p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Footer */
/* Keep procedural steps and their markers inside the reading column. */
.content-section .container > ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.content-section .container > ol > li + li { margin-top: 0.75rem; }

.guide-image {
  max-width: 960px;
  margin: 24px auto;
  padding: 0 20px;
}
.guide-image img { width: 100%; border-radius: var(--radius-md); }
.guide-image figcaption { margin-top: 10px; color: var(--text-muted); font-size: 0.875rem; }
.hero-visual .guide-image { margin: 0; padding: 0; }
.hero-visual .guide-image figcaption { padding: 0 14px 14px; }
.table-wrapper:focus-visible { outline: 2px solid var(--accent-orange); outline-offset: 4px; }
@media (max-width: 600px) {
  .table-wrapper[role="region"] table { min-width: 640px; }
  .table-wrapper[role="region"]::before {
    content: "Scroll horizontally to read all columns.";
    display: block;
    padding: 10px 16px;
    color: var(--text-muted);
    font-size: 0.8rem;
  }
}

.site-footer {
  background: #05070a;
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0 32px;
  margin-top: auto;
  font-size: 0.88rem;
  color: var(--text-muted);
}

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

.footer-col h4 {
  color: #ffffff;
  font-size: 0.95rem;
  margin-bottom: 14px;
}

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

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover, .footer-links a:focus-visible {
  color: var(--accent-orange);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.8rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* Mobile Nav Toggle Interaction */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    padding: 16px 20px;
    gap: 8px;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: 10px 14px;
  }
}
