/* ---------- Reset / Base ---------- */
:root {
  --color-primary: #ff5a26;
  --color-secondary: #ffbe33;
  --color-dark: #111;
  --color-dark-alt: #1c1c1c;
  --color-light: #f3f3f3;
  --font-heading: "Bebas Neue", cursive;
  --font-body: "Noto Sans JP", "Segoe UI", sans-serif;
  --shadow-glow: 0 0 15px #ff5a2655;
  --shadow-strong: 0 8px 25px #000c;
  --nav-height: 70px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  line-height: 1.7;
  color: var(--color-light);
  background: var(--color-dark);
  overflow-x: hidden;
}
body.nav-open { overflow: hidden; }

img { max-width: 100%; display: block; border-radius: 8px; }
a { color: inherit; text-decoration: none; }
.container { width: min(90%, 1200px); margin-inline: auto; }

/* ---------- Nav ---------- */
header {
  position: fixed; top: 0; left: 0; width: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 90, 38, 0.2);
}
nav {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-height); padding: 0 1rem;
}
.logo a {
  font-family: var(--font-heading); font-size: 1.8rem; letter-spacing: 1.5px;
  color: var(--color-primary); text-shadow: 0 0 10px var(--color-primary);
  transition: .3s;
}
.logo a:hover { transform: scale(1.05); }

.nav-toggle {
  display: none; width: 30px; height: 22px; cursor: pointer;
  flex-direction: column; justify-content: space-between; z-index: 1002;
}
.nav-toggle span {
  display: block; width: 100%; height: 3px;
  background: var(--color-light); border-radius: 3px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(9.5px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-9.5px) rotate(-45deg); }

.menu { list-style: none; }
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .menu {
    position: fixed; top: 0; right: 0; width: 100%; height: 100vh;
    background: rgba(10, 10, 10, 0.95);
    display: flex; flex-direction: column; justify-content: center;
    align-items: center; gap: 2.5rem;
    transform: translateX(100%);
    transition: transform 0.4s ease-in-out;
  }
  body.nav-open .menu { transform: translateX(0); }
  .menu a { font-size: 1.5rem; font-weight: 700; padding: 0.5rem 1rem; }
}
@media (min-width: 769px) {
  .menu { display: flex; gap: 1.5rem; }
  .menu a { font-weight: 700; position: relative; padding-bottom: 0.5rem; transition: color .3s; }
  .menu a::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px;
    background: var(--color-secondary); transform: scaleX(0); transform-origin: right;
    transition: transform .35s ease-in-out;
  }
  .menu a:hover { color: var(--color-secondary); }
  .menu a:hover::after { transform: scaleX(1); transform-origin: left; }
}

/* ---------- Hero ---------- */
.hero {
  height: 100vh; background-size: cover; background-position: center;
  position: relative; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 0 1rem;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at center, transparent 30%, #000 95%),
              linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.8));
}
.hero .inner { position: relative; z-index: 2; }
.hero .inner h2 {
  font-family: var(--font-heading); font-size: clamp(2.5rem, 8vw, 4.5rem);
  letter-spacing: 3px; text-transform: uppercase; color: #fff;
  text-shadow: 0 0 10px #000, 0 0 30px #000;
}
.hero .inner p {
  margin-top: 1rem; font-size: clamp(1rem, 2.5vw, 1.1rem);
  font-weight: 700; color: #ddd;
}
.btn {
  display: inline-block; margin-top: 2rem; padding: .8rem 2.5rem;
  background: var(--color-primary); border-radius: 50px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  box-shadow: var(--shadow-glow); transition: .3s;
  border: 2px solid transparent;
}
.btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 25px #ff5a2666;
  background: var(--color-secondary); color: var(--color-dark);
}

/* ---------- Section General ---------- */
.section { padding: 6rem 0; position: relative; overflow: hidden; }
.section.alt { background: var(--color-dark-alt); }
.section-title {
  font-family: var(--font-heading); font-size: clamp(2.2rem, 6vw, 2rem);
  margin-bottom: 2rem; color: var(--color-secondary);
  text-shadow: 0 0 10px #ffbe3344;
}
.split-layout {
  display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center;
}
.text-center { text-align: center; max-width: 800px; margin-inline: auto; }
.section-header { margin-bottom: 3rem; }


