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

/* ==== ПЕРЕМЕННЫЕ (Buckshot Roulette) ==== */
:root {
  --bg:        #0d0d0d;
  --bg-alt:    #141414;
  --surface:   #1a1a1a;
  --surface-2: #222222;
  --border:    #2e2e2e;
  --border-hi: #3d3d3d;

  --text:      #d4d4d4;
  --text-dim:  #8a8a8a;
  --text-mute: #555555;

  --accent:      #9e2b2b;
  --accent-hi:   #c43a3a;
  --accent-glow: rgba(158, 43, 43, 0.35);

  --font-head: 'Oswald', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius: 2px;
  --container: 1200px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* ==== ШУМ / ЗЕРНО ==== */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.05;
  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='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==== КОНТЕЙНЕР ==== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==== ТИПОГРАФИКА ==== */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #e8e8e8;
  line-height: 1.1;
}

.accent { color: var(--accent-hi); }

/* ==== ГИЛЬЗЫ (ПОВЕРХ ВСЕГО КОНТЕНТА) ==== */
.shells-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  overflow: hidden;
}

.shell {
  position: absolute;
  width: 16px;
  height: 48px;
  border-radius: 2px 2px 4px 4px;
  opacity: 0.55;
  will-change: transform;
}

.shell.shell-blue {
  background: linear-gradient(
    to right,
    #16324f 0%,
    #3a6ea8 22%,
    #7db8e8 48%,
    #3a6ea8 72%,
    #16324f 100%
  );
  box-shadow:
    inset 0 -10px 0 #1f4468,
    inset 0 -14px 0 #0e2740,
    0 0 8px rgba(80, 140, 220, 0.45);
}

.shell.shell-red {
  background: linear-gradient(
    to right,
    #4a1414 0%,
    #a83a3a 22%,
    #e87d7d 48%,
    #a83a3a 72%,
    #4a1414 100%
  );
  box-shadow:
    inset 0 -10px 0 #681f1f,
    inset 0 -14px 0 #400e0e,
    0 0 8px rgba(220, 80, 80, 0.45);
}

.shell::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 11px;
  border-radius: 0 0 4px 4px;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.5);
}
.shell-blue::before {
  background: linear-gradient(to bottom, #7db8e8 0%, #3a6ea8 50%, #16324f 100%);
}
.shell-red::before {
  background: linear-gradient(to bottom, #e87d7d 0%, #a83a3a 50%, #4a1414 100%);
}

.shell::after {
  content: '';
  position: absolute;
  left: 3px;
  right: 3px;
  top: 7px;
  height: 2px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 1px;
}

/* ==== HEADER ==== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.08em;
  color: #e8e8e8;
  text-decoration: none;
  white-space: nowrap;
}
.logo-mark { color: var(--accent-hi); margin-right: 6px; }
.logo-accent { color: var(--accent-hi); }

.nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.nav-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-link:hover { color: var(--text); }
.nav-link.active {
  color: var(--accent-hi);
  border-bottom-color: var(--accent-hi);
}

/* ==== КНОПКИ ==== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  background: none;
  color: inherit;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #f0f0f0;
  border-color: var(--accent-hi);
}
.btn-primary:hover {
  background: var(--accent-hi);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-outline {
  border-color: var(--border-hi);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--accent-hi);
  color: var(--accent-hi);
}

.btn-ghost {
  color: var(--text-dim);
  border-color: var(--border);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-hi);
}

.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 12px; }

/* ==== HERO ==== */
.hero {
  position: relative;
  z-index: 1;
  padding: 120px 0 100px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(200, 200, 200, 0.04) 0%, transparent 50%);
}

.hero-inner { max-width: 720px; }

.hero-tag {
  font-size: 13px;
  color: var(--accent-hi);
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.95;
  margin-bottom: 28px;
}

.hero-sub {
  font-size: 15px;
  color: var(--text-dim);
  max-width: 520px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-meta {
  display: flex;
  gap: 28px;
  font-size: 13px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hero-meta span::before {
  content: '▮ ';
  color: var(--accent);
}

.hero-scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(255,255,255,0.01) 3px,
    rgba(255,255,255,0.01) 4px
  );
  pointer-events: none;
}

/* ==== СЕКЦИИ ==== */
.section {
  position: relative;
  z-index: 1;
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-size: 32px;
  margin-bottom: 40px;
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.section-title .num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent-hi);
  letter-spacing: 0.1em;
}

/* ==== КАРТОЧКА КВЕСТА ==== */
.quest-card {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.quest-card-media {
  position: relative;
  min-height: 320px;
}

.media-placeholder {
  width: 100%;
  height: 100%;
  min-height: 320px;
  background: linear-gradient(135deg, #1f1f1f 0%, #0d0d0d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 40px;
  letter-spacing: 0.2em;
  color: rgba(200, 200, 200, 0.25);
}

.badge {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  background: rgba(0,0,0,0.7);
  border: 1px solid var(--border-hi);
  text-transform: uppercase;
}
.badge-danger { color: #8b1a1a; border-color: #6b1414; }
.quest-card-body {
  padding: 32px 32px 32px 0;
  display: flex;
  flex-direction: column;
}

.quest-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.quest-card-title { font-size: 28px; }

.quest-card-desc {
  color: var(--text-dim);
  margin-bottom: 20px;
}

.quest-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: auto;
}

.tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border: 1px solid var(--border-hi);
  color: var(--text-dim);
  border-radius: var(--radius);
}

.quest-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.price-value { font-family: var(--font-head); font-size: 24px; color: #e8e8e8; }
.price-note { color: var(--text-mute); font-size: 13px; }

.quest-card-actions { display: flex; gap: 10px; }

/* ==== ПРАВИЛА ==== */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.rule {
  background: var(--bg-alt);
  padding: 28px 24px;
}
.rule-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-hi);
  margin-bottom: 12px;
}
.rule h4 { font-size: 16px; margin-bottom: 10px; }
.rule p { font-size: 14px; color: var(--text-dim); }

