/* ============================================================
   MEGALIGHT GAMES — Global Stylesheet
   Color palette: warm dark bg · orange primary · teal tertiary
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Crimson+Pro:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Barlow+Condensed:wght@300;400;500;600;700&display=swap');

/* ------------------------------------------------------------
   CSS CUSTOM PROPERTIES
   ------------------------------------------------------------ */
:root {
  /* Backgrounds — warm dark */
  --bg-base:        #0d0a08;
  --bg-surface:     #141009;
  --bg-raised:      #1c160f;
  --bg-highlight:   #241d14;

  /* Primary — orange / ember */
  --orange:         #e8520a;
  --orange-bright:  #f46d28;
  --orange-dim:     #a33a06;
  --orange-glow:    rgba(232, 82, 10, 0.12);
  --orange-border:  rgba(232, 82, 10, 0.25);
  --orange-border-strong: rgba(232, 82, 10, 0.55);

  /* Secondary — warm off-white / parchment */
  --parchment:      #f2e8d9;
  --parchment-dim:  #b8a898;
  --parchment-muted:#7a6e62;

  /* Tertiary — teal (used sparingly) */
  --teal:           #3fb9d4;
  --teal-dim:       #2a8fa3;
  --teal-border:    rgba(63, 185, 212, 0.2);

  /* Text */
  --text-primary:   #f0e6d8;
  --text-secondary: #b8a898;
  --text-muted:     #7a6e62;

  /* Borders */
  --border:         rgba(232, 82, 10, 0.15);
  --border-strong:  rgba(232, 82, 10, 0.35);
  --border-subtle:  rgba(255, 255, 255, 0.05);

  /* Typography */
  --font-display:   'Cinzel', serif;
  --font-body:      'Crimson Pro', serif;
  --font-ui:        'Barlow Condensed', sans-serif;

  /* Spacing */
  --section-pad:    clamp(72px, 10vw, 120px) 4vw;
  --content-max:    1100px;
  --content-narrow: 720px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.75;
  overflow-x: hidden;
}

/* Warm grain overlay — subtle texture across all pages */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.6;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ------------------------------------------------------------
   NAVIGATION
   ------------------------------------------------------------ */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4vw;
  height: 66px;
  background: rgba(13, 10, 8, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo img {
  height: 36px;
  width: 36px;
  object-fit: contain;
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--orange-bright); }

.nav-links a.active { color: var(--orange); }

/* ------------------------------------------------------------
   PAGE WRAPPER
   ------------------------------------------------------------ */
.page-content {
  padding-top: 66px; /* offset fixed nav */
}

/* ------------------------------------------------------------
   SECTION PRIMITIVES
   ------------------------------------------------------------ */
.section {
  padding: var(--section-pad);
}

.section--surface {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section--raised {
  background: var(--bg-raised);
}

.section-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.section-inner--narrow {
  max-width: var(--content-narrow);
  margin: 0 auto;
}

/* ------------------------------------------------------------
   SECTION HEADER
   ------------------------------------------------------------ */
.section-eyebrow {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.section-rule {
  width: 40px;
  height: 2px;
  background: var(--orange);
  margin-bottom: 48px;
}

.section-rule--center {
  margin-left: auto;
  margin-right: auto;
}

.section-lead {
  font-size: 19px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 620px;
}

/* ------------------------------------------------------------
   BUTTONS
   ------------------------------------------------------------ */
.btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 13px 32px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--orange);
  color: var(--bg-base);
}

.btn-primary:hover {
  background: var(--orange-bright);
}

.btn-outline {
  background: transparent;
  color: var(--orange);
  border: 1px solid var(--orange-border-strong);
}

.btn-outline:hover {
  background: var(--orange-glow);
  border-color: var(--orange);
}

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

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--bg-highlight);
}

/* ------------------------------------------------------------
   CARDS
   ------------------------------------------------------------ */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  transition: border-color 0.25s;
}

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

.card--accent {
  border-left: 3px solid var(--orange);
}

/* ------------------------------------------------------------
   GAME CARDS
   ------------------------------------------------------------ */
.game-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}

.game-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.game-card__banner {
  height: 180px;
  background: var(--bg-highlight);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 24px;
}

.game-card__badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 4px 10px;
}

.game-card__badge--active {
  background: var(--orange);
  color: var(--bg-base);
}

.game-card__badge--concept {
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--teal-border);
}

.game-card__body {
  padding: 28px;
}

.game-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.game-card__genre {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 14px;
}

.game-card__desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 22px;
}

.game-card__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 3px 10px;
  background: var(--bg-surface);
}

/* ------------------------------------------------------------
   DIVIDER
   ------------------------------------------------------------ */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------ */
.site-footer {
  background: var(--bg-base);
  border-top: 1px solid var(--border);
  padding: 36px 4vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo img {
  height: 24px;
  width: 24px;
  object-fit: contain;
  opacity: 0.5;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}

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

.footer-copy {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  opacity: 0.5;
}

/* ------------------------------------------------------------
   SOCIAL ICONS
   ------------------------------------------------------------ */
.social-links {
  display: flex;
  gap: 12px;
  align-items: center;
}

.social-link {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s;
}

.social-link:hover {
  border-color: var(--orange-border-strong);
  color: var(--orange);
  background: var(--orange-glow);
}

.social-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ------------------------------------------------------------
   SCROLL ENTRANCE ANIMATION
   ------------------------------------------------------------ */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }

/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  .nav-links { display: none; }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}
