/* Gamestem Studios — shared styles
   Dark but soft: deep slate backgrounds, prison-uniform blue accent, restrained type. */

:root {
  --bg: #0f1216;
  --bg-2: #141920;
  --surface: #1a2028;
  --surface-2: #222a34;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e4e8ec;
  --muted: #95a0ac;
  /* Accents come from the State Pen menu palette (MenuStuff/Color_Palette.jpg). Use sparingly. */
  --accent: #cdbeac;      /* bone (buttons) */
  --accent-hover: #e0d4c4;
  --accent-ink: #111418;  /* text on accent */
  --accent-text: #83b6d0; /* uniform blue: a few highlight words */
  --label: #caa982;       /* tan: eyebrows and small labels */
  --gold: #e0c979;
  --amber: #c58941;
  --rust: #b14d2b;
  --green: #94e089;
  --pop: #9c5d36;         /* palette brown: rules, edges, underlines */
  --pop-text: #83b6d0;    /* palette light blue: accent text and numbers */
  --danger: #e08a8a;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--text); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin: 0 0 0.5em;
}
h1, h2 { text-transform: uppercase; }
h3 { font-weight: 500; }

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.8em 1.5em;
  border-radius: var(--radius-sm);
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 0.95rem var(--font-body);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); background: var(--accent-hover); }
.btn:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.btn--ghost:hover { background: var(--surface); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--label);
  margin-bottom: 0.9em;
}

/* ---------- Under construction (index.html) ---------- */

.uc {
  min-height: calc(100vh - 2px);
  min-height: calc(100dvh - 2px);
  display: grid;
  grid-template-rows: 1fr auto;
  background:
    radial-gradient(900px 500px at 70% -10%, rgba(230, 225, 214, 0.07), transparent 60%),
    radial-gradient(700px 500px at 0% 110%, rgba(179, 170, 152, 0.06), transparent 60%),
    var(--bg);
  overflow: hidden;
}
.uc__main {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 48px 16px;
}
.uc__logo {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.24em;
  color: var(--muted);
  margin-bottom: 36px;
}
.uc__logo span { color: var(--text); }
.uc h1 { font-size: clamp(2.2rem, 6.5vw, 4.2rem); }
.uc h1 em { font-style: normal; color: var(--accent-text); }
.uc__lead { color: var(--muted); max-width: 32em; margin: 0 auto 36px; font-size: 1.08rem; }
.uc__progress {
  width: min(320px, 80vw);
  height: 4px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.uc__progress div {
  height: 100%;
  width: 62%;
  border-radius: inherit;
  background: var(--pop);
  animation: dig 6s ease-in-out infinite alternate;
}
@keyframes dig { from { width: 38%; } to { width: 71%; } }
.uc__status {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  min-height: 1.6em;
}
.uc__foot {
  padding: 20px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}
/* The staff link looks exactly like the surrounding text. */
.uc__foot .quiet { color: inherit; text-decoration: none; cursor: text; }
.uc__foot .quiet:focus-visible { outline: 1px dotted var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .uc__progress div { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Login ---------- */

.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(600px 400px at 50% 0%, rgba(230, 225, 214, 0.07), transparent 70%),
    var(--bg);
}
.login__card {
  width: min(400px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}
.login__card h1 { font-size: 1.8rem; }
.login__card p { color: var(--muted); margin-top: 0; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: 0.88rem; }
.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
}
.field input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.login .btn { width: 100%; justify-content: center; margin-top: 8px; }
.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(224, 138, 138, 0.1);
  color: var(--danger);
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.login__back { display: block; text-align: center; margin-top: 18px; color: var(--muted); font-size: 0.88rem; }

/* ---------- Site chrome (front page + State Pen) ---------- */

.preview-bar {
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  padding: 6px 16px;
}
.preview-bar a { color: inherit; }

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 18, 22, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.16em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.brand span { color: var(--muted); }
.nav__links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: flex-end; }
.nav__links a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.92rem; }
.nav__links a:hover, .nav__links a[aria-current] { color: var(--text); }

