/* ============================================================
   KUNI — Day of Defeat: Source  |  WWII Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Special+Elite&family=Oswald:wght@400;700&family=Bebas+Neue&family=UnifrakturMaguntia&display=swap');

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

:root {
  --olive:       #4a4a1e;
  --olive-light: #6b6b2a;
  --khaki:       #8a7a3e;
  --cream:       #d4c49a;
  --paper:       #c9b87a;
  --rust:        #8b2500;
  --rust-light:  #b83200;
  --dark:        #1a1a0e;
  --darker:      #0e0e06;
  --metal:       #3a3a2a;
  --metal-light: #555540;
  --warn:        #d4a017;
  --font-title:  'Bebas Neue', sans-serif;
  --font-body:   'Special Elite', serif;
  --font-accent: 'Oswald', sans-serif;
  --font-fraktur:'UnifrakturMaguntia', cursive;
}

html { scroll-behavior: smooth; }

/* ---- CYRILLIC FONT OVERRIDES (RU) ----------------------- */
/* Bebas Neue / Oswald не поддерживают кириллицу            */
/* Russo One — советский военный стиль, полная кириллица     */
/* Philosopher — засечки с характером, полная кириллица      */
html[lang="ru"] {
  --font-title:  'Russo One', sans-serif;
  --font-accent: 'Russo One', sans-serif;
  --font-body:   'Philosopher', serif;
}

body {
  background-color: var(--darker);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

/* Subtle global paper texture via repeating gradient */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.03) 2px,
      rgba(0,0,0,0.03) 4px
    );
}

/* ---- NOISE OVERLAY --------------------------------------- */
.noise-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* ---- SCANLINES ------------------------------------------ */
.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: repeating-linear-gradient(
    180deg,
    rgba(0,0,0,0) 0px,
    rgba(0,0,0,0) 3px,
    rgba(0,0,0,0.12) 3px,
    rgba(0,0,0,0.12) 4px
  );
}

/* ---- HERO / HEADER -------------------------------------- */
.hero {
  position: relative;
  background: var(--darker);
  border-bottom: 4px solid var(--olive);
  overflow: hidden;
}

/* Camouflage stripe across the very top */
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: repeating-linear-gradient(
    90deg,
    var(--rust)       0px,  var(--rust)       40px,
    var(--olive)      40px, var(--olive)       90px,
    var(--metal)      90px, var(--metal)      130px,
    var(--olive-light)130px,var(--olive-light) 170px
  );
  opacity: 0.8;
  z-index: 5;
}

/* Bottom camo stripe */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--khaki)  0px, var(--khaki)  30px,
    var(--metal)  30px,var(--metal)  60px,
    var(--olive)  60px,var(--olive)  100px
  );
  opacity: 0.6;
  z-index: 5;
}

.hero-inner {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 22px 48px;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  gap: 28px;
}

/* ---- LOGO BLOCK ----------------------------------------- */
.logo-block {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: nowrap;
}

/* Patch-style frame — like a military unit insignia */
.logo-frame {
  position: relative;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  background: #000;
  border: 2px solid var(--khaki);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.8),
    0 0 14px rgba(180,160,80,0.25),
    inset 0 0 8px rgba(0,0,0,0.9);
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.1) brightness(0.85);
}

.logo-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(210,185,100,0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* Corner rivets on logo frame */
.logo-frame::before,
.logo-frame::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: var(--khaki);
  border-style: solid;
  z-index: 2;
}
.logo-frame::before {
  top: -3px; left: -3px;
  border-width: 2px 0 0 2px;
}
.logo-frame::after {
  bottom: -3px; right: -3px;
  border-width: 0 2px 2px 0;
}

/* Vertical separator between logo and text */
.logo-divider {
  width: 2px;
  height: 70px;
  background: linear-gradient(180deg, transparent, var(--khaki) 30%, var(--rust) 70%, transparent);
  flex-shrink: 0;
  opacity: 0.6;
}

.logo-text-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.logo-title {
  font-family: var(--font-fraktur);
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  color: var(--cream);
  text-shadow:
    1px 1px 0 #000,
    0 0 20px rgba(200,180,80,0.45);
  letter-spacing: 3px;
  line-height: 1;
}

