/* ========================================
   EMBERFALL 40K - Volcanic Theme Styles
   Naming: volcanic/magma/lava/ember theme
   ======================================== */

:root {
  --ember-primary: #E8820C;
  --ember-gold: #F5A623;
  --magma-purple: #9B4DCA;
  --magma-deep: #7B2D8E;
  --lava-red: #D32F2F;
  --lava-bright: #FF5722;
  --volcanic-dark: #0D0D1A;
  --volcanic-charcoal: #1A1A2E;
  --volcanic-slate: #16213E;
  --ash-light: #E8E8E8;
  --ash-medium: #A0A0A0;
  --ash-dim: #666666;
  --eruption-glow: rgba(232, 130, 12, 0.3);
  --type-display: 'Segoe UI', Tahoma, Geneva, sans-serif;
  --type-body: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --section-gap: 4rem;
  --content-max: 1200px;
  --radius-soft: 8px;
  --radius-round: 16px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--type-body);
  background: var(--volcanic-dark);
  color: var(--ash-light);
  line-height: 1.7;
  padding-top: 100px;
  min-height: 100vh;
}

/* ========================================
   RESPONSIBLE GAMBLING BANNER
   ======================================== */
.rg-strip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: linear-gradient(90deg, var(--volcanic-charcoal), var(--volcanic-slate));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 2000;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(232, 130, 12, 0.2);
}

.rg-strip span {
  color: var(--ash-medium);
}

.rg-strip a {
  color: var(--ember-gold);
  text-decoration: none;
  transition: color 0.2s;
}

.rg-strip a:hover {
  color: var(--ember-primary);
  text-decoration: underline;
}

/* ========================================
   HEADER / NAVIGATION
   ======================================== */
.volcano-header {
  position: fixed;
  top: 36px;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(13, 13, 26, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(232, 130, 12, 0.15);
}

.volcano-header .header-wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.volcano-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.volcano-logo img {
  height: 50px;
  width: auto;
}

.volcano-logo span {
  font-family: var(--type-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ember-gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.magma-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.magma-nav a {
  color: var(--ash-light);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.2s;
}

.magma-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--ember-primary);
  transition: width 0.3s;
}

.magma-nav a:hover {
  color: var(--ember-gold);
}

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

.mobile-trigger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-trigger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ash-light);
  transition: all 0.3s;
}

/* ========================================
   HERO SECTION - Split Layout
   ======================================== */
.eruption-hero {
  padding: 3rem 1.5rem 4rem;
  background: linear-gradient(135deg, var(--volcanic-dark) 0%, var(--volcanic-charcoal) 50%, var(--volcanic-slate) 100%);
  position: relative;
  overflow: hidden;
}

.eruption-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 80% 20%, var(--eruption-glow) 0%, transparent 50%);
  pointer-events: none;
}

.hero-split {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  font-family: var(--type-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--ash-light);
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

.hero-content h1 .ember-highlight {
  color: var(--ember-gold);
  text-shadow: 0 0 30px var(--eruption-glow);
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--ash-medium);
  margin-bottom: 2rem;
  max-width: 500px;
}

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

.cta-molten {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-soft);
  transition: all 0.3s;
  cursor: pointer;
  border: none;
  min-width: 180px;
}

.cta-molten.primary {
  background: linear-gradient(135deg, var(--ember-primary), var(--lava-bright));
  color: #fff;
  box-shadow: 0 4px 20px var(--eruption-glow);
}

.cta-molten.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px var(--eruption-glow);
}

.cta-molten.secondary {
  background: transparent;
  color: var(--ember-gold);
  border: 2px solid var(--ember-gold);
}

.cta-molten.secondary:hover {
  background: rgba(232, 130, 12, 0.1);
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-round);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ========================================
   CONTENT SECTIONS
   ======================================== */
.lava-section {
  padding: var(--section-gap) 1.5rem;
  max-width: var(--content-max);
  margin: 0 auto;
}

.lava-section h2 {
  font-family: var(--type-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--ash-light);
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.lava-section h2 .accent {
  color: var(--ember-gold);
}

.lava-section h3 {
  font-family: var(--type-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ember-gold);
  margin-bottom: 0.75rem;
}

.lava-section p {
  margin-bottom: 1.25rem;
  color: var(--ash-light);
}

.lava-section p:last-child {
  margin-bottom: 0;
}

/* ========================================
   TABLES
   ======================================== */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
}

.ember-table {
  width: 100%;
  min-width: 500px;
  border-collapse: collapse;
  background: var(--volcanic-charcoal);
  border-radius: var(--radius-soft);
  overflow: hidden;
}

.ember-table thead {
  background: linear-gradient(90deg, var(--ember-primary), var(--lava-red));
}

.ember-table th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 600;
  color: #fff;
  font-size: 0.95rem;
}

.ember-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(232, 130, 12, 0.1);
  font-size: 0.95rem;
}

.ember-table tbody tr:nth-child(even) {
  background: rgba(232, 130, 12, 0.03);
}

.ember-table tbody tr:hover {
  background: rgba(232, 130, 12, 0.08);
}

.ember-table .highlight {
  color: var(--ember-gold);
  font-weight: 600;
}

/* ========================================
   FEATURE CARDS
   ======================================== */
.magma-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.magma-card {
  background: var(--volcanic-charcoal);
  border: 1px solid rgba(232, 130, 12, 0.15);
  border-radius: var(--radius-soft);
  padding: 1.5rem;
  transition: all 0.3s;
}