.section { padding: 96px 0; }
.section--alt { background: var(--bg-2); }
.section h2 { font-size: clamp(1.9rem, 4.2vw, 2.8rem); }
.section__intro { color: var(--muted); max-width: 40em; font-size: 1.08rem; }

/* Big State Pen banner on the studio page */
.banner {
  position: relative;
  display: block;
  margin-top: 32px;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: clamp(380px, 60vh, 620px);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
  isolation: isolate;
}
.banner__art, .hero__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 0.8s ease;
}
.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Footage is bright (white walls), so darken hard toward the text and tint it cool. */
  background:
    linear-gradient(0deg, rgba(10, 12, 16, 0.96) 0%, rgba(10, 12, 16, 0.6) 45%, rgba(10, 12, 16, 0.25) 100%),
    linear-gradient(90deg, rgba(10, 12, 14, 0.6) 0%, transparent 60%),
    rgba(0, 0, 0, 0.15);
}
.banner:hover .banner__art { transform: scale(1.02); }
.banner:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 4px; }
.banner__body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: clamp(24px, 5vw, 56px);
}
.banner__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 10vw, 6.8rem);
  letter-spacing: 0.04em;
  line-height: 0.95;
  margin: 0 0 0.2em;
  color: var(--text);
}
.banner__title span { color: var(--accent-text); }
.banner__tag { font-size: clamp(1rem, 2.2vw, 1.25rem); color: var(--text); max-width: 32em; margin: 0 0 24px; }

