:root {
  --black: #050505;
  --ink: #111;
  --panel: #151515;
  --line: #343434;
  --soft-line: #242424;
  --white: #f7f7f2;
  --muted: #b9b9b2;
  --dim: #777;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 5vw, 72px);
  background: rgba(5, 5, 5, 0.86);
  border-bottom: 1px solid var(--soft-line);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.site-footer div,
.hero-actions,
.form-row,
.carousel-controls,
.carousel-dots {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  min-width: 0;
  font-weight: 900;
  text-transform: uppercase;
}

.brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--white);
}

.brand span {
  white-space: nowrap;
}

.nav-links,
.site-footer div {
  gap: clamp(14px, 3vw, 30px);
  color: var(--muted);
  font-size: 0.94rem;
}

.nav-links a,
.site-footer a,
.lead-story a {
  transition: color 180ms ease;
}

.nav-links a:hover,
.site-footer a:hover,
.lead-story a:hover {
  color: var(--white);
}

.header-action,
.button,
.newsletter button,
.carousel-button {
  border: 1px solid var(--white);
  border-radius: var(--radius);
  font-weight: 800;
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.header-action {
  padding: 10px 16px;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font-size: 0.9rem;
}

.header-action:hover,
.button:hover,
.newsletter button:hover,
.carousel-button:hover {
  transform: translateY(-2px);
}

.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  align-items: end;
  padding: clamp(92px, 12vw, 156px) clamp(18px, 5vw, 72px) clamp(42px, 8vw, 88px);
  overflow: hidden;
  isolation: isolate;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
}

.hero-overlay {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 0.88), rgba(5, 5, 5, 0.52) 48%, rgba(5, 5, 5, 0.9)),
    linear-gradient(0deg, rgba(5, 5, 5, 0.98), rgba(5, 5, 5, 0.06) 44%, rgba(5, 5, 5, 0.36)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 9px);
}

.hero-content {
  width: min(860px, 100%);
}

.eyebrow,
.tag,
time {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 920px;
  margin-bottom: 16px;
  font-size: clamp(3.2rem, 9vw, 8.7rem);
  line-height: 0.86;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4.9rem);
  line-height: 0.95;
}

h3 {
  margin-bottom: 10px;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.05;
}

.hero-copy {
  width: min(680px, 100%);
  color: var(--white);
  font-size: clamp(1.08rem, 2vw, 1.32rem);
  line-height: 1.6;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.9);
}

.hero-actions,
.form-row {
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
}

.button.primary,
.newsletter button {
  background: var(--white);
  color: var(--black);
}

.button.secondary {
  background: rgba(5, 5, 5, 0.36);
}

.ticker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--soft-line);
  background: var(--white);
  color: var(--black);
}

.ticker p {
  margin: 0;
  padding: 16px clamp(18px, 4vw, 42px);
  font-weight: 900;
  text-transform: uppercase;
}

.ticker p + p {
  border-left: 1px solid #c9c9c2;
}

.section,
.story-band,
.newsletter {
  padding: clamp(56px, 9vw, 112px) clamp(18px, 5vw, 72px);
}

.subpage-hero,
.standalone-page {
  min-height: auto;
  padding: clamp(76px, 11vw, 136px) clamp(18px, 5vw, 72px) clamp(44px, 7vw, 82px);
}

.subpage-hero {
  border-bottom: 1px solid var(--soft-line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%),
    #090909;
}

.subpage-hero h1,
.standalone-page h1 {
  max-width: 1020px;
  margin-bottom: 18px;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.92;
  text-transform: uppercase;
}

.subpage-hero p:not(.eyebrow) {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.65;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.game-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 22px;
  align-items: stretch;
}

.games-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: clamp(42px, 7vw, 82px);
}

.studio-game-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(280px, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.studio-game-media {
  position: relative;
  min-height: 310px;
}

.studio-game-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.studio-game-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: clamp(22px, 4vw, 38px);
}

.studio-game-body p {
  color: var(--muted);
  line-height: 1.6;
}

.studio-game-body .button {
  width: fit-content;
  margin-top: 8px;
}

.detail-heading {
  padding-top: clamp(16px, 3vw, 34px);
  border-top: 1px solid var(--soft-line);
}

.carousel,
.game-info,
.lead-story,
.story-list article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.carousel {
  overflow: hidden;
}

.carousel-track {
  position: relative;
  min-height: clamp(340px, 54vw, 690px);
}

.slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
}

.slide img {
  width: 100%;
  height: 100%;
  min-height: clamp(340px, 54vw, 690px);
  object-fit: cover;
}

.slide figcaption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  width: fit-content;
  max-width: calc(100% - 36px);
  padding: 10px 12px;
  border: 1px solid rgba(247, 247, 242, 0.64);
  border-radius: var(--radius);
  background: rgba(5, 5, 5, 0.76);
  color: var(--white);
  font-size: 0.94rem;
  font-weight: 800;
}

