/* Components, all taken from the game's terminal: ledger headers and rows,
   menu rows with a selected state, action buttons with key caps, text
   commands, the media player window, gallery, lightbox and Steam widget. */

/* Ledger header: small blue caps over a fine rule (the game's section header) */
.ledger-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  margin-bottom: 4px;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--head);
  border-bottom: 1px solid var(--rule);
}

.live-tag {
  padding: 0 6px;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: #fff;
  background: #b8393f;
}

/* Ledger rows: label left, value right, separated by a hairline */
.ledger {
  display: grid;
}

.ledger__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--rule-soft);
}

.ledger dt,
.ledger__row > span {
  color: var(--label);
}

.ledger dd {
  font-size: 1.1rem;
  text-align: right;
}

.ledger small {
  display: block;
  font-size: 0.78rem;
  color: var(--dim);
}

@media (min-width: 560px) {
  .ledger small {
    display: inline;
    margin-left: 10px;
  }
}

/* Statement to shareholders */
.statement__body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px 16px;
  align-items: center;
  padding-top: 10px;
}

.statement__avatar {
  width: 64px;
  height: 64px;
  border: 2px solid #3b4760;
  box-shadow: inset 0 0 0 1px #000, 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.statement__name {
  font-size: 1.05rem;
  color: #d3d8e0;
}

.statement__name span {
  display: block;
  font-size: 0.8rem;
  color: var(--label);
}

.statement__quote {
  margin-top: 4px;
  font-size: 1.08rem;
  color: var(--quote);
}

.statement__next {
  grid-column: 1 / -1;
  justify-self: start;
}

@media (min-width: 760px) {
  .statement__body {
    grid-template-columns: auto 1fr auto;
  }

  .statement__next {
    grid-column: auto;
    align-self: end;
  }

  .statement__quote {
    font-size: 1.2rem;
  }
}

/* Menu rows (main operations, investor relations) */
.ops {
  display: grid;
  gap: 6px;
  padding-top: 6px;
}

.op {
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-areas: "icon title" "icon sub";
  align-items: center;
  column-gap: 12px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--panel);
}

.op:hover {
  color: var(--text);
  background: var(--panel-hover);
  border-color: var(--rule);
}

.op__icon {
  grid-area: icon;
  width: 26px;
  height: 26px;
  justify-self: center;
  color: #e9edf4;
}

.op__title {
  grid-area: title;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.op__sub {
  grid-area: sub;
  font-size: 0.8rem;
  color: var(--label);
}

/* The highlighted row, exactly like the game's selected menu entry. */
.op--selected,
.op--selected:hover {
  color: #fff;
  background: linear-gradient(180deg, var(--sel-top) 0%, var(--sel-mid) 50%, var(--sel-bottom) 100%);
  border-color: var(--sel-edge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.op--selected .op__sub {
  color: #d7e5f7;
}

.op:not(.op--selected):hover .op__icon {
  color: var(--gold);
}

.ops--grid {
  gap: 8px;
}

@media (min-width: 760px) {
  .ops--grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Buttons */
.order-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  color: #fff;
  background: linear-gradient(180deg, var(--sel-top), var(--sel-bottom));
  border: 1px solid var(--sel-edge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.order-btn:hover {
  color: #fff;
  background: linear-gradient(180deg, #6a9bd8, #3a6eb0);
}

/* Action bar button with a key cap, as in the game's Q/E/R bar. */
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 12px;
  min-height: 44px;
  padding: 6px 18px 6px 8px;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  color: #c7ced9;
  background: linear-gradient(180deg, #2a3342, #1c2330);
  border: 1px solid #3a4557;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.action-btn:hover {
  color: #fff;
  border-color: #56647c;
}

.action-btn--go {
  color: #f2fff6;
  background: linear-gradient(180deg, #5cb37c 0%, #409a62 55%, #2f8250 100%);
  border-color: #7fd49c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 2px 0 #174a2b;
}

.action-btn--go:hover {
  color: #fff;
  background: linear-gradient(180deg, #6cc38c, #4aa56c 55%, #358a57);
}

.action-btn--go .keycap {
  color: #eafff1;
  border-color: rgba(234, 255, 241, 0.7);
  background: rgba(0, 0, 0, 0.12);
}

.action-btn[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
}

.keycap {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  line-height: 1;
  color: #d9dee6;
  background: #111723;
  border: 1px solid #5a6477;
  border-radius: 2px;
  box-shadow: 0 1px 0 #000;
}

/* Text command: the game's flat commands, no box */
.text-cmd {
  padding: 4px 0;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  color: var(--head);
  background: none;
  border: 0;
}

.text-cmd:hover {
  color: #9cc3f2;
  text-decoration: underline;
}

.text-cmd::before {
  content: "\25B8";
  margin-right: 6px;
}

/* Pane header: caps title over a rule, with a document code on the right */
.pane-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

.pane-head__title {
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #f1f4f8;
}

.pane-head__code {
  font-family: var(--font-num);
  font-size: 0.74rem;
  white-space: nowrap;
  color: var(--dim);
}

.pane-lede {
  max-width: 36ch;
  font-size: clamp(1.15rem, 3.4vw, 1.4rem);
  font-weight: 300;
  line-height: 1.4;
  color: var(--quote);
}

/* Controls list */
.keys {
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--label);
}

.keys li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* Media player window around the trailer */
.player {
  border: 1px solid #3a4658;
  box-shadow: 6px 8px 0 rgba(0, 0, 0, 0.45);
}

.player__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 28px;
  padding: 0 4px 0 10px;
  font-size: 0.8rem;
  color: #dfe6f1;
  background: linear-gradient(180deg, var(--title-top), var(--title-bottom));
}

.player__bar .winbtns i {
  width: 18px;
  height: 15px;
}

.player__controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  font-family: var(--font-num);
  font-size: 0.72rem;
  color: var(--label);
  background: linear-gradient(180deg, #232b39, #151b26);
  border-top: 1px solid #3a4658;
}

.player__seek {
  flex: 1;
  height: 6px;
  background: #0b0f16;
  border: 1px solid #3a4658;
}

.player__seek i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--sel-mid);
}

.trailer {
  aspect-ratio: 16 / 9;
  background: #000;
}

.trailer iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.trailer__poster {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  width: 100%;
  height: 100%;
  padding: 0;
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.6)),
    var(--chart) url("../assets/img/chart-bg.svg") right center / cover no-repeat;
  border: 0;
}

.trailer__coin {
  width: clamp(64px, 14vw, 96px);
  height: auto;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.7));
}

