:root {
  color-scheme: light dark;
  --page: light-dark(#fbf8f2, #0e131b);
  --surface: light-dark(#fffdf8, #151c27);
  --ink: light-dark(#111923, #f7f3ea);
  --soft: light-dark(#656b73, #aeb7c4);
  --line: light-dark(rgba(17, 25, 35, .12), rgba(247, 243, 234, .13));
  --coral: #ff4155;
  --coral-soft: light-dark(#ffe2e4, #402027);
  --mint: #86dcb5;
  --shadow: light-dark(rgba(30, 20, 10, .10), rgba(0, 0, 0, .30));
  --dark-panel: #111923;
  --ivory: #fbf8f2;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: ui-rounded, "SF Pro Rounded", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body, button, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { max-width: 100%; }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--coral) 70%, transparent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--page);
  background: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(16px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  width: 176px;
  height: 42px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--ivory);
}

.brand img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.04);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.primary-nav a,
.language-switch button,
.language-switch a,
.site-footer a {
  border: 0;
  border-radius: 10px;
  padding: 9px 11px;
  color: var(--soft);
  background: transparent;
  text-decoration: none;
}

.primary-nav a:hover,
.language-switch button:hover,
.language-switch a:hover,
.language-switch button[aria-pressed="true"],
.language-switch a[aria-current="page"],
.site-footer a:hover {
  color: var(--ink);
  background: var(--coral-soft);
}

.language-switch {
  display: flex;
  gap: 2px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.language-switch button { cursor: pointer; }
.language-switch a { text-decoration: none; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(280px, .96fr);
  gap: 42px;
  align-items: center;
  padding-top: 74px;
  padding-bottom: 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--coral);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
}

.hero h1 {
  max-width: 620px;
  margin: 18px 0;
  font-size: clamp(38px, 6.4vw, 68px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -.045em;
}

.lead {
  max-width: 590px;
  margin: 0;
  color: var(--soft);
  font-size: 16px;
  line-height: 1.75;
}

.hero-actions,
.store-row,
.proof-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.hero-actions { gap: 10px; margin-top: 24px; }
.proof-row { gap: 10px 20px; margin-top: 22px; color: var(--soft); }
.proof-row strong { color: var(--ink); font-weight: 500; }

.button,
.store-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface);
  font-weight: 500;
  text-decoration: none;
}

.button-primary {
  border-color: var(--ink);
  color: var(--page);
  background: var(--ink);
}

.button:hover,
.store-button:hover { transform: translateY(-1px); }

.hero-showcase {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  border-radius: 30px 30px 92px 30px;
  background:
    radial-gradient(circle at 16% 18%, rgba(134, 220, 181, .88) 0 9%, transparent 9.5%),
    radial-gradient(circle at 88% 80%, rgba(255, 65, 85, .22) 0 16%, transparent 16.5%),
    linear-gradient(145deg, var(--coral-soft), var(--surface) 56%, rgba(134, 220, 181, .34));
  box-shadow: 0 24px 58px var(--shadow);
  isolation: isolate;
}

.showcase-copy {
  position: absolute;
  top: 28px;
  left: 30px;
  right: 30px;
  z-index: 2;
}

.showcase-copy span {
  color: var(--coral);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.showcase-copy strong {
  display: block;
  max-width: 290px;
  margin-top: 7px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
}

.showcase-icons {
  position: absolute;
  inset: 104px 28px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.icon-tile {
  position: relative;
  width: min(30%, 132px);
  padding: 8px;
  border-radius: 24px;
  background: rgba(255, 253, 248, .90);
  box-shadow: 0 18px 36px rgba(17, 25, 35, .18);
  transform: rotate(-4deg);
}

.icon-tile:nth-child(2) { transform: translateY(24px) rotate(5deg); }
.icon-tile:nth-child(3) { transform: translateY(-5px) rotate(-2deg); }
.icon-tile img { display: block; width: 100%; aspect-ratio: 1; border-radius: 18px; object-fit: cover; }

.icon-tile span {
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fffdf8;
  background: var(--dark-panel);
  font-size: 11px;
}

.showcase-pixel {
  position: absolute;
  z-index: -1;
  width: 24px;
  height: 24px;
  background: var(--coral);
  clip-path: polygon(33% 0, 67% 0, 67% 33%, 100% 33%, 100% 67%, 67% 67%, 67% 100%, 33% 100%, 33% 67%, 0 67%, 0 33%, 33% 33%);
}

.pixel-one { top: 84px; right: 34px; }
.pixel-two { bottom: 40px; left: 34px; width: 18px; height: 18px; background: var(--mint); }

.section {
  padding: 62px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 72px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -.03em;
}

.section-heading p { margin: 0; color: var(--soft); }

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

.game-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
}

.game-card-upcoming {
  grid-column: 1 / -1;
  border-color: rgba(24, 65, 122, .24);
  background: linear-gradient(145deg, var(--surface) 55%, rgba(23, 74, 139, .07));
}

.game-top {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px 20px 17px;
}

.game-icon {
  flex: 0 0 68px;
  width: 68px;
  height: 68px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 8px 20px var(--shadow);
}

.game-title { min-width: 0; flex: 1; }
.game-title h3 { margin: 0 0 4px; font-size: 21px; font-weight: 500; line-height: 1.2; }
.game-title span { color: var(--soft); font-size: 12px; }

.download-badge {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--dark-panel);
  background: var(--mint);
  font-size: 12px;
  white-space: nowrap;
}

.status-badge {
  padding: 7px 10px;
  border-radius: 999px;
  color: #fffdf8;
  background: #174a8b;
  font-size: 12px;
  white-space: nowrap;
}

.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px 10px;
  color: var(--soft);
  font-size: 12px;
}

.gallery-actions { display: flex; gap: 6px; }

.gallery-arrow {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
}

.gallery-arrow:hover { background: var(--coral-soft); }

.game-gallery {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 0 20px 12px;
  scroll-padding-left: 20px;
  scroll-snap-type: x mandatory;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--coral) transparent;
  -webkit-overflow-scrolling: touch;
}

.game-shot {
  flex: 0 0 auto;
  width: auto;
  height: 310px;
  display: block;
  border-radius: 16px;
  object-fit: contain;
  scroll-snap-align: start;
}

.game-copy { padding: 18px 20px 22px; }
.game-copy p { min-height: 53px; margin: 0; color: var(--soft); line-height: 1.65; }
.store-row { gap: 10px; margin-top: 20px; }
.coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  color: #fffdf8;
  background: #174a8b;
  font-weight: 500;
  letter-spacing: .02em;
}
.coming-soon::before { content: "✦"; color: #ff6247; }
.play-link::before { content: "▶"; color: var(--coral); font-size: 10px; }

.apple-link::before {
  content: "A";
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: var(--page);
  background: var(--ink);
  font-size: 10px;
  font-weight: 500;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.values-grid article { padding-left: 18px; border-left: 3px solid var(--mint); }
.values-grid article:nth-child(2) { border-left-color: var(--coral); }
.values-grid h3 { margin: 0 0 7px; font-size: 18px; font-weight: 500; }
.values-grid p { margin: 0; color: var(--soft); line-height: 1.6; }

.contact-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px;
  border-radius: 24px;
  color: #f9f5ec;
  background: var(--dark-panel);
}

.contact-panel h2 { margin: 0 0 8px; font-size: 27px; font-weight: 500; }
.contact-panel p { margin: 0; color: #b7c0cc; }
.contact-panel a {
  flex: 0 0 auto;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--dark-panel);
  background: var(--coral);
  font-weight: 500;
  text-decoration: none;
}

.site-footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--soft); }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }

