/* =========================================================
   GLEB'S NIGHT SHIFT
   Cinematic single-page download.
   Palette extracted from the game: warm tungsten lamp on
   cracked plaster walls, deep shadow, red-hot icon glow.
   ========================================================= */

/* — Tokens ------------------------------------------------ */
:root {
  --black: #08090c;
  --surface: #111318;
  --surface-raised: #181b22;
  --rule: rgba(255,255,255,.07);

  /* The only colour that matters: the red glow from the icon */
  --red: hsl(7, 78%, 53%);
  --red-dim: hsl(7, 60%, 38%);

  --fg: hsl(210, 14%, 93%);
  --fg2: hsl(215, 14%, 64%);
  --fg3: hsl(215, 12%, 42%);

  --ff: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  --ease: cubic-bezier(.16,1,.3,1);
}

/* — Reset ------------------------------------------------- */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
img{display:block;max-width:100%}
button{font:inherit;cursor:pointer;border:none;background:none;color:inherit}

body {
  background: var(--black);
  color: var(--fg);
  font: 400 1rem/1.55 var(--ff);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* Protected images */
.pimg {
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* =========================================================
   HERO  — Full-viewport cinematic opener
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 24px 80px;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% center;
  opacity: .45;
  filter: saturate(.6);
}

/* Gradient fade: transparent → black at the bottom */
.hero-fade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, transparent 30%, var(--black) 92%),
    linear-gradient(to right, rgba(8,9,12,.8), transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 560px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.hero-emblem {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  border: 2px solid rgba(255,255,255,.08);
  box-shadow: 0 0 60px 10px rgba(232,83,60,.15);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--fg2);
  max-width: 360px;
}

/* CTA */
.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-primary {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 36px;
  background: var(--red);
  border-radius: 10px;
  transition: .2s var(--ease);
}
.btn-primary:hover {
  background: var(--red-dim);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(232,83,60,.3);
}
.btn-primary:active {
  transform: none;
}

.btn-label {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -.01em;
}
.btn-meta {
  font-size: .78rem;
  opacity: .85;
  font-family: var(--mono);
  letter-spacing: .02em;
}

.btn-outline {
  padding: 16px 24px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  color: var(--fg2);
  font-size: .9rem;
  transition: .2s var(--ease);
}
.btn-outline:hover {
  border-color: rgba(255,255,255,.2);
  color: var(--fg);
}

/* Download notice */
.notice {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  font-family: var(--mono);
  color: var(--fg2);
  margin-top: 2px;
}
.notice-dot {
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink {
  0%,100%{opacity:1}50%{opacity:.2}
}

/* =========================================================
   SCREENSHOTS
   ========================================================= */
.screens {
  padding: 0 24px;
  margin-top: -28px;          /* overlap the hero fade slightly */
  position: relative;
  z-index: 3;
}
.screens-inner {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.screen-main-wrap {
  position: relative;
}
.screen-main {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--rule);
}
.screen-main img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity .15s;
}
/* VHS / surveillance camera effect */
.vhs-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* Scanlines */
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0px,
      transparent 2px,
      rgba(0,0,0,.15) 2px,
      rgba(0,0,0,.15) 4px
    );
  /* Subtle vignette */
  mask-image: none;
}
.vhs-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  /* Vignette darkening at edges */
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,.45) 100%);
}
.vhs-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  /* Chromatic aberration — slight red/cyan shift */
  background:
    linear-gradient(90deg, rgba(255,0,0,.03) 0%, transparent 3%, transparent 97%, rgba(0,255,255,.03) 100%);
  mix-blend-mode: screen;
}

/* Apply slight desaturation + contrast to mimic CCTV feed */
.screen-main img {
  filter: saturate(.75) contrast(1.1);
}

.screen-shield {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.screen-tag {
  position: absolute;
  bottom: 10px; left: 10px;
  z-index: 3;
  font-family: var(--mono);
  font-size: .75rem;
  font-weight: 500;
  color: var(--fg2);
  background: rgba(0,0,0,.7);
  padding: 3px 8px;
  border-radius: 4px;
}

/* Thumbnails */
.screen-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.st {
  aspect-ratio: 16/9;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color .18s;
  background: #000;
}
.st img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .5;
  transition: opacity .18s;
}
.st:hover img { opacity: .8 }
.st[aria-pressed="true"] {
  border-color: var(--red);
}
.st[aria-pressed="true"] img {
  opacity: 1;
}

/* =========================================================
   ABOUT + SPECS  — simple two-column text, no cards
   ========================================================= */
.about {
  padding: 80px 24px 64px;
}
.about-inner {
  max-width: 880px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  border-top: 1px solid var(--rule);
  padding-top: 48px;
}

