/* Vasto Games site styles. Layout, type and colour follow design/game-page.dc.html. */

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-200.woff2") format("woff2");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --night: #05090f;
  --night-alt: #070e1c;
  --cream: #ede6d6;
  --cream-bright: #f4eee0;
  --light: #f2c266;
  --light-hover: #ffe0a3;
  --ink: #101725;
  --gutter: 80px;
  --content: 1280px;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--night);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

h1,
h2,
p,
dl,
dd {
  margin: 0;
}

/* Only regular weights ship; headings set their own weight so the browser never fakes bold. */
h1,
h2 {
  font-weight: 400;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--light);
  text-decoration: none;
}

a:hover {
  color: var(--light-hover);
}

:focus-visible {
  outline: 2px solid var(--light);
  outline-offset: 3px;
}

::selection {
  background: var(--light);
  color: var(--night);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(237, 230, 214, 0.5);
}

.eyebrow--dot::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--light);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 17px 30px;
  border: 0;
  border-radius: 2px;
  background: var(--light);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

.button:hover {
  background: var(--light-hover);
  color: var(--ink);
}

.button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  width: max-content;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cream);
}

.brand img {
  width: 30px;
  height: auto;
  filter: drop-shadow(0 1px 6px rgba(5, 9, 15, 0.7));
}

a.brand:hover {
  color: var(--cream);
}

/* Hero ------------------------------------------------------------------ */

.hero {
  /* ≈100vh with a sliver of the next section, never shorter than 680 px, and never
     taller than the 1440 × 880 design proportion so the painting keeps its framing. */
  --hero-h: max(680px, min(calc(100vh - 20px), 61.111vw));
  --content-left: max(var(--gutter), calc((100% - var(--content)) / 2));
  container-type: inline-size;
  position: relative;
  height: var(--hero-h);
  overflow: hidden;
  isolation: isolate;
  background: var(--night-alt);
}

.hero-art {
  position: absolute;
  inset: 0;
  /* Night blue behind the layers so nothing light shows while images decode. */
  background: linear-gradient(to bottom, #0a1f4a 0%, #0b2a5e 46%, #061229 70%, #05090f 100%);
}

/* The stage keeps the design's 1440 × 880 proportion and cover-fits the hero,
   so the four layers register the same way at every desktop size. The stage is only
   wider than the hero below 1113 px (680 px minimum height); the crop then trims 55%
   of the overflow from the left, which keeps both dishes in frame. */
.hero-stage {
  --stage-w: max(100%, calc(var(--hero-h) * 1.63636));
  position: absolute;
  bottom: 0;
  left: calc((100% - var(--stage-w)) * 0.55);
  width: var(--stage-w);
  aspect-ratio: 1440 / 880;
}

.hero-layer {
  position: absolute;
  height: auto;
  max-width: none;
}

/* Each layer's bleed past the stage must stay larger than its parallax cap in game-page.js. */
.hero-layer--sky {
  top: -58%;
  left: -11%;
  /* When the stage is cropped, slide the sky right by 43% of the overflow so the moon clears
     the headline without meeting the big dish. 100% is the stage width, 100cqw the hero's. */
  left: calc(-11% + (100% - 100cqw) * 0.43);
  width: 160%;
}

.hero-layer--mountains {
  bottom: -2%;
  left: -2%;
  width: 104%;
}

.hero-layer--antennas {
  right: 7%;
  bottom: 19%;
  width: 40%;
}

.hero-layer--ground {
  bottom: -10%;
  left: -4%;
  width: 108%;
}

.hero.is-parallax .hero-layer,
.hero.is-parallax .hero-copy {
  will-change: transform;
}

.hero-flat {
  display: none;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(7, 14, 28, 0.72) 0%,
    rgba(7, 14, 28, 0.12) 26%,
    rgba(7, 14, 28, 0.1) 48%,
    rgba(5, 9, 15, 0.86) 88%,
    #05090f 100%
  );
}

.hero .brand {
  position: absolute;
  top: 38px;
  left: var(--content-left);
}