.logo-subtitle {
  font-family: var(--font-accent);
  font-size: clamp(0.65rem, 1.4vw, 0.82rem);
  color: var(--khaki);
  letter-spacing: 3px;
  text-transform: uppercase;
  border-left: 2px solid var(--rust);
  padding-left: 8px;
  line-height: 1.5;
  opacity: 0.9;
}

/* ---- BARBED WIRE DECORATIONS ---------------------------- */
.barbed-wire {
  position: absolute;
  left: 0; right: 0;
  height: 18px;
  z-index: 4;
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      transparent 12px,
      var(--metal) 12px,
      var(--metal) 14px
    );
  opacity: 0.5;
}
.barbed-wire.top  { top: 0; }
.barbed-wire.bottom { bottom: 0; }
.barbed-wire::before {
  content: '';
  display: block;
  height: 2px;
  background: var(--metal-light);
  margin-top: 8px;
}

/* ---- STAMPS --------------------------------------------- */
.stamp {
  font-family: var(--font-accent);
  font-weight: 700;
  font-size: 2.4rem;
  letter-spacing: 6px;
  border: 5px solid;
  padding: 6px 18px;
  transform-origin: center;
  position: absolute;
  opacity: 0.12;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.stamp-left {
  color: var(--rust);
  border-color: var(--rust);
  transform: rotate(-18deg);
  top: 60px;
  left: 40px;
}
.stamp-right {
  color: var(--olive-light);
  border-color: var(--olive-light);
  transform: rotate(12deg);
  top: 40px;
  right: 40px;
}

/* ---- MAIN CONTENT --------------------------------------- */
.content {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

/* ---- SECTION TITLE -------------------------------------- */
.section-title {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.main-heading {
  font-family: var(--font-title);
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--cream);
  letter-spacing: 2px;
  line-height: 1.2;
  text-shadow: 2px 2px 0 #000, 0 0 20px rgba(200,180,80,0.2);
  margin-bottom: 20px;
}

.divider-wire {
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--khaki) 0px,
    var(--khaki) 20px,
    transparent 20px,
    transparent 26px,
    var(--rust) 26px,
    var(--rust) 28px,
    transparent 28px,
    transparent 34px
  );
  margin: 0 auto;
  max-width: 500px;
  opacity: 0.7;
}

/* ---- SECTION WHAT --------------------------------------- */
.section-what {
  margin-bottom: 60px;
}

.section-label {
  font-family: var(--font-accent);
  font-size: 1.1rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--khaki);
  margin-bottom: 28px;
  border-bottom: 1px solid var(--metal-light);
  padding-bottom: 10px;
}

/* ---- ACCORDION ------------------------------------------ */
.accordion {
  margin-bottom: 16px;
  border: 2px solid var(--metal);
  background: rgba(26,26,14,0.85);
  position: relative;
}

.accordion::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--rust) 0%, var(--khaki) 100%);
}

.accordion-btn {
  width: 100%;
  background: linear-gradient(90deg, rgba(74,74,30,0.6) 0%, rgba(26,26,14,0.95) 100%);
  border: none;
  color: var(--cream);
  font-family: var(--font-accent);
  font-size: 1.05rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 18px 24px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: background 0.2s;
}

.accordion-btn:hover {
  background: linear-gradient(90deg, rgba(100,100,40,0.7) 0%, rgba(40,40,20,0.95) 100%);
}

.acc-icon {
  font-size: 0.8rem;
  transition: transform 0.3s;
  color: var(--khaki);
  flex-shrink: 0;
}

.accordion.open .acc-icon {
  transform: rotate(90deg);
}

.accordion-body {
  display: none;
  padding: 24px 28px 28px;
  border-top: 1px solid var(--metal);
  animation: fadeIn 0.25s ease;
}

