:root {
  --bg: #15122a;         /* night market sky */
  --bg-2: #1d1938;       /* raised surface */
  --text: #f4efe6;       /* canopy cloth */
  --muted: #a49dba;
  --lantern: #f2b544;    /* warm stall light, used sparingly */
  --awning: #e0493c;
  --hair: rgba(244, 239, 230, .09);
  --radius-lg: 22px;
  --radius-sm: 12px;
  --font: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(70rem 40rem at 78% -10%, rgba(242, 181, 68, .11), transparent 62%) no-repeat,
    radial-gradient(50rem 30rem at -10% 40%, rgba(224, 73, 60, .06), transparent 60%) no-repeat,
    var(--bg);
  color: var(--text);
  font: 400 1rem/1.75 var(--font);
  letter-spacing: -.005em;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
.pixel { image-rendering: pixelated; }
a { color: inherit; text-decoration: none; }
figure { margin: 0; }
:focus-visible { outline: 2px solid var(--lantern); outline-offset: 4px; border-radius: 8px; }

/* A thin canopy stripe: the only trace of the stall awning */
.stripe {
  height: 6px;
  background: repeating-linear-gradient(90deg, var(--awning) 0 28px, var(--text) 28px 56px);
  opacity: .9;
}

.topbar {
  max-width: var(--wrap); margin: 0 auto;
  padding: 28px 28px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0;
  font-weight: 800; font-size: 1.125rem; letter-spacing: -.02em;
}
.wordmark img { border-radius: 8px; }
.wordmark span { font-weight: 500; color: var(--muted); }
.topbar nav { display: flex; gap: 2px; }
.topbar nav a {
  padding: 8px 14px; border-radius: 999px;
  color: var(--muted); font-weight: 600; font-size: .9375rem;
  transition: color .15s, background-color .15s;
}
.topbar nav a:hover { color: var(--text); background: var(--hair); }

main { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  min-height: min(720px, 86vh);
  padding: 56px 0 88px;
}
.hero h1 {
  margin: 0 0 28px;
  font-weight: 800;
  font-size: clamp(2.5rem, 5.4vw, 4.5rem);
  line-height: 1.12;
  letter-spacing: -.045em;
}
.hero-copy p { margin: 0; max-width: 30rem; color: var(--muted); font-size: 1.125rem; }
.cta {
  display: inline-flex; align-items: center;
  height: 52px; padding: 0 26px;
  border-radius: 999px;
  background: var(--text); color: var(--bg);
  font-weight: 700;
  transition: background-color .15s;
}
.cta:hover { background: var(--lantern); }

/* Three game banners fanned like cards on a counter */
.fan { position: relative; aspect-ratio: 1 / .82; }
.fan img {
  position: absolute; width: 74%;
  border-radius: 16px;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .7), 0 0 0 1px var(--hair);
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}
.fan .c1 { right: 0;  top: 2%;  transform: rotate(7deg); }
.fan .c2 { left: 0;   top: 26%; transform: rotate(-6deg); }
.fan .c3 { left: 15%; top: 50%; transform: rotate(1.5deg); z-index: 1; }
@media (prefers-reduced-motion: no-preference) {
  @starting-style {
    .fan .c1, .fan .c2, .fan .c3 { transform: translateY(24px) rotate(0); }
  }
}

/* Sections */
.section { padding: 40px 0 120px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  padding-bottom: 20px; margin-bottom: 64px;
  border-bottom: 1px solid var(--hair);
}
.section-head h2 { margin: 0; font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 800; letter-spacing: -.035em; }
.section-head p { margin: 0; color: var(--muted); font-size: .9375rem; }

/* Games */
.game {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.game + .game { margin-top: 112px; }
.game.flip .game-art { order: 2; }
.game-art {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8), 0 0 0 1px var(--hair);
}
.game-art img { width: 100%; }
.game-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.app-icon { width: 56px; height: 56px; border-radius: 14px; flex: none; box-shadow: 0 0 0 1px var(--hair); }
.game h3 { margin: 0; font-size: 1.875rem; font-weight: 800; letter-spacing: -.035em; line-height: 1.2; }
.en { margin: 0; color: var(--muted); font-size: .875rem; }
.tagline { margin: 0 0 10px; color: var(--lantern); font-weight: 700; font-size: 1.0625rem; }
.desc { margin: 0; color: rgba(244, 239, 230, .78); max-width: 32rem; }
.note { margin: 12px 0 0; color: var(--muted); font-size: .8125rem; }

.stores { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.store {
  display: flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 16px 0 12px;
  border-radius: var(--radius-sm);
  background: #000; color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
  font-weight: 650; font-size: .9375rem; line-height: 1.1;
  transition: box-shadow .15s;
}
.store svg { width: 22px; height: 22px; flex: none; }
.store span { display: flex; flex-direction: column; }
.store small { font-weight: 500; font-size: .625rem; color: rgba(255, 255, 255, .62); letter-spacing: .02em; }
.store:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55); }

/* Services */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.service {
  display: flex; flex-direction: column;
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--hair);
  transition: box-shadow .2s;
}
.service img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.service-body { padding: 28px 32px 32px; display: flex; flex-direction: column; flex: 1; }
.service h3 { margin: 0 0 10px; font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; }
.service p { margin: 0 0 24px; color: var(--muted); }
.go {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text); font-weight: 700;
}
.go svg { width: 16px; height: 16px; transition: transform .15s; }
.service:hover { box-shadow: 0 0 0 1px rgba(242, 181, 68, .5); }
.service:hover .go svg { transform: translate(2px, -2px); }

