/* ============================================================
   AG&W Inc. — Synthwave Cyber Mage Theme
   ============================================================ */

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

:root {
  /* Game palette */
  --gold: #D4A017;
  --amber: #C9A227;
  --purple: #9933FF;
  --purple-dim: #6B21A8;
  --green-term: #4DFF4D;
  --fire-red: #FF4444;
  --water-blue: #4488FF;
  --earth-green: #44DD44;
  --gas-yellow: #AADD44;

  /* UI colors */
  --bg-deep: #06020F;
  --bg-section: #0A0516;
  --bg-card: rgba(20, 10, 40, 0.7);
  --text-primary: #E8E0F0;
  --text-secondary: #A090B8;
  --text-dim: #6B5A80;
  --border-glow: rgba(153, 51, 255, 0.3);

  /* Typography */
  --font-body: 'Philosopher', Georgia, serif;
  --font-display: 'VT323', monospace;
  --font-logo: 'Almendra', serif;
}

html {
  scroll-behavior: smooth;
  background: var(--bg-deep);
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-deep);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- Background Canvas --- */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* --- Scanline Overlay --- */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
}

/* --- Layout --- */
main { position: relative; z-index: 2; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  padding: 1rem 1.5rem 3.5rem;
}

.hero-glow {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(153, 51, 255, 0.15) 0%, rgba(153, 51, 255, 0.05) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: glow-pulse 4s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-logo {
  max-width: min(500px, 80vw);
  height: auto;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 40px rgba(153, 51, 255, 0.4)) drop-shadow(0 0 80px rgba(212, 160, 23, 0.2));
  animation: logo-float 6s ease-in-out infinite;
}

@keyframes logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero-video {
  width: min(560px, 90vw);
  aspect-ratio: 16 / 9;
  margin: 0 auto 1rem;
  border: 1px solid var(--border-glow);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(153, 51, 255, 0.25), 0 0 60px rgba(153, 51, 255, 0.1);
}

.hero-video iframe {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-tagline {
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 3rem);
  color: var(--gold);
  text-shadow: 0 0 20px rgba(212, 160, 23, 0.5), 0 0 40px rgba(212, 160, 23, 0.2);
  margin-bottom: 0.6rem;
  letter-spacing: 0.02em;
  font-style: italic;
}

.hero-sub {
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  max-width: 560px;
  margin: 0 auto 1.2rem;
  line-height: 1.7;
}

.hero-ea {
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s ease-in-out infinite;
}

