/* Jupi Games. Layout: a night sky. A glassy header, a hero with phones floating on the right,
   each game as a big card led by its store banner, and a footer with the celeste-and-white stripes of
   home. Dark only, on purpose: the games themselves are night skies. */
@font-face {
  font-family: 'Nunito';
  src: url('/fonts/nunito.woff2') format('woff2');
  font-weight: 200 1000; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  src: url('/fonts/nunito-latin-ext.woff2') format('woff2');
  font-weight: 200 1000; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  src: url('/fonts/nunito-cyrillic.woff2') format('woff2');
  font-weight: 200 1000; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --bg: #080b18;
  --glass: rgba(255, 255, 255, 0.045);
  --glass-2: rgba(255, 255, 255, 0.08);
  --edge: rgba(255, 255, 255, 0.10);
  --ink: #eef2fb;
  --body: #d7deee;
  --muted: #9ba7c4;
  --faint: #6c7896;
  --celeste: #5cc6f5;        /* sky blue: links, buttons, focus */
  --pink: #f47fb8;        /* pink: the star, highlights */
  --grad: linear-gradient(100deg, var(--celeste) 0%, #9fd8f8 45%, var(--pink) 100%);
  --font: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 22px;
  color-scheme: dark;
}
/* Japanese, Korean and Chinese: Nunito has no such letters, so they come from the system's font for that
   language (each draws the shared characters its own way). */
:lang(ja) { --font: 'Nunito', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic', Meiryo, sans-serif; }
:lang(ko) { --font: 'Nunito', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif; }
:lang(zh) { --font: 'Nunito', 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(ko) h1, :lang(ko) h2, :lang(ko) h3, :lang(zh) h1, :lang(zh) h2, :lang(zh) h3 { letter-spacing: 0; line-height: 1.25; }
:lang(ja) .hero h1, :lang(ko) .hero h1, :lang(zh) .hero h1 { font-size: clamp(34px, 5.2vw, 62px); }
:lang(ko) { word-break: keep-all; }
:lang(ja) { line-break: strict; }
:lang(de) h1, :lang(de) h2, :lang(ru) h1, :lang(ru) h2 { hyphens: auto; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: clip; }        /* the tilted phones may poke past the edge on small screens */
body {
  margin: 0; color: var(--ink); font: 500 17px/1.6 var(--font);
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(92, 198, 245, 0.16), transparent 62%),
    radial-gradient(760px 480px at 100% 4%, rgba(244, 127, 184, 0.12), transparent 60%),
    radial-gradient(1200px 700px at 50% 120%, rgba(92, 198, 245, 0.08), transparent 60%),
    var(--bg);
  min-height: 100vh;
}
/* A faint field of stars behind everything. */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.55;
  background-image:
    radial-gradient(1px 1px at 23px 41px, rgba(255,255,255,0.8), transparent 60%),
    radial-gradient(1px 1px at 141px 97px, rgba(255,255,255,0.55), transparent 60%),
    radial-gradient(1.5px 1.5px at 211px 183px, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1px 1px at 77px 211px, rgba(255,255,255,0.45), transparent 60%),
    radial-gradient(1px 1px at 189px 23px, rgba(255,255,255,0.5), transparent 60%);
  background-size: 260px 260px;
}
a { color: var(--celeste); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--celeste); outline-offset: 3px; border-radius: 10px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.08; text-wrap: balance; margin: 0; font-weight: 900; letter-spacing: -0.015em; overflow-wrap: break-word; }
p { margin: 0; }
em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: var(--gutter); }

/* ---- header ---- */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: rgba(8, 11, 24, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--edge);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; flex-wrap: wrap; }
.wordmark { display: inline-flex; align-items: baseline; gap: 9px; color: var(--ink); text-decoration: none; }
.wordmark .jupi { font-size: 30px; font-weight: 1000; letter-spacing: -0.03em; }
.wordmark .jupi .i { position: relative; display: inline-block; }
.wordmark .jupi svg { position: absolute; width: 0.44em; height: 0.44em; left: 50%; top: 0.01em; transform: translateX(-50%); fill: var(--pink); filter: drop-shadow(0 0 6px rgba(244,127,184,0.7)); }
.wordmark .games { font-size: 12px; font-weight: 900; letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted); }
nav { display: flex; gap: 6px; align-items: center; font-weight: 800; font-size: 15px; }
nav a { color: var(--muted); text-decoration: none; padding: 7px 12px; border-radius: 999px; }
nav a:hover { color: var(--ink); background: var(--glass); }

