/* playigi.com - the whole site on a green phosphor CRT monitor */
:root {
  --ph: #5dff8a;              /* phosphor */
  --ph-hi: #c8ffd8;
  --ph-dim: rgba(93, 255, 138, .6);
  --ph-line: rgba(93, 255, 138, .3);
  --ph-bg: rgba(93, 255, 138, .07);
  --red: #ff4a3a;
  --glow: 0 0 6px rgba(93, 255, 138, .35);
  --green-pic: saturate(.9);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 50% 30%, #1b1c18, #070806 70%);
  font: 15px/1.65 "IGI Tiny", Tahoma, sans-serif;
  color: var(--ph);
  overflow: hidden;
}

/* the monitor */
.bezel {
  width: min(100vw - 24px, 1440px);
  height: calc(100vh - 24px);
  height: calc(100svh - 24px);
  padding: clamp(10px, 2vw, 26px);
  border-radius: clamp(18px, 3vw, 38px);
  background: linear-gradient(145deg, #2c2d28, #131410);
  box-shadow: inset 0 2px 0 #3d3e38, inset 0 -3px 0 #0a0a08, 0 30px 90px #000;
}
.screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: clamp(12px, 2vw, 28px) / clamp(16px, 2.8vw, 40px);
  background: radial-gradient(ellipse at center, #07220f 0%, #020b05 70%, #000 100%);
  box-shadow: inset 0 0 120px rgba(0, 0, 0, .9), inset 0 0 30px rgba(60, 255, 120, .15);
}
.scroll {
  position: relative;
  height: 100%;
  overflow-y: auto;
  padding: 0 clamp(16px, 3.4vw, 52px);
  text-shadow: var(--glow);
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--ph-line) transparent;
  scroll-padding-top: 80px;
}
/* scanlines, vignette, flicker and the slow roll bar */
.fx { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
.fx::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(rgba(0, 0, 0, .3) 0 2px, transparent 2px 4px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .7));
}
.fx::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 140px;
  background: linear-gradient(transparent, rgba(90, 255, 140, .06), transparent);
  display: none;
}
@keyframes flick { 0%, 100% { opacity: 1; } 47% { opacity: .9; } 48% { opacity: 1; } }
@keyframes roll { from { top: -140px; } to { top: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .fx::after, .fx::before, .cur { animation: none; }
  .scroll { scroll-behavior: auto; }
}

a { color: var(--ph); text-decoration: none; }
a:hover, a:focus-visible { color: var(--ph-hi); outline: none; }
::selection { background: var(--ph); color: #021006; text-shadow: none; }
img { max-width: 100%; }
.dim { color: var(--ph-dim); }
.cur {
  display: inline-block;
  width: .55em;
  height: .95em;
  background: var(--ph);
  vertical-align: -.12em;
  box-shadow: var(--glow);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* top bar */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px 26px;
  flex-wrap: wrap;
  padding: 22px 0 14px;
  background: linear-gradient(#041a0b 70%, rgba(4, 26, 11, 0));
}
.brand { color: var(--ph-hi); }
.brand span { color: var(--ph-dim); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 0 10px; text-transform: uppercase; }
.nav a:hover { background: var(--ph-bg); }
.nav a[aria-current="page"] { background: var(--ph); color: #021006; text-shadow: none; }
.clock { color: var(--ph-dim); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .brand span, .clock { display: none; }
  .nav { margin-left: 0; width: 100%; justify-content: space-between; }
  .nav a { padding: 0 4px; }
}

/* buttons */
.btn {
  display: inline-block;
  padding: 4px 20px;
  font-size: 28px;
  text-transform: uppercase;
  border: 1px solid var(--ph);
}
.btn:hover { background: var(--ph-bg); }
.btn-red, .btn-solid { background: var(--ph); color: #021006; text-shadow: none; }
.btn-red:hover { background: var(--ph-hi); color: #021006; }
.btn-off { color: var(--ph-dim); border-style: dashed; border-color: var(--ph-line); }
.btn-off:hover { background: none; }
.btn-sm { padding: 0 12px; font-size: 23px; }

/* home */
.home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  min-height: calc(100% - 80px);
  padding: 20px 0 40px;
}
.boot { margin: 0 0 18px; font-size: 13px; color: var(--ph-dim); }
.home h1 { margin: 0; font: 400 clamp(64px, 7.5vw, 104px)/.88 "IGI Menu", monospace; color: var(--ph-hi); }
.menu { list-style: none; margin: 28px 0 0; padding: 0; font-size: clamp(28px, 2.6vw, 36px); }
.menu a { display: block; width: max-content; padding: 0 12px; margin-left: -12px; }
.menu a::before { content: "  "; white-space: pre; }
.menu a:hover, .menu a:focus-visible, .menu li:first-child a { background: var(--ph); color: #021006; text-shadow: none; }
.menu a:hover::before, .menu li:first-child a::before { content: "> "; }
.menu:hover li:first-child a:not(:hover) { background: none; color: var(--ph); text-shadow: var(--glow); }
.menu:hover li:first-child a:not(:hover)::before { content: "  "; }
.prompt { margin: 22px 0 0; color: var(--ph-dim); }

.frame { position: relative; margin: 0; padding: 10px; border: 1px solid var(--ph-line); }
.frame figcaption { position: absolute; top: -.7em; left: 14px; padding: 0 8px; background: #031a0a; }
.frame img { display: block; width: 100%; height: auto; filter: var(--green-pic); }
@media (max-width: 860px) {
  .home { grid-template-columns: 1fr; min-height: 0; padding-top: 10px; }
  .frame { order: -1; }
}

/* sections */
.sect { padding: 48px 0 0; }
.sect h2, .page-head h1 {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin: 0 0 8px;
  font: 400 44px/1 "IGI Menu", monospace;
  color: var(--ph-hi);
}
.more { margin-left: auto; font-size: 24px; }
.sect > .dim { max-width: 60em; margin: 0 0 22px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.card { display: block; border: 1px solid var(--ph-line); padding: 8px; }
.card:hover, .card:focus-visible { border-color: var(--ph); background: var(--ph-bg); }
.card-img { aspect-ratio: 168 / 124; overflow: hidden; }
.card-img img { display: block; width: 100%; height: 100%; object-fit: cover; filter: var(--green-pic); transition: filter .2s; }
.card:hover .card-img img { filter: none; }
.card-body { padding-top: 6px; }
.num { color: var(--ph-dim); }
.num::before { content: "MSN_"; }
.card h3 { margin: 0; font: 400 26px/1.1 "IGI Menu", monospace; color: var(--ph-hi); text-transform: uppercase; }
.card p { margin: 2px 0 0; font-size: 13px; line-height: 1.4; color: var(--ph-dim); }

.dir { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px dashed var(--ph-line); }
.dir li { display: flex; justify-content: space-between; gap: 18px; padding: 8px 0; border-bottom: 1px dashed var(--ph-line); }
.dir li span { color: var(--ph-dim); text-align: right; }
.dir a::before { content: "> "; }

/* inner pages */
.page-head { padding: 24px 0 26px; margin-bottom: 30px; border-bottom: 1px dashed var(--ph-line); }
.page-head h1 { font-size: clamp(56px, 6vw, 84px); }
.page-head h1::before { content: "> "; color: var(--ph-dim); }
.kicker { margin: 0 0 6px; color: var(--ph-dim); text-transform: uppercase; }
.kicker::before { content: "// "; }
.lede { margin: 6px 0 0; max-width: 40em; }
.sub-h { margin: 50px 0 14px; font: 400 40px/1 "IGI Menu", monospace; color: var(--ph-hi); }
.sub-h::before { content: "> "; color: var(--ph-dim); }
h2 { font-weight: 400; }

/* play */
.player { aspect-ratio: 16 / 9; border: 1px solid var(--ph-line); background: #000; overflow: hidden; }
.player iframe { display: block; width: 100%; height: 100%; border: 0; }
.standby { position: relative; height: 100%; display: grid; place-items: center; text-align: center; }
.standby > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: var(--green-pic) blur(3px) brightness(.35); }
.standby > div { position: relative; padding: 20px; }
.standby .kicker { color: var(--red); text-shadow: 0 0 8px var(--red); }
.standby .kicker::before { content: ""; }
.laser { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); }
.standby b { display: block; font: 400 clamp(36px, 4vw, 56px)/1 "IGI Menu", monospace; color: var(--ph-hi); text-transform: uppercase; }
.standby p { margin: 8px 0 20px; text-transform: uppercase; }
@media (max-width: 600px) { .player { aspect-ratio: 3 / 4; } }

/* download */
.get { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.get > img { display: block; width: 100%; height: auto; border: 1px solid var(--ph-line); padding: 8px; filter: var(--green-pic); }
.get h2 { margin: 0 0 18px; font-size: 42px; line-height: 1; color: var(--ph-hi); text-transform: uppercase; }
.note { color: var(--ph-dim); }
.req { margin: 24px 0 0; border-top: 1px dashed var(--ph-line); }
.req div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--ph-line); text-transform: uppercase; }
.req dt { color: var(--ph-dim); }
.req dd { margin: 0; }
@media (max-width: 860px) { .get { grid-template-columns: 1fr; } }
.table { border-top: 1px dashed var(--ph-line); }
.tr { display: grid; grid-template-columns: minmax(0, 1fr) 70px 90px auto; gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--ph-line); text-transform: uppercase; }
.tr .file b { display: block; font-weight: 400; color: var(--ph-hi); }
.tr .file small { font-size: 13px; color: var(--ph-dim); }
@media (max-width: 600px) { .tr { grid-template-columns: 1fr auto; } .tr > span:nth-child(2), .tr > span:nth-child(3) { display: none; } }

/* missions */
.mission { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 32px; padding: 30px 0; border-bottom: 1px dashed var(--ph-line); }
.mission:first-child { padding-top: 0; }
.mission-img { align-self: start; border: 2px solid var(--ph-line); padding: 8px; }
.mission:target .mission-img, .mission:hover .mission-img { border-color: var(--ph); }
.mission-img img { display: block; width: 100%; height: auto; aspect-ratio: 168 / 124; object-fit: cover; filter: var(--green-pic); transition: filter .2s; }
.mission:hover .mission-img img { filter: none; }
.mission h2 { margin: 0; font: 400 52px/1 "IGI Menu", monospace; color: var(--ph-hi); text-transform: uppercase; }
.brief { margin: 4px 0 16px; color: var(--ph-dim); }
.objectives { margin: 0; padding: 0; list-style: none; counter-reset: o; }
.objectives li { counter-increment: o; display: grid; grid-template-columns: 52px 1fr; padding: 4px 0; }
.objectives li::before { content: "[" counter(o, decimal-leading-zero) "]"; color: var(--ph-dim); }
@media (max-width: 860px) { .mission { grid-template-columns: 1fr; gap: 14px; } }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; grid-auto-flow: dense; }
.shot { margin: 0; border: 1px solid var(--ph-line); padding: 8px; }
.shot:hover { border-color: var(--ph); }
.shot a { display: block; overflow: hidden; }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 168 / 124; object-fit: cover; filter: var(--green-pic); transition: filter .2s; }
.shot:hover img { filter: none; }
.shot.wide { grid-column: span 2; grid-row: span 2; }
.shot.wide img { aspect-ratio: 4 / 3; }
.shot.logo img { object-fit: contain; padding: 16px; }
.shot figcaption { padding-top: 6px; text-transform: uppercase; color: var(--ph-dim); }
@media (max-width: 600px) { .shot.wide { grid-column: auto; grid-row: auto; } }
.viewer { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 20px; border: 0; background: rgba(0, 6, 2, .96); color: var(--ph); font-family: "IGI Menu", monospace; }
.viewer[open] { display: grid; place-items: center; }
.viewer figure { margin: 0; text-align: center; }
.viewer figure img { display: block; max-width: min(1300px, 90vw); max-height: 80vh; margin: 0 auto; border: 2px solid var(--ph); }
.viewer figcaption { padding-top: 10px; font-size: 26px; text-transform: uppercase; text-shadow: var(--glow); }
.viewer button { position: absolute; padding: 2px 16px; font: 28px "IGI Menu", monospace; color: var(--ph); background: #000; border: 1px solid var(--ph); cursor: pointer; }
.viewer button:hover { background: var(--ph); color: #000; }
.v-prev { left: 20px; top: 50%; translate: 0 -50%; }
.v-next { right: 20px; top: 50%; translate: 0 -50%; }
.v-close { right: 20px; top: 20px; }

/* info */
.info { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 44px; align-items: start; }
.toc { position: sticky; top: 76px; display: flex; flex-direction: column; text-transform: uppercase; }
.toc a::before { content: "  "; white-space: pre; }
.toc a:hover::before { content: "> "; }
.articles article { padding-bottom: 36px; margin-bottom: 36px; border-bottom: 1px dashed var(--ph-line); }
.articles article:last-child { border-bottom: 0; }
.articles h2 { margin: 0 0 12px; font: 400 46px/1 "IGI Menu", monospace; color: var(--ph-hi); text-transform: uppercase; }
.articles h2::before { content: "> "; color: var(--ph-dim); }
.articles h3 { margin: 20px 0 6px; font: 400 28px/1 "IGI Menu", monospace; color: var(--ph-hi); text-transform: uppercase; }
.articles p { margin: 0 0 12px; max-width: 64ch; }
.place, .src { color: var(--ph-dim); }
.kv, .cast, .script { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); }
.kv > div, .cast > div, .script > div { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; column-gap: 28px; padding: 5px 0; border-top: 1px dashed var(--ph-line); }
.kv dt, .script dt { color: var(--ph-dim); text-transform: uppercase; }
.cast dt { color: var(--ph-hi); text-transform: uppercase; }
.kv dd, .cast dd, .script dd { margin: 0; }
.script > div { border: 0; padding: 2px 0; }
.script dt { color: var(--red); text-shadow: 0 0 8px rgba(255, 74, 58, .7); }
.spoiler { margin: 16px 0 10px; border: 1px dashed var(--ph-line); padding: 0 16px; }
.spoiler summary { padding: 8px 0; cursor: pointer; text-transform: uppercase; }
.arc { margin: 0; padding: 0; list-style: none; counter-reset: a; }
.arc li { counter-increment: a; display: grid; grid-template-columns: 52px 1fr; padding: 3px 0; }
.arc li::before { content: "[" counter(a, decimal-leading-zero) "]"; color: var(--ph-dim); }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { padding: 6px 10px; text-align: left; font-weight: 400; color: var(--ph-dim); text-transform: uppercase; border-bottom: 1px solid var(--ph-line); }
.tbl td { padding: 6px 10px; vertical-align: top; border-bottom: 1px dashed var(--ph-line); }
.keys td:last-child { color: var(--ph-hi); }
@media (max-width: 860px) {
  .info { grid-template-columns: 1fr; gap: 16px; }
  .toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 0 10px; }
  .kv, .cast, .script { grid-template-columns: 1fr; }
  .tbl { display: block; overflow-x: auto; }
}

/* bottom status line */
.status {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 24px;
  margin-top: 64px;
  padding: 16px 0 28px;
  border-top: 1px dashed var(--ph-line);
  color: var(--ph-dim);
}
.status nav { display: flex; gap: 4px 18px; flex-wrap: wrap; text-transform: uppercase; }
.legal { flex-basis: 100%; margin: 6px 0 0; font-size: 12px; line-height: 1.5; text-transform: none; }

/* "IGI Menu" only for display parts; running text stays in the clean mono */
.bar, .menu, .btn, .prompt, .num, .dir a, .toc, .kicker, .status nav, .clock, .frame figcaption, .more, .spoiler summary, .tbl th, .viewer button { font-family: "IGI Menu", monospace; font-size: 22px; }
.menu { font-size: clamp(26px, 2.4vw, 34px); }
.btn { font-size: 26px; }
.sect > .dim { text-transform: none; }
.dir li span { font-size: 14px; }

/* real game logo, top left */
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { display: block; height: 64px; width: auto; filter: brightness(1.15) drop-shadow(0 0 8px rgba(93, 255, 138, .45)); }
@media (max-width: 760px) { .brand img { height: 34px; } }

/* real website: no monitor frame, the CRT look is the page background */
html, body { height: auto; }
body {
  display: block;
  overflow: visible;
  min-height: 100vh;
  background: radial-gradient(ellipse 120% 90% at 50% 30%, #07220f 0%, #020b05 65%, #000 100%) fixed;
}
.bezel { width: auto; height: auto; padding: 0; border-radius: 0; background: none; box-shadow: none; }
.screen { height: auto; overflow: visible; border-radius: 0; background: none; box-shadow: none; position: static; }
.scroll { height: auto; overflow: visible; width: min(1240px, 100% - 40px); margin: 0 auto; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
.fx { position: fixed; z-index: 20; }
.fx::after { background: repeating-linear-gradient(rgba(0, 0, 0, .3) 0 2px, transparent 2px 4px), radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, .7)); }
.bar { margin: 0 calc(50% - 50vw); padding: 18px calc(50vw - 50%) 14px; background: rgba(2, 12, 5, .88); border-bottom: 1px solid var(--ph-line); backdrop-filter: blur(6px); }
.home { min-height: calc(100vh - 110px); }
.toc { top: 110px; }
@media (max-width: 760px) { .scroll { width: calc(100% - 28px); } }

/* navbar */
.bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand img { height: 46px; }
.nav { margin: 0; gap: clamp(18px, 3vw, 44px); justify-self: center; }
.nav a {
  position: relative;
  padding: 6px 2px;
  font-size: 26px;
  letter-spacing: .08em;
  color: var(--ph-dim);
  background: none;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 0;
  height: 2px;
  background: var(--ph);
  box-shadow: 0 0 8px var(--ph);
  transition: left .2s, right .2s;
}
.nav a:hover { color: var(--ph-hi); background: none; }
.nav a:hover::after { left: 0; right: 0; }
.nav a[aria-current="page"] { color: var(--ph-hi); background: none; text-shadow: var(--glow); }
.nav a[aria-current="page"]::after { left: 0; right: 0; }
.nav-cta {
  justify-self: end;
  padding: 4px 18px;
  font: 24px/1.3 "IGI Menu", monospace;
  letter-spacing: .06em;
  background: var(--ph);
  color: #021006;
  text-shadow: none;
  box-shadow: 0 0 18px rgba(93, 255, 138, .35);
}
.nav-cta:hover { background: var(--ph-hi); color: #021006; }
@media (max-width: 760px) {
  .bar { grid-template-columns: auto 1fr; row-gap: 8px; }
  .brand img { height: 34px; }
  .nav-cta { font-size: 20px; padding: 2px 12px; }
  .nav { grid-column: 1 / -1; width: 100%; justify-content: space-between; }
  .nav a { font-size: 21px; }
}

/* navbar: option 2 + the game's main menu panel */
@font-face { font-family: "IGI Menu"; src: url(fonts/igi-menu.woff) format("woff"); font-display: swap; }
.bar { display: block; padding: 0; }
.strip {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font: 18px/1.2 "IGI Menu", monospace;
  letter-spacing: .06em;
  color: #ffa900;
  text-shadow: 0 0 6px rgba(255, 169, 0, .4);
  border-bottom: 1px solid rgba(0, 191, 0, .25);
}
.strip .dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); }
.strip .clock { margin-left: 14px; font: inherit; color: inherit; }
.bar-row { display: flex; align-items: center; gap: 18px; padding: 12px 0; }
.brand img { height: 52px; }
.nav {
  margin-left: auto;
  display: flex;
  gap: 0;
  border: 1px solid #00bf00;
  background: rgba(10, 70, 14, .45);
  box-shadow: inset 0 0 18px rgba(0, 191, 0, .12);
}
.nav a {
  padding: 6px 22px 7px;
  font: 400 25px/1 "IGI Menu", "IGI Menu", monospace;
  letter-spacing: 0;
  color: #7fff7f;
  text-shadow: 0 1px 0 #000;
}
.nav a + a { border-left: 1px solid rgba(0, 191, 0, .35); }
.nav a::after { display: none; }
.nav a:hover { color: #fff; background: rgba(0, 191, 0, .14); }
.nav a[aria-current="page"] { color: #fff; background: rgba(30, 90, 46, .95); text-shadow: 0 1px 0 #000; }
.nav-cta {
  padding: 6px 18px 7px;
  font: 400 25px/1 "IGI Menu", "IGI Menu", monospace;
  color: #fff;
  background: none;
  border: 1px solid #00bf00;
  box-shadow: none;
  text-shadow: 0 1px 0 #000;
}
.nav-cta:hover { background: rgba(0, 191, 0, .2); color: #fff; }
@media (max-width: 760px) {
  .strip span:first-child { display: none; }
  .bar-row { flex-wrap: wrap; }
  .brand img { height: 38px; }
  .nav { order: 3; width: 100%; margin: 0; }
  .nav a { flex: 1; padding: 6px 4px; text-align: center; font-size: 20px; }
  .nav-cta { margin-left: auto; font-size: 20px; }
}
.bar { padding: 0 calc(50vw - 50%); }
.bar { background: linear-gradient(#0a2e12, #072409); border-bottom: 1px solid #00bf00; backdrop-filter: none; }
.strip { border-bottom-color: rgba(0, 191, 0, .3); }
.bar { background: none; border-bottom: 0; backdrop-filter: none; }
.strip { border-bottom: 0; }
.nav-cta, .nav a { white-space: nowrap; }

/* loading screen blends into the page; page a little darker */
body { background: radial-gradient(ellipse 120% 90% at 50% 30%, #04170a 0%, #010603 65%, #000 100%) fixed; }
.frame { padding: 0; border: 0; box-shadow: none; }
.frame figcaption { display: none; }
.frame img {
  -webkit-mask: radial-gradient(ellipse 70% 68% at 50% 47%, #000 55%, transparent 100%);
  mask: radial-gradient(ellipse 70% 68% at 50% 47%, #000 55%, transparent 100%);
}
.frame img { mix-blend-mode: screen; -webkit-mask: radial-gradient(ellipse 66% 64% at 50% 47%, #000 50%, transparent 98%); mask: radial-gradient(ellipse 66% 64% at 50% 47%, #000 50%, transparent 98%); }

/* bigger loading screen on the right, mirrored */
.bezel { width: 100%; }
.home { grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); gap: 20px; }
.home .frame { margin-right: -40px; }
.home .frame img { width: 100%; transform: scaleX(-1); }
@media (max-width: 860px) { .home { grid-template-columns: 1fr; } .home .frame { margin-right: 0; } }
/* hero art without the logo above the operative: crop the top of the picture */
.home .frame img {
  aspect-ratio: 640 / 325;
  object-fit: cover;
  object-position: 50% 100%;
  -webkit-mask: radial-gradient(ellipse 64% 66% at 50% 50%, #000 50%, transparent 98%);
  mask: radial-gradient(ellipse 64% 66% at 50% 50%, #000 50%, transparent 98%);
}
.home .frame img {
  aspect-ratio: 640 / 335;
  -webkit-mask: radial-gradient(ellipse 62% 72% at 52% 60%, #000 45%, transparent 96%);
  mask: radial-gradient(ellipse 62% 72% at 52% 60%, #000 45%, transparent 96%);
}
/* bigger hero art; softer top and left edges */
.home { grid-template-columns: minmax(0, .85fr) minmax(0, 1.75fr); }
.home .frame { margin-right: -70px; margin-left: -60px; }
.home .frame img {
  -webkit-mask:
    linear-gradient(to bottom, transparent 0%, #000 42%),
    linear-gradient(to right, transparent 0%, #000 45%),
    radial-gradient(ellipse 70% 80% at 55% 55%, #000 55%, transparent 98%);
  -webkit-mask-composite: source-in;
  mask:
    linear-gradient(to bottom, transparent 0%, #000 42%),
    linear-gradient(to right, transparent 0%, #000 45%),
    radial-gradient(ellipse 70% 80% at 55% 55%, #000 55%, transparent 98%);
  mask-composite: intersect;
}
@media (max-width: 860px) { .home .frame { margin: 0; } }
.bar-row { padding-top: 18px; }
/* lighter CRT overall so the hero image reads clearly */
.fx::after { background: repeating-linear-gradient(rgba(0, 0, 0, .16) 0 2px, transparent 2px 4px), radial-gradient(ellipse at center, transparent 62%, rgba(0, 0, 0, .6)); }

/* download: two games */
.dl2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.dl-card { border: 1px solid var(--ph-line); background: rgba(2, 14, 6, .55); }
.dl-card > img, .dl-card .ph { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--ph-line); }
.ph {
  position: relative;
  display: grid !important;
  place-content: center;
  text-align: center;
  background:
    linear-gradient(var(--ph-line), var(--ph-line)) center / 1px 100% no-repeat,
    linear-gradient(var(--ph-line), var(--ph-line)) center / 100% 1px no-repeat,
    radial-gradient(circle at center, rgba(93, 255, 138, .08), transparent 60%),
    #020a04;
}
.ph span { font: 400 72px/1 "IGI Menu", monospace; color: var(--ph-hi); background: #020a04; padding: 0 18px; }
.ph small { margin-top: 6px; font: 18px "IGI Menu", monospace; color: var(--ph-dim); letter-spacing: .2em; background: #020a04; }
.dl-body { padding: 22px 24px 26px; }
.dl-body h2 { margin: 0 0 8px; font: 400 40px/1 "IGI Menu", monospace; color: var(--ph-hi); text-transform: uppercase; }
.dl-body p:not(.kicker) { margin: 0 0 20px; }
@media (max-width: 860px) { .dl2 { grid-template-columns: 1fr; } }


/* the game's own fonts, 1:1: font3 = IGI Menu (titles, menus), font4 = IGI Small (labels), font1 = IGI Tiny (text) */
@font-face { font-family: "IGI Small"; src: url(fonts/igi-small.woff) format("woff"); font-display: swap; }
@font-face { font-family: "IGI Tiny"; src: url(fonts/igi-tiny.woff) format("woff"); font-display: swap; }
body { font: 20px/1.45 "IGI Tiny", Tahoma, sans-serif; }
.kicker, .boot, .num, .prompt, .dir a, .more, .toc, .status, .status nav, .clock, .tbl th, .spoiler summary, .brief, .lede, .ph small, .req dt, .kv dt, .script dt { font-family: "IGI Small", "IGI Menu", sans-serif; }
.boot { font-size: 18px; }
.kicker, .num, .more, .toc, .status nav { font-size: 20px; letter-spacing: .02em; }
.prompt, .dir a { font-size: 22px; }
h1, h2, h3, .menu, .nav a, .nav-cta, .btn, .card h3, .mission h2, .articles h2, .articles h3, .dl-body h2, .ph span, .standby b, .sub-h, .page-head h1, .sect h2, .home h1 { font-family: "IGI Menu", sans-serif; }
.home h1 { color: #fff; text-shadow: 0 0 10px rgba(93, 255, 138, .35); }
.menu a { color: #3cff3c; }

/* the game writes its menus in title case, never forced capitals */
body * { text-transform: none !important; }

/* intro: the game's loading screen. loading.pic at 640x480 on black; flat bar 560x10 at (40,440), #00ff00 over #007f00 */
.loader { display: none; }
.js-intro .loader {
  display: grid;
  place-items: center;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  transition: opacity .35s;
}
.loader.out { opacity: 0; pointer-events: none; }
.loader-pic { position: relative; width: min(640px, 92vw); aspect-ratio: 4 / 3; }
.loader-pic img { display: block; width: 100%; height: 100%; mask: none; -webkit-mask: none; mix-blend-mode: normal; }
.loader-bar { position: absolute; left: 6.25%; top: 91.667%; width: 87.5%; height: 2.083%; background: #007f00; }
.loader-bar i { display: block; height: 100%; width: 0; background: #00ff00; }

/* page change: the map computer's "downloading" refresh, measured from the game at 1080p.
   Cut to black, outlined bar (1px #19ff19, 960x28) fills #007f19 in jumps; next page comes up under
   horizontal streak interference with CONNECTING / DOWNLOADING above the bar, clean after ~0.8s. */
.mc { position: fixed; inset: 0; z-index: 95; display: none; pointer-events: none; }
html.mc-out .mc { display: block; background: #000; }
html.mc-in .mc { display: block; }
.mc-noise { position: absolute; inset: 0; width: 100%; height: 100%; }
.mc-box { position: absolute; left: 50%; bottom: 48px; width: min(960px, 80vw); translate: -50% 0; }
.mc-label { display: block; height: 16px; margin: 0 0 6px; font: 14px/16px "IGI Tiny", monospace; color: #19ff19; text-shadow: none; }
.mc-bar { height: 28px; border: 1px solid #19ff19; background: transparent; }
.mc-bar i { display: block; height: 100%; width: 0; background: #007f19; }
html.mc-out .bar, html.mc-out main { visibility: hidden; }
.loader { cursor: pointer; }
.loader-go { position: absolute; left: 0; right: 0; top: calc(100% + 18px); margin: 0; text-align: center; font: 22px "IGI Menu", sans-serif; color: #7fff7f; opacity: 0; transition: opacity .3s; }
.loader.ready .loader-go { opacity: 1; animation: blink 1s steps(1) infinite .3s; }

/* home headline: one line in the game font, typed in, red laser dot as the full stop */
.home h1.headline {
  display: flex;
  align-items: baseline;
  margin: 0;
  white-space: nowrap;
  font: 400 clamp(54px, 6.4vw, 96px)/1 "IGI Menu", sans-serif;
  letter-spacing: .02em;
  color: #eaffef;
  text-shadow: 0 0 18px rgba(93, 255, 138, .35), 0 2px 0 #000;
}
.headline .type.typing::after {
  content: "";
  display: inline-block;
  width: .45em;
  height: .8em;
  margin-left: .08em;
  background: #5dff8a;
  box-shadow: 0 0 10px rgba(93, 255, 138, .7);
  animation: blink .8s steps(1) infinite;
}
.laser-dot {
  width: .16em;
  height: .16em;
  margin-left: .1em;
  border-radius: 50%;
  background: #ff2b1c;
  box-shadow: 0 0 6px 2px #ff4130, 0 0 22px 8px rgba(255, 40, 20, .45);
  transform: translateY(-.02em);
  transition: opacity .2s;
}
.headline.pending .laser-dot { opacity: 0; }
.tagline {
  display: flex;
  gap: 0 18px;
  flex-wrap: wrap;
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(93, 255, 138, .35);
  font: 20px/1.2 "IGI Small", sans-serif;
  color: rgba(93, 255, 138, .75);
}
.tagline span + span::before { content: "//"; margin-right: 18px; color: rgba(93, 255, 138, .35); }
.home .menu { margin-top: 30px; }
.home-text { position: relative; z-index: 22; }
.laser-dot { width: .14em; height: .14em; align-self: flex-end; margin-bottom: .06em; transform: none; box-shadow: 0 0 4px 1px #ff4130, 0 0 16px 6px rgba(255, 40, 20, .5); }
.home h1.headline { display: block; }
.laser-dot { display: inline-block; align-self: auto; vertical-align: baseline; margin: 0 0 0 .08em; }
.laser-dot { transform: translateY(-.1em); }
/* headline = the game's own "I'm Going In" logo art */
.home h1.headline { line-height: 0; text-shadow: none; }
.home h1.headline img {
  display: block;
  width: min(560px, 100%);
  height: auto;
  filter: drop-shadow(0 0 14px rgba(93, 255, 138, .25));
  transition: opacity .6s, transform .6s;
}
.headline.pending img { opacity: 0; transform: scale(.96); }

/* language flags (display only) */
.langs { display: flex; gap: 8px; align-items: center; }
.langs span { display: block; padding: 3px; border: 1px solid transparent; opacity: .55; transition: opacity .15s, border-color .15s; }
.langs span:hover { opacity: .9; }
.langs span.on { opacity: 1; border-color: #00bf00; }
.langs svg { display: block; width: 26px; height: 17px; }
@media (max-width: 760px) { .langs { gap: 4px; } .langs svg { width: 20px; height: 13px; } }

/* missions: IGI 1 / IGI 2 switch */
.game-tabs { display: flex; gap: 0; margin-top: 26px; border: 1px solid #00bf00; width: max-content; max-width: 100%; background: rgba(10, 70, 14, .45); }
.game-tabs a { padding: 8px 22px 9px; font: 26px/1 "IGI Menu", sans-serif; color: #7fff7f; }
.game-tabs a + a { border-left: 1px solid rgba(0, 191, 0, .35); }
.game-tabs a small { margin-left: 8px; font: 17px "IGI Small", sans-serif; color: rgba(93, 255, 138, .6); }
.game-tabs a.on { background: rgba(30, 90, 46, .95); color: #fff; }
.campaign { margin: 40px 0 6px; padding-bottom: 8px; font: 400 34px/1 "IGI Menu", sans-serif; color: #ffa900; border-bottom: 1px solid rgba(255, 169, 0, .35); }
.campaign:first-child { margin-top: 0; }
@media (max-width: 600px) { .game-tabs a { padding: 8px 12px; font-size: 21px; } .game-tabs a small { display: none; } }

/* hero art at full strength: normal blend, fade only the outer edges */
.home .frame img {
  mix-blend-mode: normal;
  filter: contrast(1.08) saturate(1.1) brightness(1.05);
  -webkit-mask:
    linear-gradient(to bottom, transparent 0%, #000 22%, #000 82%, transparent 100%),
    linear-gradient(to right, transparent 0%, #000 22%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask:
    linear-gradient(to bottom, transparent 0%, #000 22%, #000 82%, transparent 100%),
    linear-gradient(to right, transparent 0%, #000 22%, #000 88%, transparent 100%);
  mask-composite: intersect;
}
html, body { overflow-x: hidden; }
.home .headline { margin-bottom: 8px; }

/* music toggle */
.music { display: grid; place-items: center; width: 34px; height: 30px; padding: 0; margin-right: 4px; background: none; border: 1px solid rgba(0, 191, 0, .4); cursor: pointer; }
.music svg { width: 20px; height: 16px; fill: none; stroke: #7fff7f; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.music svg path:first-child { fill: #7fff7f; }
.music .w { display: none; }
.music.on .w { display: block; }
.music.on .x { display: none; }
.music:hover, .music.on { border-color: #00bf00; background: rgba(0, 191, 0, .12); }

/* Play: fullscreen button under the game frame */
.player { position: relative; }
.player .fs { position: absolute; right: 0; bottom: -54px; }
.p-play main .wrap:has(.player) { padding-bottom: 60px; }
/* artwork can't be selected or long-press saved */
img { -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
/* fullscreen fallback: the game fills the browser window */
html.game-fill .player { position: fixed; inset: 0; z-index: 200; aspect-ratio: auto; border: 0; }
html.game-fill .player .fs { right: 12px; bottom: 12px; z-index: 201; }
html.game-fill body { overflow: hidden; }

/* Play page: only the navbar and the game, edge to edge, filling the rest of the window */
.p-play .scroll { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; width: 100%; padding: 0; }
.p-play .bar { margin: 0; padding-left: max(20px, (100% - 1240px) / 2); padding-right: max(20px, (100% - 1240px) / 2); }
.p-play main { flex: 1; display: flex; }
.p-play .game-wrap { flex: 1; display: flex; }
.p-play .player { flex: 1; aspect-ratio: auto; border: 0; border-top: 1px solid rgba(0, 191, 0, .4); }
.p-play .status { display: none; }
.p-play .player .fs { right: 14px; bottom: 14px; z-index: 2; padding: 2px 12px; font-size: 20px; opacity: .55; background: rgba(0, 0, 0, .6); transition: opacity .15s; }
.p-play .player .fs:hover { opacity: 1; }
.p-play .fx { display: none; }

/* Play page: no navbar, the game is the whole screen */
.p-play .bar { display: none; }
.p-play .player { position: fixed; inset: 0; z-index: 50; border: 0; }
.p-play .player .fs { left: 50%; right: auto; bottom: 24px; translate: -50% 0; opacity: .9; font-size: 24px; padding: 6px 20px; }
html.is-full .p-play .player .fs { display: none; }

/* Play page loading screen: the game's loading.pic scaled to fit the window (letterboxed on black),
   with the game's own flat bar (560x10 at 40,440 on 640x480; #00ff00 over #007f00) scaled with it */
.game-load { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: #000; transition: opacity .4s; }
.game-load.done { opacity: 0; pointer-events: none; }
.game-load-pic { position: relative; width: min(100vw, 100vh * 4 / 3); aspect-ratio: 4 / 3; }
.game-load-pic img { display: block; width: 100%; height: 100%; -webkit-mask: none; mask: none; mix-blend-mode: normal; filter: none; }
.game-load-bar { position: absolute; left: 6.25%; top: 91.667%; width: 87.5%; height: 2.083%; background: #007f00; }
.game-load-bar i { display: block; height: 100%; width: 0; background: #00ff00; }
.game-load-txt { position: absolute; left: 0; right: 0; bottom: 14px; margin: 0; text-align: center; font: 18px "IGI Small", sans-serif; color: rgba(93, 255, 138, .7); }

/* Safari / iOS: no blue tap highlight, no native blue button styling, no blue focus rings */
html { -webkit-tap-highlight-color: transparent; }
button, input, select { -webkit-appearance: none; appearance: none; color: inherit; font: inherit; border-radius: 0; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus { outline: none; }
:focus-visible { outline: 1px dashed rgba(93, 255, 138, .7); outline-offset: 2px; }

/* touch devices (phones, tablets) get the mobile entry; mouse devices the framed player */
.touch-only { display: none; }
@media (hover: none) and (pointer: coarse) {
  .touch-only { display: block; }
  .desk-only { display: none; }
}
.mobile-card { margin-top: 26px; padding: 14px 16px; border: 1px solid rgba(0, 191, 0, .45); background: rgba(2, 14, 6, .6); font-size: 16px; line-height: 1.45; }
.mobile-card p { margin: 0 0 6px; }
.mobile-card b { color: var(--ph-hi); font-weight: 400; }
.mc-title { font: 22px/1.2 "IGI Menu", sans-serif; color: var(--ph-hi); }

/* phone / narrow layout for the home screen (must come last: overrides the desktop hero tweaks) */
@media (max-width: 860px) {
  .home { grid-template-columns: 1fr; gap: 8px; min-height: 0; padding: 4px 0 24px; }
  .home .frame { order: -1; margin: 0 -14px; }
  .home .frame img { aspect-ratio: 640 / 380; }
  .home-text { text-align: left; }
  .home .headline img { width: min(360px, 100%); }
  .menu { margin-top: 16px; font-size: 30px; }
  .menu a { margin-left: 0; }
  .prompt { display: none; }
  .mobile-card { margin-top: 18px; }
}