/* ---------- Highlight Section (Trailer & Gold Edition) ---------- */
.section-highlight {
  background: linear-gradient(150deg, var(--color-primary), #d14212);
}
.section-highlight .container { max-width: 1200px; }
.section-highlight .section-title, .section-highlight p { color: var(--color-dark); }
.section-highlight p { font-weight: 700; font-size: 1.1rem; }
.video-wrapper {
  position: relative; padding-top: 56.25%; border-radius: 8px;
  overflow: hidden; box-shadow: var(--shadow-strong);
  border: 4px solid var(--color-light);
  max-width: 900px; margin-inline: auto;
}
.video-wrapper iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

.info-grid-item {
  height: 400px;
}
/* ---------- PRODUCT INFO SECTION ---------- */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    align-items: stretch; /* Makes all grid items the same height */
}
.info-grid-item {
    display: flex; /* Allows child item to fill height */
}
.preorder-bonus {
  background: var(--color-dark);
  border: 2px solid var(--color-primary);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-glow);
  width: 100%;
  display: flex;
  flex-direction: column;
}
.preorder-bonus h4 {
  color: var(--color-secondary);
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.preorder-bonus .interactive-image-link {
    flex-grow: 1; /* Makes image container fill available space */
}
.preorder-bonus .caption {
  margin-top: 1rem;
  font-weight: 700;
  font-size: 1.1rem;
}


/* ---------- Universal Image Hover Styles ---------- */
/* Applies to all galleries AND the info section images */
.gallery a,
.dlc-gallery a,
.info-grid .interactive-image-link,
.systems-grid a {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow-strong);
}
.gallery a img,
.dlc-gallery a img,
.info-grid .interactive-image-link img,
.systems-grid a img {
    transition: transform .4s ease-out;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Maintained for game cases */
}
.gallery a:hover img,
.dlc-gallery a:hover img,
.info-grid .interactive-image-link:hover img,
.systems-grid a:hover img {
    transform: scale(1.1);
}
/* This specific rule ensures gallery images cover their area correctly */
.gallery img, .dlc-gallery img {
    object-fit: cover;
}


/* ---------- Galleries ---------- */
.gallery, .dlc-gallery {
  display: grid;
  gap: 1.5rem;
}
.gallery { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.dlc-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 per row */
  gap: 1rem;                  /* Slightly smaller gap */
  margin-top: 3rem;
  max-width: 660px;           /* Slightly smaller than original */
  margin-inline: auto;
}

.dlc-gallery img {
  height: 110px;              /* Shrinks the images just a bit */
  width: 100%;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 2px 12px #0006;
}


/* ---------- Driver Systems Grid ---------- */
.systems-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.systems-grid article {
  background: var(--color-dark); padding: 1.5rem; border-radius: 8px;
  box-shadow: var(--shadow-strong);
}
.systems-grid h4 {
  color: var(--color-secondary); font-family: var(--font-heading);
  font-size: 1.5rem; margin-bottom: 1rem;
}
.systems-grid article a {
    margin-top: 1rem;
}


/* ---------- Footer ---------- */
footer { background: #000; padding: 3rem 0; text-align: center; }
footer .logos {
  display: flex; justify-content: center; align-items: center;
  gap: 2.5rem; margin-bottom: 2rem; flex-wrap: wrap;
}
footer img { height: 40px; width: auto; filter: grayscale(1) brightness(0.8); transition: .3s; }
footer img:hover { filter: none; transform: scale(1.1); }
footer small { font-size: .8rem; color: #aaa; line-height: 1.6; }
footer a { color: var(--color-secondary); text-decoration: underline; text-underline-offset: 4px; }

@media (min-width: 769px) {
  .section { padding: 8rem 0; }
  .split-layout { grid-template-columns: repeat(2, 1fr); }
  .split-layout.reversed > div:first-child { order: 2; }
}