/* ============================================================
   STEAMPUNK TOWER 2 — Brand Website
   Dark industrial steampunk aesthetic
   ============================================================ */

@font-face {
  font-family: 'Mouse Deco';
  src: url('../fonts/mouse_deco.TTF') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* --- CSS Variables --- */
:root {
  --bg: #070403;
  --bg-panel: #0d0a08;
  --bg-panel-hover: #141010;
  --color-title: #f9dbc3;
  --color-accent: #ffa200;
  --color-accent-dim: rgba(255, 162, 0, 0.25);
  --color-text: #ffebc9;
  --color-text-dim: #b8a084;
  --color-brass-dark: #3a2a1a;
  --color-brass: #7a5c2e;
  --color-brass-mid: #9e7a3e;
  --color-brass-light: #c5a44e;
  --color-brass-bright: #d4b458;
  --max-w: 980px;
  --font-heading: 'Mouse Deco', 'Georgia', serif;
  --font-body: Arial, Helvetica, sans-serif;
  --radius: 3px;
  --transition: 0.35s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  min-height: 100vh;
  overflow-x: hidden;
}

/* subtle noise overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%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)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.5;
}

/* vignette */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.5) 100%);
}

img { display: block; max-width: 100%; }
a { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-brass-bright); }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

.section {
  padding: 10px 0 20px;
  position: relative;
}

/* --- Section Titles with thin divider underneath --- */
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(22px, 4vw, 30px);
  color: var(--color-title);
  text-align: center;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-bottom: 4px;
  text-shadow: 0 0 30px rgba(255, 162, 0, 0.15), 0 2px 4px rgba(0,0,0,0.6);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  margin-top: -2px;
  background: linear-gradient(90deg, transparent, var(--color-brass-mid), var(--color-brass-light), var(--color-brass-mid), transparent);
}

/* --- Language Toggle --- */
[data-lang="en"] .lang-ru { display: none !important; }
[data-lang="ru"] .lang-en { display: none !important; }


/* ============================================================
   HEADER — Logo with gears behind it
   ============================================================ */
.header {
  position: relative;
  text-align: center;
  overflow: hidden;
}

.header-bg {
  position: relative;
  background: url('../images/wp_gears.jpg') center center / cover no-repeat;
  padding: 10px 24px 16px;
  overflow: visible;
}

.header-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    rgba(7,4,3,0.5) 0%,
    rgba(7,4,3,0.3) 40%,
    rgba(7,4,3,0.7) 100%
  );
}

.header-content {
  position: relative;
  z-index: 4;
  display: inline-block;
  text-align: center;
}

.logo {
  position: relative;
  z-index: 5;
  margin: 0 auto;
  max-width: 900px;
  width: 90%;
  filter: drop-shadow(0 4px 20px rgba(255,162,0,0.25));
}

/* Gears BEHIND the logo, centered under the "II" crest */
.header-gears-row {
  position: absolute;
  bottom: 5%;
  left: 49%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: -10px;
  z-index: 3;
  pointer-events: none;
}

.header-gear {
  opacity: 0.65;
  filter: drop-shadow(0 0 10px rgba(197,164,78,0.4));
}

.header-gear-left {
  width: 130px;
  height: 130px;
  animation: gear-spin 25s linear infinite;
}

.header-gear-right {
  width: 115px;
  height: 115px;
  animation: gear-spin 20s linear infinite reverse;
}

/* Language switcher — near logo, top right */
.lang-switcher {
  position: absolute;
  top: -8px;
  right: 0px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.lang-switcher img {
  width: 32px;
  height: auto;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 3px;
  opacity: 0.5;
  transition: all var(--transition);
}

.lang-switcher img:hover {
  opacity: 0.85;
  border-color: var(--color-brass);
}

.lang-switcher img.active {
  opacity: 1;
  border-color: var(--color-accent);
  box-shadow: 0 0 12px var(--color-accent-dim);
}

@keyframes gear-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}


