:root {
  --ink: #102841;
  --paper: #fff8d8;
  --sky: #69bff2;
  --field: #6da63f;
  --frame: #d3d3d0;
  --frame-light: #fbfbf6;
  --frame-dark: #5f6669;
  --art-ratio: 1448 / 1086;
}

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

html {
  min-height: 100%;
  background: #7eaab8;
}

body {
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.11) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(90deg, rgba(16, 40, 65, 0.08) 0 1px, transparent 1px 8px),
    linear-gradient(135deg, #98bec6, #5d8fa7);
  font-family: "Courier New", Courier, monospace;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 3px solid #fff6a0;
  outline-offset: 4px;
  box-shadow: 0 0 0 6px rgba(16, 40, 65, 0.48);
}

.page {
  display: grid;
  min-height: 100svh;
  padding: clamp(0.55rem, 2svh, 1.4rem);
  place-items: center;
}

.splash {
  position: relative;
  width: min(96vw, 76rem, calc((100svh - 1.2rem) * 1.333));
  aspect-ratio: var(--art-ratio);
  filter: drop-shadow(0 1rem 2.35rem rgba(16, 40, 65, 0.34));
}

.screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
  background: var(--sky);
}

.stage,
.scene-image {
  position: absolute;
  inset: 0;
}

.stage {
  z-index: 1;
}

.scene-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
}

.screen::after {
  position: absolute;
  inset: 3.8% 0.9% 1.6%;
  z-index: 2;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(180deg, rgba(13, 59, 115, 0.08), transparent 38%),
    radial-gradient(ellipse at 50% 18%, rgba(255, 255, 255, 0.1), transparent 42%);
  mix-blend-mode: soft-light;
}

.masthead {
  position: absolute;
  z-index: 5;
  top: clamp(6rem, 28%, 12.5rem);
  right: 8%;
  left: 8%;
  text-align: center;
}

.masthead h1 {
  margin: 0;
  color: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 0.85rem + 3.3vw, 4.65rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.94;
  text-shadow:
    0 2px 0 #5e8fd2,
    2px 0 0 #5e8fd2,
    -2px 0 0 #254060,
    0 -2px 0 #254060,
    3px 4px 0 rgba(7, 22, 42, 0.5);
}

.masthead p {
  width: fit-content;
  max-width: min(40rem, 84%);
  margin: clamp(0.45rem, 1.3vw, 1rem) auto 0;
  transform: translateX(clamp(-1.8rem, -2.4vw, -0.45rem));
  color: #183b60;
  font-family: "Courier New", Courier, monospace;
  font-size: clamp(0.82rem, 0.54rem + 0.86vw, 1.18rem);
  font-weight: 700;
  line-height: 1.4;
  text-shadow:
    1px 1px 0 rgba(255, 255, 255, 0.72),
    0 0 0.55rem rgba(255, 255, 255, 0.42);
}

.home-strip {
  position: absolute;
  right: 50%;
  bottom: clamp(0.55rem, 2.35%, 1.5rem);
  z-index: 6;
  transform: translateX(50%);
  max-width: calc(100% - 2rem);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.24) 0 1px, transparent 1px 8px),
    linear-gradient(180deg, rgba(244, 247, 231, 0.92), rgba(205, 218, 200, 0.92));
  border: 2px solid rgba(24, 43, 52, 0.78);
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.66),
    inset -2px -2px 0 rgba(83, 99, 88, 0.32),
    0 0.35rem 0.85rem rgba(13, 32, 28, 0.18);
}

.home-strip a {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: clamp(2rem, 3vw, 2.45rem);
  padding: 0.18rem clamp(0.5rem, 1.1vw, 0.85rem);
  color: #1b3a45;
  font-size: clamp(0.76rem, 0.54rem + 0.66vw, 1rem);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.72);
}

.home-strip a:hover {
  color: #57364b;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22rem;
}

.error-page .masthead {
  top: clamp(3.6rem, 17%, 12rem);
}

.error-page .masthead h1 {
  font-size: clamp(3.4rem, 1.4rem + 8vw, 8.5rem);
}

.error-page .masthead p {
  transform: translateX(-0.75rem);
}

@media (max-width: 42rem) {
  .page {
    padding: 0.55rem;
  }

  .splash {
    width: min(96vw, calc((100svh - 1.1rem) * 1.333));
  }

  .masthead {
    top: 18.4%;
    right: 5.5%;
    left: 5.5%;
  }

  .masthead h1 {
    font-size: clamp(1.45rem, 0.82rem + 5.1vw, 2.55rem);
  }

  .masthead p {
    max-width: 16.5rem;
    margin-top: 0.35rem;
    transform: translateX(-0.55rem);
    font-size: clamp(0.72rem, 0.54rem + 2.1vw, 0.96rem);
    line-height: 1.34;
  }

  .home-strip {
    bottom: 2.2%;
    max-width: calc(100% - 1.2rem);
  }

  .home-strip a {
    min-height: 1.85rem;
    font-size: clamp(0.62rem, 0.44rem + 1.9vw, 0.78rem);
  }
}

@media (max-width: 24rem) {
  .masthead {
    top: 12%;
  }

  .masthead h1 {
    font-size: 1.78rem;
  }

  .masthead p {
    max-width: 13.5rem;
    font-size: 0.68rem;
  }

  .home-strip a {
    font-size: 0.58rem;
  }
}