.magma-card:hover {
  border-color: var(--ember-primary);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.magma-card h4 {
  font-family: var(--type-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ember-gold);
  margin-bottom: 0.75rem;
}

.magma-card p {
  font-size: 0.95rem;
  color: var(--ash-medium);
  margin: 0;
}

/* ========================================
   FAQ SECTION
   ======================================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--volcanic-charcoal);
  border: 1px solid rgba(232, 130, 12, 0.1);
  border-radius: var(--radius-soft);
  padding: 1.5rem;
}

.faq-item h3 {
  font-size: 1.1rem;
  color: var(--ember-gold);
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.faq-item p {
  margin: 0;
  color: var(--ash-light);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ========================================
   SCREENSHOT GALLERY
   ======================================== */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.screenshot-item {
  position: relative;
  border-radius: var(--radius-soft);
  overflow: hidden;
}

.screenshot-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s;
}

.screenshot-item:hover img {
  transform: scale(1.03);
}

.screenshot-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  font-size: 0.9rem;
  color: var(--ash-light);
}

/* ========================================
   CTA BANNER
   ======================================== */
.cta-banner {
  background: linear-gradient(135deg, var(--volcanic-charcoal), var(--volcanic-slate));
  border: 1px solid rgba(232, 130, 12, 0.2);
  border-radius: var(--radius-round);
  padding: 2.5rem;
  text-align: center;
  margin: 2rem 0;
}

.cta-banner h3 {
  font-family: var(--type-display);
  font-size: 1.5rem;
  color: var(--ash-light);
  margin-bottom: 1rem;
}

.cta-banner p {
  color: var(--ash-medium);
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-banner .cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   FOOTER
   ======================================== */
.volcanic-footer {
  background: var(--volcanic-charcoal);
  border-top: 1px solid rgba(232, 130, 12, 0.1);
  padding: 3rem 1.5rem 1.5rem;
  margin-top: var(--section-gap);
}

.footer-wrap {
  max-width: var(--content-max);
  margin: 0 auto;
}

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

.footer-brand p {
  color: var(--ash-medium);
  font-size: 0.9rem;
  margin-top: 1rem;
  max-width: 300px;
}

.footer-links h4,
.footer-rg h4 {
  font-family: var(--type-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ember-gold);
  margin-bottom: 1rem;
}

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

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

.footer-links a {
  color: var(--ash-medium);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--ember-gold);
}

.footer-rg p {
  color: var(--ash-medium);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.rg-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.rg-links a {
  color: var(--ember-gold);
  text-decoration: none;
  font-size: 0.85rem;
}

.rg-links a:hover {
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(232, 130, 12, 0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  color: var(--ash-medium);
  font-size: 0.85rem;
  margin: 0;
}

.footer-bottom nav a {
  color: var(--ash-medium);
  text-decoration: none;
  font-size: 0.85rem;
  margin-left: 1.5rem;
}

.footer-bottom nav a:hover {
  color: var(--ember-gold);
}

/* ========================================
   DEMO MODAL
   ======================================== */
.demo-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 3000;
  align-items: center;
  justify-content: center;
}

.demo-overlay.active {
  display: flex;
}

.demo-container {
  position: relative;
  width: 95%;
  max-width: 1200px;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--radius-soft);
  overflow: hidden;
}

.demo-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.demo-close {
  position: absolute;
  top: -50px;
  right: 0;
  width: 44px;
  height: 44px;
  background: rgba(232, 130, 12, 0.2);
  border: 1px solid var(--ember-primary);
  border-radius: 50%;
  color: var(--ash-light);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.demo-close:hover {
  background: var(--ember-primary);
}

/* ========================================
   MOBILE STICKY CTA
   ======================================== */
.mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--volcanic-charcoal);
  border-top: 1px solid var(--ember-primary);
  padding: 0.75rem 1rem;
  z-index: 1500;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
}

.mobile-cta-bar a {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.875rem;
  background: linear-gradient(135deg, var(--ember-primary), var(--lava-bright));
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-soft);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 900px) {
  .hero-split {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    order: 2;
  }

  .hero-visual {
    order: 1;
  }

  .hero-tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 90px;
    padding-bottom: 70px;
  }

  .magma-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--volcanic-charcoal);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
    border-bottom: 1px solid rgba(232, 130, 12, 0.15);
  }

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

  .magma-nav a {
    padding: 1rem;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(232, 130, 12, 0.1);
  }

  .mobile-trigger {
    display: flex;
  }

  .mobile-trigger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-trigger.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-trigger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .mobile-cta-bar {
    display: block;
  }

  .table-wrap {
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .cta-molten {
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-bottom nav a {
    margin: 0 0.75rem;
  }
}

@media (max-width: 480px) {
  .rg-strip {
    font-size: 0.75rem;
    padding: 0 0.5rem;
    gap: 0.5rem;
  }

  .eruption-hero {
    padding: 2rem 1rem 3rem;
  }

  .lava-section {
    padding: 3rem 1rem;
  }

  .screenshot-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
  .volcano-header,
  .rg-strip,
  .volcanic-footer,
  .demo-overlay,
  .mobile-cta-bar,
  .cta-molten {
    display: none !important;
  }

  body {
    padding: 0;
    background: #fff;
    color: #000;
  }

  .lava-section {
    padding: 1rem 0;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }
}

/* ========================================
   FOCUS STYLES (Accessibility)
   ======================================== */
:focus-visible {
  outline: 3px solid var(--ember-gold);
  outline-offset: 2px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--ember-gold);
  outline-offset: 2px;
}