/* Footer */
.footer { border-top: 1px solid var(--hair); margin-top: 24px; }
.footer-inner {
  max-width: var(--wrap); margin: 0 auto;
  padding: 48px 28px 24px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px;
}
.footer .muted { margin: 8px 0 0; color: var(--muted); font-size: .875rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: flex-start; font-size: .9375rem; }
.footer-links a { color: var(--muted); border-bottom: 1px solid var(--hair); }
.footer-links a:hover { color: var(--text); }
.copy { max-width: var(--wrap); margin: 0 auto; padding: 0 28px 40px; color: rgba(164, 157, 186, .6); font-size: .8125rem; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding: 40px 0 72px; gap: 40px; }
  .fan { max-width: 560px; width: 100%; }
  .game { grid-template-columns: 1fr; gap: 28px; }
  .game.flip .game-art { order: 0; }
  .game + .game { margin-top: 80px; }
  .services { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; gap: 4px; margin-bottom: 40px; }
}
@media (max-width: 520px) {
  .topbar, main, .footer-inner, .copy { padding-left: 20px; padding-right: 20px; }
  .topbar nav a { padding: 8px 9px; }
  .wordmark span { display: none; }
  .hero h1 { font-size: 2.125rem; }
  .stores li { flex: 1 1 calc(50% - 4px); }
  .store { width: 100%; }
  .service-body { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- Decoration: night market details ---------- */

/* Faint pixel stars over the top of the page */
.sky {
  position: absolute; inset: 0 0 auto 0; height: 1100px;
  background: url("/img/stars.svg") 0 0 / 320px 320px;
  -webkit-mask-image: linear-gradient(#000 30%, transparent);
          mask-image: linear-gradient(#000 30%, transparent);
  pointer-events: none; z-index: -1;
}
body { position: relative; isolation: isolate; }

/* Festoon lights hanging from the canopy stripe; they switch on once at load */
.lights {
  height: 48px; margin-bottom: -48px;
  background: url("/img/lights.svg") 0 0 / 240px 48px repeat-x;
  filter: drop-shadow(0 0 5px rgba(255, 190, 90, .75)) drop-shadow(0 0 14px rgba(255, 170, 70, .35));
  pointer-events: none;
}
.topbar { position: relative; padding-top: 64px; }
@media (prefers-reduced-motion: no-preference) {
  .lights { animation: switch-on 1.6s steps(1, end) .3s both; }
  @keyframes switch-on {
    0%   { opacity: .15; filter: none; }
    18%  { opacity: 1; }
    26%  { opacity: .3; filter: none; }
    40%  { opacity: 1; }
    100% { opacity: 1; }
  }
}

/* Per-game tint: glow under the banner and the tagline colour */
.game { --tint: var(--lantern); }
.game-art { box-shadow: 0 40px 110px -46px var(--tint), 0 0 0 1px var(--hair); }
.game .tagline { color: var(--tint); }
.game-art::after {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  pointer-events: none;
}

/* Screenshot strips */
.shots {
  grid-column: 1 / -1; order: 3;
  display: flex; gap: 14px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 4px 2px 14px;
  margin-top: -16px;
  scrollbar-width: thin; scrollbar-color: var(--line, #3b3160) transparent;
}
.shots img {
  flex: none; height: 350px; width: auto;
  border-radius: 14px;
  scroll-snap-align: start;
  box-shadow: 0 0 0 1px var(--hair), 0 18px 40px -24px rgba(0, 0, 0, .8);
}
.shots.wide img { height: 250px; }
.shots:focus-visible { outline-offset: 2px; }

/* Stall silhouettes above the footer */
.skyline { height: 140px; margin-top: 40px; overflow: hidden; }
.skyline svg { width: 100%; height: 100%; display: block; }
.footer { margin-top: 0; background: var(--bg-2); border-top: 0; }
.copy { background: transparent; }
body > .copy, .footer .copy { padding-bottom: 40px; }

@media (max-width: 900px) {
  .shots { margin-top: 4px; }
}
@media (max-width: 520px) {
  .shots { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; scroll-padding-left: 20px; }
  .shots img { height: 300px; }
  .shots.wide img { height: 190px; }
  .skyline { height: 90px; }
  .topbar { padding-top: 56px; }
}
.lights { height: 58px; margin-bottom: -58px; background-size: 290px 58px; }
@media (min-width: 521px) {
  .shots.wide { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
}

/* Language picker */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.topbar nav { margin-left: auto; }
.lang {
  position: relative; display: flex; align-items: center;
  margin-left: 8px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(244, 239, 230, .18);
  color: var(--muted);
  transition: box-shadow .15s, color .15s;
}
.lang:hover, .lang:focus-within { box-shadow: inset 0 0 0 1px rgba(244, 239, 230, .45); color: var(--text); }
.lang .globe { position: absolute; left: 12px; width: 15px; height: 15px; pointer-events: none; }
.lang::after {
  content: ""; position: absolute; right: 13px; top: 50%;
  width: 6px; height: 6px; margin-top: -5px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); pointer-events: none;
}
.lang select {
  appearance: none; -webkit-appearance: none;
  height: 38px; padding: 0 32px 0 34px;
  border: 0; border-radius: 999px;
  background: transparent; color: inherit;
  font: 600 .875rem/1 var(--font);
  cursor: pointer;
}
.lang select:focus-visible { outline: 2px solid var(--lantern); outline-offset: 2px; }
.lang option { color: #15122a; background: #f4efe6; }
@media (max-width: 640px) {
  .topbar nav { display: none; }
  .lang { margin-left: auto; }
}

/* Supported languages under each game */
.langs {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 18px 0 0; max-width: 32rem;
  color: var(--muted); font-size: .875rem; line-height: 1.6;
}
.langs b { color: var(--text); font-weight: 650; margin-right: 6px; }
.lang-ico { width: 15px; height: 15px; flex: none; margin-top: 3px; color: var(--tint, var(--muted)); }