.accordion.open .accordion-body {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- PATH BOX ------------------------------------------- */
.path-box {
  background: rgba(0,0,0,0.55);
  border: 1px solid var(--metal);
  border-left: 4px solid var(--khaki);
  padding: 14px 18px;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.path-box code {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--warn);
  letter-spacing: 0.5px;
  word-break: break-all;
}

/* ---- DOWNLOAD LIST -------------------------------------- */
.download-label {
  font-family: var(--font-accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--khaki);
  margin-bottom: 10px;
}

.download-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dl-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--cream);
  text-decoration: none;
  font-family: var(--font-accent);
  font-size: 1rem;
  letter-spacing: 1px;
  border: 1px solid var(--metal);
  padding: 10px 20px;
  background: rgba(74,74,30,0.3);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.dl-link::before {
  content: '';
  position: absolute;
  left: -100%;
  top: 0; bottom: 0;
  width: 100%;
  background: linear-gradient(90deg, transparent, rgba(200,180,80,0.1), transparent);
  transition: left 0.4s;
}

.dl-link:hover::before { left: 100%; }

.dl-link:hover {
  color: #fff;
  border-color: var(--khaki);
  background: rgba(100,100,40,0.4);
  box-shadow: 0 0 12px rgba(200,180,80,0.2);
}

.dl-icon {
  font-size: 1.2rem;
  color: var(--warn);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* ---- WARNING BOX ---------------------------------------- */
.warning-box {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: rgba(139,37,0,0.18);
  border: 1px solid var(--rust);
  border-left: 4px solid var(--rust-light);
  padding: 14px 18px;
  margin: 16px 0 20px;
  font-size: 0.92rem;
  line-height: 1.6;
}

.warn-icon {
  font-size: 1.5rem;
  color: var(--warn);
  flex-shrink: 0;
  line-height: 1.4;
  animation: flicker 3s infinite;
}

@keyframes flicker {
  0%, 95%, 100% { opacity: 1; }
  96%            { opacity: 0.3; }
  97%            { opacity: 1; }
  98%            { opacity: 0.5; }
  99%            { opacity: 1; }
}

/* ---- CONNECT SECTION ------------------------------------ */
.section-connect {
  text-align: center;
  padding: 60px 0 20px;
  position: relative;
}

.section-connect::before {
  content: '';
  display: block;
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px, transparent 8px,
    var(--metal) 8px, var(--metal) 10px
  );
  margin-bottom: 50px;
  opacity: 0.5;
}

.connect-lead {
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--cream);
  margin-bottom: 40px;
  line-height: 1.5;
  opacity: 0.85;
}

.connect-cmd-wrap {
  display: flex;
  justify-content: center;
}

/* Styled like a military field order / telegraph message */
.connect-cmd-outer {
  display: inline-block;
  border: 2px solid var(--khaki);
  padding: 6px;
  position: relative;
  background: rgba(10,10,5,0.6);
  box-shadow:
    0 0 0 1px var(--metal),
    0 0 30px rgba(180,155,60,0.12),
    inset 0 0 20px rgba(0,0,0,0.6);
}

/* Corner marks like a stamped document */
.connect-cmd-outer::before,
.connect-cmd-outer::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border-color: var(--rust);
  border-style: solid;
}
.connect-cmd-outer::before {
  top: -2px; left: -2px;
  border-width: 3px 0 0 3px;
}
.connect-cmd-outer::after {
  bottom: -2px; right: -2px;
  border-width: 0 3px 3px 0;
}

.connect-cmd-inner {
  border: 1px solid rgba(180,155,60,0.3);
  padding: 28px 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* "FIELD ORDER №1" label above command */
.connect-cmd-label {
  font-family: var(--font-accent);
  font-size: 0.72rem;
  letter-spacing: 5px;
  color: var(--rust-light);
  text-transform: uppercase;
  border-bottom: 1px solid rgba(180,155,60,0.25);
  padding-bottom: 10px;
  width: 100%;
  text-align: center;
  margin-bottom: 6px;
}

.connect-cmd {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--cream);
  letter-spacing: 4px;
  text-shadow:
    1px 1px 0 #000,
    0 0 18px rgba(212,192,120,0.35);
}

