@font-face {
  font-family: "Oswald";
  src: url("fonts/oswald.woff2") format("woff2");
  font-weight: 200 700;
  font-display: swap;
}
@font-face {
  font-family: "PT Mono";
  src: url("fonts/ptmono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #050708;          /* tone of the menu plate, as on the boot splash */
  --ink: rgba(5, 13, 18, 0.82);
  --line: #294a5e;        /* steel teal seam */
  --line-dim: rgba(41, 74, 94, 0.55);
  --text: #c9d3d6;
  --text-dim: #7d8f96;
  --tele: #5f8191;        /* telemetry */
  --title: #e9e4d4;
  --alarm: #c8402e;
  --warm: #d9a066;
  --mono: "PT Mono", Consolas, "Courier New", monospace;
  --display: "Oswald", Impact, "Arial Narrow", sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; display: block; }
a { color: inherit; }

/* Language switch: everything exists twice, the inactive copy is hidden. */
html[lang="ru"] [data-l="en"],
html[lang="en"] [data-l="ru"] { display: none !important; }

.tele {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tele);
}
.dim { opacity: 0.6; }

/* Corner brackets around the viewport, like the menu overlay. */
.frame { position: fixed; inset: 10px; pointer-events: none; z-index: 30; }
.frame .c { position: absolute; width: 18px; height: 18px; border: 0 solid var(--line); }
.frame .tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.frame .tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.frame .bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.frame .br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

.bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 22px var(--gutter) 0;
}
.langs { display: flex; gap: 6px; }
.langs button {
  font: 13px/1 var(--mono); letter-spacing: 0.1em;
  color: var(--text-dim); background: var(--ink);
  border: 1px solid var(--line-dim); padding: 7px 10px; cursor: pointer;
}
.langs button[aria-pressed="true"] { color: var(--title); border-color: var(--line); }
.langs button[aria-pressed="true"]::before { content: "> "; color: var(--tele); }
.langs button:hover, .langs button:focus-visible { color: var(--title); outline: none; border-color: var(--line); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  padding: 90px var(--gutter) clamp(28px, 6vh, 64px);
  isolation: isolate;
}
.hero-bg, .hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-bg { z-index: -1; }
.hero-bg img { object-fit: cover; object-position: 40% 50%; image-rendering: pixelated; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(5,7,8,0.55) 0%, rgba(5,7,8,0.15) 30%, rgba(5,7,8,0.6) 62%, var(--bg) 100%),
    radial-gradient(ellipse at 30% 40%, transparent 30%, rgba(5,7,8,0.5) 100%);
}
.hero-in { width: 100%; max-width: 1240px; margin: 0 auto; }

/* Title: two copies cut at the seam, the lower half shifted ("decorrelation"). */
.title {
  position: relative; margin: 6px 0 22px;
  font-family: var(--display); font-weight: 700;
  /* the line is ~9.6em wide plus the shifted half: fit it into the content width */
  font-size: clamp(24px, calc((100vw - 2 * var(--gutter)) / 10.2), 148px); line-height: 1;
  letter-spacing: 0.01em; color: var(--title);
  white-space: nowrap;
  text-shadow: 0 0.04em 0.08em rgba(0,0,0,0.6);
}
.title .slice { display: block; }
.title .top { clip-path: inset(0 0 54% 0); }
.title .bot {
  position: absolute; left: 0; top: 0;
  clip-path: inset(46% 0 0 0);
  transform: translateX(0.12em);
  animation: jerk 9s steps(1) infinite;
}
.title .seam {
  position: absolute; left: -2%; right: -6%; top: 46%; height: 1px;
  background: var(--line); opacity: 0.9;
}
@keyframes jerk {
  0%, 91%, 100% { transform: translateX(0.12em); }
  92% { transform: translateX(0.2em); }
  93% { transform: translateX(0.06em); }
  94% { transform: translateX(0.14em); }
}