.legal-main { padding-bottom: 72px; }

.legal-hero {
  padding-top: 64px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
}

.legal-kicker { margin: 0 0 14px; color: var(--coral); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.legal-hero h1 { margin: 0 0 16px; font-size: clamp(38px, 6vw, 62px); font-weight: 500; letter-spacing: -.04em; }
.legal-hero p { max-width: 720px; margin: 0; color: var(--soft); line-height: 1.7; }

.legal-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 58px;
  padding-top: 50px;
}

.legal-aside { align-self: start; position: sticky; top: 104px; }
.legal-aside strong { display: block; margin-bottom: 12px; font-weight: 500; }
.legal-aside p { margin: 0 0 18px; color: var(--soft); font-size: 13px; line-height: 1.6; }
.legal-aside a { display: inline-flex; padding: 9px 11px; border-radius: 10px; color: var(--ink); background: var(--coral-soft); text-decoration: none; }

.legal-copy { max-width: 760px; }
.legal-copy h2 { margin: 44px 0 14px; font-size: 23px; font-weight: 500; line-height: 1.4; }
.legal-copy h2:first-child { margin-top: 0; }
.legal-copy p { margin: 0 0 12px; color: var(--soft); line-height: 1.75; }
.legal-copy .legal-indent-1 { padding-left: 18px; }
.legal-copy .legal-indent-2 { padding-left: 36px; }
.legal-copy a { color: var(--coral); }

.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;
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 54px; }
  .hero-showcase { min-height: 350px; }
  .games-grid { grid-template-columns: 1fr; }
  .game-copy p { min-height: 0; }
  .legal-layout { grid-template-columns: 1fr; gap: 30px; }
  .legal-aside { position: static; }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 28px, 1120px); }
  .header-inner { min-height: 64px; }
  .brand { width: 148px; height: 36px; }
  .primary-nav { display: none; }
  .language-switch { margin-left: auto; padding-left: 0; border-left: 0; }
  .hero { padding-top: 48px; padding-bottom: 44px; }
  .hero-showcase { min-height: 330px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .values-grid { grid-template-columns: 1fr; }
  .contact-panel { align-items: flex-start; flex-direction: column; padding: 26px; }
  .footer-inner { align-items: flex-start; flex-direction: column; padding: 24px 0; }
  .site-footer nav { justify-content: flex-start; }
  .legal-hero { padding-top: 48px; }
}

@media (max-width: 430px) {
  .hero h1 { font-size: 39px; }
  .hero-actions, .store-row { align-items: stretch; flex-direction: column; }
  .button, .store-button { justify-content: center; text-align: center; }
  .proof-row { align-items: flex-start; flex-direction: column; }
  .hero-showcase { min-height: 300px; border-radius: 24px 24px 64px 24px; }
  .showcase-copy { top: 22px; left: 22px; right: 22px; }
  .showcase-icons { inset: 98px 18px 22px; gap: 13px; }
  .icon-tile { border-radius: 24px; }
  .icon-tile img { border-radius: 18px; }
  .game-top { display: grid; grid-template-columns: 68px minmax(0, 1fr); align-items: center; }
  .download-badge, .status-badge { grid-column: 2; justify-self: start; margin-top: -8px; }
  .game-shot { height: 275px; }
  .legal-copy .legal-indent-1 { padding-left: 10px; }
  .legal-copy .legal-indent-2 { padding-left: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
