/* Z2SIX studio pages: apps directory, app pages, privacy pages, support.
 * Also styles the "Apps & games" door and top links on the mod home. */

/* ---- additions to the mod home (index*.html) ---------------------------- */

.top-links {
  display: flex;
  gap: 18px;
  pointer-events: auto;
}

.top-links a {
  color: var(--text-dim, #a5a5a5);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.top-links a:hover,
.top-links a:focus-visible {
  color: var(--text-main, #ededed);
}

.hero-door {
  display: inline-block;
  margin: 30px 0 0 10px;
  border: 1px solid var(--accent, #fc0553);
  background: rgba(252, 5, 83, 0.12);
  color: var(--text-main, #ededed);
  padding: 11px 20px;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: background 220ms ease, transform 220ms ease;
}

.hero-door:hover,
.hero-door:focus-visible {
  background: rgba(252, 5, 83, 0.24);
  transform: translateY(-1px);
}

/* ---- standalone studio pages ------------------------------------------- */

.studio-page {
  --st-bg: #070708;
  --st-surface: #0f0f11;
  --st-line: #232327;
  --st-text: #ededed;
  --st-dim: #a5a5a5;
  --st-accent: #fc0553;
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(252, 5, 83, 0.12), transparent 60%),
    var(--st-bg);
  color: var(--st-text);
  font-family: "Space Grotesk", system-ui, sans-serif;
  line-height: 1.6;
}

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

.studio-page a {
  color: var(--st-text);
}

.studio-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 20px;
}

.studio-brand {
  font-family: "Antonio", sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.studio-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.studio-nav a {
  color: var(--st-dim);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.studio-nav a:hover,
.studio-nav a[aria-current="page"] {
  color: var(--st-text);
}

.studio-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 96px;
}

.studio-eyebrow {
  margin: 0;
  color: var(--st-accent);
  font-size: 0.76rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.studio-title {
  margin: 8px 0 0;
  font-family: "Antonio", sans-serif;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
}

.studio-lead {
  max-width: 62ch;
  margin: 18px 0 0;
  color: var(--st-dim);
  font-size: 1.05rem;
}

.studio-section {
  margin-top: 56px;
}

.studio-section > h2 {
  margin: 0 0 18px;
  font-family: "Antonio", sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
}

/* app cards */

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.app-card {
  --app-accent: var(--st-accent);
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  border: 1px solid var(--st-line);
  background: var(--st-surface);
  padding: 20px;
  text-decoration: none;
  transition: border-color 200ms ease, transform 200ms ease;
}

.app-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--app-accent);
}

.app-card:hover,
.app-card:focus-within {
  border-color: var(--app-accent);
  transform: translateY(-2px);
}

.app-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-card__icon {
  width: 56px;
  height: 56px;
  flex: none;
  object-fit: contain;
  background: #151518;
  border: 1px solid var(--st-line);
  padding: 6px;
}

.app-card__icon--letter {
  display: grid;
  place-items: center;
  font-family: "Antonio", sans-serif;
  font-size: 1.6rem;
  color: var(--app-accent);
}

.app-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.app-card__platform {
  margin: 2px 0 0;
  color: var(--st-dim);
  font-size: 0.8rem;
}

.app-card__copy {
  margin: 0;
  color: var(--st-dim);
}

.app-card__link {
  justify-self: start;
  color: var(--st-text);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--app-accent);
  padding-bottom: 2px;
}

.app-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* doors (mods / apps) */

.door-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.door {
  display: block;
  border: 1px solid var(--st-line);
  background: var(--st-surface);
  padding: 22px;
  text-decoration: none;
}

.door:hover {
  border-color: var(--st-accent);
}

.door strong {
  display: block;
  font-family: "Antonio", sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.03em;
}

.door span {
  color: var(--st-dim);
}

/* long-form text (privacy, app pages) */

.prose {
  max-width: 72ch;
}

.prose h2 {
  margin: 40px 0 10px;
  font-family: "Antonio", sans-serif;
  font-size: 1.45rem;
  letter-spacing: 0.03em;
}

.prose h3 {
  margin: 26px 0 6px;
  font-size: 1.05rem;
}

.prose p,
.prose li {
  color: #d6d6d6;
}

.prose ul {
  padding-left: 20px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.92rem;
}

.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 9px 10px;
  border-bottom: 1px solid var(--st-line);
}

.prose th {
  color: var(--st-dim);
  font-weight: 500;
}

.studio-note {
  border-left: 3px solid var(--st-accent);
  background: var(--st-surface);
  padding: 12px 16px;
  color: var(--st-dim);
}

/* support form */

.support-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.studio-form {
  display: grid;
  gap: 16px;
  border: 1px solid var(--st-line);
  background: var(--st-surface);
  padding: 22px;
}

.studio-form label {
  display: grid;
  gap: 6px;
  color: var(--st-dim);
  font-size: 0.9rem;
}

.studio-form input,
.studio-form select,
.studio-form textarea {
  width: 100%;
  border: 1px solid #2c2c31;
  background: #09090b;
  color: var(--st-text);
  font: inherit;
  padding: 10px 12px;
  border-radius: 0;
}

.studio-form textarea {
  min-height: 160px;
  resize: vertical;
}

.studio-form input:focus,
.studio-form select:focus,
.studio-form textarea:focus {
  outline: 2px solid var(--st-accent);
  outline-offset: 0;
}

.studio-form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.studio-form fieldset {
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
  border: 0;
}

.studio-form fieldset label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--st-text);
}