/* ---- hero ---- */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; padding-block: clamp(40px, 8vw, 96px) clamp(32px, 6vw, 72px); }
.hero > div { min-width: 0; display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.hero h1 { font-size: clamp(42px, 6.6vw, 78px); }
.hero p { font-size: 19px; color: var(--muted); max-width: 52ch; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.stage { position: relative; height: 470px; }
.stage img {
  position: absolute; width: 210px; border-radius: 26px; border: 4px solid rgba(255,255,255,0.12);
  box-shadow: 0 30px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(0,0,0,0.4);
}
.stage img:nth-child(1) { left: 2%; top: 60px; transform: rotate(-10deg); }
.stage img:nth-child(2) { left: 31%; top: 0; z-index: 2; }
.stage img:nth-child(3) { left: 60%; top: 70px; transform: rotate(9deg); }
@media (prefers-reduced-motion: no-preference) {
  .stage img { animation: float 7s ease-in-out infinite; }
  .stage img:nth-child(2) { animation-delay: -2.3s; }
  .stage img:nth-child(3) { animation-delay: -4.6s; }
  @keyframes float { 50% { translate: 0 -10px; } }
}

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 14px;
  font-weight: 900; font-size: 16px; text-decoration: none; color: #04121c; background: var(--celeste);
  box-shadow: 0 10px 30px rgba(92, 198, 245, 0.25);
}
.btn.ghost { background: var(--glass); color: var(--ink); border: 1px solid var(--edge); box-shadow: none; }
.btn:hover { filter: brightness(1.08); }
/* A store button in the shape of the usual "Get it on" badge, without Google's artwork. */
.play {
  display: inline-flex; align-items: center; gap: 12px; padding: 9px 18px 9px 14px; border-radius: 12px;
  background: #000; color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,0.28);
}
.play svg { width: 24px; height: 24px; flex: none; fill: #fff; }
.play span { display: flex; flex-direction: column; line-height: 1.05; }
.play small { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.8); }
.play b { font-size: 19px; font-weight: 800; }
.play:hover { border-color: rgba(255,255,255,0.6); }

/* ---- games ---- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); }
.section-head p { color: var(--muted); font-weight: 700; }
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 26px; }
.card { background: var(--glass); border: 1px solid var(--edge); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card .banner { display: block; aspect-ratio: 1024 / 500; overflow: hidden; }
.card .banner img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card .info { padding: 20px 22px 0; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
.card .info > div { min-width: 0; }
.card .info img { width: 62px; height: 62px; border-radius: 16px; box-shadow: 0 6px 18px rgba(0,0,0,0.4); }
.card h3 { font-size: 24px; }
.card .info p { color: var(--muted); font-size: 15px; line-height: 1.45; margin-top: 4px; }
/* Category tags; "offline" leads, in sky blue. */
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.tags li { font-size: 13px; font-weight: 800; padding: 4px 11px; border-radius: 999px; color: var(--muted); background: var(--glass-2); border: 1px solid var(--edge); }
.tags li.offline { display: inline-flex; align-items: center; gap: 6px; color: var(--celeste); background: rgba(92, 198, 245, 0.12); border-color: rgba(92, 198, 245, 0.45); }
.tags svg, .badge svg { width: 15px; height: 15px; fill: currentColor; flex: none; }
.card .tags { padding: 16px 22px 0; }
.game-head .tags { margin-top: 12px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 800;
  color: var(--celeste); background: rgba(92, 198, 245, 0.10); border: 1px solid rgba(92, 198, 245, 0.4);
}
.hero p.badge { font-size: 14px; color: var(--celeste); }
.card .actions { padding: 18px 22px 22px; margin-top: auto; display: flex; gap: 10px 18px; align-items: center; flex-wrap: wrap; }
.card .actions a.more { font-weight: 800; text-decoration: none; }
.card .actions a.more:hover { text-decoration: underline; }
@media (prefers-reduced-motion: no-preference) {
  .card { transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease; }
  .card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.2); box-shadow: 0 24px 50px rgba(0,0,0,0.45); }
  .card:hover .banner img { transform: scale(1.03); }
}
.soon { margin-top: 26px; color: var(--muted); font-weight: 800; display: flex; align-items: center; gap: 10px; }
.soon::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 12px var(--pink); }

.contact { margin-block: clamp(56px, 8vw, 96px); padding: clamp(28px, 4vw, 44px); border-radius: var(--radius); background: var(--glass); border: 1px solid var(--edge); display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.contact h2 { font-size: clamp(26px, 3.4vw, 36px); }
.contact p { color: var(--muted); }
.contact a.mail { font-size: clamp(20px, 2.6vw, 26px); font-weight: 900; text-decoration: none; }

/* ---- game page ---- */
.game-top { padding-block: 34px 10px; }
.game-banner { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--edge); aspect-ratio: 1024 / 500; max-height: 440px; width: 100%; }
.game-banner img { width: 100%; height: 100%; object-fit: cover; }
.game-head { display: grid; grid-template-columns: auto 1fr auto; gap: 18px 22px; align-items: end; margin-top: -48px; padding-inline: 24px; position: relative; }
.game-head > img { width: 112px; height: 112px; border-radius: 26px; border: 4px solid var(--bg); box-shadow: 0 12px 30px rgba(0,0,0,0.5); }
.game-head > div { min-width: 0; padding-top: 58px; }
.game-head h1 { font-size: clamp(32px, 4.6vw, 52px); }
.game-head .play { margin-bottom: 4px; }
.game-head p { color: var(--muted); font-size: 18px; margin-top: 6px; }