/* ============================================================
   DIVIDER — used under header only
   ============================================================ */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0px 0;
  position: relative;
  z-index: 2;
}

.divider-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-brass-mid), var(--color-brass-light), var(--color-brass-mid), transparent);
}


/* ============================================================
   VIDEO SECTION
   ============================================================ */
.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  border: 2px solid var(--color-brass-dark);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0,0,0,0.6), inset 0 0 1px rgba(197,164,78,0.2);
}

.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: none;
}


/* ============================================================
   STORE BADGES
   ============================================================ */
.store-badges {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 22px;
  background: linear-gradient(180deg, #1a1510 0%, #0f0c08 100%);
  border: 1px solid var(--color-brass-dark);
  border-radius: var(--radius);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.store-badge::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(197,164,78,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.store-badge:hover {
  border-color: var(--color-brass-mid);
  color: var(--color-accent);
  box-shadow: 0 0 20px var(--color-accent-dim), inset 0 0 15px rgba(255,162,0,0.04);
  transform: translateY(-2px);
}

.store-badge .badge-icon {
  font-size: 20px;
  line-height: 1;
  opacity: 0.85;
}

.store-badge .badge-icon-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

.store-badge .badge-label {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.store-badge .badge-sub {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-dim);
  font-weight: 400;
}

.store-badge .badge-name {
  font-size: 17px;
  color: var(--color-text);
  transition: color var(--transition);
}

.store-badge:hover .badge-name {
  color: var(--color-accent);
}


/* ============================================================
   DESCRIPTION
   ============================================================ */
.description-block {
  max-width: 780px;
  margin: 0 auto;
}

.description-block .desc-intro {
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 12px;
  color: var(--color-text);
}

.description-block .desc-features-title {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--color-title);
  letter-spacing: 2px;
  margin: 18px 0 10px;
}

.description-block .desc-features {
  list-style: none;
  padding: 0;
}

.description-block .desc-features li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 6px;
  font-size: 14px;
  line-height: 1.45;
}

.description-block .desc-features li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 7px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--color-brass-mid);
  border-radius: 50%;
  background: transparent;
}

.description-block .desc-tagline {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--color-accent);
  text-align: center;
  margin-top: 18px;
  letter-spacing: 2px;
}


/* ============================================================
   SCREENSHOTS
   ============================================================ */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.screenshot-link {
  display: block;
  border: 1px solid var(--color-brass-dark);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
}

.screenshot-link:hover {
  border-color: var(--color-brass-mid);
  transform: scale(1.03);
  z-index: 2;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5), 0 0 12px var(--color-accent-dim);
}

.screenshot-link img {
  width: 100%;
  height: auto;
  display: block;
}


/* ============================================================
   CHARACTERS
   ============================================================ */

/* Character strip */
.character-strip {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
}

.char-card {
  width: 96px;
  height: 136px;
  border: 2px solid var(--color-brass-dark);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all var(--transition);
  background: var(--bg-panel);
}

.char-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform var(--transition);
}

.char-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7,4,3,0.7) 0%, transparent 50%);
  pointer-events: none;
  transition: opacity var(--transition);
}

.char-card:hover {
  border-color: var(--color-brass-mid);
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.5), 0 0 15px var(--color-accent-dim);
}

.char-card:hover img {
  transform: scale(1.05);
}

.char-card.active {
  border-color: var(--color-accent);
  box-shadow: 0 0 18px var(--color-accent-dim);
}

.char-card.active::after {
  background: linear-gradient(to top, rgba(255,162,0,0.15) 0%, transparent 50%);
}

.char-card-name {
  position: absolute;
  bottom: 6px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--color-title);
  text-shadow: 0 1px 4px rgba(0,0,0,0.9);
  z-index: 2;
  text-transform: uppercase;
}


/* Character detail */
.character-detail {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.character-image-wrap {
  flex: 0 0 260px;
  max-width: 260px;
  position: relative;
}

.character-image-wrap img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 30px rgba(0,0,0,0.7));
  transition: opacity 0.3s ease;
}