.studio-form fieldset input {
  width: auto;
}

.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.studio-button {
  justify-self: start;
  border: 1px solid var(--st-accent);
  background: rgba(252, 5, 83, 0.16);
  color: var(--st-text);
  font: inherit;
  font-weight: 500;
  padding: 11px 22px;
  cursor: pointer;
}

.studio-button:hover {
  background: rgba(252, 5, 83, 0.28);
}

.studio-button[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.form-status {
  margin: 0;
  min-height: 1.4em;
}

.form-status.is-error {
  color: #ff96be;
}

.form-status.is-ok {
  color: #8ef7b8;
}

.contact-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  border: 1px solid var(--st-line);
  background: var(--st-surface);
  padding: 14px 16px;
}

.contact-list strong {
  display: block;
}

.contact-list span {
  color: var(--st-dim);
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .support-layout,
  .studio-form .row {
    grid-template-columns: 1fr;
  }

  .studio-top {
    flex-wrap: wrap;
  }

  .hero-door {
    margin-left: 0;
    margin-top: 12px;
  }
}

/* ---- studio front page (studio*.html) ---------------------------------- */

.studio-home {
  position: relative;
  overflow-x: hidden;
}

.studio-home .studio-top,
.studio-home .studio-main {
  position: relative;
  z-index: 1;
}

.sh-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.sh-grid {
  position: absolute;
  inset: -40%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(900px) rotateX(58deg) translateY(18%);
  transform-origin: center top;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
  animation: sh-grid-drift 26s linear infinite;
}

.sh-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 500px at 78% 8%, rgba(252, 5, 83, 0.18), transparent 60%),
    radial-gradient(700px 420px at 8% 92%, rgba(0, 214, 255, 0.07), transparent 60%);
}

@keyframes sh-grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 560px, 0 0; }
}

.sh-main {
  padding-top: 6vh;
}

.sh-hero {
  max-width: 900px;
}

.sh-title {
  position: relative;
  display: inline-block;
  isolation: isolate;
  margin: 12px 0 0;
  font-family: "Antonio", sans-serif;
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 0.96;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.sh-base {
  position: relative;
  z-index: 2;
  display: block;
}

.sh-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
}