.trailer__label {
  padding: 6px 14px;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(180deg, var(--sel-top), var(--sel-bottom));
  border: 1px solid var(--sel-edge);
}

.trailer__poster[disabled] {
  cursor: default;
}

.trailer__poster[disabled] .trailer__label {
  color: var(--label);
  background: rgba(8, 11, 17, 0.9);
  border-color: var(--rule);
}

/* Prospectus */
.prospectus {
  display: grid;
  gap: 32px;
}

.prospectus__memo {
  display: grid;
  gap: 14px;
  max-width: 60ch;
  color: #b9c2d1;
}

.prospectus__facts .ledger dd {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--text);
}

@media (min-width: 960px) {
  .prospectus {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
  }
}

/* Gallery: one lead figure and three smaller ones */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.gallery__cell--lead {
  grid-column: 1 / -1;
}

.gallery__item {
  display: block;
  width: 100%;
  padding: 0;
  cursor: zoom-in;
  background: #000;
  border: 1px solid #3a4658;
}

.gallery__item:hover {
  border-color: var(--sel-edge);
}

.gallery__item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.gallery__fig {
  display: block;
  padding-top: 4px;
  font-family: var(--font-num);
  font-size: 0.72rem;
  color: var(--dim);
}

@media (min-width: 960px) {
  .gallery {
    gap: 14px;
  }

  .gallery__cell--lead {
    grid-column: 1 / -1;
    width: 72%;
    justify-self: center;
  }
}

/* Lightbox, as a terminal window */
.lightbox {
  width: min(96vw, 1280px);
  max-width: none;
  padding: 0;
  color: var(--text);
  background: #05080d;
  border: 1px solid #3a4658;
  box-shadow: 8px 10px 0 rgba(0, 0, 0, 0.5);
}

.lightbox::backdrop {
  background: rgba(3, 5, 9, 0.85);
}

.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px 0 12px;
  font-size: 0.85rem;
  background: linear-gradient(180deg, var(--title-top), var(--title-bottom));
}

.lightbox__close {
  width: 36px;
  height: 30px;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(180deg, #c8656a, #93373c);
  border: 1px solid #5a1f23;
}

.lightbox__img {
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
}

.lightbox__nav {
  display: flex;
  justify-content: space-between;
  padding: 6px 12px;
  background: var(--status);
  border-top: 1px solid var(--chrome-edge);
}

/* Steam widget: loads on request, scaled by js/steam.js to fit a phone. */
.steam-widget {
  --steam-scale: 1;
  width: 100%;
  max-width: 646px;
  height: calc(190px * var(--steam-scale));
  overflow: hidden;
  background: var(--panel);
  border: 1px solid #3a4658;
}

.steam-widget iframe {
  width: 646px;
  max-width: none;
  height: 190px;
  border: 0;
  transform: scale(var(--steam-scale));
  transform-origin: top left;
}

.steam-widget__load {
  display: grid;
  align-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  padding: 0 16px 0 calc(16px + clamp(44px, 12vw, 72px));
  text-align: left;
  cursor: pointer;
  background: url("../assets/icons/coin.svg") 16px center / clamp(44px, 12vw, 72px) no-repeat;
  border: 0;
}

.steam-widget__title {
  font-size: 0.95rem;
  text-transform: uppercase;
  color: var(--text);
}

.steam-widget__load:hover .steam-widget__title {
  color: var(--gold);
}

.steam-widget__note {
  font-size: 0.78rem;
  color: var(--label);
}

.pane--steam .fineprint {
  margin-top: 8px;
}

.pane--steam .pane-lede {
  margin: 20px 0 24px;
}

/* Press room */
.press {
  display: grid;
  gap: 32px;
}

.press .ledger dd {
  font-family: var(--font-ui);
  font-size: 0.95rem;
}

.downloads .ledger__row {
  align-items: center;
}

@media (min-width: 960px) {
  .press {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 56px;
  }
}

/* Legal page */
.legal__inner {
  max-width: 860px;
}

.legal__block {
  display: grid;
  gap: 12px;
}

.legal__block h2 {
  margin-top: 12px;
}

.legal__block h3 {
  margin: 8px 0 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold);
}

.legal__block p,
.legal__list {
  color: #b9c2d1;
}

.legal__block strong {
  color: var(--text);
}

.legal__list {
  display: grid;
  gap: 10px;
  padding-left: 20px;
  list-style: square;
}

.legal .ledger dd {
  font-family: var(--font-ui);
  font-size: 0.95rem;
}
