/* ===== Triumph Guides — black & gold ===== */

@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --c-black: #000000;
  --c-gold: #d4af37;
  --c-gold-bright: #e8c547;
  --c-gold-dark: #a8841a;
  --c-gold-pale: #f5e6b8;
  --c-white: #ffffff;

  --bg: #000000;
  --bg-raised: #0a0a0a;
  --bg-panel: #0f0f0f;
  --line: rgba(212, 175, 55, 0.12);
  --line-strong: rgba(212, 175, 55, 0.22);
  --text-gold: #d4af37;
  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.78);
  --text-faint: rgba(255, 255, 255, 0.48);
  --accent: #d4af37;
  --accent-bright: #e8c547;
  --accent-glow: rgba(212, 175, 55, 0.28);
  --accent-soft: rgba(212, 175, 55, 0.1);
  --warm: #d4af37;
  --warm-soft: rgba(212, 175, 55, 0.1);
  --tan: #e8c547;
  --font-display: 'Exo 2', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --header-h: 64px;
  --container: 1200px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 10px;

  /* legacy aliases */
  --bg-primary: var(--bg);
  --bg-secondary: var(--bg-raised);
  --bg-elevated: var(--bg-panel);
  --bg-card: var(--bg-panel);
  --border-subtle: var(--line);
  --border-medium: var(--line-strong);
  --text-primary: var(--text-gold);
  --text-secondary: var(--text-soft);
  --text-muted: var(--text-faint);
  --accent-hover: var(--accent-bright);
  --accent-muted: var(--accent-soft);
  --header-height: var(--header-h);
  --section-gap: 5rem;
  --transition: 0.2s var(--ease);
  --radius-sm: 6px;
  --radius-md: var(--radius);
  --radius-lg: 14px;
  --badge-new: #8fbc8f;
  --badge-featured: var(--accent);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  background: #000000;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  background: #000000;
  color: var(--text);
  line-height: 1.65;
  font-size: 0.9375rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, h4,
.section-label,
.logo-text,
.hero-stat-value,
.feature-num,
.game-card h3,
.section-intro h2,
.community-content h2,
.footer-col h4 {
  color: var(--text-gold);
}

.hero h1 em {
  color: var(--c-white);
  text-shadow: 0 0 32px var(--accent-glow);
}

p, .hero-subtitle, .section-subtitle,
.game-card p, .feature-card p,
.footer-tagline, .footer-col a,
.hero-stat-label {
  color: var(--text-soft);
}

.game-link, .main-nav a:hover,
.footer-col a:hover, .hub-view-all {
  color: var(--text-gold);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(212, 175, 55, 0.12), transparent 55%),
    radial-gradient(ellipse 40% 40% at 100% 50%, rgba(212, 175, 55, 0.05), transparent 50%),
    radial-gradient(ellipse 35% 35% at 0% 80%, rgba(212, 175, 55, 0.06), transparent 45%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body > * { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.15;
}

::selection {
  background: rgba(212, 175, 55, 0.35);
  color: #fff;
}

/* ---- Header ---- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1.5rem;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  min-width: 0;
}

.logo-icon { display: none; }

.main-nav { display: flex; gap: 1.75rem; }

.main-nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  transition: color var(--transition);
}

.main-nav a:hover { color: var(--warm); }

.header-actions { display: flex; align-items: center; gap: 0.625rem; }

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin: -8px;
  flex-shrink: 0;
}

.mobile-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5625rem 1.125rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.btn-lg { padding: 0.75rem 1.375rem; }

.btn-primary {
  background: var(--c-gold);
  color: #1a1408;
  border-color: var(--c-gold);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
}

.btn-outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text-gold);
}

.btn-outline:hover {
  border-color: var(--c-gold-bright);
  color: var(--c-white);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
}

.btn-ghost:hover { color: var(--text); }

/* ---- Badges ---- */

.badge {
  display: inline-flex;
  padding: 0.2rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 4px;
}

.badge-new {
  background: rgba(126, 200, 163, 0.15);
  color: var(--badge-new);
  border: 1px solid rgba(126, 200, 163, 0.3);
}

.badge-early {
  background: rgba(212, 175, 55, 0.12);
  color: var(--c-gold-bright);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.badge-soon {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-faint);
  border: 1px solid var(--line);
}

.badge-featured {
  background: var(--warm-soft);
  color: var(--accent);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.game-card--soon { opacity: 0.85; }
.game-card--soon:hover .game-card-media img { transform: none; }

/* ---- Home hero (Sirin cinematic) ---- */

.hero {
  position: relative;
  padding-top: var(--header-h);
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #000000;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 40%, rgba(212, 175, 55, 0.1), transparent 45%),
    radial-gradient(circle at 30% 70%, rgba(212, 175, 55, 0.04), transparent 40%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 4rem 0 5rem;
  width: 100%;
}

.section-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1rem;
  line-height: 1.75;
  max-width: 32rem;
  margin-bottom: 2rem;
}

.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.hero-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 60px rgba(212, 175, 55, 0.1);
  background: #000000;
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  object-position: center center;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), transparent 50%);
}