.carousel-controls {
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.carousel-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
}

.carousel-dots {
  gap: 8px;
}

.carousel-dots button {
  width: 34px;
  height: 8px;
  padding: 0;
  border: 1px solid var(--white);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.carousel-dots button.active {
  background: var(--white);
}

.game-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 4vw, 38px);
}

.game-info p,
.lead-story p,
.story-band p,
.newsletter p,
.story-list h3 {
  color: var(--muted);
  line-height: 1.6;
}

.game-info h3,
.lead-story h3,
.story-list h3 {
  color: var(--white);
}

.facts {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
}

.facts div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
  border-top: 1px solid var(--line);
}

.facts dt,
.facts dd {
  margin: 0;
}

.facts dt {
  color: var(--dim);
  font-weight: 900;
  text-transform: uppercase;
}

.facts dd {
  color: var(--white);
  text-align: right;
}

.story-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 600px);
  gap: clamp(28px, 7vw, 88px);
  align-items: center;
  border-block: 1px solid var(--soft-line);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05), transparent),
    #0d0d0d;
}

.story-band p {
  margin-bottom: 0;
  font-size: 1.08rem;
}

.news-section {
  background: #090909;
}

.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 22px;
}

.lead-story {
  position: relative;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: clamp(24px, 4vw, 42px);
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.08), rgba(5, 5, 5, 0.92)),
    var(--story-image, url("assets/american-icecream-night.png")) center / cover;
}

.lead-story h3 {
  max-width: 780px;
  font-size: clamp(1.7rem, 4vw, 3.7rem);
}

.lead-story a {
  width: fit-content;
  margin-top: 14px;
  border-bottom: 2px solid var(--white);
  font-weight: 900;
}

.story-list {
  display: grid;
  gap: 14px;
}

.story-list article {
  padding: 22px;
}

.story-list h3 {
  margin-bottom: 0;
  font-size: 1.1rem;
}

.newsletter {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 560px);
  gap: 28px;
  align-items: center;
  background: var(--white);
  color: var(--black);
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 560px);
  gap: clamp(28px, 7vw, 88px);
  align-items: center;
  padding: clamp(56px, 9vw, 112px) clamp(18px, 5vw, 72px);
  border-top: 1px solid #d5d5cf;
  background: var(--white);
  color: var(--black);
}

.contact-section .eyebrow,
.contact-section p {
  color: #555;
}

.contact-section p {
  max-width: 620px;
  margin-bottom: 0;
  line-height: 1.65;
}

.contact-links {
  display: grid;
  gap: 12px;
}

.contact-links a {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--black);
  border-radius: var(--radius);
  background: transparent;
}

.contact-links span {
  color: #555;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-links strong {
  color: var(--black);
  font-size: clamp(1.15rem, 3vw, 1.8rem);
  overflow-wrap: anywhere;
}

.newsletter .eyebrow,
.newsletter p {
  color: #555;
}

.newsletter form {
  display: grid;
  gap: 10px;
}

.newsletter label {
  font-weight: 900;
}

.newsletter input {
  flex: 1 1 230px;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid #101010;
  border-radius: var(--radius);
  background: transparent;
  color: var(--black);
  font: inherit;
}

.newsletter button {
  min-height: 50px;
  padding: 0 20px;
  cursor: pointer;
}

.form-note {
  min-height: 24px;
  margin-bottom: 0;
  font-weight: 700;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--soft-line);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    min-height: 78vh;
  }

  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(5, 5, 5, 0.34), rgba(5, 5, 5, 0.96) 72%),
      repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 9px);
  }

  .ticker,
  .studio-game-card,
  .game-showcase,
  .story-band,
  .news-layout,
  .newsletter,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .ticker p + p {
    border-left: 0;
    border-top: 1px solid #c9c9c2;
  }
}

@media (max-width: 560px) {
  .header-action {
    display: none;
  }

  .brand img {
    width: 44px;
    height: 44px;
  }

  .brand span {
    font-size: 0.9rem;
  }

  h1 {
    font-size: clamp(2.7rem, 16vw, 5rem);
  }

  h2 {
    font-size: clamp(2rem, 11vw, 3.4rem);
  }

  .section-heading {
    display: block;
  }

  .slide figcaption {
    font-size: 0.82rem;
  }

  .facts div {
    display: grid;
  }

  .facts dd {
    text-align: left;
  }

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

  .site-footer div {
    width: 100%;
    justify-content: space-between;
  }
}

.admin-page {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 34%),
    var(--black);
}

.admin-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 40px 0 72px;
}

.admin-hero {
  padding: clamp(38px, 8vw, 96px) 0 28px;
}

