/* ============================================================
   Protection Games — shared styles
   Identity: pure black, white text, red #ff2222 accent,
   Eurostile Round Extended everywhere.
   ============================================================ */

@font-face {
  font-family: 'Eurostile Round Extended';
  src: url('../assets/fonts/eurostile-round-extended-medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000000;
  --surface: #0d0d0d;
  --line: rgba(255, 255, 255, 0.09);
  --text: #ffffff;
  --muted: #d6d6d6;
  --faint: #8a8a8a;
  --red: #ff2222;
  --red-hover: #ff4141;
  --max: 1180px;
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Eurostile Round Extended', 'Segoe UI', Arial, sans-serif;
  font-weight: 500;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; }
a { color: inherit; }

/* ---------- Navbar ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img { height: 38px; width: auto; display: block; }

.brand span {
  font-size: 14px;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand span em {
  font-style: normal;
  color: var(--red);
}

/* Red accent word inside headlines */
h1 em, h2 em, h3 em, h4 em {
  font-style: normal;
  color: var(--red);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

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

.nav-links a.active {
  color: var(--text);
  border-bottom-color: var(--red);
}

/* Games dropdown */

.dropdown { position: relative; }

.dropdown .caret { font-size: 10px; color: var(--faint); margin-left: 6px; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 210px;
  list-style: none;
  padding: 8px;
  background: #0a0a0a;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

/* invisible bridge so the menu doesn't close while moving the cursor down */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: none;
  border-bottom: 0;
  border-radius: 8px;
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background: rgba(255, 34, 34, 0.12);
  color: var(--text);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: transform 0.25s, opacity 0.25s;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, border-color 0.2s, color 0.2s;
}

.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-hover); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.3);
}
.btn-ghost:hover { border-color: #fff; transform: translateY(-2px); }

/* ---------- Layout helpers ---------- */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(48px, 7vh, 84px) 24px;
}

.section-head { text-align: center; margin-bottom: 44px; }

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.section-head .rule {
  width: 56px;
  height: 3px;
  background: var(--red);
  margin: 14px auto 0;
  border-radius: 2px;
}

.section-head p { color: var(--muted); margin-top: 14px; }

.badge {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
}

/* ---------- Home: hero (compact: logo left, text right) ---------- */

.hero-home {
  padding: clamp(36px, 6vh, 64px) 24px;
}

.hero-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 4.5vw, 56px);
  max-width: 880px;
  margin: 0 auto;
  text-align: left;
}

.hero-home .hero-logo {
  width: clamp(150px, 22vw, 230px);
  flex: 0 0 auto;
  display: block;
}

.hero-home .tagline {
  color: var(--muted);
  font-size: clamp(0.98rem, 1.5vw, 1.15rem);
  line-height: 1.75;
  max-width: 480px;
  margin: 0 0 22px;
}

.hero-home .cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .hero-row { flex-direction: column; text-align: center; }
  .hero-home .tagline { margin-left: auto; margin-right: auto; }
  .hero-home .cta-row { justify-content: center; }
}

/* ---------- Home: featured game ---------- */

.featured { background: var(--surface); border-block: 1px solid var(--line); }

.featured-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(48px, 7vh, 84px) 24px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.featured-art img {
  width: 100%;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.featured-text h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  margin: 16px 0 6px;
  letter-spacing: 0.02em;
}

.featured-text .meta {
  color: var(--faint);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.featured-text p {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 28px;
}

.featured-text .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Home: games grid ---------- */

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.game-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 34, 34, 0.55);
  box-shadow: 0 18px 44px rgba(255, 34, 34, 0.12);
}

.game-card .card-img { aspect-ratio: 616 / 353; overflow: hidden; }

.game-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}

.game-card:hover .card-img img { transform: scale(1.04); }

.game-card .badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
}

.card-body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }

.card-body h3 { font-size: 1.15rem; letter-spacing: 0.02em; }

.card-body .card-tag {
  color: var(--faint);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 6px 0 10px;
}

.card-body p { color: var(--muted); font-size: 14px; line-height: 1.7; flex: 1; }

.card-body .card-link {
  color: var(--red);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 16px;
}

/* ---------- Home: about ---------- */

.about-inner { max-width: 720px; margin: 0 auto; text-align: center; }

.about-inner p { color: var(--muted); line-height: 1.9; margin-bottom: 16px; }

/* ---------- Game page ---------- */

.back-link {
  display: inline-block;
  color: rgba(255, 34, 34, 0.65);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 26px;
  transition: color 0.2s;
}
.back-link:hover { color: var(--red); }

.gp-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }

.gp-hero .gp-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(22px) brightness(0.3);
  transform: scale(1.15);
}

.gp-hero .gp-inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(48px, 8vh, 96px) 24px;
  display: grid;
  grid-template-columns: minmax(280px, 460px) 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.gp-inner .gp-art img {
  width: 100%;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.gp-inner h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  letter-spacing: 0.02em;
  margin: 14px 0 8px;
}