/* ==== КОНТАКТЫ ==== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-lead { color: var(--text-dim); }

.contact-list { list-style: none; }
.contact-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.contact-list span { color: var(--text-mute); text-transform: uppercase; font-size: 12px; letter-spacing: 0.06em; }
.contact-list a { color: var(--text); text-decoration: none; border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s; }
.contact-list a:hover { color: var(--accent-hi); border-bottom-color: var(--accent-hi); }

/* ==== FOOTER ==== */
.site-footer {
  position: relative;
  z-index: 1;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-note { font-size: 12px; color: var(--text-mute); letter-spacing: 0.06em; }

/* ==== АДАПТИВ ==== */
@media (max-width: 900px) {
  .quest-card { grid-template-columns: 1fr; }
  .quest-card-body { padding: 24px; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .rules-grid { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
  .header-cta { margin-left: auto; }
}

@media (max-width: 560px) {
  .hero { padding: 80px 0 60px; }
  .section { padding: 56px 0; }
  .section-title { font-size: 24px; }
  .quest-card-title { font-size: 22px; }
  .hero-meta { flex-wrap: wrap; gap: 14px; }
  .rules-grid { grid-template-columns: 1fr; }
}

/* ==== ИНТРО-АНИМАЦИЯ ==== */
.intro {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  animation: introFade 2.5s ease-in-out forwards;
}

.intro-silhouette {
  position: absolute;
  width: 220px;
  height: 380px;
  background: radial-gradient(
    ellipse at center,
    rgba(30, 30, 30, 1) 0%,
    rgba(20, 20, 20, 1) 40%,
    transparent 75%
  );
  border-radius: 50% 50% 40% 40% / 60% 60% 30% 30%;
  opacity: 0;
  filter: blur(6px);
  animation: silhouetteAppear 1s ease-out forwards;
}

.intro::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 40%,
    rgba(200, 200, 200, 0.6) 50%,
    transparent 60%
  );
  opacity: 0;
  animation: flash 0.15s ease-out 0.85s;
  pointer-events: none;
}

.intro-text {
  position: relative;
  z-index: 2;
  font-family: var(--font-head);
  font-size: clamp(36px, 8vw, 96px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  line-height: 0.95;
  color: #e8e8e8;
  opacity: 0;
  animation: textAppear 1.3s ease-out 1s forwards;
  text-shadow: 0 0 30px rgba(200, 200, 200, 0.3);
}

@keyframes introFade {
  0%   { opacity: 1; }
  85%  { opacity: 1; }
  100% { opacity: 0; pointer-events: none; visibility: hidden; }
}

@keyframes silhouetteAppear {
  0%   { opacity: 0;   filter: blur(20px); }
  60%  { opacity: 0.9; filter: blur(6px);  }
  90%  { opacity: 0.9; filter: blur(6px);  }
  100% { opacity: 0;   filter: blur(0);    }
}

@keyframes flash {
  0%   { opacity: 0; }
  30%  { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes textAppear {
  0% { opacity: 0; transform: translateY(10px) scale(0.98); letter-spacing: 0.06em; }
  20% { opacity: 1; transform: translateY(0) scale(1); }
  30% { opacity: 0.7; }
  40% { opacity: 1; transform: translateX(-2px); }
  45% { transform: translateX(2px); }
  50% { transform: translateX(-1px); }
  60% { transform: translateX(0); opacity: 1; }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==== ПАРАЛЛАКС-СЕКЦИЯ ==== */
.parallax {
  position: relative;
  z-index: 1;
  min-height: 90vh;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse at 50% 40%, rgba(158, 43, 43, 0.10) 0%, transparent 60%),
    var(--bg);
  perspective: 1200px;
}

.parallax-inner {
  position: relative;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

.parallax-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  will-change: transform, opacity;
}

.parallax-word {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(80px, 18vw, 260px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  user-select: none;
}

.layer-back .parallax-word {
  color: rgba(232, 232, 232, 0.06);
  filter: blur(1px);
}

.layer-mid .parallax-word.outline {
  color: transparent;
  -webkit-text-stroke: 2px rgba(232, 232, 232, 0.35);
  text-shadow: 0 0 60px rgba(200, 200, 200, 0.08);
}

.layer-front .parallax-word.accent {
  color: var(--accent-hi);
  text-shadow:
    0 0 30px rgba(196, 58, 58, 0.6),
    0 0 80px rgba(196, 58, 58, 0.3);
  font-size: clamp(60px, 14vw, 200px);
}

.parallax-caption {
  position: relative;
  z-index: 10;
  text-align: center;
  will-change: transform;
}

.parallax-title {
  font-size: clamp(36px, 6vw, 80px);
  line-height: 0.95;
  margin-top: 16px;
  color: #e8e8e8;
  text-shadow: 0 0 40px rgba(0, 0, 0, 0.9);
}

.parallax-scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(255, 255, 255, 0.015) 3px,
    rgba(255, 255, 255, 0.015) 4px
  );
}

@media (max-width: 700px) {
  .parallax,
  .parallax-inner { min-height: 70vh; height: 70vh; }
  .parallax-word { font-size: clamp(56px, 22vw, 140px); }
  .parallax-title { font-size: clamp(28px, 8vw, 48px); }
}