/* JES GAMES — site styles. Brand: red #C44344, graphite #3B3736, white #FCFBFC */
:root {
  --red: #C44344; --red-dark: #A93738; --red-light: #E05B5C;
  --graphite: #3B3736; --bg: #1E1B1A; --bg-2: #2A2625; --bg-3: #161413;
  --white: #FCFBFC; --text-2: #D9D4D2; --text-3: #B8B1AE; --line: #3B3736; --line-2: #5A5452;
  --display: 'Black Han Sans', Inter, system-ui, sans-serif;
  --body: Inter, 'Noto Sans KR', system-ui, sans-serif;
  --wrap: 1200px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--white); font-family: var(--body); line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--white); }
a:hover { color: #F2B8B8; }
:focus-visible { outline: 2px solid var(--red-light); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--white); color: var(--bg); padding: 8px 12px; border-radius: 6px; z-index: 50; }
.skip:focus { left: 8px; }
.muted { color: var(--text-3); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(30, 27, 26, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 12px 5%; }
.brand img { height: 44px; width: auto; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.nav a { color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 15px; padding: 10px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--white); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--red); }
.lang { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; }
.lang a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 10px; border-radius: 6px; color: var(--text-2); font: 700 13px var(--body); text-decoration: none; }
.lang a[aria-current="true"] { background: var(--graphite); color: var(--white); pointer-events: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 8px; font-weight: 700; font-size: 16px; text-decoration: none; border: 0; cursor: pointer; }
.btn-dark { background: var(--graphite); color: var(--white); }
.btn-dark:hover { background: var(--bg-2); color: var(--white); }
.store { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line-2); border-radius: 8px; color: var(--white); text-decoration: none; font-weight: 600; font-size: 14px; }
.store:hover { border-color: var(--white); color: var(--white); }

/* Sections */
section { padding: 88px 5%; }
.h-display { margin: 0; font-family: var(--display); font-weight: 400; line-height: 1; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(36px, 5vw, 52px); }