.admin-hero h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(3rem, 9vw, 7rem);
}

.admin-hero p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.65;
}

.admin-card {
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(21, 21, 21, 0.94);
}

.admin-card + .admin-card {
  margin-top: 18px;
}

.admin-card h2,
.admin-card h3 {
  margin-bottom: 18px;
}

.admin-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr);
  gap: 22px;
}

.admin-login-form,
.admin-upload-form,
.admin-json-form {
  display: grid;
  gap: 12px;
}

.admin-login-form {
  max-width: 460px;
}

.admin-page label {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.admin-page input,
.admin-page select,
.admin-page textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #080808;
  color: var(--white);
  font: inherit;
}

.admin-page textarea {
  min-height: 560px;
  resize: vertical;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}

.admin-page button {
  width: fit-content;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--white);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--black);
  cursor: pointer;
  font-weight: 900;
}

.admin-message {
  min-height: 24px;
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.admin-message.is-error {
  color: #ffb4b4;
}

.is-hidden {
  display: none;
}

.has-edit-toolbar {
  padding-bottom: 78px;
}

.edit-toolbar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 80;
  width: min(1080px, calc(100% - 28px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(247, 247, 242, 0.72);
  border-radius: var(--radius);
  background: rgba(5, 5, 5, 0.92);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.edit-toolbar strong {
  display: block;
  color: var(--white);
  font-size: 0.92rem;
  text-transform: uppercase;
}

.edit-toolbar span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.edit-toolbar nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.edit-status {
  flex-basis: 100%;
  min-height: 18px;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.edit-status.is-error {
  color: #ffb4b4;
}

.edit-toolbar a,
.edit-toolbar button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--white);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--black);
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 900;
}

.edit-toolbar button {
  background: transparent;
  color: var(--white);
}

.edit-toolbar button[data-edit-save] {
  background: var(--white);
  color: var(--black);
}

.inline-file-input {
  display: none;
}

.is-inline-editing [data-edit-path] {
  outline: 1px dashed rgba(247, 247, 242, 0.54);
  outline-offset: 4px;
  cursor: text;
  transition:
    outline-color 160ms ease,
    background 160ms ease;
}

.is-inline-editing [data-edit-path]:hover,
.is-inline-editing [data-edit-path]:focus {
  outline-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.is-inline-editing .ticker [data-edit-path]:hover,
.is-inline-editing .ticker [data-edit-path]:focus,
.is-inline-editing .newsletter [data-edit-path]:hover,
.is-inline-editing .newsletter [data-edit-path]:focus,
.is-inline-editing .contact-section [data-edit-path]:hover,
.is-inline-editing .contact-section [data-edit-path]:focus {
  background: rgba(0, 0, 0, 0.08);
}

.inline-image-edit-button {
  position: absolute;
  z-index: 12;
  top: 18px;
  right: 18px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--white);
  border-radius: var(--radius);
  background: rgba(5, 5, 5, 0.82);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 900;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.38);
}

.brand + .inline-image-edit-button,
.site-header > .inline-image-edit-button {
  position: static;
  min-height: 34px;
  margin-left: auto;
}

.game-info .inline-image-edit-button,
.story-list .inline-image-edit-button {
  position: static;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
}

.auth-dialog {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  padding: clamp(24px, 5vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--black);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.58);
}

.auth-dialog h2 {
  margin-bottom: 22px;
  color: var(--black);
  font-size: clamp(1.9rem, 5vw, 3.4rem);
}

.auth-dialog .eyebrow {
  color: #555;
}

.auth-dialog form {
  display: grid;
  gap: 11px;
}

.auth-dialog label {
  color: #555;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-dialog input {
  min-height: 50px;
  padding: 0 13px;
  border: 1px solid #111;
  border-radius: var(--radius);
  background: transparent;
  color: var(--black);
  font: inherit;
}

.auth-dialog button[type="submit"] {
  width: fit-content;
  min-height: 46px;
  margin-top: 8px;
  padding: 0 18px;
  border: 1px solid var(--black);
  border-radius: var(--radius);
  background: var(--black);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--black);
  border-radius: 50%;
  background: transparent;
  color: var(--black);
  cursor: pointer;
  font-size: 1.2rem;
}

.auth-message {
  min-height: 22px;
  margin: 4px 0 0;
  color: #555;
  font-weight: 800;
}

.auth-message.is-error {
  color: #a00000;
}

@media (max-width: 860px) {
  .admin-card-heading,
  .admin-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-page textarea {
    min-height: 420px;
  }
}

@media (max-width: 700px) {
  .edit-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .edit-toolbar nav {
    justify-content: stretch;
  }

  .edit-toolbar a,
  .edit-toolbar button {
    flex: 1 1 auto;
  }
}

.is-hidden {
  display: none !important;
}
