/* =======================================================
   BULWARK ENTERTAINMENT – GLOBAL STYLESHEET
   - Cleaned, organized, and fully commented
   - Uses CSS variables for easy theming
   ======================================================= */

/* ---------------------------
   0) THEME VARIABLES & RESET
   --------------------------- */
:root {
  /* Colors */
  --bg: #0d0d0d;
  --bg-elev: #131313;
  --panel: #1a1a1a;
  --text: #ffffff;
  --text-dim: #cccccc;
  --gold: #d4af37;
  --gold-dim: #b7952b;
  --line: #222222;

  /* Effects */
  --blur: 12px;
  --shadow-1: 0 2px 15px rgba(0, 0, 0, 0.7);
  --shadow-2: 0 8px 25px rgba(0, 0, 0, 0.8);

  /* Layout */
  --container: 1200px;
  --container-wide: 1300px;
  --radius: 8px;
  --radius-lg: 12px;
  --gap: 2rem;
}

/* Global Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ---------------------------
   1) SCROLLBAR (WEBKIT)
   --------------------------- */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-dim);
}

/* ---------------------------
   2) NAVBAR
   --------------------------- */
.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  position: sticky;
  top: 0;
  width: 100%;
  height: 120px;
  background: rgba(19, 19, 19, 0.6);
  backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow-1);
  transition: all 0.4s ease;
  z-index: 2000; /* Always above content */
}

.navbar.scrolled {
  background: rgba(13, 13, 13, 0.95);
  box-shadow: 0 3px 20px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(16px);
}

.navbar__container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-wide);
  width: 100%;
  padding: 0 24px;
}

/* Brand */
#navbar__logo {
  display: flex;
  align-items: center;
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--text);
  text-decoration: none;
}
#navbar__logo img {
  height: 80px;
  margin-right: 12px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--text);
  border-radius: 10px;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
  transition: transform 0.3s ease, filter 0.3s ease, border-color 0.3s ease;
}
#navbar__logo img:hover,
#navbar__logo img:active,
#navbar__logo.glow img {
  transform: scale(1.05);
  border-color: var(--gold);
  filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.8));
}

/* Menu */
.navbar__menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  z-index: 1000;
}
.navbar__menu.active {
  pointer-events: auto; /* for mobile */
}

.navbar__links {
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 1rem;
  padding: 0.5rem;
  position: relative;
  transition: color 0.3s ease;
}
.navbar__links::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.25s ease;
}
.navbar__links:hover {
  color: var(--gold);
}
.navbar__links:hover::after,
.navbar__links.active::after {
  width: 100%;
}
.navbar__links.active {
  color: var(--gold);
}

/* Hamburger (mobile) */
.navbar__toggle {
  display: none;
  cursor: pointer;
  z-index: 1002;
}
.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background: var(--text);
  transition: all 0.3s ease;
}
.navbar__toggle.is-active .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.navbar__toggle.is-active .bar:nth-child(2) {
  opacity: 0;
}
.navbar__toggle.is-active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------------------------
   3) HERO (IMAGE + TEXT)
   --------------------------- */
.hero {
  background: url("images/homepagehero.png") center/cover no-repeat;
  height: 75vh;
  position: relative;
  z-index: 1; /* Below navbar */
}
/* Readability veil; non-interactive so clicks pass */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  pointer-events: none;
  z-index: 1;
}

/* Hero text block below image */
.hero-text {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2.25rem 1rem;
  background: transparent;
}
.hero__content {
  max-width: 900px;
  text-align: center;
  padding: 1rem 18px;
  position: relative;
  z-index: 2;
}
.hero__content h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.5rem;
  color: var(--text);
}
.hero__content h2 {
  font-size: clamp(1.1rem, 3vw, 1.7rem);
  margin-bottom: 1rem;
  color: var(--gold);
}
.hero__content p {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  margin-bottom: 1.25rem;
  color: #dddddd;
}

/* Primary button */
.button {
  background: var(--gold);
  padding: 12px 30px;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  border-radius: 4px;
  transition: background 0.3s ease, transform 0.2s ease;
  display: inline-block;
}
.button:hover {
  background: var(--gold-dim);
  transform: translateY(-1px);
}

/* ---------------------------
   4) ABOUT (SIMPLE)
   --------------------------- */
.about {
  padding: 4rem 2rem;
  text-align: center;
  background: var(--panel);
}
.about h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 2rem;
}
.about p {
  max-width: 700px;
  margin: 0 auto;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
}
.about__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--gap);
  margin-top: 2rem;
}
.about__grid-item {
  background: var(--panel);
  padding: 2rem;
  border-radius: var(--radius);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.about__grid-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-2);
}

/* ---------------------------
   5) GAMES (GRID CARDS)
   --------------------------- */
