/* Arknights: Endfield prelander. Palette follows the official site: near-black, white, signal yellow. */
:root {
  --yellow: #fff200;
  --yellow-deep: #e6d200;
  --ink: #0b0c0e;
  --white: #f4f4f2;
  --grey: #9a9ca0;
  --line: rgba(255, 255, 255, .14);
  --cut: 18px;
}

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

html, body { height: 100%; }

body {
  background: var(--ink);
  color: var(--white);
  font-family: "Rajdhani", system-ui, sans-serif;
  overflow-x: hidden;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Background video ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--ink) url(assets/poster.jpg) center / cover no-repeat; }
.bg__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bg__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(11,12,14,.92) 0%, rgba(11,12,14,.55) 45%, rgba(11,12,14,.15) 100%),
    linear-gradient(0deg, rgba(11,12,14,.95) 0%, rgba(11,12,14,0) 45%);
}
.bg__grid {
  position: absolute; inset: 0; opacity: .35;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(90deg, #000 0%, transparent 70%);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 70%);
}
.bg__scan {
  position: absolute; left: 0; right: 0; height: 120px; top: -120px;
  background: linear-gradient(180deg, transparent, rgba(255,242,0,.06), transparent);
  animation: scan 6s linear infinite;
}
@keyframes scan { to { top: 100%; } }

/* ---------- HUD ---------- */
.hud-top {
  display: flex; justify-content: space-between; gap: 12px;
  padding: max(16px, env(safe-area-inset-top)) 20px 0;
}
.tag {
  font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: .12em;
  padding: 5px 9px; background: var(--yellow); color: var(--ink); white-space: nowrap;
}
.tag--dim { background: rgba(11,12,14,.6); color: var(--white); border: 1px solid var(--line); }
@media (max-width: 480px) { .tag--dim { display: none; } }
.blink { font-style: normal; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Hero ---------- */
.hero {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: 32px 20px 40px;
  max-width: 640px;
}

.kicker {
  display: flex; align-items: center; gap: 10px;
  font-family: "JetBrains Mono", monospace; font-size: 12px; letter-spacing: .2em; color: var(--yellow);
  opacity: 0; animation: rise .6s .1s ease-out forwards;
}
.kicker__bar { width: 28px; height: 3px; background: var(--yellow); }

.title { margin: 14px 0 18px; line-height: .9; font-family: "Oswald", sans-serif; font-weight: 700; }
.title__small {
  display: block; font-size: clamp(18px, 5vw, 26px); letter-spacing: .5em; color: var(--white);
  opacity: 0; animation: rise .6s .25s ease-out forwards;
}
.title__big {
  position: relative; display: inline-block;
  font-size: clamp(64px, 19vw, 132px); letter-spacing: .02em; color: var(--white);
  opacity: 0; animation: rise .7s .4s ease-out forwards;
}
.title__big::after {
  content: attr(data-text); position: absolute; left: 0; top: 0; color: var(--yellow);
  clip-path: inset(0 0 100% 0);
  animation: glitch 4.5s 1.5s infinite;
}
@keyframes glitch {
  0%, 90%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
  92% { clip-path: inset(20% 0 55% 0); transform: translateX(-4px); }
  94% { clip-path: inset(60% 0 15% 0); transform: translateX(4px); }
  96% { clip-path: inset(40% 0 40% 0); transform: translateX(-2px); }
}

.lead {
  font-size: clamp(17px, 4.4vw, 20px); font-weight: 500; line-height: 1.4; color: #d8d9db; max-width: 34em;
  opacity: 0; animation: rise .6s .55s ease-out forwards;
}

.feats { list-style: none; margin: 22px 0 30px; display: grid; gap: 8px; opacity: 0; animation: rise .6s .7s ease-out forwards; }
.feats li {
  display: flex; align-items: center; gap: 12px;
  font-size: 16px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  padding-left: 12px; border-left: 2px solid var(--yellow);
}
.feats b { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--yellow); }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- CTA ---------- */
.cta {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  width: 100%; max-width: 460px; min-height: 76px; padding: 0 28px;
  background: var(--yellow); color: var(--ink); text-decoration: none;
  font-family: "Oswald", sans-serif; font-weight: 700; font-size: clamp(24px, 6.6vw, 32px); letter-spacing: .08em;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  opacity: 0;
  animation: rise .6s .85s ease-out forwards, pulse 1.6s 1.6s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
  transition: background .2s;
}
.cta::before { /* moving hazard stripes */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: repeating-linear-gradient(-45deg, transparent 0 14px, rgba(0,0,0,.07) 14px 28px);
  animation: stripes 1s linear infinite;
}
.cta__shine {
  position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.85), transparent);
  transform: skewX(-20deg);
  animation: shine 2.4s 1.8s ease-in-out infinite;
}
.cta__arrow { display: grid; place-items: center; animation: nudge 1s ease-in-out infinite; }
.cta:hover, .cta:focus-visible { background: #fff; outline: none; }
.cta:active { transform: scale(.97); }

@keyframes pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255,242,0,0)); }
  50% { transform: scale(1.045); filter: drop-shadow(0 0 22px rgba(255,242,0,.75)); }
}
@keyframes shine { 0% { left: -40%; } 60%, 100% { left: 130%; } }
@keyframes stripes { to { background-position: 39.6px 0; } }
@keyframes nudge { 50% { transform: translateX(6px); } }

