:root {
  --green: #00ff9d;
  --black: #090b0a;
  --mono: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--black);
  color: var(--green);
  font-family: var(--mono);
}

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

.site-header {
  position: relative;
  z-index: 2;
  min-height: 0;
  padding: 22px 24px;
  text-align: center;
  pointer-events: none;
}

.logo {
  display: inline-block;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  font-family: var(--mono);
  font-size: clamp(8px, 0.82vw, 15px);
  font-variant-ligatures: none;
  line-height: 1;
  text-align: left;
  white-space: pre;
}

nav {
  position: absolute;
  top: 28px;
  right: 32px;
  z-index: 3;
  display: flex;
  gap: 20px;
  font-size: clamp(10px, 0.72vw, 14px);
  pointer-events: auto;
}

.coming-soon {
  position: absolute;
  top: 28px;
  left: 32px;
  font-size: clamp(10px, 0.72vw, 14px);
}

.intro-copy a,
nav a,
.footer-actions a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

nav a:hover,
nav a:focus-visible {
  color: #fff;
}

.loading-screen {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  min-height: 100vh;
  padding: 40px 6% 16px;
}

.intro-grid,
.feature-grid {
  position: relative;
  top: auto;
  right: auto;
  left: auto;
  height: auto;
  z-index: 1;
  display: grid;
}

.intro-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 6%;
  align-items: center;
}

.intro-copy {
  max-width: 620px;
  padding: 4% 0;
  text-align: left;
  text-shadow: 0 0 10px var(--black);
}

.intro-copy .eyebrow {
  margin: 0 0 3%;
  font-size: clamp(10px, 0.72vw, 14px);
  letter-spacing: 0.12em;
}

.intro-copy h1 {
  margin: 0 0 4%;
  font-size: clamp(24px, 3vw, 56px);
  line-height: 0.95;
  font: 35px/1 var(--mono);
  font-weight: bold;
}

.intro-copy p:not(.eyebrow) {
  width: fit-content;
  max-width: 52ch;
  margin: 2px;
  margin-bottom: calc(3% + 2px);
  padding: 0.2em 0.35em;
  background: var(--black);
  font-size: clamp(13px, 1.05vw, 21px);
  line-height: 1.3;
}

.video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--green);
  background: var(--black);
  box-shadow: 0 0 18px rgba(0, 255, 157, 0.18);
}

.video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.feature-grid {
  margin-top: 72px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3%;
  z-index: 2;
  pointer-events: none;
}

.feature-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  pointer-events: auto;
}

.feature-card h2 {
  align-self: flex-start;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 1.5%;
  padding: 0.2em 0.3em;
  background: var(--black);
  font-size: clamp(15px, 1.35vw, 26px);
  line-height: 1;
  text-align: left;
}

.image-slot {
  display: block;
  width: 100%;
  aspect-ratio: 1115 / 628;
  object-fit: cover;
  cursor: zoom-in;
}

.image-wrap {
  position: relative;
  padding: 1px;
  border: 1px solid rgba(0, 255, 157, 0.35);
}

.lightbox-indicator {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: clamp(18px, 1.8vw, 28px);
  height: clamp(18px, 1.8vw, 28px);
  padding: 3px;
  border: 1px solid var(--green);
  background: rgba(9, 11, 10, 0.82);
  fill: none;
  stroke: var(--green);
  stroke-linecap: square;
  stroke-width: 1.5;
  pointer-events: none;
}

.card-copy {
  flex: 1;
  min-height: 0;
  margin-top: 4%;
  padding: 3% 0 0;
  border-top: 1px solid rgba(0, 255, 157, 0.28);
  background: var(--black);
  font-size: clamp(15px, 1vw, 20px);
  line-height: 1.25;
  text-align: left;
}

.plus-block,
.site-footer {
  position: relative;
  z-index: 1;
  width: 88%;
  margin-right: auto;
  margin-left: auto;
}

.plus-block {
  margin-top: 24px;
  padding: 0;
  text-align: left;
}