.games {
  padding: 4rem 2rem;
  text-align: center;
}
.games__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--gap);
  margin-top: 2rem;
}
.game__card {
  background: var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.game__card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.game__card h3 {
  margin: 1rem 0 0.5rem;
  color: var(--gold);
  font-size: 1.2rem;
  text-align: center;
}
.game__card p {
  padding: 0 1rem 1rem;
  font-size: 0.95rem;
  color: var(--text-dim);
  text-align: center;
}
.game__card .coming-soon {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #999;
  background: #222;
  padding: 4px 10px;
  border-radius: 4px;
  transition: background 0.3s ease, color 0.3s ease;
}
.game__card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-2);
}
.game__card:hover h3 {
  color: var(--text);
}
.game__card:hover p {
  color: var(--gold);
}
.game__card:hover .coming-soon {
  background: var(--gold);
  color: #000;
}

/* ---------------------------
   6) GAME LIST (DETAIL CARDS)
   --------------------------- */
.games-list {
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
.game-card {
  display: grid;
  grid-template-columns: 500px 1fr;
  gap: 2rem;
  background: var(--panel);
  padding: 1rem;
  border-radius: var(--radius);
  align-items: start;
}
.game-card .main-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  background: #000;
}
.game-card .main-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
  transition: transform 0.3s ease;
}
.game-card .main-image img:hover {
  transform: scale(1.03);
}
.game-card .game-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.game-card .thumbnails {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.game-card .thumbnails img {
  width: 100px;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.7;
  border: 2px solid transparent;
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease,
    border-color 0.3s ease;
}
.game-card .thumbnails img:hover {
  opacity: 1;
  transform: scale(1.05);
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}
.game-card .thumbnails img.active {
  border-color: var(--gold);
  opacity: 1;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.7);
}

/* Buttons inside game card areas */
.game-button a {
  display: inline-block;
  background: var(--gold);
  padding: 12px 30px;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  margin-top: 1rem;
}
.game-button a:hover {
  background: var(--gold-dim);
  transform: translateY(-2px);
}
.game-button a:active {
  transform: translateY(0);
}

/* ---------------------------
   7) GAME DETAIL (HERO + CAROUSEL)
   --------------------------- */
.games-detail {
  position: relative; /* ensures it sits over hero overlay when near */
  z-index: 5;
}
.games-detail__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
}
.games-detail__main img {
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 9; /* cinematic ratio */
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform 0.3s ease;
}
.games-detail__main img:hover {
  transform: scale(1.03);
}
.games-carousel {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 0.1rem;
}
.carousel-image {
  width: 160px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.3s ease;
}
.carousel-image:hover {
  opacity: 1;
  transform: scale(1.05);
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}
.carousel-image.active {
  border: 2px solid var(--gold);
  opacity: 1;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.7);
}
.games-detail__info {
  margin-top: 0.5rem;
  text-align: center;
  max-width: 700px;
}
.games-detail__info h2 {
  margin-bottom: 1rem;
}
.games-detail__info p {
  font-size: 1.05rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

/* Caption fade utility for JS swaps */
#carousel-caption {
  transition: opacity 0.5s ease;
  opacity: 1;
}
#carousel-caption.fade-out {
  opacity: 0;
}
#carousel-caption.fade-in {
  opacity: 1;
}

/* ---------------------------
   8) CONTACT
   --------------------------- */
.contact {
  padding: 4rem 2rem;
  background: var(--bg);
}
.contact__container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 4rem;
  flex-wrap: wrap;
  justify-content: center;
}
.contact__form,
.contact__info {
  flex: 1;
  min-width: 300px;
}
.contact__form h2,
.contact__info h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}
.form-group {
  margin-bottom: 1rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  background: var(--panel);
  border: 1px solid #333;
  border-radius: 5px;
  color: var(--text);
  font-size: 1rem;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border: 1px solid var(--gold);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}
.form-group textarea {
  resize: none;
  height: 150px;
}
.contact__info p {
  margin-bottom: 0.6rem;
  font-size: 1rem;
  color: var(--text-dim);
}
.contact__info a {
  color: var(--gold);
  text-decoration: none;
}
.contact__info a:hover {
  text-decoration: underline;
}

/* ---------------------------
   9) CALL TO ACTION
   --------------------------- */
.cta-section {
  text-align: center;
  padding: 6rem 2rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.cta-section h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 2.5rem;
}
.cta-section .button {
  padding: 14px 40px;
  font-size: 1.1rem;
}

/* ---------------------------
   10) ABOUT – MISSION & VISION
   --------------------------- */