.gp-inner .meta {
  color: rgba(255, 34, 34, 0.65);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.gp-inner .gp-desc {
  color: var(--muted);
  line-height: 1.85;
  max-width: 560px;
  margin-bottom: 28px;
}

.gp-inner .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* Steam widget */

.steam-widget { text-align: center; }

.steam-widget iframe {
  width: 100%;
  max-width: 660px;
  height: 190px;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
}

/* Trailer */

.trailer video {
  display: block;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* Gallery */

/* Flexbox (not grid) so a partial last row centers itself */
.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.gallery a {
  display: block;
  flex: 0 1 320px;
  min-width: 260px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  transition: border-color 0.2s, transform 0.2s;
}

.gallery a:hover { border-color: rgba(255, 34, 34, 0.55); transform: translateY(-3px); }

.gallery img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

/* About (game page prose) */

.prose { max-width: 820px; margin: 0 auto; }

.prose p { color: var(--muted); line-height: 1.9; margin-bottom: 18px; }

.prose h3 {
  color: var(--text);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  margin: 30px 0 12px;
}

.prose ul { list-style: none; margin: 6px 0 18px; }

.prose li {
  color: var(--muted);
  position: relative;
  padding-left: 26px;
  margin: 10px 0;
  line-height: 1.7;
}

.prose li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 9px;
  height: 9px;
  background: var(--red);
  border-radius: 2px;
}

.prose .fine { color: var(--faint); font-size: 13px; }

/* Short summary callout: subtle red wash, red left edge, white text */

.about-short {
  max-width: 820px;
  margin: 0 auto 36px;
  background: rgba(255, 34, 34, 0.07);
  border: 1px solid rgba(255, 34, 34, 0.22);
  border-left: 3px solid var(--red);
  border-radius: 12px;
  padding: 22px 26px;
  color: var(--text);
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  line-height: 1.75;
}

/* Feature cards */

/* Flexbox so a partial last row centers itself (like the screenshot gallery) */
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  max-width: var(--max);
  margin: 0 auto;
}

.feature {
  flex: 0 1 300px;
  min-width: 250px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.25s, border-color 0.25s;
}

.feature:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 34, 34, 0.45);
}

.feature svg {
  width: 30px;
  height: 30px;
  color: var(--muted);
  margin-bottom: 14px;
}

.feature h4 {
  font-size: 1rem;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
  color: var(--red);
}

.feature p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

/* Numbered steps (How To Play) */

.steps {
  list-style: none;
  counter-reset: step;
  max-width: 620px;
  margin: 0 auto;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 16px 0 16px 64px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  line-height: 1.7;
}

.steps li:last-child { border-bottom: 0; }

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 34, 34, 0.1);
  border: 1px solid rgba(255, 34, 34, 0.55);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

/* Prev / next pager */

.pager {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 24px 80px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 40px;
}

.pager a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s;
}

.pager a:hover { color: var(--text); }

.pager .dir {
  display: block;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 6px;
}

.pager .title {
  color: var(--red);
  transition: color 0.2s;
}

.pager a:hover .title { color: var(--red-hover); }

.pager .next { text-align: right; margin-left: auto; }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.lightbox.open { opacity: 1; pointer-events: auto; }

.lightbox img {
  max-width: 92vw;
  max-height: 84vh;
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8);
}

.lightbox .lb-btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  color: #fff;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lightbox .lb-btn:hover { background: rgba(255, 34, 34, 0.4); }

.lb-close { top: 22px; right: 22px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

.lightbox .lb-count {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.14em;
}

/* ---------- Contact ---------- */

.contact-wrap {
  max-width: 660px;
  margin: 0 auto;
  padding: clamp(48px, 8vh, 90px) 24px;
}

.contact-wrap .lead {
  color: var(--muted);
  text-align: center;
  line-height: 1.8;
  margin: -18px 0 40px;
}

.field { margin-bottom: 22px; }

.field label {
  display: block;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.field input,
.field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  padding: 13px 16px;
  font: inherit;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 34, 34, 0.15);
}

.field textarea { min-height: 160px; resize: vertical; }

.field .error {
  display: none;
  color: #ff6b6b;
  font-size: 13px;
  margin-top: 6px;
}

.field.invalid input,
.field.invalid textarea { border-color: #ff6b6b; }
.field.invalid .error { display: block; }

.field[aria-hidden="true"] {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px 18px;
  margin: 0 0 26px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.form-status.ok {
  border-left-color: #2ecc71;
  color: var(--text);
}

.form-status.err {
  border-left-color: var(--red);
  color: var(--text);
}

.form-status[hidden] { display: none; }

.form-actions { text-align: center; margin-top: 30px; }

.form-note {
  color: var(--faint);
  font-size: 13px;
  text-align: center;
  margin-top: 16px;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 40px 24px 44px;
  text-align: center;
}

.footer img { height: 34px; width: auto; opacity: 0.9; }

.socials {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin: 20px 0 16px;
}

.socials a {
  color: var(--muted);
  display: inline-flex;
  transition: color 0.2s, transform 0.2s;
}

.socials a:hover { color: var(--red); transform: translateY(-2px); }

.socials svg { width: 22px; height: 22px; fill: currentColor; }

.footer small { color: var(--faint); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .featured-inner,
  .gp-hero .gp-inner { grid-template-columns: 1fr; }

  .gp-inner .gp-art { max-width: 460px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(0, 0, 0, 0.97);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-links.open { max-height: 300px; }

  .nav-links li { width: 100%; text-align: center; }

  .nav-links a {
    display: block;
    padding: 16px;
    border-bottom: 0;
  }

  /* Games dropdown is expanded statically inside the mobile menu */
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    min-width: 0;
  }

  .dropdown-menu a {
    text-align: center;
    color: var(--faint);
    padding: 12px 16px;
    white-space: normal;
  }

  .dropdown .caret { display: none; }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .pager { flex-direction: column; }
  .pager .next { text-align: left; margin-left: 0; }
}