.shots { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 34px var(--gutter) 30px; scrollbar-width: thin; scrollbar-color: var(--edge) transparent; }
.shots img { width: 232px; height: auto; flex: none; border-radius: 20px; border: 1px solid var(--edge); scroll-snap-align: start; box-shadow: 0 16px 34px rgba(0,0,0,0.45); }
@media (min-width: 1240px) { .shots { justify-content: center; } }

.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding-block: 10px; }
.panel { background: var(--glass); border: 1px solid var(--edge); border-radius: var(--radius); padding: 26px 28px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel h2 { font-size: 15px; letter-spacing: 0.12em; color: var(--accent, var(--celeste)); }        /* the listings' headings, in capitals */
.panel ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.panel li { position: relative; padding-left: 26px; color: var(--body); }
.panel li::before { content: ''; position: absolute; left: 4px; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent, var(--celeste)); box-shadow: 0 0 10px var(--accent, var(--celeste)); }
.panel p { color: var(--body); }
.panel .note { color: var(--muted); font-size: 15px; padding-top: 12px; border-top: 1px solid var(--edge); }
.about { padding-block: 4px 26px; }
.about .lead { font-size: clamp(19px, 2.2vw, 23px); line-height: 1.55; color: var(--ink); max-width: 62ch; font-weight: 600; }

/* Questions and answers: each opens in place. */
.faq { margin-top: 56px; }
.faq h2 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 18px; }
.qa { display: grid; gap: 10px; }
.qa details { background: var(--glass); border: 1px solid var(--edge); border-radius: 16px; }
.qa details[open] { background: var(--glass-2); }
.qa summary { cursor: pointer; list-style: none; padding: 16px 52px 16px 22px; font-weight: 800; font-size: 17px; position: relative; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: '+'; position: absolute; right: 20px; top: 50%; translate: 0 -52%; font-size: 24px; font-weight: 700; color: var(--accent, var(--celeste)); transition: rotate 0.2s ease; }
.qa details[open] summary::after { rotate: 45deg; }
.qa details p { padding: 0 22px 18px; color: var(--body); }

/* The listing's last line, as a call to download. */
.closing { margin-top: 56px; }
.closing .panel { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 16%, transparent), var(--glass) 70%); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.closing p { font-size: clamp(20px, 2.4vw, 26px); font-weight: 900; color: var(--ink); line-height: 1.3; max-width: 36ch; }
.support { margin-block: 22px 72px; }
.support .panel { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.support .panel > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.support p { color: var(--muted); }
.support .links { display: flex; gap: 8px 18px; font-weight: 800; flex-wrap: wrap; }

/* ---- legal pages ---- */
.legal { max-width: 48rem; padding-block: 28px 72px; }
.legal h1 { font-size: clamp(30px, 4.6vw, 44px); margin: 24px 0 8px; }
.legal h2 { font-size: 21px; margin: 34px 0 10px; }
.legal p, .legal li { line-height: 1.75; color: var(--body); }
.legal p + p { margin-top: 10px; }
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal .muted { color: var(--muted); font-size: 15px; }
.legal strong { color: var(--ink); }
.legal hr { border: 0; border-top: 1px solid var(--edge); margin: 56px 0 24px; }
.legal code { background: var(--glass-2); border: 1px solid var(--edge); padding: 1px 6px; border-radius: 6px; font-size: 0.92em; }

/* ---- footer: celeste and white stripes ---- */
footer { border-top: 1px solid var(--edge); background: rgba(5, 8, 18, 0.6); }
footer .stripes { height: 8px; background: repeating-linear-gradient(90deg, #6cc8f2 0 24px, #f4f8fd 24px 48px); opacity: 0.9; }
footer .wrap { padding-block: 26px 34px; display: flex; flex-wrap: wrap; gap: 12px 26px; justify-content: space-between; align-items: center; color: var(--muted); font-size: 15px; font-weight: 700; }
footer nav a { font-size: 15px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .stage { height: 380px; max-width: 420px; width: 100%; margin: 0 auto; }
  .stage img { width: 140px; border-radius: 20px; }
  .stage img:nth-child(1) { left: 1%; top: 64px; }
  .stage img:nth-child(3) { left: 58%; top: 74px; }
  .panels { grid-template-columns: 1fr; }
  .game-head { grid-template-columns: auto 1fr; padding-inline: 12px; }
  .game-head .play { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 520px) {
  .game-head > img { width: 84px; height: 84px; border-radius: 20px; }
  .game-head { margin-top: -34px; }
  .game-head > div { padding-top: 40px; }
  .game-head > img { align-self: start; }
  .shots img { width: 190px; }
}
@media (max-width: 400px) {
  .top nav { display: none; }
}
