/* ============================================================
   XFECTION — teaser page
   Single-screen layout: brand + field manual in one viewport.
   Ambient trailer backdrop, dotted world map, blood red on black.
   ============================================================ */

:root {
  --bg: #07070a;
  --blood: #d00000;
  --blood-2: #8f0d0d;
  --blood-dark: #4a0404;
  --bone: #ece7da;
  --muted: #93939c;
  --line: rgba(208, 0, 0, 0.18);
  --font-head: "Anton", Impact, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "Share Tech Mono", ui-monospace, monospace;
}

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

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--bone);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

::selection {
  background: var(--blood);
  color: #fff;
}

.mono {
  font-family: var(--font-mono);
}

.blood {
  color: var(--blood);
  text-shadow: 0 0 26px rgba(208, 0, 0, 0.55);
}

/* ---------- Atmosphere overlays ---------- */

.fx-noise,
.fx-scanlines,
.fx-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.fx-noise {
  z-index: 60;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%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");
}

.fx-scanlines {
  z-index: 61;
  opacity: 0.25;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.28) 0 1px,
    transparent 1px 3px
  );
}

.fx-vignette {
  z-index: 59;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.65) 100%);
}

/* ---------- HUD corners ---------- */

.hud {
  position: absolute;
  z-index: 40;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  color: rgba(208, 0, 0, 0.85);
  padding: 0.55rem 0.7rem;
  pointer-events: none;
  white-space: nowrap;
}

.hud-tl { top: 0.9rem; left: 0.9rem; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.hud-tr { top: 0.9rem; right: 0.9rem; border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
.hud-bl { bottom: 0.9rem; left: 0.9rem; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); display: flex; align-items: center; gap: 0.5rem; }
.hud-br { bottom: 0.9rem; right: 0.9rem; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }

.hud .ok {
  color: #8fce7a;
}

/* ---------- Screen layout ---------- */

.screen {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(3.2rem, 7vh, 4.5rem) clamp(1rem, 4vw, 3rem);
  overflow: hidden;
  background:
    radial-gradient(ellipse 75% 50% at 50% 0%, rgba(208, 0, 0, 0.12), transparent 65%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 72px);
}

/* drifting red fog */
.screen::before {
  content: "";
  position: absolute;
  inset: -25%;
  z-index: 0;
  background: radial-gradient(ellipse 38% 28% at 32% 22%, rgba(208, 0, 0, 0.12), transparent 60%);
  animation: fog 14s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes fog {
  to { transform: translate(14%, 10%) scale(1.2); }
}

/* ---------- Ambient trailer backdrop ---------- */

.bg-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  filter: saturate(0.75) brightness(0.55) contrast(1.15);
  pointer-events: none;
}

/* ---------- World map ---------- */

.map {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
}

.map svg {
  width: min(1150px, 135vw);
  opacity: 0.5;
  transition: filter 1.2s ease;
}

.map svg.spread {
  filter: drop-shadow(0 0 22px rgba(208, 0, 0, 0.3));
}

.map circle {
  fill: rgba(208, 0, 0, 0.2);
  transition: fill 0.6s ease;
}

.map svg.spread circle {
  fill: rgba(255, 26, 26, 0.95);
}

/* ---------- Hero grid: brand + manual ---------- */

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  width: min(1240px, 100%);
}

/* ---------- Brand column ---------- */

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(0.55rem, 1.6vh, 0.95rem);
  text-align: left;
}

.tag {
  color: var(--blood);
  font-size: clamp(0.6rem, 1.6vw, 0.78rem);
  letter-spacing: 0.32em;
  animation: flicker 4s steps(1) infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.2; }
  94% { opacity: 1; }
  96% { opacity: 0.35; }
  97% { opacity: 1; }
}

.logo {
  width: clamp(96px, 11vw, 150px);
  border: 1px solid var(--line);
  animation: breathe 5s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { box-shadow: 0 0 45px rgba(208, 0, 0, 0.25); }
  50% { box-shadow: 0 0 90px rgba(208, 0, 0, 0.5); }
}

.title {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(2.6rem, 5.6vw, 4.4rem);
  line-height: 1;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.8);
}

.tagline {
  color: var(--muted);
  font-size: clamp(0.6rem, 1.8vw, 0.8rem);
  letter-spacing: 0.3em;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.9);
}

