/* ==========================================================================
   eGames / Swords and Sandals — static rebuild
   Design tokens recovered from The7 theme options + custom CSS:
   bg #000, footer #1a1c20, accent gold #e8b90e, body Raleway #e0e0e0,
   display font Exocet (Adobe Fonts kit tck7jbl), h2 #7b7b7b ls 4px
   ========================================================================== */

:root {
  --bg: #000;
  --panel: #1a1c20;
  --text: #e0e0e0;
  --muted: #7b7b7b;
  --muted-2: #6a6a6a;
  --gold: #e8b90e;
  --line: #656565;
  --header-h: 100px;
  --content-w: 1212px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.7 "Raleway", Helvetica, Arial, sans-serif;
}

img { max-width: 100%; height: auto; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: #fff; }

h1, .h1 {
  font-family: exocet, "Raleway", sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: 38px;
  line-height: 42px;
  color: #fff;
}
h2 {
  color: var(--muted);
  letter-spacing: 4px;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 600;
  text-transform: uppercase;
  margin: 30px 0 8px;
}
h3, h4, h5 { color: #fff; }
h6 { color: var(--muted-2); }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #000;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08), 0 4px 14px rgba(0, 0, 0, .6);
}
.header-bar {
  max-width: var(--content-w);
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.branding { display: flex; align-items: center; }
.branding img { display: block; width: auto; max-height: 44px; }

.main-nav { display: flex; align-items: center; gap: 0; }
.main-nav a {
  display: inline-block;
  margin: 28px 20px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  position: relative;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: -6px;
  height: 2px;
  background: var(--gold);
  transition: right .25s ease;
}
.main-nav a:hover::after { right: 0; }
.main-nav a.nav-steam {
  border: 1px solid var(--gold);
  padding: 5px 20px;
  margin: 0 0 0 20px;
  transition: background .2s ease, color .2s ease;
}
.main-nav a.nav-steam::after { display: none; }
.main-nav a.nav-steam:hover { background: var(--gold); color: #000; }

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  content: "";
  display: block;
  width: 24px; height: 2px;
  background: #fff;
  position: relative;
  transition: transform .2s ease;
}
.menu-toggle span::before { position: absolute; top: -7px; }
.menu-toggle span::after { position: absolute; top: 7px; }

.mobile-nav {
  display: none;
  flex-direction: column;
  background: #0a0a0a;
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 10px 0 20px;
}
.mobile-nav a {
  color: #fff;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.mobile-nav a:hover { color: var(--gold); }

/* -------------------------------------------------------------------- rows */
.vc-row { position: relative; }
.vc-row.has-bg {
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
}
.row-inner {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0 30px;
}
.vc-row.v-middle > .row-inner { align-items: center; }
.vc-row.full-bleed > .row-inner { max-width: none; padding: 0; }

.vc-col { min-width: 0; flex: 1 1 0; }
.vc-col.w-1-4 { flex-basis: calc(25% - 23px); flex-grow: 0; }
.vc-col.w-1-3 { flex-basis: calc(33.333% - 20px); flex-grow: 0; }
.vc-col.w-1-2 { flex-basis: calc(50% - 15px); flex-grow: 0; }
.vc-col.w-2-3 { flex-basis: calc(66.666% - 10px); flex-grow: 0; }
.vc-col.w-3-4 { flex-basis: calc(75% - 8px); flex-grow: 0; }
.vc-col.w-1-1 { flex-basis: 100%; flex-grow: 0; }

.wpb-image { margin: 0 0 30px; }
.wpb-image figure { margin: 0; }
.wpb-image.align-center { text-align: center; }
.wpb-image.align-right { text-align: right; }
.wpb-image img { display: inline-block; }

/* -------------------------------------------------------------------- hero */
.hero { max-height: 550px; overflow: hidden; }
.hero > .row-inner { align-items: center; }
.hero .hero-character-container { align-self: flex-end; }
.hero .hero-character-container .wpb-image { margin-bottom: 0; }
.hero .vc-col:nth-child(2) { padding: 46px 0; }
.hero h1 { text-align: center; margin: 10px 0 20px; }

.game-hero { overflow: hidden; }
.game-hero > .row-inner { align-items: center; }
.game-hero .hero-character-container { align-self: flex-end; }
.game-hero .hero-character-container .wpb-image { margin-bottom: 0; }
.game-hero .vc-col:nth-child(2) { padding: 40px 0; }
.game-logo { margin-bottom: 16px; }

/* subtle entry animations (replacing WPBakery fadeInLeft/right) */
@media (prefers-reduced-motion: no-preference) {
  .anim-fade-in-left { animation: fadeInLeft .9s ease both; }
  .anim-fade-in-right { animation: fadeInRight .9s ease both; }
  @keyframes fadeInLeft { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
  @keyframes fadeInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
}

/* ----------------------------------------------------------------- buttons */
.btn-gold {
  display: inline-block;
  color: #fff;
  background: #000;
  border: 1px solid var(--gold);
  padding: 10px 40px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .5px;
  transition: background .2s ease, color .2s ease;
}
.btn-gold:hover, .btn-gold:focus { background: var(--gold); color: #000; }
.btn-center { text-align: center; }
.wpb-btn { margin: 24px 0 30px; }
.hero .wpb-btn { margin: 20px 0 40px; }
.hero h1 { margin: 4px 0 0; }

/* store buttons row (game pages) */
.get-game-button {
  display: inline-block;
  background-color: #000;
  width: 32%;
  border: 1px solid var(--line);
  text-align: center;
}
a.get-game-button:hover { border-color: var(--gold); }
.get-game-button img { display: inline-block; vertical-align: middle; }
.get-game-button-steam { text-align: right !important; }
.get-game-button-google { text-align: center !important; }
.get-game-button-app { text-align: left !important; }

/* ------------------------------------------------------------ games grid */
.games-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin: 20px 0 40px;
}
.games-grid a { display: block; line-height: 0; }
.games-grid img {
  width: 100%;
  transition: opacity .2s ease, transform .2s ease;
}
.games-grid a:hover img { opacity: .85; }

/* -------------------------------------------------------------- side rails */
.sticky-rail { position: sticky; top: calc(var(--header-h) + 20px); }
.sticky-rail .wpb-image { margin-bottom: 20px; }

/* ---------------------------------------------------------------- carousel */
.carousel { position: relative; margin: 0 0 30px; }
.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  text-align: center;
}
.carousel-slide .wpb-image { margin: 0; }
.carousel-slide img { width: 100%; height: auto; }
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, .55);
  color: #fff;
  border: 0;
  font-size: 26px;
  line-height: 1;
  width: 44px; height: 44px;
  cursor: pointer;
  z-index: 2;
}
.carousel-btn:hover { color: var(--gold); }
.carousel-btn.prev { left: 8px; }
.carousel-btn.next { right: 8px; }
.carousel-dots { text-align: center; margin-top: 10px; }
.carousel-dots button {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1px solid #fff;
  background: transparent;
  margin: 0 5px;
  padding: 0;
  cursor: pointer;
}
.carousel-dots button.active { background: #fff; }

/* ------------------------------------------------------------------- video */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin: 0 0 30px;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ------------------------------------------------------------------- modal */
.modal-open-btn {
  display: block;
  width: 100%;
  background: none;
  border: 1px solid var(--gold);
  color: #fff;
  padding: 10px 40px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.modal-open-btn:hover { background: var(--gold); color: #000; }
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .8);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-box {
  position: relative;
  background: #000;
  border: 1px solid var(--line);
  max-width: 860px;
  width: 100%;
  padding: 24px;
}
.modal-close {
  position: absolute;
  top: 8px; right: 8px;
  background: none;
  border: 0;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}
.modal-close:hover { color: var(--gold); }

/* -------------------------------------------------------------------- form */
input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="number"], select, textarea {
  color: #8b8d94;
  width: 100%;
  border: 1px solid rgba(51, 51, 51, .8);
  padding: 5px 15px;
  background-color: #333;
  border-radius: 1px;
  font: inherit;
}
textarea { min-height: 180px; }
.support-form label { display: block; margin: 18px 0 6px; color: #fff; font-weight: 600; }
.support-form .btn-gold { margin-top: 24px; cursor: pointer; font-family: inherit; }
.form-note { font-size: 13px; color: var(--muted); }
.form-result { margin-top: 20px; }
.form-result .ok { color: #7ed37e; }
.form-result .err { color: #e05f5f; }
.hp-field { position: absolute; left: -9999px; opacity: 0; }

/* ------------------------------------------------------------------ footer */
.site-footer { background: var(--panel); margin-top: 60px; }
.footer-widgets {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px 30px;
}
.footer-widgets .f-logo { flex: 0 0 auto; }
.footer-widgets .f-logo img { display: block; width: 150px; }
.footer-menu { flex: 1 1 300px; text-align: center; }
.footer-menu a {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 14px;
  white-space: nowrap;
}
.footer-menu a:hover { color: var(--gold); }
.footer-social { flex: 0 0 auto; text-align: right; }
.footer-social a { margin-left: 30px; display: inline-block; }
.footer-social a img { height: 16px; width: auto; }
.bottom-bar {
  background: var(--panel);
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 11px;
  line-height: 1.6;
  color: #aaa;
  text-align: center;
  padding: 14px 20px;
}
.bottom-bar a { color: #aaa; }
.bottom-bar a:hover { color: #fff; }

/* ------------------------------------------------------------------- pages */
.page-body { min-height: 55vh; }
.content-narrow { max-width: 820px; margin: 0 auto; padding: 20px; }
.page-title { text-align: center; font-size: 30px; margin: 40px 0 10px; color: #fff; }

/* lore page */
.lore-content { font-size: 16px; }
.lore-content ol li { margin-bottom: 4px; }
.lore-content img { margin: 10px 0; }

/* ruffle page */
.ruffle-stage {
  background: #111;
  border: 1px solid var(--line);
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 480px;
}
.ruffle-stage ruffle-player { width: 100%; height: 600px; }
.swf-picker { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.swf-picker button {
  background: #000;
  border: 1px solid var(--line);
  color: #fff;
  padding: 8px 18px;
  font: 600 14px "Raleway", sans-serif;
  cursor: pointer;
}
.swf-picker button:hover, .swf-picker button.active {
  border-color: var(--gold);
  color: var(--gold);
}

/* ------------------------------------------------------------------- utils */
.faded { opacity: .4; }
.show-mobile { display: none; }
.align-center { text-align: center; }

/* --------------------------------------------------------------- responsive */
@media screen and (max-width: 1024px) {
  .hide-tablet { display: none !important; }
  .main-nav { display: none; }
  .menu-toggle { display: block; }
  .mobile-nav { display: flex; }
  :root { --header-h: 70px; }
  .vc-col.w-1-4, .vc-col.w-1-3, .vc-col.w-1-2, .vc-col.w-2-3, .vc-col.w-3-4 {
    flex-basis: 100%;
  }
  .hero > .row-inner, .game-hero > .row-inner { flex-direction: row; flex-wrap: nowrap; }
  .hero .vc-col, .game-hero .vc-col { flex: 1 1 0; }
  .sticky-rail { position: static; }
}

@media screen and (max-width: 768px) {
  .hero, .game-hero { max-height: none; }
  .hero .vc-col:nth-child(2), .game-hero .vc-col:nth-child(2) { padding: 28px 0; }
  .hide-mobile { display: none !important; }
  .show-mobile { display: block; }
  h1 { font-size: 28px; line-height: 32px; }
  .games-grid { grid-template-columns: 1fr; }
  .get-game-button-steam, .get-game-button-google, .get-game-button-app {
    text-align: center !important;
    width: 100% !important;
    margin-bottom: 8px;
  }
  .hero > .row-inner, .game-hero > .row-inner { flex-wrap: wrap; }
  .footer-widgets { justify-content: center; text-align: center; }
  .footer-social { text-align: center; }
  .footer-social a { margin: 0 15px; }
}