.cmd-prefix {
  color: var(--rust-light);
  font-size: 0.7em;
  opacity: 0.7;
  font-family: var(--font-accent);
  letter-spacing: 2px;
  align-self: flex-end;
  margin-bottom: 4px;
}

.cmd-text {
  color: var(--cream);
}

.cmd-cursor {
  animation: blink 1.2s step-end infinite;
  color: var(--khaki);
  font-size: 0.85em;
}

/* small sub-label below command */
.connect-cmd-footer {
  font-family: var(--font-accent);
  font-size: 0.6rem;
  letter-spacing: 6px;
  color: var(--metal-light);
  text-transform: uppercase;
  margin-top: 10px;
  opacity: 0.45;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ---- FOOTER --------------------------------------------- */
.site-footer {
  position: relative;
  background: var(--darker);
  border-top: 4px solid var(--olive);
  padding: 0;
  overflow: hidden;
  text-align: center;
}

.footer-noise {
  opacity: 0.04;
}

.footer-inner {
  position: relative;
  z-index: 2;
  padding: 50px 24px 40px;
}

/* Decorative corner marks */
.footer-inner::before,
.footer-inner::after {
  content: '✦ ✦ ✦';
  display: block;
  font-size: 0.8rem;
  color: var(--metal-light);
  letter-spacing: 8px;
  margin-bottom: 20px;
}
.footer-inner::after {
  margin-bottom: 0;
  margin-top: 20px;
}

.easter-egg-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.easter-trigger {
  font-size: 1.4rem;
  color: var(--metal-light);
  cursor: default;
  transition: color 0.3s, text-shadow 0.3s;
}

.easter-trigger:hover {
  color: var(--warn);
  text-shadow: 0 0 10px var(--warn);
}

.easter-text {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--cream);
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.6s ease, max-width 0.8s ease;
}

.easter-text.visible {
  opacity: 1;
  max-width: 600px;
}

.footer-tagline {
  font-family: var(--font-title);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: 4px;
  color: var(--khaki);
  text-shadow: 2px 2px 0 #000;
}

/* ---- BULLET HOLES (decorative) -------------------------- */
.bullet-holes {
  position: relative;
  height: 20px;
  pointer-events: none;
  margin-bottom: 20px;
}

.bullet-holes::before,
.bullet-holes::after {
  content: '• • •';
  position: absolute;
  top: 0;
  font-size: 1.5rem;
  color: var(--metal);
  letter-spacing: 12px;
  opacity: 0.4;
}
.bullet-holes::before { left: 0; }
.bullet-holes::after  { right: 0; }

/* ---- LANG SWITCHER -------------------------------------- */
.lang-switcher {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--metal);
  padding: 6px 14px;
  background: rgba(0,0,0,0.45);
  position: relative;
}

/* corner marks */
.lang-switcher::before,
.lang-switcher::after {
  content: '';
  position: absolute;
  width: 8px; height: 8px;
  border-color: var(--khaki);
  border-style: solid;
  opacity: 0.6;
}
.lang-switcher::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.lang-switcher::after  { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

.lang-btn {
  background: none;
  border: none;
  font-family: var(--font-accent);
  font-size: 0.78rem;
  letter-spacing: 3px;
  color: var(--metal-light);
  cursor: pointer;
  padding: 2px 4px;
  transition: color 0.2s, text-shadow 0.2s;
  text-transform: uppercase;
}

.lang-btn:hover {
  color: var(--cream);
}

.lang-btn.active {
  color: var(--khaki);
  text-shadow: 0 0 8px rgba(180,155,60,0.5);
}

.lang-sep {
  color: var(--metal);
  font-size: 0.8rem;
  opacity: 0.5;
}

/* ---- RESPONSIVE ----------------------------------------- */
@media (max-width: 640px) {
  .logo-block      { gap: 20px; }
  .logo-frame      { width: 110px; height: 110px; }
  .logo-title      { font-size: 3.5rem; }
  .connect-cmd     { padding: 14px 22px; }
  .stamp           { display: none; }
  .accordion-btn   { font-size: 0.9rem; padding: 14px 18px; }
  .accordion-body  { padding: 18px 18px 20px; }
}
