/* ============================================
   Wall Street Raider - Website Styles
   ============================================ */

/* --- Design Tokens (CSS Variables) --- */
:root {
  /* Backgrounds */
  --bg-primary: #0b1120;
  --bg-secondary: #111827;
  --bg-card: #1a2332;
  --bg-hover: #243044;
  --bg-overlay: rgba(11, 17, 32, 0.85);

  /* Text */
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-heading: #f1f5f9;
  --text-muted: #64748b;

  /* Accents (derived from game UI) */
  --accent-cyan: #22d3ee;
  --accent-green: #22c55e;
  --accent-red: #ef4444;
  --accent-amber: #f59e0b;
  --accent-purple: #a855f7;

  /* Borders */
  --border-subtle: #1e293b;
  --border-accent: #334155;

  /* Typography */
  --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-story: 'Georgia', 'Times New Roman', serif;

  /* Sizing */
  --max-width: 1200px;
  --max-width-narrow: 800px;
  --section-padding: clamp(3rem, 8vh, 6rem);
  --nav-height: 64px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

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

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

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

a:hover {
  color: #67e8f9; /* lighter cyan */
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-heading);
  line-height: 1.2;
  font-weight: 700;
}

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

p {
  margin-bottom: 1em;
  color: var(--text-primary);
}

.text-mono {
  font-family: var(--font-mono);
}

.text-cyan { color: var(--accent-cyan); }
.text-green { color: var(--accent-green); }
.text-amber { color: var(--accent-amber); }
.text-muted { color: var(--text-secondary); }

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

.container-narrow {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--section-padding) 0;
}

.section-alt {
  background-color: var(--bg-secondary);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-overlay);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  transition: background var(--transition-base);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-heading);
}

.nav-logo img {
  height: 32px;
  width: auto;
}

.nav-logo:hover {
  color: var(--text-heading);
}

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

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-heading);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.nav-hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 1.5rem;
  z-index: 999;
}

.nav-mobile.open {
  display: block;
}

.nav-mobile a {
  display: block;
  padding: 0.75rem 0;
  color: var(--text-secondary);
  font-size: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.nav-mobile a:last-child {
  border-bottom: none;
}

.nav-mobile a:hover {
  color: var(--text-heading);
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .nav-hamburger {
    display: flex;
  }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  line-height: 1;
}

.btn-steam {
  background: var(--accent-green);
  color: #fff;
}

.btn-steam:hover {
  background: #16a34a;
  color: #fff;
  transform: translateY(-1px);
}

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

.btn-outline:hover {
  background: var(--bg-hover);
  border-color: var(--text-secondary);
  color: var(--text-heading);
}

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

.btn-cyan:hover {
  background: var(--accent-cyan);
  color: var(--bg-primary);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
}

/* Animated grid overlay */
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 2rem 1.5rem;
}

.hero-tagline {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
}

.hero h1 {
  margin-bottom: 1rem;
  font-weight: 800;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-steam {
  margin-top: 2rem;
}

.hero-steam iframe {
  border: none;
  border-radius: 8px;
  max-width: 100%;
}

/* Hero screenshot showcase */
.hero-showcase {
  position: relative;
  z-index: 4;
  width: 100%;
  max-width: 1100px;
  padding: 0 1.5rem 4rem;
  margin-top: 3rem;
}

.hero-screenshot {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-accent);
  box-shadow:
    0 0 40px rgba(34, 211, 238, 0.08),
    0 0 80px rgba(34, 211, 238, 0.04),
    0 20px 60px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.hero-screenshot:hover {
  border-color: var(--accent-cyan);
  box-shadow:
    0 0 40px rgba(34, 211, 238, 0.15),
    0 0 80px rgba(34, 211, 238, 0.08),
    0 20px 60px rgba(0, 0, 0, 0.5);
}

.hero-screenshot img {
  width: 100%;
  display: block;
}

/* Gradient fade at bottom of hero */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(transparent, var(--bg-primary));
  z-index: 3;
  pointer-events: none;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 2rem;
  transition: border-color var(--transition-base), transform var(--transition-base);
}

.feature-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.feature-stat {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
}

.feature-card h3 {
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 0;
}

@media (max-width: 960px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* --- Screenshot Gallery --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  transition: border-color var(--transition-base);
}