.cta-note {
  margin-top: 14px; font-family: "JetBrains Mono", monospace; font-size: 12px; letter-spacing: .1em; color: var(--grey);
  opacity: 0; animation: rise .6s 1s ease-out forwards;
}

/* ---------- Bottom ---------- */
.stripes {
  height: 10px;
  background: repeating-linear-gradient(-45deg, var(--yellow) 0 12px, var(--ink) 12px 24px);
  background-size: 34px 34px;
  animation: stripes-move 1.2s linear infinite;
}
@keyframes stripes-move { to { background-position: 34px 0; } }

.foot {
  padding: 12px 20px max(14px, env(safe-area-inset-bottom));
  background: var(--ink); color: #6c6e72; font-size: 12px;
}

.cta__win { flex: none; }

/* ---------- Side HUD panel (desktop only) ---------- */
.panel { display: none; }

/* ---------- Desktop (main target: Windows PC) ---------- */
@media (min-width: 900px) {
  .hud-top, .hero, .foot { padding-left: 7vw; padding-right: 7vw; }
  .hud-top { padding-top: 28px; }
  .tag { font-size: 12px; padding: 6px 12px; }
  .hero { max-width: 980px; padding-top: 0; padding-bottom: 0; }
  .title__small { font-size: 30px; }
  .title__big { font-size: clamp(120px, 11vw, 190px); }
  .lead { font-size: 22px; }
  .feats { gap: 12px; margin: 28px 0 40px; }
  .feats li { font-size: 17px; white-space: nowrap; }
  .cta { max-width: 560px; min-height: 92px; font-size: 38px; --cut: 22px; }
  .cta-note { font-size: 13px; }

  .panel {
    display: block; position: fixed; right: 7vw; bottom: 90px; width: 280px;
    padding: 18px 20px; border: 1px solid var(--line); background: rgba(11,12,14,.55);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    font-family: "JetBrains Mono", monospace; font-size: 12px; letter-spacing: .08em; color: var(--grey);
    opacity: 0; animation: rise .6s 1.1s ease-out forwards;
  }
  .panel::before { content: ""; position: absolute; left: -1px; top: -1px; width: 40px; height: 3px; background: var(--yellow); }
  .panel h2 { font: 600 12px "JetBrains Mono", monospace; letter-spacing: .2em; color: var(--yellow); margin-bottom: 12px; }
  .panel dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; }
  .panel dd { color: var(--white); text-align: right; }
  .panel__bar { margin-top: 14px; height: 4px; background: var(--line); overflow: hidden; }
  .panel__bar i { display: block; height: 100%; width: 40%; background: var(--yellow); animation: load 2.2s ease-in-out infinite; }
}
@keyframes load { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }

/* Smaller laptop screens (1366x768, 1280x720) */
@media (min-width: 900px) and (max-height: 800px) {
  .title__big { font-size: clamp(96px, 9vw, 140px); }
  .feats { margin: 18px 0 26px; }
  .cta { min-height: 78px; font-size: 32px; }
  .panel { bottom: 70px; }
}
@media (min-width: 900px) and (max-width: 1250px) { .panel { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .kicker, .title__small, .title__big, .lead, .feats, .cta, .cta-note { opacity: 1; }
}

/* ---------- Header logo ---------- */
.hud-top { align-items: center; }
.hud-logo { display: block; width: 130px; filter: drop-shadow(0 2px 10px rgba(0,0,0,.6)); }
.hud-logo img { display: block; width: 100%; height: auto; }
.hud-logo__top {
  display: flex; justify-content: space-between; width: 78%; margin-bottom: 5px;
  font: 700 11px/1 "Oswald", sans-serif; color: #fff;
}
.hud-logo__top i { font-style: normal; }
@media (min-width: 900px) { .hud-logo { width: 170px; } .hud-logo__top { font-size: 13px; margin-bottom: 6px; } }