.plus-block p {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 0.2em 0.35em;
  background: var(--black);
  font-size: clamp(14px, 1vw, 20px);
  line-height: 1.35;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 56px;
  padding: 24px 0 36px;
  border-top: 1px solid var(--green);
}

.footer-logo {
  font-size: clamp(12px, 1vw, 18px);
  font-weight: 700;
}

.footer-actions {
  margin-left: auto;
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  font-size: clamp(12px, 0.9vw, 16px);
}

.lightbox {
  width: min(92vw, 1200px);
  max-width: none;
  padding: 0;
  border: 1px solid var(--green);
  background: rgba(9, 11, 10, 0.96);
  color: var(--green);
  box-shadow: 0 0 24px rgba(0, 255, 157, 0.32);
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.82);
}

#lightbox-image {
  display: block;
  width: 100%;
  height: auto;
}

.lightbox-close {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 1;
  border: 0;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  font: 24px/1 var(--mono);
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  color: #fff;
}

.mailing-list-dialog {
  width: min(92vw, 560px);
  max-width: none;
  padding: 32px;
  border: 1px solid var(--green);
  background: var(--black);
  color: var(--green);
  box-shadow: 0 0 24px rgba(0, 255, 157, 0.32);
}

.mailing-list-dialog::backdrop {
  background: rgba(0, 0, 0, 0.82);
}

.mailing-list-dialog h2 {
  margin: 0 0 24px;
  font: bold 24px/1 var(--mono);
}

.mailing-list-dialog .sender-form-field {
  position: relative;
  text-align: center;
}

.mailing-list-dialog .sender-form-field::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 64px;
  background: #000;
  content: "";
  pointer-events: none;
}

.mailing-list-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  font: 24px/1 var(--mono);
}

.mailing-list-close:hover,
.mailing-list-close:focus-visible {
  color: #fff;
}

#planet-art {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  margin: 0;
  overflow: hidden;
  color: var(--green);
  font-family: var(--mono);
  font-size: clamp(7px, 1vw, 12px);
  font-weight: 700;
  font-variant-ligatures: none;
  line-height: 1.02;
  text-align: left;
  text-shadow: 0 0 5px var(--green);
  user-select: none;
  pointer-events: none;
}

@media (max-width: 900px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .loading-screen {
    display: block;
    width: 100%;
    height: auto;
    min-height: 100vh;
    padding: 32px 6% 16px;
  }

  #planet-art {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
  }

  .intro-grid,
  .feature-grid {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    height: auto;
  }

  .intro-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6%;
    align-items: start;
  }

  .feature-grid {
    margin-top: 64px;
  }

  .plus-block {
    margin-top: 32px;
  }

  .feature-card h2 {
    margin-bottom: 8px;
  }
}

@media (max-width: 720px) {
  .site-header {
    min-height: 0;
    padding: 10px 10px;
  }

  .logo {
    display: table;
    margin: 0 auto;
    font-size: 6px;
    text-align: left;
  }

  nav {
    position: static;
    justify-content: center;
    gap: 10px;
    font-size: 9px;
    margin-top: 0;
  }

  .coming-soon {
    top: 10px;
    left: 10px;
    font-size: 9px;
  }

  .intro-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 42px;
    margin-top: 56px;
  }

  .feature-card {
    padding: 0;
  }

  .card-copy {
    font-size: clamp(13px, 3.4vw, 17px);
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
}

@media (max-width: 167px) {
  .site-header {
    min-height: 0;
    padding: 7px 4px;
  }

  .logo {
    font-size: 0;
    line-height: 1.1;
    white-space: normal;
  }

  .logo::after {
    display: block;
    content: "SPACE PROSPECTOR\A-- AN ASCII SPACE EXPLORATION GAME --";
    font-size: 5px;
    line-height: 1.1;
    text-align: center;
    white-space: pre;
  }

  nav {
    top: 35px;
    right: 4px;
    gap: 5px;
    font-size: 6px;
    margin-top: 0;
  }

  .coming-soon {
    top: 7px;
    left: 4px;
    font-size: 6px;
  }
}