.gallery-item:hover {
  border-color: var(--accent-cyan);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11, 17, 32, 0.3);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.gallery-item:hover::after {
  opacity: 1;
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: var(--text-primary);
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}

/* --- Quotes / Testimonials --- */
.quote-card {
  background: var(--bg-card);
  border-left: 3px solid var(--accent-cyan);
  border-radius: 0 8px 8px 0;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
}

.quote-card blockquote {
  font-size: 1.0625rem;
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.quote-card cite {
  font-style: normal;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* --- Video Section --- */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  padding: var(--section-padding) 0;
  position: relative;
}

.cta-section h2 {
  margin-bottom: 1rem;
}

.cta-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  transition: color var(--transition-fast);
}

.cta-link:hover {
  color: var(--accent-cyan);
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0 2rem;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  list-style: none;
}

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

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

.footer-copy {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.footer-disclaimer {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0.5rem;
  font-style: italic;
}

/* --- Section Headers --- */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  max-width: 600px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}

/* --- Divider --- */
.divider {
  width: 60px;
  height: 2px;
  background: var(--accent-cyan);
  margin: 0 auto 2rem;
  opacity: 0.5;
}

/* --- Story Page Specific --- */
.story-body {
  font-family: var(--font-story);
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.story-body h3 {
  font-family: var(--font-heading);
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.story-body p {
  margin-bottom: 1.25em;
}

.story-body blockquote {
  background: var(--bg-card);
  border-left: 3px solid var(--accent-cyan);
  border-radius: 0 8px 8px 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
}

.story-body blockquote p {
  margin-bottom: 0.5em;
}

.story-body blockquote p:last-child {
  margin-bottom: 0;
}

.story-title {
  text-align: center;
  padding: 4rem 0 2rem;
}

.story-title h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.5rem;
}

.story-title .subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
  font-style: italic;
}

/* Pull quote - for standout quotes in the story */
.pull-quote {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--accent-cyan);
  text-align: center;
  padding: 2rem 0;
  margin: 2rem 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  font-style: normal;
  line-height: 1.5;
}

/* --- Story Images --- */
.story-image {
  margin: 2rem auto;
  text-align: center;
}

.story-image img {
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
}

.story-image figcaption {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.75rem;
  font-style: italic;
}

.story-image.full {
  width: 100%;
}

.story-image.medium {
  max-width: 80%;
}

.story-image.small {
  max-width: 60%;
}

.story-image.portrait {
  max-width: 50%;
}

.story-image-pair {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.story-image-pair img {
  flex: 1;
  min-width: 0;
}

.placeholder-box {
  background: var(--bg-card);
  border: 2px dashed var(--border-accent);
  border-radius: 6px;
  padding: 3rem 2rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.875rem;
}

@media (max-width: 640px) {
  .story-image.medium,
  .story-image.small,
  .story-image.portrait {
    max-width: 100%;
  }

  .story-image-pair {
    flex-direction: column;
  }
}

/* --- Story Stats Card --- */
.story-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2.5rem 0;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

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

.story-stat-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-cyan);
  display: block;
}

.story-stat-label {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  display: block;
}

/* --- Story Mid-page CTA --- */
.story-cta {
  text-align: center;
  margin: 3rem 0;
  padding: 2.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.story-cta p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

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

@media (max-width: 640px) {
  .story-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Testimonials Page --- */
.testimonials-featured {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.testimonial-featured {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-cyan);
  border-radius: 0 8px 8px 0;
  padding: 2rem 2.5rem;
  position: relative;
}

.testimonial-featured blockquote {
  font-size: 1.0625rem;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.testimonial-featured blockquote p {
  margin-bottom: 0.75em;
}

.testimonial-featured blockquote p:last-child {
  margin-bottom: 0;
}

.testimonial-featured cite {
  display: block;
  font-style: normal;
  font-weight: 600;
  color: var(--text-heading);
  font-size: 0.9375rem;
  margin-top: 1rem;
}

.testimonial-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.testimonial-note {
  font-size: 0.8125rem;
  color: var(--accent-amber);
  font-style: italic;
  margin-top: 1rem;
  margin-bottom: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.testimonials-grid .quote-card {
  margin-bottom: 0;
}

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

  .testimonial-featured {
    padding: 1.5rem;
  }
}

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

/* Spacer for fixed nav */
.nav-spacer {
  height: var(--nav-height);
}