.hero-visual-caption {
  position: absolute;
  bottom: 1rem;
  left: 1.25rem;
  z-index: 1;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.hero-stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hero-stat-label {
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ---- Games grid ---- */

.games-section {
  padding: var(--section-gap) 0;
  background: #000000;
}

.section-intro {
  margin-bottom: 2.5rem;
}

.section-intro h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.625rem;
}

.section-intro--center { text-align: center; }

.section-subtitle {
  color: var(--text-soft);
  font-size: 0.9375rem;
  max-width: 36rem;
  line-height: 1.7;
}

.section-intro--center .section-subtitle { margin-inline: auto; }

.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.game-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.game-card:hover {
  border-color: rgba(212, 175, 55, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), 0 0 24px var(--accent-glow);
}

.game-card-media {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  transition: transform 0.4s var(--ease);
}

.game-card:hover .game-card-media img { transform: scale(1.04); }

.game-card-body { padding: 1.375rem 1.5rem 1.5rem; flex: 1; display: flex; flex-direction: column; }

.game-card-meta {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.625rem;
}

.game-card-genre {
  font-size: 0.6875rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.game-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: 0.04em;
}

.game-card p {
  font-size: 0.875rem;
  color: var(--text-soft);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1rem;
}

.game-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--warm);
}

/* ---- Features ---- */

.features-section {
  padding: var(--section-gap) 0;
  background: #000000;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.feature-card {
  padding: 1.5rem;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.feature-num {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--c-gold);
  margin-bottom: 0.875rem;
}

.feature-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: 0.04em;
}

.feature-card p {
  font-size: 0.8125rem;
  color: var(--text-soft);
  line-height: 1.65;
}

/* ---- Community ---- */

.community-section {
  padding: var(--section-gap) 0;
  background: #000000;
  border-top: 1px solid var(--line);
}

.community-panel {
  padding: 2.5rem;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: block;
}

.community-content h2 {
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.community-content p {
  color: var(--text-soft);
  margin-bottom: 1.5rem;
  line-height: 1.75;
  max-width: 32rem;
}

.community-visual { display: none; }

.community-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ---- Footer ---- */

.site-footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--line);
  background: #000000;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.footer-tagline {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-faint);
  line-height: 1.6;
  max-width: 22rem;
}

.footer-col h4 {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 0.875rem;
}

.footer-col { display: flex; flex-direction: column; gap: 0.5rem; }

.footer-col a {
  font-size: 0.8125rem;
  color: var(--text-soft);
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--warm); }

.footer-bottom { padding-top: 1.5rem; }

.footer-bottom p {
  font-size: 0.75rem;
  color: var(--text-faint);
  text-align: center;
}

/* ---- Theme toggle + mobile drawer ---- */

.tg-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
}