.hero { background: var(--red); padding: 88px 5% 96px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.hero img { width: 100%; max-width: 520px; height: auto; }
.hero p { margin: 0; max-width: 640px; font-size: clamp(18px, 2.4vw, 22px); font-weight: 600; line-height: 1.45; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.card { background: var(--bg-2); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.cover { position: relative; aspect-ratio: 16 / 9; background: repeating-linear-gradient(135deg, #3B3736 0 14px, #34302F 14px 28px); display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.pill { position: absolute; top: 12px; left: 12px; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 6px; letter-spacing: .03em; text-transform: uppercase; }
.pill.released { background: var(--red); color: var(--white); }
.pill.other { background: var(--white); color: var(--graphite); }
.card-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.card-plat { font-size: 13px; font-weight: 600; color: var(--text-3); letter-spacing: .04em; }
.card h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.1; }
.card h3 a { color: var(--white); text-decoration: none; }
.card h3 a:hover { color: #F2B8B8; }
.card p { margin: 0; font-size: 15px; color: var(--text-2); flex-grow: 1; }
.card .stores { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; }
.coming { padding-top: 6px; font-size: 14px; font-weight: 600; color: var(--text-3); }

/* About */
.about { background: var(--bg-2); }
.about .wrap { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.about-text { flex: 1 1 460px; display: flex; flex-direction: column; gap: 20px; }
.about-text h2 { font-size: clamp(36px, 5vw, 52px); }
.about-text p { margin: 0; font-size: 18px; line-height: 1.6; color: var(--text-2); }
.facts { flex: 1 1 360px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fact { background: var(--bg); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.fact:last-child:nth-child(odd) { grid-column: span 2; }
.fact b { font-family: var(--display); font-weight: 400; font-size: 48px; line-height: 1; color: var(--red-light); }
.fact span { font-size: 15px; color: var(--text-2); font-weight: 600; }

.available { padding: 72px 5%; border-bottom: 1px solid var(--line); text-align: center; }
.available .label { font-size: 14px; font-weight: 700; color: var(--text-3); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 28px; }
.available .logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 32px 80px; }
.available img { height: 56px; width: auto; }

/* Projects page */
.page-title { font-size: clamp(48px, 8vw, 72px); }
.filters { display: flex; flex-direction: column; gap: 14px; padding: 20px; background: var(--bg-2); border-radius: 12px; margin: 32px 0 20px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.filter-row > span { font-size: 13px; font-weight: 700; color: var(--text-3); letter-spacing: .08em; min-width: 92px; text-transform: uppercase; }
.chip { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; min-height: 44px; padding: 0 16px; border-radius: 999px; font: 600 14px var(--body); cursor: pointer; border: 1.5px solid var(--line-2); background: transparent; color: var(--text-2); }
.chip:hover { border-color: var(--white); color: var(--white); }
.chip img { width: 18px; height: 18px; object-fit: contain; }
.chip[aria-current="true"] { background: var(--white); border-color: var(--white); color: var(--bg); }
.count { font-size: 14px; color: var(--text-3); font-weight: 600; margin-bottom: 20px; }
.empty { padding: 48px; text-align: center; background: var(--bg-2); border-radius: 12px; }

/* Project page */
.p-hero { position: relative; display: flex; align-items: flex-end; min-height: clamp(440px, 46vw, 660px); padding: 0 5% 32px; overflow: hidden; }
.p-art { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, #3B3736 0 14px, #34302F 14px 28px); }
.p-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.p-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(30,27,26,.97) 0%, rgba(30,27,26,.9) 38%, rgba(30,27,26,.35) 64%, rgba(30,27,26,0) 82%), linear-gradient(0deg, #1E1B1A 0%, rgba(30,27,26,0) 38%); }
.p-info { position: relative; width: 100%; display: flex; flex-direction: column; gap: 14px; }
.p-info > * { max-width: 620px; }
.p-info h1 { font-size: clamp(40px, 6vw, 72px); text-shadow: 0 2px 16px rgba(0,0,0,.4); }
.p-info p { margin: 0; font-size: 18px; color: var(--text-2); }
.p-info .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.p-info .meta .pill { position: static; }
.p-info .buy { margin-top: 8px; }
.project-wrap { padding: 8px 5% 80px; }
.project-wrap > .wrap { display: flex; flex-direction: column; gap: 56px; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 36px) / 4); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.strip a { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--bg-2); scroll-snap-align: start; }
.strip img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.strip a:hover img { transform: scale(1.03); }
.strip .play { position: absolute; left: 50%; top: 50%; width: 56px; height: 40px; margin: -20px 0 0 -28px; border-radius: 12px; background: var(--red); }
.strip .play::after { content: ''; position: absolute; left: 22px; top: 11px; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff; }
.strip-tag { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 6px; background: rgba(0,0,0,.65); font-size: 12px; font-weight: 700; }
@media (max-width: 1100px) { .strip { grid-auto-columns: 44%; } }
@media (max-width: 900px) {
  .p-hero { display: block; min-height: 0; padding: 0; }
  .p-art { position: relative; aspect-ratio: 16 / 9; }
  .p-art::after { background: linear-gradient(0deg, #1E1B1A 0%, rgba(30,27,26,0) 45%); }
  .p-info { padding: 0 5%; margin-top: -12px; }
  .project-wrap { padding-top: 24px; }
}
@media (max-width: 600px) {
  .strip { grid-auto-columns: 78%; }
}
.back { font-size: 14px; font-weight: 700; color: var(--text-2); text-decoration: none; }
.storebig { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 22px; border-radius: 10px; background: var(--red); color: var(--white); text-decoration: none; font-weight: 700; }
.storebig:hover { background: var(--red-dark); color: var(--white); }
.h2 { font-size: 40px; margin-bottom: 20px; }
.cols { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.cols .main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.cols .main p { margin: 0; font-size: 18px; line-height: 1.65; color: var(--text-2); }
.specs { flex: 1 1 280px; background: var(--bg-2); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 18px; margin: 0; }
.specs dt { font-size: 12px; font-weight: 700; color: var(--text-3); letter-spacing: .1em; text-transform: uppercase; }
.specs dd { margin: 4px 0 0; font-size: 16px; font-weight: 600; }
.get { background: var(--red); border-radius: 16px; padding: clamp(24px, 4vw, 40px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.get h2 { font-size: 40px; line-height: 1.05; }
.get .logos { display: flex; flex-wrap: wrap; gap: 12px; }
.get .logos a { display: inline-flex; align-items: center; padding: 16px 28px; border-radius: 12px; background: var(--bg); color: var(--white); text-decoration: none; font-weight: 700; min-height: 56px; }
.get .logos img { height: 56px; width: auto; }

/* Privacy */
.doc { max-width: 860px; margin: 0 auto; }
.doc h1 { font-family: var(--display); font-weight: 400; font-size: clamp(36px, 5vw, 48px); line-height: 1.1; margin: 0 0 20px; }
.doc h2 { font-size: 20px; margin: 40px 0 12px; }
.doc p, .doc li { color: var(--text-2); font-size: 16px; line-height: 1.7; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--text-2); }
.doc th { color: var(--white); font-weight: 700; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
@media (max-width: 600px) {
  .doc th { white-space: normal; }
  .doc th, .doc td { padding: 8px; overflow-wrap: anywhere; }
}
.doc-tabs { display: flex; gap: 8px; margin-bottom: 32px; }
.doc-tabs a { text-decoration: none; padding: 10px 16px; border-radius: 8px; border: 1.5px solid var(--line-2); font-weight: 700; font-size: 14px; }
.doc-tabs a[aria-current="page"] { background: var(--white); color: var(--bg); border-color: var(--white); }

/* Footer */
.site-footer { background: var(--bg-3); padding: 64px 5% 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; margin-bottom: 40px; }
.footer-grid .label { font-size: 13px; font-weight: 700; color: var(--text-3); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 10px; }
.footer-grid .links { display: flex; flex-wrap: wrap; gap: 16px; font-weight: 600; }
.footer-legal { border-top: 1px solid var(--line); padding-top: 24px; display: flex; flex-direction: column; gap: 12px; font-size: 13px; color: var(--text-3); line-height: 1.6; }
.footer-legal .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.privacy-link { font-weight: 800; }
.tm { font-size: 12px; }

/* Server-rendered additions */
.lead { font-size: 18px; margin: 12px 0 0; }
.center-block { text-align: center; padding: 64px 0; }
.card .cover { text-decoration: none; }
.preview-bar { background: #F2C14E; color: #1E1B1A; text-align: center; font-weight: 700; padding: 10px 5%; }
.buy { display: flex; flex-wrap: wrap; gap: 12px; }
.h2 { margin-top: 0; }
.cols .main .h2 { margin: 0; }
.rich { display: flex; flex-direction: column; gap: 18px; font-size: 18px; line-height: 1.65; color: var(--text-2); }
.rich > * { margin: 0; }
.rich h3 { color: var(--white); font-size: 22px; }
.rich ul, .rich ol { padding-left: 1.4em; }
.rich a { color: #F2B8B8; }
.rich blockquote { border-left: 3px solid var(--red); padding-left: 16px; }
.plats { display: flex; flex-direction: column; gap: 6px; }
.plats span { display: inline-flex; align-items: center; gap: 8px; }
.plats img { width: 20px; height: 20px; object-fit: contain; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10, 9, 9, .94); display: none; align-items: center; justify-content: center; padding: 56px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.lightbox iframe { width: min(100%, calc((100vh - 112px) * 16 / 9)); aspect-ratio: 16 / 9; border: 0; border-radius: 8px; background: #000; }
.lightbox.lb-one .lb-prev, .lightbox.lb-one .lb-next { display: none; }
.lightbox img[hidden] { display: none; }
.lightbox button { position: absolute; background: rgba(255,255,255,.08); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 30px; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.2); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; margin-top: -24px; }
.lb-next { right: 16px; top: 50%; margin-top: -24px; }
.old-version { background: var(--bg-2); padding: 12px 16px; border-radius: 8px; color: var(--text-2); }
.archive-link { margin-top: 40px; font-weight: 700; }
.versions li { margin: 8px 0; }
.footer-logo { height: 56px; width: auto; margin-bottom: 14px; }

@media (max-width: 640px) {
  .lightbox { padding: 56px 8px; }
  section { padding: 64px 5%; }
  .site-header .bar { padding: 10px 5%; }
  .brand img { height: 36px; }
  .nav { gap: 4px 16px; }
  .fact b { font-size: 40px; }
}