/* Text panel — NO scroll, full height */
.character-text-panel {
  flex: 1;
  min-width: 0;
  background: linear-gradient(135deg, rgba(13,10,8,0.95) 0%, rgba(20,16,12,0.9) 100%);
  border: 1px solid var(--color-brass-dark);
  border-radius: var(--radius);
  padding: 20px 24px;
  position: relative;
  overflow: visible;
  transition: opacity 0.3s ease;
}

/* brass corner ornaments */
.character-text-panel::before,
.character-text-panel::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--color-brass-mid);
  border-style: solid;
  pointer-events: none;
}

.character-text-panel::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
  border-radius: 3px 0 0 0;
}

.character-text-panel::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
  border-radius: 0 0 3px 0;
}

.char-detail-name {
  font-family: var(--font-heading);
  font-size: clamp(20px, 3vw, 26px);
  color: var(--color-title);
  letter-spacing: 3px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.char-epigraph {
  font-style: italic;
  font-size: 14px;
  color: var(--color-accent);
  line-height: 1.4;
  padding: 8px 16px;
  margin-bottom: 12px;
  border-left: 3px solid var(--color-brass-mid);
  background: rgba(255,162,0,0.03);
}

.char-story p {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--color-text);
}

.char-story p:last-child {
  margin-bottom: 0;
}

/* fade transition for character switch */
.character-image-wrap img,
.character-text-panel {
  transition: opacity 0.3s ease;
}


/* ============================================================
   POSTERS — single row, no scrollbar, overlap if needed
   ============================================================ */
.posters-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  overflow: hidden;
}

.poster-link {
  display: block;
  flex-shrink: 1;
  min-width: 0;
  width: 115px;
  border: 1px solid var(--color-brass-dark);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}

.poster-link:hover {
  border-color: var(--color-brass-mid);
  transform: scale(1.05);
  z-index: 2;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 10px var(--color-accent-dim);
}

.poster-link img {
  width: 100%;
  height: auto;
  display: block;
}


/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  text-align: center;
  padding: 20px 24px;
  color: var(--color-text-dim);
  font-size: 13px;
  line-height: 1.6;
  border-top: 1px solid var(--color-brass-dark);
  margin-top: 10px;
}

.footer a {
  color: var(--color-brass-light);
}

.footer a:hover {
  color: var(--color-accent);
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .character-detail {
    flex-direction: column;
    align-items: center;
  }
  .character-image-wrap {
    flex: none;
    max-width: 220px;
  }
  .character-text-panel {
    padding: 16px 18px;
  }
  .screenshots-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .lang-switcher {
    right: -40px;
  }
}

@media (max-width: 680px) {
  body { font-size: 14px; }

  .container { padding: 0 16px; }

  .header-bg { padding: 10px 16px 10px; }
  .logo { max-width: 500px; width: 90%; }
  .header-gears-row { gap: 20px; }
  .header-gear-left { width: 60px; height: 60px; }
  .header-gear-right { width: 50px; height: 50px; }
  .lang-switcher { right: -30px; top: -4px; }
  .lang-switcher img { width: 26px; }

  .character-strip {
    gap: 4px;
    flex-wrap: wrap;
  }
  .char-card {
    width: 64px;
    height: 90px;
  }
  .char-card-name { font-size: 8px; bottom: 3px; }

  .character-image-wrap { max-width: 160px; }

  .screenshots-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .store-badges { gap: 8px; }
  .store-badge { padding: 6px 12px; font-size: 12px; }
  .store-badge .badge-name { font-size: 13px; }
  .store-badge .badge-icon { font-size: 16px; }

  .poster-link { width: 80px; }
}

@media (max-width: 400px) {
  .char-card { width: 56px; height: 78px; }
  .screenshots-grid { grid-template-columns: repeat(2, 1fr); }
  .poster-link { width: 60px; }
}
