/* Stranger & Stranger Games
   ------------------------------------------------------------------ */

:root {
  --bg:          #171036;
  --bg-deep:     #0F0A26;
  --panel:       #241A52;
  --line:        rgba(167, 139, 250, 0.18);
  --line-strong: rgba(167, 139, 250, 0.38);

  --text:        #C9C2E8;
  --text-bright: #E8E4F5;
  --muted:       #8A80A8;

  --accent:      #A78BFA;
  --accent-deep: #6D28D9;
  --glow:        #FFF3D0;

  --measure: 64ch;

  --step--1: 0.875rem;
  --step-0:  1.0625rem;
  --step-1:  1.33rem;
  --step-2:  1.5rem;
  --step-3:  2.15rem;
  --step-4:  clamp(2.3rem, 5.4vw, 3.7rem);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Karla", system-ui, -apple-system, sans-serif;
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--accent);
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}
a:hover { color: var(--text-bright); text-decoration-color: currentColor; }

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

h1, h2, h3 {
  font-family: "Special Elite", "Courier New", monospace;
  font-weight: 400;
  color: var(--text-bright);
  line-height: 1.1;
  letter-spacing: 0;
  margin: 0;
}

.wrap {
  width: min(100% - 2.5rem, 68rem);
  margin-inline: auto;
}

.narrow { max-width: var(--measure); }

/* ---------- site header ---------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.mark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-bright);
  text-decoration: none;
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.mark img { width: 26px; height: 26px; border-radius: 3px; }

.masthead nav {
  display: flex;
  gap: 1.4rem;
  font-size: var(--step--1);
}
.masthead nav a { text-decoration: none; color: var(--text); }
.masthead nav a:hover { color: var(--glow); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 2rem;
  padding: 4.5rem 0 4rem;
}

.wordmark {
  display: inline-grid;
  justify-items: center;
  gap: 0.4em;
  margin-bottom: 1.6rem;
  color: #fff;
  font-size: clamp(1.15rem, 4.6vw, 1.9rem);
  line-height: 1.1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-shadow: 0 0 4px rgba(255, 243, 208, 0.55), 0 0 18px rgba(167, 139, 250, 0.5);
}
/* cancel the trailing letter-spacing so both lines centre on each other */
.wordmark > span { margin-right: -0.22em; }
.wordmark .amp { font-size: 0.8em; letter-spacing: 0; margin: 0 0.1em; }
.wordmark .games { font-size: 0.62em; letter-spacing: 0.5em; margin-right: -0.5em; }

.hero p.lede {
  font-size: var(--step-1);
  color: var(--text-bright);
  max-width: 34ch;
  margin: 0 0 2rem;
  line-height: 1.4;
}

.hero-art {
  justify-self: end;
  width: min(100%, 30rem);
  filter: drop-shadow(0 0 60px rgba(109, 40, 217, 0.45));
}

/* single orchestrated moment: the glow catches, fails, catches */
@keyframes catch {
  0%   { opacity: 0.15; }
  18%  { opacity: 1; }
  24%  { opacity: 0.25; }
  32%  { opacity: 1; }
  38%  { opacity: 0.4; }
  100% { opacity: 1; }
}
.wordmark { animation: catch 1.4s ease-out both; }

@media (prefers-reduced-motion: reduce) {
  .wordmark { animation: none; }
}

/* ---------- signup ---------- */

.signup {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 1.5rem 1.4rem 1.4rem;
  max-width: 34rem;
}

.signup h2 {
  font-size: var(--step-2);
  margin-bottom: 0.5rem;
}

.signup p {
  margin: 0 0 1.1rem;
  font-size: var(--step--1);
  color: var(--text);
}