.tg-theme-toggle:hover { border-color: var(--c-gold); color: var(--c-gold-bright); }

.tg-theme-toggle-track { position: relative; width: 1rem; height: 1rem; }
.tg-theme-icon { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 0.2s; }
.tg-theme-icon--sun { opacity: 0; }
.tg-theme-icon--moon { opacity: 1; }
html[data-theme="light"] .tg-theme-icon--sun { opacity: 1; }
html[data-theme="light"] .tg-theme-icon--moon { opacity: 0; }

.tg-mobile-drawer[hidden] { display: none; }
.tg-mobile-drawer {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}
.tg-mobile-drawer-panel {
  position: absolute; top: 0; right: 0;
  width: min(88vw, 300px); height: 100%;
  padding: 1.25rem;
  background: var(--bg-panel);
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 1rem;
}
.tg-mobile-drawer-head { display: flex; justify-content: space-between; align-items: center; }
.tg-mobile-drawer-title { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }
.tg-mobile-drawer-close { background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }
.tg-mobile-drawer-nav { display: flex; flex-direction: column; gap: 0.25rem; }
.tg-mobile-drawer-nav a { padding: 0.75rem; border-radius: var(--radius-sm); color: var(--text-soft); font-weight: 500; }
.tg-mobile-drawer-nav a:hover { background: var(--accent-soft); color: var(--text); }
.tg-mobile-drawer-divider { margin-top: 0.5rem; padding: 0.5rem 0.75rem; font-size: 0.625rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }
.tg-mobile-drawer-actions { margin-top: auto; display: flex; flex-direction: column; gap: 0.5rem; }
.tg-mobile-drawer-actions .btn { width: 100%; }
body.tg-mobile-open { overflow: hidden; }

.mobile-menu-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-btn.is-open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu-btn span { transition: transform 0.2s, opacity 0.2s; }

.hub-header-tools { display: flex; align-items: center; gap: 0.5rem; }

/* Light toggle — keep black & gold (no cream backgrounds) */
html[data-theme="light"] {
  color-scheme: dark;
  --bg: #000000;
  --bg-raised: #0a0a0a;
  --bg-panel: #0f0f0f;
  --line: rgba(212, 175, 55, 0.12);
  --line-strong: rgba(212, 175, 55, 0.22);
  --text-gold: #d4af37;
  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.78);
  --text-faint: rgba(255, 255, 255, 0.48);
  --accent: #d4af37;
  --accent-bright: #e8c547;
}

/* ---- Responsive ---- */

@media (max-width: 1024px) {
  :root { --section-gap: 4rem; }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: none; width: 100%; }
  .games-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root {
    --header-h: 56px;
    --section-gap: 3.25rem;
  }

  .main-nav, .header-actions { display: none; }
  .mobile-menu-btn { display: flex; }
  .header-inner { gap: 0.75rem; }
  .logo-text { font-size: 0.75rem; letter-spacing: 0.14em; }

  .hero {
    min-height: auto;
    align-items: stretch;
  }

  .hero-inner {
    padding: 2rem 0 2.75rem;
    gap: 1.75rem;
  }

  .hero h1 { font-size: clamp(1.75rem, 8vw, 2.5rem); }
  .hero-subtitle { font-size: 0.9375rem; margin-bottom: 1.5rem; }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn { width: 100%; }

  .hero-stats {
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
  }

  .hero-stat-value { font-size: 1.25rem; }

  .games-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }

  .community-panel { padding: 1.5rem; }
  .section-intro h2 { font-size: clamp(1.25rem, 5vw, 1.75rem); }
}

@media (max-width: 480px) {
  :root { --gutter: 1rem; }

  .hero-inner { padding: 1.5rem 0 2.25rem; }
  .game-card-body { padding: 1.125rem 1.25rem 1.25rem; }
  .feature-card { padding: 1.25rem; }
  .community-panel { padding: 1.25rem; }
  .site-footer { padding: 2.25rem 0 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}
