:root {
  color-scheme: dark;
  --bg: #07090f;
  --bg-2: #0f121c;
  --panel: rgba(20, 18, 24, 0.82);
  --panel-strong: rgba(31, 20, 22, 0.94);
  --line: rgba(255, 116, 70, 0.32);
  --line-blue: rgba(62, 166, 255, 0.36);
  --text: #f4efe9;
  --muted: #c8bdb5;
  --blue: #2c9dff;
  --gold: #ffc868;
  --ember: #ff5a35;
  --violet: #a66aff;
  --max: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 8%, rgba(44, 157, 255, 0.16), transparent 28rem),
    radial-gradient(circle at 86% 18%, rgba(255, 88, 48, 0.18), transparent 26rem),
    linear-gradient(180deg, #07090f 0%, #100a0b 58%, #07090f 100%);
  color: var(--text);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, transparent, black 14%, black 78%, transparent);
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: rgba(7, 9, 15, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 82px;
  padding: 0 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  min-width: 0;
}

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

.brand strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: 0.16em;
}

.brand span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-links {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.nav-links a,
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  padding: 0 16px;
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.button.primary {
  border-color: rgba(255, 118, 67, 0.72);
  background: linear-gradient(135deg, rgba(118, 34, 21, 0.95), rgba(80, 34, 98, 0.9));
  box-shadow: 0 0 26px rgba(255, 80, 42, 0.22);
}

.button.blue {
  border-color: rgba(69, 170, 255, 0.72);
  background: linear-gradient(135deg, rgba(16, 55, 116, 0.9), rgba(50, 24, 95, 0.86));
  box-shadow: 0 0 24px rgba(44, 157, 255, 0.18);
}

.hero {
  max-width: var(--max);
  margin: 0 auto;
  min-height: calc(100vh - 82px);
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(320px, 0.74fr);
  gap: 36px;
  padding: 72px 22px 56px;
  align-items: center;
}

.eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.82rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  line-height: 1.05;
  margin: 0;
}

h1 {
  margin-top: 16px;
  font-size: clamp(3rem, 8vw, 6.7rem);
  letter-spacing: -0.04em;
}

.hero-copy {
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.7;
  max-width: 730px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.phone-frame {
  position: relative;
  width: min(100%, 390px);
  justify-self: center;
  aspect-ratio: 9 / 16;
  padding: 12px;
  border-radius: 34px;
  background: linear-gradient(145deg, rgba(69, 170, 255, 0.42), rgba(255, 88, 48, 0.32));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 70px rgba(255, 87, 45, 0.13);
}

.phone-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 24px;
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 74px 22px;
}

.section h2 {
  font-size: clamp(2rem, 4.6vw, 4.2rem);
  margin-bottom: 18px;
}

.section-lead {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.08rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 32px;
}

.card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(36, 21, 24, 0.82), rgba(17, 13, 17, 0.86));
  border-radius: 8px;
  padding: 24px;
  min-height: 210px;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.card p,
.policy-card p,
.policy-card li {
  color: var(--muted);
  line-height: 1.65;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.gallery a {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #120b0d;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.gallery a:hover img {
  transform: scale(1.04);
}

.split {
  display: grid;
  grid-template-columns: 0.84fr 1.16fr;
  gap: 24px;
  align-items: start;
}

.studio-panel {
  border: 1px solid var(--line-blue);
  background: rgba(6, 15, 25, 0.72);
  border-radius: 8px;
  padding: 28px;
}

.studio-panel img {
  width: 140px;
  height: 140px;
  display: block;
  margin-bottom: 20px;
}

.policy-layout {
  max-width: 980px;
  margin: 0 auto;
  padding: 56px 22px 84px;
}

.policy-card {
  border: 1px solid var(--line);
  background: var(--panel-strong);
  border-radius: 8px;
  padding: clamp(24px, 5vw, 48px);
}

.policy-card h1 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.policy-card h2 {
  font-size: 1.45rem;
  margin-top: 34px;
  margin-bottom: 10px;
}

.policy-card ul {
  padding-left: 22px;
}

.notice {
  border: 1px solid rgba(255, 200, 104, 0.28);
  background: rgba(255, 200, 104, 0.07);
  border-radius: 8px;
  padding: 18px;
}

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 34px 22px;
  color: var(--muted);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.reel {
  overflow: hidden;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #050508;
}

.reel-stage {
  width: min(100vw, 480px);
  aspect-ratio: 9 / 16;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #080608;
}

.reel-stage img,
.reel-stage .reel-copy {
  position: absolute;
  inset: 0;
}

.reel-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: reelImage 18s infinite;
}

.reel-stage img:nth-child(2) { animation-delay: 6s; }
.reel-stage img:nth-child(3) { animation-delay: 12s; }

.reel-copy {
  padding: 42px 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.82));
}