.signup .fine {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.field {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.field input[type="email"] {
  flex: 1 1 14rem;
  min-width: 0;
  background: var(--bg-deep);
  border: 1px solid var(--line-strong);
  color: var(--text-bright);
  font: inherit;
  font-size: var(--step--1);
  padding: 0.7rem 0.8rem;
  border-radius: 2px;
}
.field input[type="email"]::placeholder { color: var(--muted); }

.field button {
  flex: 0 0 auto;
  background: var(--accent-deep);
  color: #fff;
  border: 1px solid transparent;
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.7rem 1.5rem;
  border-radius: 2px;
  cursor: pointer;
}
.field button:hover { background: var(--accent); color: var(--bg-deep); }

/* ---------- games ---------- */

.section { padding: 4rem 0; }

.section > h2 {
  font-size: var(--step-3);
  margin-bottom: 1.8rem;
}

.featured {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 2.2rem;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--panel);
  padding: 1.6rem;
}

.featured .shot {
  background: var(--bg-deep);
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.featured h3 { font-size: var(--step-3); }

.playable {
  color: var(--glow);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  margin: 0 0 0.6rem;
}

.featured p { margin: 0.7rem 0 1.3rem; }

.actions {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  background: var(--accent-deep);
  color: #fff;
  text-decoration: none;
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.62rem 1.4rem;
  border-radius: 2px;
}
.btn:hover { background: var(--accent); color: var(--bg-deep); }

.btn-quiet {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text-bright);
}
.btn-quiet:hover { background: transparent; border-color: var(--glow); color: var(--glow); }

.pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem;
  margin-top: 1.6rem;
}

.game {
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.game .shot {
  background: var(--bg-deep);
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
  border-bottom: 1px solid var(--line);
}

.game .body {
  padding: 1.2rem 1.3rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.game .body .actions { margin-top: auto; }
.game h3 { font-size: var(--step-2); margin-bottom: 0.45rem; }
.game p { margin: 0 0 1rem; font-size: var(--step--1); }

.meta {
  color: var(--muted);
  font-size: 0.8125rem;
  margin: 0 0 0.9rem;
}

/* ---------- game detail pages ---------- */

.game-head { padding: 3.2rem 0 0; }
.game-head h1 { font-size: var(--step-4); }
.game-head .tagline {
  font-size: var(--step-1);
  color: var(--glow);
  margin: 0.5rem 0 0;
}

.game-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  margin: 2rem 0 2.5rem;
}

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16rem;
  gap: 3rem;
  align-items: start;
}

.detail .prose > p { max-width: var(--measure); }
.detail .prose h2 { font-size: var(--step-2); margin: 2rem 0 0.6rem; }

.cast { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.cast li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  max-width: var(--measure);
}
.cast strong { color: var(--text-bright); font-weight: 600; }

.facts {
  border: 1px solid var(--line);
  padding: 1.2rem 1.3rem;
  font-size: var(--step--1);
  position: sticky;
  top: 1.5rem;
}
.facts dl { margin: 0; }
.facts dt {
  color: var(--muted);
  font-size: 0.8125rem;
  margin-top: 0.9rem;
}
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: 0.1rem 0 0; color: var(--text-bright); }

.strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
  margin: 2.5rem 0 0;
}
.strip img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--bg-deep);
  border: 1px solid var(--line);
}
.strip.wide img { aspect-ratio: 4 / 3; }
.strip.cinema { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.strip.cinema img { aspect-ratio: 16 / 9; }

/* ---------- footer ---------- */

.footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
  padding: 3.5rem 0 2.5rem;
  margin-top: 4rem;
}

.footer .signup { margin-inline: auto; }

.footer-cols {
  display: flex;
  justify-content: space-between;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--step--1);
}
.footer-cols a { color: var(--text); text-decoration: none; }
.footer-cols a:hover { color: var(--glow); }
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { margin-bottom: 0.35rem; }

/* ---------- responsive ---------- */

.masthead nav a { white-space: nowrap; }

@media (max-width: 560px) {
  /* icon only — the full name doesn't fit beside the nav */
  .mark { font-size: 0; gap: 0; }
  .mark img { width: 30px; height: 30px; }
  .masthead nav { gap: 1.1rem; }
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    padding: 2.5rem 0 3rem;
    gap: 1.5rem;
  }
  .hero-art { justify-self: center; width: min(80%, 20rem); order: -1; }
  .featured { grid-template-columns: 1fr; }
  .featured .shot { order: -1; }
  .pair { grid-template-columns: 1fr; }
  .detail { grid-template-columns: 1fr; gap: 2rem; }
  .facts { position: static; }
}