.plate {
  background: var(--ink);
  border: 1px solid var(--line);
  padding: clamp(18px, 3vw, 30px);
  position: relative;
}
.plate::before {
  content: ""; position: absolute; inset: -1px auto auto -1px; width: 28px; height: 3px; background: var(--line);
}
.hero-plate { max-width: 660px; }
.hero-plate p { margin: 0 0 14px; }
.sub {
  font-family: var(--display); font-weight: 500;
  font-size: 15px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--tele);
}
.meta { margin: 16px 0 0 !important; font-size: 11px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.btn {
  display: inline-block; text-decoration: none;
  font: 14px/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text); background: transparent;
  border: 1px solid var(--line); padding: 12px 18px;
  transition: background 0.15s, color 0.15s;
}
.btn::before { content: "  "; white-space: pre; color: var(--tele); }
.btn:hover::before, .btn:focus-visible::before { content: "> "; }
.btn:hover, .btn:focus-visible { background: rgba(41, 74, 94, 0.35); color: var(--title); outline: none; animation: strobe 0.24s steps(2) 1; }
.btn.primary { background: var(--line); color: var(--title); }
.btn.primary:hover, .btn.primary:focus-visible { background: #33607a; }
@keyframes strobe { 50% { background: rgba(233, 228, 212, 0.18); } }

/* ---------- blocks ---------- */
.block { max-width: 1240px; margin: 0 auto; padding: clamp(40px, 7vw, 84px) var(--gutter) 0; }
.hd {
  display: flex; align-items: baseline; gap: 14px;
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  font-size: clamp(26px, 4vw, 44px); letter-spacing: 0.04em; line-height: 1.1;
  color: var(--title); margin: clamp(36px, 5vw, 64px) 0 22px;
  border-bottom: 1px solid var(--line-dim); padding-bottom: 12px;
}
.block > .hd:first-child { margin-top: 0; }
.hd .no { font: 12px var(--mono); color: var(--tele); letter-spacing: 0.12em; }
.hd .no::before { content: "["; } .hd .no::after { content: "]"; }

.row { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(20px, 4vw, 48px); align-items: center; margin-bottom: clamp(28px, 4vw, 48px); }
.row.flip .text { order: 2; }
.text p { margin: 0 0 14px; }
.beat { color: var(--alarm); letter-spacing: 0.04em; }

.shot { margin: 0; border: 1px solid var(--line-dim); cursor: zoom-in; position: relative; }
.shot img { width: 100%; height: auto; image-rendering: pixelated; }
.shot::after {
  content: ""; position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px;
  border: 0 solid var(--line); border-right-width: 1px; border-bottom-width: 1px;
}
.shot.warm { border-color: rgba(217, 160, 102, 0.45); }

.video { position: relative; border: 1px solid var(--line); background: #000; aspect-ratio: 16 / 9; }
.video video, .video iframe { width: 100%; height: 100%; border: 0; }

.feat { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 36px; }
.feat li { padding: 10px 0 10px 26px; position: relative; border-bottom: 1px solid rgba(41, 74, 94, 0.25); }
.feat li::before { content: ">"; position: absolute; left: 4px; color: var(--tele); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid button {
  padding: 0; border: 1px solid var(--line-dim); background: #000; cursor: zoom-in;
  aspect-ratio: 16 / 9; overflow: hidden;
}
.grid button img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; transition: opacity 0.2s, transform 0.4s; opacity: 0.86; }
.grid button:hover img, .grid button:focus-visible img { opacity: 1; transform: scale(1.03); }
.grid button:focus-visible { outline: 1px solid var(--title); outline-offset: 2px; }

.notice { text-align: center; }
.advice { font-family: var(--display); font-weight: 500; font-size: clamp(20px, 2.6vw, 28px); color: var(--title); letter-spacing: 0.03em; margin: 0 0 12px; line-height: 1.3; }
.warn { margin: 0; color: var(--text-dim); font-size: 14px; }
.warn b { color: var(--alarm); font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; }


.foot { max-width: 1240px; margin: 0 auto; padding: clamp(60px, 9vw, 110px) var(--gutter) 46px; text-align: center; }
.foot-logo { width: min(560px, 90%); height: auto; margin: 0 auto 18px; opacity: 0.85; }

/* ---------- lightbox ---------- */
dialog#lightbox {
  width: min(1400px, 100vw); max-width: 100vw; max-height: 100vh;
  padding: 16px; margin: auto; background: var(--bg); color: var(--text);
  border: 1px solid var(--line);
}
dialog#lightbox::backdrop { background: rgba(2, 3, 4, 0.92); }
dialog#lightbox figure { margin: 0; }
dialog#lightbox img { width: 100%; height: auto; max-height: calc(100vh - 170px); object-fit: contain; image-rendering: pixelated; }
dialog#lightbox figcaption { margin-top: 12px; min-height: 3.2em; font-size: 14px; color: var(--text-dim); }
dialog#lightbox figcaption b { display: block; color: var(--title); font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; }
.lb-nav { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.lb-nav .lb-count { flex: 1; text-align: center; }
.lb-nav button {
  font: 14px var(--mono); color: var(--text); background: transparent;
  border: 1px solid var(--line); padding: 8px 14px; cursor: pointer; min-width: 44px;
}
.lb-nav button:hover, .lb-nav button:focus-visible { background: rgba(41, 74, 94, 0.4); color: var(--title); outline: none; }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .row, .row.flip { grid-template-columns: 1fr; }
  .row.flip .text { order: 0; }
  .feat { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  body { font-size: 15px; }
  .bar .tele { font-size: 10px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .btn { width: 100%; text-align: center; }
  .btn::before { content: ""; }
  .btn:hover::before, .btn:focus-visible::before { content: ""; }
  dialog#lightbox { padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .title .bot { animation: none; }
  .btn:hover, .btn:focus-visible { animation: none; }
  .grid button img { transition: none; }
}