.reel-copy span {
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.reel-copy h1 {
  font-size: 3rem;
  text-shadow: 0 4px 24px rgba(0,0,0,.7);
}

.reel-copy p {
  font-size: 1.2rem;
  color: #f6ded1;
}

@keyframes reelImage {
  0% { opacity: 0; transform: scale(1.06); }
  7% { opacity: 1; }
  30% { opacity: 1; }
  40% { opacity: 0; transform: scale(1.0); }
  100% { opacity: 0; }
}

@media (max-width: 840px) {
  .hero,
  .split,
  .grid,
  .gallery {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 42px;
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 22px;
  }

  .nav-links {
    margin-left: 0;
    justify-content: flex-start;
  }
}

/* Multi-game home and dedicated game pages */
.hero-wide {
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
}

.hero-games {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 18px;
  align-items: stretch;
}

.game-tile {
  position: relative;
  display: block;
  min-height: 440px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: #0b0d12;
  text-decoration: none;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.game-tile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.game-tile:hover img {
  transform: scale(1.035);
}

.game-tile span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(5, 7, 11, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-weight: 800;
  font-size: 1.08rem;
}

.game-tile.humanfall {
  aspect-ratio: 9 / 16;
}

.game-tile.recapture img {
  object-position: center;
}

.games-showcase {
  display: grid;
  gap: 22px;
  margin-top: 34px;
}

.game-feature {
  display: grid;
  grid-template-columns: minmax(220px, 0.82fr) minmax(0, 1.18fr);
  gap: 26px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(18, 18, 24, 0.88), rgba(8, 9, 14, 0.92));
}

.game-feature h3 {
  font-size: clamp(1.8rem, 3vw, 3rem);
  margin-bottom: 14px;
}

.game-feature p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.07rem;
  margin-bottom: 22px;
}

.humanfall-feature {
  border-color: rgba(255, 116, 70, 0.34);
}

.recapture-feature {
  border-color: rgba(62, 166, 255, 0.34);
}

.portrait-frame,
.landscape-frame,
.landscape-hero-frame {
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #08090e;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.38);
}

.portrait-frame {
  max-width: 260px;
  aspect-ratio: 9 / 16;
  justify-self: center;
}

.landscape-frame,
.landscape-hero-frame {
  aspect-ratio: 16 / 9;
}

.portrait-frame img,
.landscape-frame img,
.landscape-hero-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.game-hero {
  min-height: auto;
  padding-top: 84px;
  padding-bottom: 72px;
}

.recapture-hero {
  grid-template-columns: minmax(0, 0.82fr) minmax(440px, 1.18fr);
}

.landscape-hero-frame {
  width: 100%;
  align-self: center;
}

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

.wide-gallery a {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #090b10;
}

.wide-gallery img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.wide-gallery a:hover img {
  transform: scale(1.035);
}

@media (max-width: 980px) {
  .hero-wide,
  .recapture-hero,
  .game-feature,
  .hero-games,
  .wide-gallery {
    grid-template-columns: 1fr;
  }

  .game-tile {
    min-height: 300px;
  }

  .game-tile.humanfall {
    min-height: 420px;
    justify-self: center;
    width: min(100%, 320px);
  }
}

/* Recapture the Castle themed pages */
body.rtc-page {
  --rtc-water: #287f7c;
  --rtc-water-dark: #15514f;
  --rtc-paper: #c9bba1;
  --rtc-paper-light: #eadcb6;
  --rtc-ink: #5a2a1e;
  --rtc-red: #b92b25;
  --rtc-gold: #f2d46f;
  --rtc-blue: #4fb5c4;
  background-color: #47aba9;
  background-image:
    linear-gradient(180deg, rgba(10, 48, 45, 0.2) 0%, rgba(10, 48, 45, 0.46) 720px, rgba(71, 171, 169, 0) 1120px),
    url("assets/recapture/ui/tiny_swords_page_background_cropped.png"),
    url("assets/recapture/ui/tiny_swords_ocean_scroll_background.png");
  background-repeat: no-repeat, no-repeat, repeat-y;
  background-position: center top, center top, 50% 0;
  background-size: auto 760px, auto 760px, auto;
  color: #fff4c7;
}

body.rtc-page::before {
  opacity: 0;
  background: none;
}

.rtc-page img,
.rtc-page .landscape-hero-frame,
.rtc-page .wide-gallery a,
.rtc-page .card,
.rtc-page .button {
  image-rendering: pixelated;
}

.rtc-page .site-header {
  background: rgba(13, 72, 68, 0.86);
  border-bottom: 3px solid rgba(240, 215, 128, 0.45);
  box-shadow: 0 8px 0 rgba(10, 42, 39, 0.34);
}

.rtc-page .brand strong,
.rtc-page .brand span,
.rtc-page .nav-links a {
  color: #fff1b8;
  text-shadow: 0 2px 0 rgba(69, 31, 20, 0.55);
}

.rtc-page .nav-links a {
  border: 2px solid rgba(81, 50, 36, 0.72);
  background: rgba(199, 177, 123, 0.22);
  box-shadow: inset 0 0 0 2px rgba(255, 236, 166, 0.18);
}

