/* ===================================================================
  Serious Mayhem LLC - Site Styles
  =================================================================== */

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

:root {
  --color-bg: #0e0f11;
  --color-bg-alt: #161820;
  --color-bg-card: #1b1d24;
  --color-surface: #22252e;
  --color-text: #e4e4e7;
  --color-text-muted: #9ca3af;
  --color-accent: #e84545;
  --color-accent-hover: #ff5c5c;
  --color-accent-glow: rgba(232, 69, 69, 0.15);
  --color-border: #2a2d37;
  --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1120px;
  --radius: 8px;
  --transition: 0.2s ease;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent-hover); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

::selection {
  background: var(--color-accent);
  color: #fff;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fff;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }

p { margin-bottom: 1em; }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.section-heading {
  margin-bottom: 1.5rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 0 0 0 var(--color-accent-glow);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--color-accent-glow);
}

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

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

/* --- Navigation --- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(14, 15, 17, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-brand:hover { color: #fff; }

.nav-brand .brand-mark {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.nav-links a:hover { color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

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

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    justify-content: flex-start;
    padding: 2rem 1.5rem;
    gap: 0;
    background: rgba(14, 15, 17, 0.97);
    backdrop-filter: blur(12px);
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links li {
    border-bottom: 1px solid var(--color-border);
  }

  .nav-links a {
    display: block;
    padding: 1rem 0;
    font-size: 1.1rem;
  }
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 64px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 15% 20%, rgba(232, 69, 69, 0.12), transparent 30%),
    linear-gradient(180deg, #101218 0%, #0d0f14 50%, #0b0c10 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 9, 12, 0.7) 0%, rgba(8, 9, 12, 0.32) 34%, rgba(8, 9, 12, 0.74) 100%),
    linear-gradient(90deg, rgba(8, 9, 12, 0.88) 0%, rgba(8, 9, 12, 0.42) 42%, rgba(8, 9, 12, 0.62) 100%);
  pointer-events: none;
  z-index: -1;
}

.hero-canvas-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -2;
}

.hero-canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.98;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 22%, rgba(232, 69, 69, 0.22), transparent 28%),
    radial-gradient(circle at 62% 68%, rgba(255, 255, 255, 0.05), transparent 30%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero .container {
  position: relative;
  width: 100%;
  z-index: 1;
}

.hero-content {
  position: relative;
  max-width: 680px;
  padding: clamp(1.5rem, 2vw, 2rem);
  z-index: 0;
}

.hero-content::before {
  content: '';
  position: absolute;
  inset: -2.6rem -4.6rem -2.8rem -2.3rem;
  z-index: -1;
  background:
    radial-gradient(ellipse 52% 62% at 30% 42%, rgba(13, 15, 20, 0.96) 0%, rgba(13, 15, 20, 0.82) 26%, rgba(13, 15, 20, 0.56) 48%, rgba(13, 15, 20, 0.24) 68%, rgba(13, 15, 20, 0) 100%),
    radial-gradient(ellipse 40% 44% at 22% 20%, rgba(19, 22, 29, 0.34) 0%, rgba(19, 22, 29, 0.16) 50%, rgba(19, 22, 29, 0) 100%),
    radial-gradient(ellipse 34% 38% at 40% 72%, rgba(232, 69, 69, 0.08) 0%, rgba(232, 69, 69, 0.03) 42%, rgba(232, 69, 69, 0) 100%);
  filter: blur(16px);
  opacity: 0.98;
  pointer-events: none;
}

.hero-content h1 {
  margin-bottom: 1.5rem;
  max-width: 12ch;
}

.hero-content h1 .accent {
  color: var(--color-accent);
  text-shadow: 0 0 28px rgba(232, 69, 69, 0.28);
}

.hero-tagline {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--color-text-muted);
  margin-bottom: 2.5rem;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding-top: 88px;
    padding-bottom: 4rem;
  }

  .hero::after {
    background:
      linear-gradient(180deg, rgba(8, 9, 12, 0.78) 0%, rgba(8, 9, 12, 0.55) 32%, rgba(8, 9, 12, 0.82) 100%),
      linear-gradient(90deg, rgba(8, 9, 12, 0.92) 0%, rgba(8, 9, 12, 0.68) 58%, rgba(8, 9, 12, 0.74) 100%);
  }

  .hero-content {
    padding: 1.35rem;
  }

  .hero-content::before {
    inset: -1.6rem -1.8rem -1.8rem -1.4rem;
    background:
      radial-gradient(ellipse 72% 70% at 38% 32%, rgba(13, 15, 20, 0.96) 0%, rgba(13, 15, 20, 0.84) 34%, rgba(13, 15, 20, 0.5) 60%, rgba(13, 15, 20, 0.16) 78%, rgba(13, 15, 20, 0) 100%),
      radial-gradient(ellipse 34% 28% at 30% 78%, rgba(232, 69, 69, 0.08) 0%, rgba(232, 69, 69, 0.02) 48%, rgba(232, 69, 69, 0) 100%);
    filter: blur(12px);
  }
}

/* --- About --- */
.about {
  background: var(--color-bg-alt);
  position: relative;
  isolation: isolate;
}