.hero-copy {
  position: absolute;
  right: var(--gutter);
  bottom: 132px;
  left: var(--content-left);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 26px;
  max-width: 880px;
}

.hero-kicker {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--light);
}

.hero-title {
  font-family: var(--serif);
  font-weight: 200;
  font-size: clamp(84px, 8.2vw, 118px);
  line-height: 0.94;
  letter-spacing: -0.01em;
  color: var(--cream-bright);
  text-shadow: 0 2px 40px rgba(5, 9, 15, 0.75);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

.hero-actions p {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.4;
  letter-spacing: 0.1em;
  color: rgba(237, 230, 214, 0.72);
}

/* Pitch ----------------------------------------------------------------- */

.pitch {
  padding-block: 150px 140px;
  background: var(--night);
}

.pitch .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 44px;
}

.pitch-text {
  max-width: 1060px;
  font-family: var(--serif);
  font-weight: 200;
  font-size: 42px;
  line-height: 1.42;
  color: var(--cream);
  text-wrap: pretty;
}

/* Signup ---------------------------------------------------------------- */

.signup {
  position: relative;
  padding-block: 130px;
  overflow: hidden;
  isolation: isolate;
  border-top: 1px solid rgba(237, 230, 214, 0.08);
  background: var(--night);
}

.signup-art {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.signup-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.signup::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(5, 9, 15, 0.88), rgba(5, 9, 15, 0.94));
}

.signup-panel {
  padding: 48px;
  border: 1px solid rgba(237, 230, 214, 0.16);
  background: rgba(58, 80, 112, 0.18);
}

.signup-panel > * + * {
  margin-top: 30px;
}

.signup-title {
  font-family: var(--serif);
  font-weight: 200;
  font-size: 34px;
  line-height: 1.3;
  color: var(--cream-bright);
}

.signup-form {
  display: flex;
  gap: 12px;
}

.signup-form input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid rgba(237, 230, 214, 0.28);
  border-radius: 2px;
  background: rgba(5, 9, 15, 0.55);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.2;
}

.signup-form input::placeholder {
  color: rgba(237, 230, 214, 0.38);
  opacity: 1;
}

.signup-form .button {
  flex: 0 0 auto;
  padding: 16px 26px;
}

.signup-note {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.06em;
  color: rgba(237, 230, 214, 0.55);
}

.signup-note a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(237, 230, 214, 0.3);
  text-underline-offset: 3px;
}

.signup-note a:hover {
  color: var(--cream);
  text-decoration-color: var(--light);
}

.signup-status {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  font-family: var(--serif);
  font-weight: 200;
  font-size: 34px;
  line-height: 1.3;
  color: var(--cream-bright);
}

.signup-panel > .signup-status:empty {
  margin-top: 0;
}

.signup-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 16px;
  border-radius: 50%;
  background: var(--light);
  box-shadow: 0 0 18px rgba(242, 194, 102, 0.8);
}

.signup-panel.is-done {
  border-color: rgba(242, 194, 102, 0.35);
}

.signup-panel.is-done .signup-title,
.signup-panel.is-done .signup-action {
  display: none;
}

.signup-panel.is-done > .signup-status {
  margin-top: 0;
}

@media (min-width: 821px) {
  /* The confirmation keeps the panel's height (locked in game-page.js) and sits centred in it. */
  .signup-panel.is-done {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

@media (min-width: 1101px) {
  /* Wide desktops: one full-width panel, heading on the left, form on the right. */
  .signup-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    column-gap: 64px;
  }

  .signup-panel > * + * {
    margin-top: 0;
  }

  .signup-status {
    grid-column: 1 / -1;
  }
}

/* Store ----------------------------------------------------------------- */

.store {
  padding-block: 120px;
  background: var(--night);
  text-align: center;
}

.store .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.store-title {
  font-family: var(--serif);
  font-weight: 200;
  font-size: 56px;
  line-height: 1.1;
  color: var(--cream-bright);
}

.platforms {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  width: 100%;
  max-width: 760px;
  margin-top: 18px;
  padding-top: 26px;
  border-top: 1px solid rgba(237, 230, 214, 0.1);
}

.platforms-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(237, 230, 214, 0.45);
}