.rtc-page .recapture-hero {
  position: relative;
  isolation: isolate;
  gap: 34px;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr);
  padding-left: 44px;
  padding-right: 44px;
}

.rtc-page .recapture-hero::before {
  content: "";
  position: absolute;
  inset: 44px 22px 34px;
  z-index: -1;
  border: 4px solid rgba(39, 56, 42, 0.7);
  background: rgba(13, 46, 39, 0.64);
  box-shadow:
    inset 0 0 0 4px rgba(236, 215, 142, 0.18),
    0 18px 0 rgba(12, 42, 36, 0.28);
}

.rtc-page .eyebrow {
  color: #fff1a4;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 0 rgba(92, 47, 30, 0.75);
}

.rtc-page .recapture-hero h1 {
  width: min(100%, 600px);
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
  padding: 22px 56px 28px 120px;
  background: url("assets/recapture/ui/title_sword_web.png") center / 100% 100% no-repeat;
  color: var(--rtc-red);
  font-size: clamp(1.95rem, 3.35vw, 3.55rem);
  letter-spacing: 0;
  line-height: 0.9;
  text-shadow:
    0 3px 0 #641b17,
    2px 0 0 #f8d6a2,
    -2px 0 0 #f8d6a2,
    0 -2px 0 #f8d6a2;
}

.rtc-page .hero-copy,
.rtc-page .section-lead,
.rtc-page .card p {
  color: #fff1bd;
  text-shadow: 0 2px 0 rgba(42, 30, 18, 0.42);
}

.rtc-page .hero-copy {
  max-width: 650px;
  padding: 34px 40px 36px;
  border: 0;
  background: url("assets/recapture/ui/special_paper_web_panel.png") center / 100% 100% no-repeat;
  box-shadow: 0 8px 0 rgba(30, 45, 37, 0.28);
}

.rtc-page .button {
  min-height: 50px;
  border-radius: 0;
  border: 3px solid #442c25;
  color: #fff1b8;
  font-weight: 800;
  text-shadow: 0 2px 0 rgba(67, 30, 22, 0.85);
  box-shadow: inset 0 0 0 2px rgba(255, 231, 148, 0.24), 0 5px 0 rgba(45, 30, 25, 0.48);
}

.rtc-page .button.blue {
  background: linear-gradient(180deg, #62b9c6, #2d8290);
  border-color: #24545f;
}

.rtc-page .button.primary {
  background: linear-gradient(180deg, #d56f62, #934034);
  border-color: #63322a;
}

.rtc-page .landscape-hero-frame,
.rtc-page .wide-gallery a {
  border-radius: 0;
  border: 6px solid #25382d;
  outline: 3px solid rgba(241, 220, 140, 0.76);
  background: #102c2a;
  box-shadow: 0 12px 0 rgba(16, 45, 39, 0.36), 0 28px 70px rgba(0, 0, 0, 0.32);
}

.rtc-page .landscape-hero-frame {
  width: min(100%, 650px);
  max-width: 100%;
  justify-self: center;
  box-sizing: border-box;
}

.rtc-page .landscape-hero-frame img {
  object-fit: contain;
  background: #102c2a;
}

.rtc-page .section {
  position: relative;
}

.rtc-page .section h2 {
  color: #fff1b2;
  text-shadow: 0 4px 0 rgba(95, 45, 31, 0.68);
}

.rtc-page .grid {
  gap: 22px;
}

.rtc-page .card {
  min-height: 245px;
  padding: 38px 42px 40px;
  border-radius: 0;
  border: 0;
  background: url("assets/recapture/ui/special_paper_web_panel.png") center / 100% 100% no-repeat;
  box-shadow: 0 8px 0 rgba(28, 45, 38, 0.34);
}

.rtc-page .card h3 {
  color: #ffe997;
  text-shadow: 0 3px 0 rgba(82, 37, 26, 0.74);
}

.rtc-page .wide-gallery {
  gap: 24px;
}

.rtc-page .footer {
  background: rgba(13, 72, 68, 0.8);
  border-top: 3px solid rgba(240, 215, 128, 0.45);
}

@media (max-width: 980px) {
  .rtc-page .recapture-hero h1 {
    width: min(100%, 560px);
    min-height: 120px;
    padding: 20px 42px 24px 98px;
    font-size: clamp(1.85rem, 7.4vw, 3.1rem);
  }

  .rtc-page .recapture-hero::before {
    inset: 24px 12px 18px;
  }

  .rtc-page .recapture-hero {
    padding-left: 28px;
    padding-right: 28px;
  }
}

@media (max-width: 560px) {
  .rtc-page .recapture-hero h1 {
    min-height: 96px;
    padding-left: 70px;
    padding-right: 26px;
    font-size: clamp(1.42rem, 7.8vw, 2.25rem);
  }

  .rtc-page .hero-copy {
    padding: 28px 30px 30px;
  }
}