.grid-3, .grid-2 { display: grid; gap: 20px; margin-top: 40px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* Longer copy blocks */
.prose p { color: #c3cad2; font-size: 1.08rem; margin: 0 0 1.1em; max-width: 38em; }
.kicker {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  margin: 1.4em 0 0;
}
.kicker span { color: var(--pop-text); }

/* Card number and top edge share the pop color */
.card .card__num { color: var(--pop-text); }
.card { border-top-color: color-mix(in srgb, var(--pop) 75%, transparent); }

/* Thin rule under the nav */
.stripe { height: 2px; background: var(--pop); opacity: 0.85; }

.hero .eyebrow, .banner .eyebrow { color: var(--pop-text); }
.nav__links a[aria-current] { box-shadow: inset 0 -2px 0 var(--pop); padding-bottom: 4px; }
.shot figcaption::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 2px;
  margin-right: 8px;
  vertical-align: middle;
  background: var(--pop);
}

.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.store__icon--discord { --icon: url(../img/discord.svg); }

/* Survival meters (State Pen pitch) */
.vitals { display: grid; gap: 14px; margin-top: 28px; max-width: 360px; }
.vital { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 12px; }
.vital span {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.vital i {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.vital i::before {
  content: "";
  display: block;
  height: 100%;
  width: var(--v, 50%);
  border-radius: inherit;
  background: var(--c, var(--accent));
}

/* The one meter that's maxed out. Blends in until you notice it. */
.vital--urgent span { color: #b89a7e; }
.vital--urgent i { overflow: visible; animation: urgent-glow 2.4s ease-in-out infinite; }
.vital--urgent i::before { animation: urgent-shudder 4s ease-in-out infinite; }
@keyframes urgent-glow {
  0%, 100% { box-shadow: 0 0 0 rgba(156, 93, 54, 0); }
  50% { box-shadow: 0 0 10px 1px rgba(156, 93, 54, 0.55); }
}
@keyframes urgent-shudder {
  0%, 86%, 100% { transform: translate(0, 0); }
  88% { transform: translate(-1px, 0); }
  90% { transform: translate(1px, 0.5px); }
  92% { transform: translate(-1px, -0.5px); }
  94% { transform: translate(1px, 0); }
  96% { transform: translate(0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .vital--urgent i, .vital--urgent i::before { animation: none; }
  .vital--urgent i { box-shadow: 0 0 8px rgba(156, 93, 54, 0.45); }
}

/* Store buttons (Steam / Epic) */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(10, 12, 16, 0.65);
  color: var(--text);
  text-decoration: none;
  line-height: 1.15;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.store:hover { background: var(--surface); border-color: rgba(255, 255, 255, 0.3); }
.store:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.store__icon {
  width: 26px;
  height: 26px;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.store__icon--steam { --icon: url(../img/steam.svg); }
.store__icon--epic { --icon: url(../img/epicgames.svg); }
.store small { display: block; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.store strong { display: block; font-size: 1rem; font-weight: 600; }
.store[aria-disabled="true"] { cursor: default; }
.cta .stores { justify-content: center; margin-bottom: 24px; }

/* Studio facts strip */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 56px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat { padding: 26px 20px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: 0.03em;
  color: var(--pop-text);
  text-transform: uppercase;
}
.stat span { color: var(--muted); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; }
@media (max-width: 700px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* Image beside text */
.media-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  background: #000;
}
.media-frame img, .media-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }

.notice {
  display: inline-block;
  margin-top: 22px;
  padding: 8px 14px;
  border-left: 3px solid var(--rust);
  background: rgba(15, 18, 22, 0.6);
  color: var(--muted);
  font-size: 0.85rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid rgba(230, 225, 214, 0.35);
  border-radius: var(--radius-sm);
  padding: 26px;
}
.card h3 { font-size: 1.3rem; }
.card p { color: var(--muted); margin: 0; }
.card__num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  color: var(--label);
  margin-bottom: 12px;
}

.split { display: grid; gap: 48px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: center; }

.team { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 40px; }
.member { text-align: center; }
.member__pic {
  width: 120px;
  height: 120px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px dashed rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.8rem;
}
.member h3 { font-size: 1.2rem; margin-bottom: 0.1em; }
.member p { color: var(--muted); margin: 0; font-size: 0.92rem; }

.footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.footer .wrap { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }

/* ---------- State Pen page ---------- */

.hero {
  position: relative;
  min-height: clamp(520px, 86vh, 820px);
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(0deg, var(--bg) 0%, rgba(15, 18, 22, 0.7) 40%, rgba(15, 18, 22, 0.35) 100%),
    linear-gradient(90deg, rgba(10, 12, 14, 0.6) 0%, transparent 65%),
    rgba(0, 0, 0, 0.15);
}
.hero .wrap { padding-bottom: 72px; }
.hero h1 { font-size: clamp(3.4rem, 12vw, 8.5rem); font-weight: 700; letter-spacing: 0.04em; line-height: 0.92; }
.hero h1 span { color: var(--accent-text); }
.hero p { font-size: clamp(1.05rem, 2.2vw, 1.3rem); max-width: 32em; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.gallery { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); margin-top: 16px; }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gallery { grid-template-columns: 1fr; } }
.shot {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}
.shot img, .shot video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Gameplay captures include the editor title bar at the top; zoom from the bottom edge to push it out of frame. */
.shot--gameplay video, .media-frame--gameplay img { transform: scale(1.06); transform-origin: center bottom; }
.gallery__heading {
  margin: 40px 0 0;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--label);
}
.shot figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 14px 10px;
  background: linear-gradient(0deg, rgba(10, 12, 16, 0.85), transparent);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
}

.trailer {
  margin-top: 32px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background: #000;
  border: 1px solid var(--line);
  overflow: hidden;
}
.trailer iframe, .trailer video { width: 100%; height: 100%; border: 0; }

.cta {
  text-align: center;
  background:
    radial-gradient(600px 300px at 50% 100%, rgba(230, 225, 214, 0.06), transparent 70%),
    var(--bg-2);
}
.cta p { color: var(--muted); max-width: 32em; margin: 0 auto 28px; }

@media (max-width: 640px) {
  .section { padding: 68px 0; }
  .nav .wrap { flex-wrap: wrap; gap: 6px 16px; padding: 10px 0; }
  .nav__links { gap: 16px; width: 100%; justify-content: flex-start; }
  .nav__links a { font-size: 0.88rem; }
}