.platform {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--cream);
}

.platform svg {
  width: 15px;
  height: 15px;
}

/* Footer ---------------------------------------------------------------- */

.site-footer {
  padding-block: 72px 64px;
  border-top: 1px solid rgba(237, 230, 214, 0.1);
  background: var(--night-alt);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.3fr;
  align-items: start;
  gap: 56px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.footer-brand img {
  width: 46px;
  height: auto;
}

.footer-brand p {
  font-size: 14.5px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: rgba(237, 230, 214, 0.8);
}

.footer-heading {
  padding-bottom: 14px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(237, 230, 214, 0.45);
}

.contact-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-block: 13px;
  border-top: 1px solid rgba(237, 230, 214, 0.12);
}

.contact-row:last-child {
  border-bottom: 1px solid rgba(237, 230, 214, 0.12);
}

.contact-row dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(237, 230, 214, 0.5);
}

.contact-row a {
  font-family: var(--mono);
  font-size: 13px;
}

.follow-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid rgba(237, 230, 214, 0.18);
  border-radius: 2px;
  color: var(--cream);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.social-pill:hover {
  border-color: var(--light);
  background: rgba(242, 194, 102, 0.06);
  color: var(--light);
}

.social-pill img {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
}

/* Below this the footer's third column is too narrow for three pills across. */
@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 32px;
  }

  .follow-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid rgba(237, 230, 214, 0.1);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(237, 230, 214, 0.4);
}

/* Reveal ---------------------------------------------------------------- */

/* game-page.js adds .is-pending only to sections below the fold, and never under reduced motion. */
[data-reveal] {
  transition: opacity 400ms ease, transform 400ms ease;
}

[data-reveal].is-pending {
  opacity: 0;
  transform: translateY(16px);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    transition: none;
  }

  [data-reveal].is-pending {
    opacity: 1;
    transform: none;
  }
}

/* Text pages (privacy, 404) --------------------------------------------- */

.page-header {
  padding-block: 38px;
}

.text-page {
  padding-block: 72px 130px;
}

.text-page-body {
  max-width: 720px;
}

.text-page h1 {
  margin-top: 26px;
  font-family: var(--serif);
  font-weight: 200;
  font-size: 72px;
  line-height: 1.05;
  color: var(--cream-bright);
}

.text-page h1:first-child {
  margin-top: 0;
}

.text-page h2 {
  margin-top: 56px;
  font-family: var(--serif);
  font-weight: 200;
  font-size: 30px;
  line-height: 1.25;
  color: var(--cream-bright);
}

.text-page p:not(.eyebrow):not(.text-page-meta) {
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.7;
  color: rgba(237, 230, 214, 0.86);
}

.text-page .text-page-meta {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(237, 230, 214, 0.55);
}

.text-page p a {
  text-decoration: underline;
  text-decoration-color: rgba(242, 194, 102, 0.45);
  text-underline-offset: 3px;
}

/* Mobile ---------------------------------------------------------------- */