.about h2 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -.01em;
  margin-bottom: 14px;
  color: var(--fg);
}
.about p {
  color: var(--fg2);
  font-size: .95rem;
  line-height: 1.65;
}

/* Requirements as <dl> */
.specs-dl {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.specs-dl > div {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: .9rem;
}
.specs-dl > div:last-child { border-bottom: none }
.specs-dl dt { color: var(--fg3); font-weight: 400 }
.specs-dl dd { color: var(--fg); font-weight: 500 }

/* =========================================================
   FOOTER
   ========================================================= */
.ft {
  padding: 20px 24px 28px;
  text-align: center;
  font-size: .8rem;
  color: var(--fg3);
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* =========================================================
   TOAST
   ========================================================= */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--surface-raised);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--fg);
  padding: 10px 22px;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 500;
  box-shadow: 0 12px 32px rgba(0,0,0,.65);
  z-index: 500;
  opacity: 0;
  transition: .25s var(--ease);
  pointer-events: none;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Tablet landscape / small desktop */
@media (max-width: 900px) {
  .screens-inner { max-width: 100% }
  .about-inner { max-width: 100%; gap: 48px }
}

/* Tablet portrait */
@media (max-width: 768px) {
  .hero {
    padding: 0 20px 64px;
    min-height: 85vh;
    min-height: 85dvh;
  }
  .hero-emblem { width: 72px; height: 72px; border-radius: 15px }
  .hero-content { gap: 16px }
  .hero-sub { font-size: .95rem }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
  }
  .btn-primary { padding: 14px 24px }
  .btn-outline { padding: 14px 20px; text-align: center }

  .screens { padding: 0 16px }
  .screen-thumbs { gap: 6px }

  .about { padding: 56px 20px 48px }
  .about-inner {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 36px;
  }
}

/* Phone */
@media (max-width: 520px) {
  .hero {
    padding: 0 16px 48px;
    min-height: 80vh;
    min-height: 80dvh;
    align-items: center;
  }
  .hero-bg { object-position: 60% center }
  .hero-emblem {
    width: 64px; height: 64px;
    border-radius: 14px;
    box-shadow: 0 0 40px 8px rgba(232,83,60,.12);
  }
  .hero h1 { font-size: 1.75rem }
  .hero-sub { font-size: .88rem }
  .hero-actions { max-width: 100% }
  .btn-primary { padding: 14px 20px; border-radius: 8px }
  .btn-label { font-size: .95rem }
  .btn-meta { font-size: .72rem }
  .btn-outline { padding: 12px 16px; font-size: .85rem; border-radius: 8px }
  .notice { font-size: .75rem }

  .screens { padding: 0 12px; margin-top: -20px }
  .screen-main { border-radius: 6px }
  .screen-tag {
    bottom: 6px; left: 6px;
    font-size: .68rem;
    padding: 2px 6px;
  }

  .screen-thumbs {
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
  }
  .st { border-radius: 4px; border-width: 1.5px }

  .about { padding: 40px 16px 36px }
  .about-inner { gap: 28px; padding-top: 28px }
  .about h2 { font-size: 1rem; margin-bottom: 10px }
  .about p { font-size: .88rem }
  .specs-dl > div { font-size: .84rem; padding: 8px 0 }

  .ft { padding: 16px 16px 24px; font-size: .75rem }
  .toast { font-size: .82rem; padding: 9px 18px; bottom: 20px }
}

/* Small phone (SE, older androids) */
@media (max-width: 380px) {
  .hero { padding: 0 12px 40px }
  .hero-emblem { width: 56px; height: 56px; border-radius: 12px }
  .hero h1 { font-size: 1.5rem }
  .hero-sub { font-size: .82rem }
  .btn-primary { padding: 12px 16px }
  .btn-label { font-size: .88rem }

  .screen-thumbs {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }

  .screens { padding: 0 8px }
  .about { padding: 32px 12px 28px }
}

/* Safe area for notched phones */
@supports (padding: env(safe-area-inset-bottom)) {
  .ft { padding-bottom: calc(24px + env(safe-area-inset-bottom)) }
  .toast { bottom: calc(20px + env(safe-area-inset-bottom)) }
  .hero { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)) }
}

/* Touch devices: bigger hit targets, no hover effects */
@media (hover: none) and (pointer: coarse) {
  .btn-primary:hover { transform: none; box-shadow: none }
  .btn-outline:hover { border-color: var(--rule); color: var(--fg2) }
  .st { min-height: 44px }
}

/* Landscape phone */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 40px 24px;
    align-items: center;
  }
  .hero-emblem { width: 52px; height: 52px }
  .hero h1 { font-size: 1.5rem }
  .hero-content { gap: 12px }
  .hero-actions { flex-direction: row }
}

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