/*
 * Innotradive Games preview page (/games/). Deliberately NOT the corporate look: it wears HAYWIRE's own "Dead Air"
 * broadcast identity (the six Dead Air colours, Unbounded / Familjen Grotesk / DM Mono — all self-hosted, SIL OFL).
 */
@font-face {
  font-family: 'Unbounded';
  src: url('/assets/games/fonts/unbounded-800.fe6d4ea7ed.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: 'Familjen Grotesk';
  src: url('/assets/games/fonts/familjen-grotesk-400.3d6a8c01c6.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Familjen Grotesk';
  src: url('/assets/games/fonts/familjen-grotesk-600.4becdcd6d1.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: 'DM Mono';
  src: url('/assets/games/fonts/dm-mono-500.9964608a84.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  /* Dead Air (HAYWIRE platform identity) */
  --hw-pitch: #0e0a16;
  --hw-void: #191225;
  --hw-panel: #241a34;
  --hw-bulb: #ffb627;
  --hw-fault: #ff5e5b;
  --hw-chalk: #f5efe6;
  /* supporting */
  --hw-chalk-dim: #c3b9cf;
  --hw-cyan: #4fc3f7;
  --hw-violet: #b493ff;
  --hw-rim: #3a2d50;

  --f-display: 'Unbounded', 'Arial Black', ui-sans-serif, system-ui, sans-serif;
  --f-body: 'Familjen Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --f-mono: 'DM Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --wrap: 1200px;
  --gutter: 20px;
  --space: 64px;
}

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
    --space: 88px;
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: 48px;
    --space: 112px;
  }
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body.games {
  margin: 0;
  background: var(--hw-pitch);
  color: var(--hw-chalk);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
ol,
ul,
figure {
  margin: 0;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--hw-bulb);
  outline-offset: 3px;
  border-radius: 4px;
}

main:focus {
  outline: none;
}

.g-wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.g-skip {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--hw-bulb);
  color: var(--hw-pitch);
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transform: translateY(-200%);
}

.g-skip:focus {
  transform: none;
}

/* ---------- Top bar ---------- */
.g-top {
  border-bottom: 1px solid var(--hw-rim);
}

.g-top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.g-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--hw-chalk-dim);
  font-size: 0.9375rem;
  text-decoration: none;
}

.g-back:hover {
  color: var(--hw-chalk);
}

.g-onair {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.g-onair__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--hw-fault);
  box-shadow: 0 0 10px var(--hw-fault);
}

@media (prefers-reduced-motion: no-preference) {
  .g-onair__dot {
    animation: g-blink 2.6s ease-in-out infinite;
  }
}

@keyframes g-blink {
  0%,
  60%,
  100% {
    opacity: 1;
  }

  75% {
    opacity: 0.25;
  }
}