@media (max-width: 820px) {
  :root {
    --gutter: 22px;
  }

  .eyebrow {
    font-size: 10px;
  }

  .eyebrow--dot::before {
    display: none;
  }

  .button {
    min-height: 48px;
    padding: 0 18px;
    font-size: 11px;
    letter-spacing: 0.12em;
  }

  .brand {
    gap: 10px;
    font-size: 10px;
    letter-spacing: 0.26em;
  }

  .brand img {
    width: 24px;
  }

  /* Phones get one flattened image instead of the layers. */
  .hero {
    height: 600px;
  }

  .hero-art {
    background: linear-gradient(to bottom, #0a1f4a 0%, #0b2a5e 48%, #061229 74%, #05090f 100%);
  }

  .hero-stage {
    display: none;
  }

  .hero-flat {
    display: block;
    position: absolute;
    inset: 0;
  }

  .hero-flat img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: 50% 100%;
  }

  .hero-scrim {
    background: linear-gradient(
      to bottom,
      rgba(7, 14, 28, 0.55) 0%,
      rgba(7, 14, 28, 0.05) 24%,
      rgba(7, 14, 28, 0.32) 58%,
      rgba(5, 9, 15, 0.9) 86%,
      #05090f 100%
    );
  }

  .hero .brand {
    top: 22px;
  }

  .hero-copy {
    bottom: 30px;
    gap: 14px;
  }

  .hero-kicker {
    font-size: 10px;
    letter-spacing: 0.3em;
  }

  .hero-kicker-long {
    display: none;
  }

  .hero-title {
    font-size: 44px;
    line-height: 1;
    letter-spacing: 0;
    text-shadow: 0 2px 24px rgba(5, 9, 15, 0.9);
  }

  .hero-actions p {
    display: none;
  }

  .pitch {
    padding-block: 64px;
  }

  .pitch .container {
    gap: 22px;
  }

  .pitch-text {
    font-size: 24px;
    line-height: 1.45;
  }

  .signup {
    padding-block: 56px;
  }

  .signup::before {
    background: linear-gradient(to bottom, rgba(5, 9, 15, 0.9), rgba(5, 9, 15, 0.94));
  }

  .signup-panel {
    padding: 0;
    border: 0;
    background: none;
  }

  .signup-panel > * + * {
    margin-top: 18px;
  }

  .signup-title {
    font-size: 26px;
  }

  .signup-form {
    flex-direction: column;
    gap: 18px;
  }

  .signup-form input {
    min-height: 48px;
    padding: 16px;
  }

  .signup-form .button {
    padding: 16px;
    font-size: 12px;
    letter-spacing: 0.14em;
  }

  .signup-note {
    font-size: 10.5px;
    letter-spacing: 0.02em;
  }

  /* On phones the heading stays and the message replaces only the field, button and note. */
  .signup-panel.is-done .signup-title {
    display: block;
  }

  .signup-panel.is-done > .signup-status {
    margin-top: 18px;
  }

  .signup-status {
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(242, 194, 102, 0.35);
    background: rgba(58, 80, 112, 0.2);
    font-family: var(--sans);
    font-weight: 400;
    font-size: 15px;
    line-height: 1.45;
  }

  .signup-status:empty {
    padding: 0;
    border: 0;
  }

  .signup-dot {
    width: 8px;
    height: 8px;
    margin-top: 7px;
    box-shadow: none;
  }

  .store {
    padding-block: 60px;
  }

  .store .container {
    gap: 20px;
  }

  .store-title {
    font-size: 32px;
  }

  .platforms {
    margin-top: 0;
    padding-top: 16px;
  }

  .platforms-label {
    display: none;
  }

  .platform {
    gap: 7px;
    font-size: 11px;
    letter-spacing: 0.06em;
  }

  .platform svg {
    width: 13px;
    height: 13px;
  }

  .site-footer {
    padding-block: 44px 56px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .footer-brand {
    gap: 26px;
  }

  .footer-brand img {
    width: 40px;
  }

  .footer-brand p {
    font-size: 13.5px;
  }

  .footer-heading {
    padding-bottom: 12px;
    font-size: 10px;
    letter-spacing: 0.24em;
  }

  .contact-row {
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding-block: 12px;
  }

  .contact-row dt {
    font-size: 10px;
  }

  .contact-row a {
    font-size: 12px;
  }

  .follow-list {
    gap: 8px;
  }

  .social-pill {
    min-height: 48px;
    padding: 0 13px;
    gap: 9px;
  }

  .footer-bottom {
    margin-top: 26px;
    padding-top: 14px;
    font-size: 10px;
  }

  .footer-bottom-title {
    display: none;
  }

  .page-header {
    padding-block: 22px;
  }

  .text-page {
    padding-block: 40px 64px;
  }

  .text-page h1 {
    margin-top: 18px;
    font-size: 44px;
  }

  .text-page h2 {
    margin-top: 40px;
    font-size: 24px;
  }

  .text-page p:not(.eyebrow):not(.text-page-meta) {
    font-size: 16px;
  }
}