.desc {
  max-width: 520px;
  color: var(--muted);
  font-size: clamp(0.88rem, 2vw, 0.97rem);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.9);
}

/* ---------- CTA ---------- */

.btn {
  display: inline-block;
  margin-top: 0.4rem;
  font-family: var(--font-head);
  font-size: clamp(0.88rem, 2vw, 1rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  text-decoration: none;
  padding: 0.95rem 2.1rem;
  background: linear-gradient(180deg, #e10600, var(--blood-2));
  border: 1px solid #ff2b2b55;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  box-shadow: 0 0 28px rgba(208, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 48px rgba(208, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  animation: btn-flicker 0.35s steps(2) 1;
}

@keyframes btn-flicker {
  0% { opacity: 1; }
  50% { opacity: 0.55; }
  100% { opacity: 1; }
}

/* ---------- Status line ---------- */

.soon {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
}

.dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--blood);
  box-shadow: 0 0 12px rgba(208, 0, 0, 0.9);
  animation: pulse 1.5s ease-in-out infinite;
}

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

/* ---------- Field manual panel ---------- */

.manual {
  background: rgba(10, 10, 15, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  box-shadow: 0 0 60px rgba(208, 0, 0, 0.12);
}

.manual-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
}

.mdots {
  display: flex;
  gap: 0.35rem;
}

.mdots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blood-dark);
}

.mdots i:first-child {
  background: var(--blood);
  box-shadow: 0 0 8px rgba(208, 0, 0, 0.7);
}

.manual-list {
  list-style: none;
  display: grid;
  gap: clamp(0.5rem, 1.5vh, 0.85rem);
  padding: clamp(0.85rem, 2.2vh, 1.2rem) clamp(0.95rem, 2vw, 1.3rem);
}

.manual-list li {
  display: grid;
  grid-template-columns: minmax(112px, auto) 1fr;
  gap: 0.9rem;
  align-items: start;
}

.manual-list li > code {
  color: var(--blood);
  font-size: 0.86rem;
  text-shadow: 0 0 12px rgba(208, 0, 0, 0.4);
  white-space: nowrap;
}

.manual-list p {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.manual-list p code {
  color: var(--blood);
}

.ex {
  display: inline-block;
  color: var(--bone);
  background: rgba(208, 0, 0, 0.1);
  border: 1px solid var(--line);
  padding: 0 0.4rem;
  font-size: 0.74rem;
  white-space: nowrap;
}

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

.foot {
  position: absolute;
  bottom: 1rem;
  left: 0;
  right: 0;
  z-index: 1;
  text-align: center;
  color: #55555e;
  font-size: 0.64rem;
  letter-spacing: 0.26em;
  pointer-events: none;
}

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

@media (max-width: 1023px) {
  .screen {
    overflow: visible;
    padding: 2.6rem 1rem 1.4rem;
  }

  .screen::before {
    inset: 0;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    width: min(560px, 100%);
  }

  .brand {
    align-items: center;
    text-align: center;
    gap: 0.5rem;
  }

  .logo {
    width: 74px;
  }

  .tagline {
    font-size: 0.56rem;
    letter-spacing: 0.14em;
  }

  .desc {
    font-size: 0.84rem;
  }

  .btn {
    padding: 0.8rem 1.8rem;
  }

  /* compact manual — everything must fit one screen */
  .manual-head {
    font-size: 0.66rem;
    padding: 0.55rem 0.9rem;
  }

  .manual-list {
    gap: 0.45rem;
    padding: 0.75rem 0.9rem;
  }

  .manual-list li {
    grid-template-columns: minmax(86px, auto) 1fr;
    gap: 0.6rem;
  }

  .manual-list li > code {
    font-size: 0.74rem;
  }

  .manual-list p {
    font-size: 0.72rem;
    line-height: 1.45;
  }

  .ex {
    font-size: 0.68rem;
  }

  .hud {
    display: none;
  }

  .map svg {
    width: 175vw;
    opacity: 0.38;
  }

  .foot {
    position: static;
    margin-top: 1.2rem;
  }
}

@media (max-height: 760px) {
  .logo {
    width: clamp(80px, 16vh, 110px);
  }

  .brand {
    gap: 0.5rem;
  }

  .screen {
    padding-top: 2.6rem;
    padding-bottom: 2.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