.sh-layer-r { color: rgba(252, 5, 83, 0.6); animation: sh-rgb 900ms steps(2) 250ms 1 both; }
.sh-layer-g { color: rgba(0, 255, 120, 0.5); animation: sh-rgb 900ms steps(2) 320ms 1 both; }
.sh-layer-b { color: rgba(0, 214, 255, 0.52); animation: sh-rgb 900ms steps(2) 390ms 1 both; }

.sh-title:hover .sh-layer {
  animation: sh-rgb 600ms steps(3) 0s 1 both;
}

@keyframes sh-rgb {
  0% { opacity: 0.9; transform: translate(-9px, -2px); }
  25% { opacity: 0.9; transform: translate(8px, 3px); }
  50% { opacity: 0.8; transform: translate(-6px, 2px); }
  75% { opacity: 0.6; transform: translate(10px, -3px); }
  100% { opacity: 0; transform: translate(0, 0); }
}

.sh-paths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 56px;
}

.sh-path {
  --path-accent: var(--st-accent);
  position: relative;
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 380px;
  padding: 26px;
  border: 1px solid var(--st-line);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.03), transparent 40%),
    rgba(12, 12, 14, 0.86);
  text-decoration: none;
  overflow: hidden;
  transition: border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.sh-path::after {
  content: "";
  position: absolute;
  inset: auto -30% -60% auto;
  width: 70%;
  aspect-ratio: 1;
  background: radial-gradient(circle, var(--path-accent), transparent 65%);
  opacity: 0.12;
  transition: opacity 220ms ease;
}

.sh-path--mods {
  --path-accent: #3ddc84;
}

.sh-path:hover,
.sh-path:focus-visible {
  border-color: var(--path-accent);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.sh-path:hover::after,
.sh-path:focus-visible::after {
  opacity: 0.26;
}

.sh-path__kicker {
  color: var(--path-accent);
  font-size: 0.76rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.sh-path__art {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 6px;
}

.sh-path__art img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  padding: 6px;
  background: #151518;
  border: 1px solid var(--st-line);
  transition: transform 260ms ease;
}

.sh-path__art--apps img {
  width: 64px;
  height: 64px;
}

.sh-path__art--mods img {
  image-rendering: pixelated;
}

.sh-path__art {
  align-items: flex-start;
}

.sh-path__art img {
  flex: none;
  box-sizing: border-box;
  display: block;
}

.sh-path:hover .sh-path__art img {
  border-color: rgba(255, 255, 255, 0.18);
}

.sh-path__title {
  font-family: "Antonio", sans-serif;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 1;
  letter-spacing: 0.01em;
}

.sh-path__copy {
  max-width: 48ch;
  color: var(--st-dim);
}

.sh-path__cta {
  align-self: end;
  margin-top: 8px;
  color: var(--st-text);
  font-weight: 500;
}

.sh-path__cta span {
  display: inline-block;
  transition: transform 220ms ease;
}

.sh-path:hover .sh-path__cta span {
  transform: translateX(5px);
}

.sh-about {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: center;
  margin-top: 72px;
  padding-top: 32px;
  border-top: 1px solid var(--st-line);
  max-width: 900px;
}

.sh-about__img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border: 1px solid var(--st-line);
}

.sh-about h2 {
  margin: 6px 0 6px;
  font-family: "Antonio", sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.02em;
}

.sh-about p {
  margin: 0;
  color: var(--st-dim);
}

.sh-about__links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 12px !important;
}

.sh-about__links a {
  color: var(--st-text);
}

@media (max-width: 760px) {
  .sh-paths {
    grid-template-columns: 1fr;
  }

  .sh-path {
    min-height: 0;
  }

  .sh-about {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sh-grid,
  .sh-layer {
    animation: none !important;
  }
}

/* ---- Games & apps page (apps/index.html): arcade night ------------------ */

.games-page {
  position: relative;
  overflow-x: hidden;
  background: #08060e;
}

.games-page .studio-top,
.games-page .studio-main {
  position: relative;
  z-index: 1;
}

.gp-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #08060e;
}