.about::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, var(--color-bg) 0%, transparent 5rem),
    linear-gradient(to top,    var(--color-bg) 0%, transparent 5rem);
  pointer-events: none;
  z-index: -1;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

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

.about-text p {
  margin-bottom: 1.25rem;
}

.stat-row {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
}

.stat-desc {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.values-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.values-list li {
  padding: 1.25rem;
  background: var(--color-bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  transition: border-color var(--transition);
}

.values-list li:hover {
  border-color: var(--color-accent);
}

.values-list strong {
  display: block;
  color: #fff;
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.values-list span {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* --- Games --- */
.games {
  background: var(--color-bg);
}

.game-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  transition: border-color var(--transition);
}

.game-card:hover {
  border-color: var(--color-accent);
}

.game-card.featured {
  background: linear-gradient(135deg, var(--color-bg-card) 0%, rgba(232, 69, 69, 0.04) 100%);
}

.game-info h3 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.game-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  background: var(--color-accent-glow);
  color: var(--color-accent);
  border-radius: 4px;
  margin-bottom: 1rem;
}

.game-desc {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.game-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  background: var(--color-surface);
  border-radius: 4px;
  color: var(--color-text-muted);
}

.game-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  background: var(--color-surface);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.game-visual-inner {
  text-align: center;
  padding: 2rem;
}

.game-visual-logo {
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.game-visual-logo .red { color: var(--color-accent); }

.game-visual-sub {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.games-coming {
  margin-top: 2rem;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  padding: 2rem;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
}

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

  .game-visual {
    order: -1;
    min-height: 180px;
  }
}

/* --- Company Info --- */
.company-info {
  background: var(--color-bg-alt);
  position: relative;
  isolation: isolate;
}

.company-info::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, var(--color-bg) 0%, transparent 5rem),
    linear-gradient(to top,    var(--color-bg) 0%, transparent 5rem);
  pointer-events: none;
  z-index: -1;
}

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

.info-card {
  padding: 1.75rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.info-card dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.info-card dd {
  font-size: 1rem;
  color: #fff;
  font-weight: 500;
}

.info-card dd small {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 400;
  margin-top: 0.25rem;
}

/* --- Contact --- */
.contact {
  background: var(--color-bg);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-method {
  padding: 1.25rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.contact-method dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
}

.contact-method dd a {
  font-weight: 500;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.contact-form > * {
  width: 100%;
}

.contact-form > .btn {
  width: auto;
}

.field-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  margin: -1px;
  padding: 0;
}

.turnstile-wrap {
  margin-top: 0.25rem;
}

.form-alert {
  min-height: 1.2rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0;
}

.form-alert.is-error {
  color: #ff8e8e;
}

.form-alert.is-success {
  color: #9adf9a;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 0.75rem 1rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition);
}

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

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Footer --- */
.site-footer {
  background: var(--color-bg-alt);
  padding: 3rem 0 2rem;
  position: relative;
  isolation: isolate;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5rem;
  background: linear-gradient(to bottom, var(--color-bg), transparent);
  pointer-events: none;
  z-index: -1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-top: 0.75rem;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.footer-links a:hover { color: #fff; }

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 0;
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom-links a {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* --- Page Header (for subpages) --- */
.page-header {
  padding: 8rem 0 3rem;
  background: var(--color-bg-alt);
  position: relative;
  isolation: isolate;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4rem;
  background: linear-gradient(to top, var(--color-bg), transparent);
  pointer-events: none;
  z-index: -1;
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-header .subtitle {
  color: var(--color-text-muted);
  font-size: 1.1rem;
}

/* --- Legal / Prose Content --- */
.prose {
  max-width: 760px;
  padding: 3rem 0 5rem;
}

.prose h2 {
  font-size: 1.4rem;
  margin: 2.5rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.prose h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.prose h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.75rem;
}

.prose p, .prose li {
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.prose ul, .prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose strong {
  color: var(--color-text);
}

/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-muted { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

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

  .hero-canvas {
    opacity: 0.5;
  }
}

/* --- Grid pattern background for game visual --- */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

/* --- Geometric accent shapes --- */
.geo-accent {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.04;
  background: var(--color-accent);
}

/* --- Contact page standalone --- */
.contact-page {
  padding: 3rem 0 5rem;
}

.contact-page .contact-grid {
  max-width: 900px;
}