.scroll-arrow {
  font-size: 2rem;
  color: var(--text-dim);
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

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

.btn-steam {
  background: linear-gradient(135deg, #1B2838 0%, #2A475E 100%);
  color: #C7D5E0;
  border: 1px solid rgba(199, 213, 224, 0.2);
  box-shadow: 0 0 20px rgba(27, 40, 56, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn-steam:hover {
  background: linear-gradient(135deg, #2A475E 0%, #3D6B8E 100%);
  color: #fff;
  border-color: rgba(199, 213, 224, 0.4);
  box-shadow: 0 0 30px rgba(42, 71, 94, 0.6), 0 4px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.btn-lg {
  font-size: 1.2rem;
  padding: 1rem 2.5rem;
}

.steam-icon {
  flex-shrink: 0;
}

.platform-icons {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.6rem;
  color: var(--text-dim);
}

.platform-icons svg {
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.platform-icons svg:hover {
  opacity: 0.85;
}

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

/* --- Section Titles --- */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  text-align: center;
  color: var(--gold);
  text-shadow: 0 0 15px rgba(212, 160, 23, 0.3);
  margin-bottom: 3rem;
  letter-spacing: 0.04em;
}

.glyph {
  color: var(--purple);
  text-shadow: 0 0 10px rgba(153, 51, 255, 0.5);
}

/* --- About --- */
.about { background: var(--bg-section); }

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

.about-text p {
  margin-bottom: 1.2rem;
  color: var(--text-secondary);
  font-size: 1.3rem;
  line-height: 1.5;
}

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

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

.screenshot {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border-glow);
  box-shadow: 0 0 30px rgba(153, 51, 255, 0.15), 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.screenshot:hover {
  transform: scale(1.02);
  box-shadow: 0 0 50px rgba(153, 51, 255, 0.25), 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* --- Features --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 10px;
  padding: 1.8rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 1.4rem;
  align-items: flex-start;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--purple), var(--gold), var(--purple), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  border-color: rgba(153, 51, 255, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(153, 51, 255, 0.15);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 8px rgba(153, 51, 255, 0.3));
}

.feature-icon svg {
  display: block;
}

.feature-text {
  flex: 1;
  min-width: 0;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* --- Specs --- */
.specs { background: var(--bg-section); }

.specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.spec-item {
  padding: 1.8rem 1.2rem;
  border: 1px solid rgba(153, 51, 255, 0.15);
  border-radius: 8px;
  background: var(--bg-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.spec-item:hover {
  transform: translateY(-5px);
  border-color: rgba(212, 160, 23, 0.4);
  box-shadow:
    0 8px 25px rgba(153, 51, 255, 0.2),
    0 0 15px rgba(212, 160, 23, 0.15),
    0 0 40px rgba(153, 51, 255, 0.1),
    inset 0 0 20px rgba(153, 51, 255, 0.03);
}

.spec-label {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.4rem;
  font-weight: 700;
}

.spec-value {
  display: block;
  font-family: var(--font-display);
  font-size: 3.2rem;
  color: var(--gold);
  text-shadow: 0 0 15px rgba(212, 160, 23, 0.3);
  line-height: 1.2;
}

.spec-desc {
  display: block;
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-top: 0.4rem;
  line-height: 1.4;
}

/* --- Bottom CTA --- */
.cta-section {
  padding: 6rem 0;
}

.cta-bottom {
  text-align: center;
}

.cta-icon {
  border-radius: 20px;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 25px rgba(153, 51, 255, 0.3));
}

.cta-heading {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  color: var(--text-primary);
  margin-bottom: 2rem;
  line-height: 1.5;
}

.cta-sub {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: 1.2rem;
  letter-spacing: 0.05em;
}

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid rgba(153, 51, 255, 0.1);
}

.site-footer em {
  color: var(--text-secondary);
}

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

  .about-image { order: -1; }

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

  .feature-card h3 {
    white-space: normal;
  }

  .specs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section { padding: 3.5rem 0; }
}

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

  .hero-logo {
    max-width: 90vw;
  }

  .btn { font-size: 0.95rem; padding: 0.75rem 1.5rem; }
}

/* --- Screenshot Carousel --- */
.carousel {
  position: relative;
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-glow);
  box-shadow: 0 0 20px rgba(153, 51, 255, 0.15);
}

.carousel-track {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.carousel-track img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.7s ease;
  z-index: 0;
}

/* --- Carousel hover bar --- */
.carousel-bar {
  position: absolute;
  bottom: 0.6rem;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(6, 2, 15, 0.8);
  border: 1px solid var(--border-glow);
  border-radius: 6px;
  padding: 0.35rem 0.7rem;
  backdrop-filter: blur(6px);
  z-index: 10;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.carousel:hover .carousel-bar {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.carousel-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem 0.45rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
  line-height: 1;
}

.carousel-btn:hover {
  background: rgba(153, 51, 255, 0.3);
  color: var(--gold);
}

.carousel-zoom {
  margin-left: 0.3rem;
  font-size: 0.9rem;
}

.carousel-counter {
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.85rem;
  min-width: 2.5rem;
  text-align: center;
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 1, 8, 0.92);
  backdrop-filter: blur(8px);
}

.lightbox-img {
  position: relative;
  max-width: 92vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 0 60px rgba(153, 51, 255, 0.3);
}

.lightbox-bar {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(10, 5, 22, 0.85);
  border: 1px solid var(--border-glow);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  backdrop-filter: blur(6px);
}

.lightbox-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
  line-height: 1;
}

.lightbox-btn:hover {
  background: rgba(153, 51, 255, 0.3);
  color: var(--gold);
}

.lightbox-close {
  margin-left: 0.5rem;
}

.lightbox-counter {
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 1rem;
  min-width: 3.5rem;
  text-align: center;
}

/* --- Fade-in animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* --- Selection color --- */
::selection {
  background: rgba(153, 51, 255, 0.4);
  color: #fff;
}