/* dithered plasma, drawn tiny by games-bg.js and scaled up with hard pixels */
.gp-dither {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.gp-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 70% at 25% 18%, rgba(8, 6, 14, 0.85) 0%, rgba(8, 6, 14, 0.35) 50%, rgba(8, 6, 14, 0) 75%);
}

.gp-title {
  position: relative;
  display: inline-block;
  isolation: isolate;
  font-size: clamp(3rem, 9vw, 6.4rem);
  text-shadow: 0 0 28px rgba(252, 5, 83, 0.35);
}

.gp-title .sh-base { position: relative; z-index: 2; display: block; }

.games-page .studio-eyebrow { color: #ffb347; }

.games-page .studio-section > h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.games-page .studio-section > h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(252, 5, 83, 0.6), transparent);
}

.games-page .studio-section__lead {
  margin: -8px 0 20px;
  color: var(--st-dim);
}

/* featured game cards */
.app-grid--games {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr));
  gap: 22px;
}

.app-grid--games .app-card {
  min-height: 300px;
  padding: 26px;
  /* header pinned top-left, description and button pinned to the bottom:
     every card's header sits at the same height whatever the text length */
  align-content: stretch;
  grid-template-rows: auto 1fr auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(500px 260px at 80% 0%, color-mix(in srgb, var(--app-accent) 35%, transparent), transparent 70%),
    linear-gradient(180deg, rgba(20, 14, 32, 0.6), rgba(10, 8, 18, 0.95));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}

.app-grid--games .app-card::before {
  height: 0;
}

.app-grid--games .app-card:hover {
  transform: translateY(-4px);
  border-color: var(--app-accent);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--app-accent), 0 0 40px color-mix(in srgb, var(--app-accent) 35%, transparent);
}

.app-card__art {
  position: absolute;
  inset: 0 0 38% 0;
  background: var(--art) center top / cover no-repeat;
  opacity: 0.45;
  transition: opacity 260ms ease, transform 600ms ease;
}

.app-card__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 8, 18, 0.55) 0%, rgba(10, 8, 18, 0.2) 35%, rgba(10, 8, 18, 0.75) 62%, rgba(10, 8, 18, 1) 85%);
}

.app-card--art { min-height: 360px; }

.app-card--art:hover .app-card__art {
  opacity: 0.75;
  transform: scale(1.03);
}

.app-grid--games .app-card > :not(.app-card__art) {
  position: relative;
  z-index: 1;
}

.app-grid--games .app-card__icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.12);
}

.app-grid--games h3 {
  font-family: "Antonio", sans-serif;
  font-size: 2rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.app-grid--games .app-card__platform {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 10px;
  border: 1px solid var(--app-accent);
  border-radius: 999px;
  color: #fff;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--app-accent) 22%, transparent);
}

.app-grid--games .app-card__copy {
  align-self: end;
  color: #e6e1ef;
  font-size: 1.02rem;
  max-width: 52ch;
}

.app-grid--games .app-card__link {
  padding: 9px 16px;
  border: 1px solid var(--app-accent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--app-accent) 18%, transparent);
  font-weight: 600;
}

/* apps & tools: quieter glass cards */
.gp-apps .app-card {
  border-radius: 14px;
  background: rgba(14, 12, 22, 0.72);
  border-color: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(3px);
}

.gp-apps .app-card::before {
  left: 18px;
  right: 18px;
  height: 2px;
  border-radius: 2px;
}

.games-page .door {
  border-radius: 14px;
  background: rgba(14, 12, 22, 0.72);
  border-color: rgba(255, 255, 255, 0.08);
}


@media (max-width: 760px) {
  .app-grid--games .app-card { min-height: 260px; padding: 20px; }
  .app-card--art { min-height: 340px; }
  .app-card__art { inset: 0 0 50% 0; opacity: 0.5; }
  .app-grid--games h3 { font-size: 1.7rem; }
}