.about-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6rem 2rem;
  gap: 4rem;
  background: linear-gradient(135deg, var(--bg) 0%, var(--panel) 100%);
  flex-wrap: wrap;
  overflow: hidden;
  position: relative;
}
.about-section__container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container);
  width: 100%;
  gap: 3rem;
  flex-wrap: wrap;
}
.about-section-reverse .about-section__container {
  flex-direction: row-reverse;
}
.about-text {
  flex: 1;
  min-width: 280px;
}
.about-text h2 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin-bottom: 1.5rem;
  color: var(--gold);
}
.about-text p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-dim);
}
.about-image {
  flex: 1;
  min-width: 280px;
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.about-image:hover img {
  transform: scale(1.05);
}

/* Link buttons inside about blocks */
.about-section a {
  background: var(--gold);
  color: #000;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: background 0.3s ease, transform 0.2s ease;
  cursor: pointer;
}
.about-section a:hover {
  background: #ffffff;
  transform: translateY(-2px);
}

/* ---------------------------
   11) FOOTER (WITH SOCIAL)
   --------------------------- */
.footer {
  background: var(--bg-elev);
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--text-dim);
  border-top: 1px solid var(--line);
}
.footer__content {
  max-width: var(--container);
  margin: 0 auto;
}
.footer__social {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.footer__social a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--gold);
  font-size: 0.85rem;
  transition: color 0.3s ease, transform 0.2s ease;
}
.footer__social a:hover {
  color: var(--text);
  transform: translateY(-2px);
}
.footer__social .icon {
  width: 24px;
  height: 24px;
  fill: var(--gold);
  margin-bottom: 0.4rem;
  transition: fill 0.3s ease, filter 0.3s ease;
}
.footer__social a:hover .icon {
  fill: #ffffff;
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.6));
}

/* ---------------------------
   12) FORM STATUS (UTILITY)
   --------------------------- */
.form-status {
  text-align: center;
  font-weight: 500;
  margin-top: 1rem;
  min-height: 1.2rem; /* prevents layout shift */
  transition: color 0.3s ease, opacity 1s ease;
  opacity: 0; /* start hidden */
}

/* ---------------------------
   13) RESPONSIVE (≤ 960px)
   --------------------------- */
@media screen and (max-width: 960px) {
  /* Mobile menu panel */
  .navbar__toggle {
    display: block;
  }

  .navbar__menu {
    flex-direction: column;
    position: fixed;
    top: 120px; /* below navbar */
    left: 0;
    width: 100%;
    height: calc(100vh - 120px);
    background: rgba(19, 19, 19, 0.97);
    backdrop-filter: blur(var(--blur));
    padding-top: 2rem;
    gap: 1.5rem;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-20px);
    transition: transform 0.5s ease, opacity 0.5s ease;
    pointer-events: none;
  }
  .navbar__menu.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .navbar__links {
    font-size: 1.6rem;
  }

  /* Hero sizing on mobile */
  .hero {
    height: 50vh;
  }
  .hero-text {
    padding: 1.5rem 1rem;
  }
  .hero__content h1 {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
  }
  .hero__content h2 {
    font-size: clamp(1rem, 4vw, 1.4rem);
  }

  /* Games list cards stack */
  .game-card {
    grid-template-columns: 1fr;
    align-items: center;
  }
  .game-card .main-image {
    width: 100%;
    aspect-ratio: 16 / 9;
  }
  .game-card .thumbnails img {
    width: 80px;
    aspect-ratio: 16 / 9;
  }

  /* Detail carousel thumbs on mobile */
  .carousel-image {
    width: 120px;
    height: 70px;
  }

  /* About simple grid stacks */
  .about__grid {
    grid-template-columns: 1fr;
  }

  /* Contact stacks */
  .contact__container {
    flex-direction: column;
  }

  /* CTA spacing */
  .cta-section {
    padding: 4rem 1.5rem 3rem;
  }
  .cta-section h2 {
    margin-bottom: 2rem;
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  /* About mission/vision blocks stack */
  .about-section__container,
  .about-section-reverse .about-section__container {
    flex-direction: column;
    gap: 2rem;
  }
  .about-text,
  .about-image {
    min-width: 100%;
  }
  .about-text h2 {
    font-size: clamp(1.8rem, 5vw, 2.2rem);
  }
  .about-text p {
    font-size: 1rem;
  }
}

/* Tablet refinements */
@media (max-width: 768px) {
  .navbar {
    height: 96px;
  }
  .navbar__menu {
    top: 96px;
    height: calc(100vh - 96px);
  }
  .games__grid {
    gap: 1.25rem;
  }
  .game__card img {
    height: 180px;
  }
  .games-detail__main img {
    max-width: 840px;
  }
  .footer__social {
    gap: 1.25rem;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .navbar__links {
    font-size: 1.2rem;
  }
  .hero {
    height: 46vh;
  }
  .hero-text {
    padding: 1rem 0.75rem;
  }
  .button {
    padding: 10px 22px;
    font-size: 0.95rem;
  }
  .games-carousel .carousel-image {
    width: 104px;
    height: 58px;
  }
  .game-card .thumbnails img {
    width: 70px;
  }
  .about {
    padding: 3rem 1.25rem;
  }
  .contact {
    padding: 3rem 1.25rem;
  }
  .footer {
    padding: 1.25rem 0.75rem;
  }
  .footer__social a {
    font-size: 0.8rem;
  }
}

/* Very large screens (keeps hero from getting too tall) */
@media (min-width: 1440px) {
  .hero {
    height: 70vh;
  }
  .games-detail__main img {
    max-width: 1100px;
  }
}