/* ---------- Shared type ---------- */
.g-label {
  margin-bottom: 14px;
  color: var(--hw-bulb);
  font-family: var(--f-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.g-label--cyan {
  color: var(--hw-cyan);
}

.g-h2 {
  font-family: var(--f-display);
  font-size: clamp(1.75rem, 1.1rem + 2.8vw, 3.25rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.g-section {
  padding-block: var(--space);
}

/* ---------- Screens ---------- */
.g-tv {
  position: relative;
  padding: 10px;
  background: var(--hw-panel);
  border: 1px solid var(--hw-rim);
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.4), 0 24px 60px -20px rgb(0 0 0 / 0.8), 0 0 70px -30px var(--hw-bulb);
  transition: transform 260ms cubic-bezier(0.2, 0.9, 0.2, 1), box-shadow 260ms ease;
}

.g-tv img {
  width: 100%;
  border-radius: 10px;
}

.g-tv figcaption {
  padding: 10px 6px 2px;
  color: var(--hw-chalk-dim);
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.g-phone {
  padding: 7px;
  background: #07050c;
  border: 1px solid var(--hw-rim);
  border-radius: 30px;
  box-shadow: 0 24px 50px -18px rgb(0 0 0 / 0.85);
  transition: transform 260ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.g-phone img {
  border-radius: 24px;
}

@media (min-width: 768px) {
  .g-tv--tilt-left {
    transform: rotate(-1.6deg);
  }

  .g-tv--tilt-right {
    transform: rotate(1.2deg);
  }

  .g-tv:hover,
  .g-phone:hover {
    transform: rotate(0) scale(1.015);
  }

  .g-tv:hover {
    box-shadow: 0 0 0 1px rgb(0 0 0 / 0.4), 0 28px 70px -20px rgb(0 0 0 / 0.85), 0 0 90px -24px var(--hw-bulb);
  }
}

/* ---------- Hazard stripe ---------- */
.g-hazard {
  height: 14px;
  background: repeating-linear-gradient(-45deg, var(--hw-bulb) 0 14px, var(--hw-pitch) 14px 28px);
  opacity: 0.9;
}

.g-hazard--coral {
  background: repeating-linear-gradient(-45deg, var(--hw-fault) 0 14px, var(--hw-pitch) 14px 28px);
}

/* ---------- Hero ---------- */
.g-hero {
  position: relative;
  padding-block: 48px 72px;
  background:
    radial-gradient(60% 70% at 85% 40%, rgb(255 182 39 / 0.14), transparent 70%),
    radial-gradient(50% 60% at 10% 90%, rgb(255 94 91 / 0.1), transparent 70%);
}

.g-hero__grid {
  display: grid;
  gap: 48px;
}

.g-kicker {
  color: var(--hw-chalk-dim);
  font-family: var(--f-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.g-title {
  margin-top: 12px;
  color: var(--hw-chalk);
  font-family: var(--f-display);
  font-size: clamp(2.375rem, 0.9rem + 9vw, 7.5rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-shadow: 3px 0 0 rgb(255 94 91 / 0.55), -3px 0 0 rgb(79 195 247 / 0.35);
}

.g-tagline {
  margin-top: 18px;
  color: var(--hw-bulb);
  font-family: var(--f-display);
  font-size: clamp(1.25rem, 0.95rem + 1.4vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
}

.g-lede {
  max-width: 34rem;
  margin-top: 20px;
  color: var(--hw-chalk-dim);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
}

.g-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 10px 16px;
  border: 1px dashed var(--hw-rim);
  border-radius: 999px;
  color: var(--hw-chalk);
  font-family: var(--f-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
}

.g-status__light {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--hw-bulb);
  box-shadow: 0 0 12px var(--hw-bulb);
}

.g-hero__stage {
  position: relative;
  padding-bottom: 40px;
}

.g-phone--hero {
  position: absolute;
  right: -4px;
  bottom: 0;
  width: 30%;
  max-width: 190px;
  transform: rotate(5deg);
}

@media (min-width: 1024px) {
  .g-hero {
    padding-block: 88px 104px;
  }

  .g-hero__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
    gap: 56px;
  }

  .g-hero__stage {
    padding: 0 40px 56px 0;
  }

  /* Unbounded is very wide: size the wordmark to its column so the TV never covers it. */
  .g-title {
    font-size: clamp(3.25rem, 0.5rem + 4.4vw, 4.75rem);
  }

  .g-phone--hero {
    right: 0;
    width: 28%;
  }
}

/* ---------- How it plays ---------- */
.g-steps {
  display: grid;
  gap: 16px;
  margin-top: 40px;
  padding: 0;
  list-style: none;
}

.g-step {
  position: relative;
  padding: 28px 24px 26px;
  background: var(--hw-void);
  border: 1px solid var(--hw-rim);
  border-radius: 16px;
}

.g-step__num {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  background: var(--hw-bulb);
  border-radius: 12px;
  color: var(--hw-pitch);
  font-family: var(--f-display);
  font-size: 1.375rem;
  font-weight: 800;
  transform: rotate(-4deg);
}

.g-step:nth-child(2) .g-step__num {
  background: var(--hw-cyan);
  transform: rotate(3deg);
}

.g-step:nth-child(3) .g-step__num {
  background: var(--hw-fault);
  transform: rotate(-2deg);
}

.g-step__title {
  font-family: var(--f-display);
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.25;
}

.g-step p {
  margin-top: 8px;
  color: var(--hw-chalk-dim);
}

@media (min-width: 900px) {
  .g-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }

  .g-step:nth-child(2) {
    transform: translateY(18px);
  }
}

/* ---------- Featured game ---------- */
.g-feature {
  background: linear-gradient(180deg, var(--hw-pitch), var(--hw-void) 30%, var(--hw-void) 70%, var(--hw-pitch));
}

.g-feature__head {
  display: grid;
  gap: 20px;
  margin-bottom: 48px;
}

.g-feature__tag {
  margin-top: 12px;
  color: var(--hw-bulb);
  font-family: var(--f-mono);
  font-size: 0.9375rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.g-feature__text {
  max-width: 34rem;
  color: var(--hw-chalk-dim);
  font-size: 1.125rem;
}

.g-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.g-gallery__main {
  grid-column: 1 / -1;
}

.g-gallery__a,
.g-gallery__b {
  grid-column: 1 / -1;
}

.g-gallery__p1,
.g-gallery__p2 {
  max-width: 240px;
  justify-self: center;
}

@media (min-width: 640px) {
  .g-gallery__a {
    grid-column: 1;
  }

  .g-gallery__b {
    grid-column: 2;
  }
}

@media (min-width: 1024px) {
  .g-feature__head {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    gap: 48px;
  }

  .g-gallery {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: auto auto;
    gap: 28px;
    align-items: start;
  }

  .g-gallery__main {
    grid-column: 1 / 9;
    grid-row: 1;
  }

  .g-gallery__p1 {
    grid-column: 9 / 11;
    grid-row: 1;
    align-self: center;
    max-width: none;
    transform: rotate(-3deg);
  }

  .g-gallery__p2 {
    grid-column: 11 / 13;
    grid-row: 1;
    align-self: end;
    max-width: none;
    transform: rotate(4deg);
  }

  .g-gallery__a {
    grid-column: 1 / 7;
    grid-row: 2;
  }

  .g-gallery__b {
    grid-column: 7 / 13;
    grid-row: 2;
    margin-top: 32px;
  }
}

/* ---------- Lineup ---------- */
.g-lineup__menu {
  max-width: 900px;
  margin: 40px auto 0;
}

.g-cards {
  display: grid;
  gap: 16px;
  margin-top: 48px;
  padding: 0;
  list-style: none;
}

.g-card {
  position: relative;
  padding: 24px 22px 26px;
  background: var(--hw-void);
  border: 1px solid var(--hw-rim);
  border-top: 4px solid var(--card, var(--hw-bulb));
  border-radius: 14px;
}

.g-card--cyan {
  --card: var(--hw-cyan);
}

.g-card--coral {
  --card: var(--hw-fault);
}

.g-card--violet {
  --card: var(--hw-violet);
}

.g-card--amber {
  --card: var(--hw-bulb);
}

.g-card__status {
  color: var(--card);
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.g-card__status--soon {
  color: var(--hw-chalk-dim);
}

.g-card__title {
  margin-top: 12px;
  font-family: var(--f-display);
  font-size: 1.1875rem;
  font-weight: 800;
  line-height: 1.2;
}

.g-card__tag {
  margin-top: 10px;
  color: var(--hw-chalk-dim);
  font-size: 0.9875rem;
}

@media (min-width: 640px) {
  .g-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .g-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }
}

/* ---------- Sign-off ---------- */
.g-signoff {
  text-align: center;
}

.g-signoff__inner {
  display: grid;
  justify-items: center;
  gap: 18px;
}

.g-signoff__title {
  font-family: var(--f-display);
  font-size: clamp(2rem, 1.2rem + 3.6vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
}

.g-signoff__title span {
  color: var(--hw-fault);
}

.g-signoff p {
  max-width: 30rem;
  color: var(--hw-chalk-dim);
}

.g-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-top: 8px;
  padding: 0 26px;
  background: var(--hw-bulb);
  border-radius: 12px;
  color: var(--hw-pitch);
  font-family: var(--f-display);
  font-size: 0.9375rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 6px 0 #b77a05;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.g-button:hover {
  transform: translateY(2px);
  box-shadow: 0 4px 0 #b77a05;
}

.g-button:active {
  transform: translateY(6px);
  box-shadow: 0 0 0 #b77a05;
}

.g-button--ghost {
  gap: 10px;
  background: transparent;
  border: 2px solid var(--hw-bulb);
  color: var(--hw-chalk);
  box-shadow: none;
}

.g-button--ghost:hover,
.g-button--ghost:active {
  background: rgb(255 182 39 / 0.12);
  transform: none;
  box-shadow: none;
}

/* INNOTRADIVE in running text: the approved wordmark itself, at text size */
.inno {
  display: inline-block;
  width: auto;
  height: 0.72em;
  margin: 0 0.08em;
  vertical-align: -0.02em;
}

/* Early-concept games: names and details deliberately unreadable */
.g-blur {
  filter: blur(7px);
  user-select: none;
}

.g-card--concept,
.g-card--concept .g-card__title {
  overflow: hidden;
}

.g-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Footer ---------- */
.g-foot {
  padding-block: 32px 40px;
  border-top: 1px solid var(--hw-rim);
  color: var(--hw-chalk-dim);
  font-size: 0.875rem;
}

.g-foot__inner {
  display: grid;
  gap: 6px;
}

.g-foot a {
  text-underline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation: none !important;
  }
}

/* Very narrow phones: the hero already says "INNOTRADIVE Games presents", so the top bar keeps only the way back. */
@media (max-width: 419px) {
  .g-onair {
    display: none;
  }
}
