/* 별빛 정원 홈페이지 — shared base. Palette follows the game (dist/style.css) and the privacy page. */
@font-face { font-family: 'SG Jua'; src: url('../fonts/sg-jua.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'SG Baloo'; src: url('../fonts/sg-baloo.woff2') format('woff2'); font-weight: 400 800; font-display: swap; }

:root {
  --night: #0d1522;
  --bg: #151f2d;
  --panel: #1c2b3b;
  --panel-2: #22344a;
  --line: #ecd09a26;
  --gold: #ecd09a;
  --gold-soft: #f5dfb5;
  --gold-deep: #c99a4b;
  --ink: #e8ecf1;
  --muted: #abbac7;
  --star: #fff6dd;
  --display: 'SG Jua', 'Jua', 'Apple SD Gothic Neo', sans-serif;
  --display-en: 'SG Baloo', 'Baloo 2', 'Avenir Next', sans-serif;
  --body: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Segoe UI', sans-serif;
  --wrap: min(1160px, 100% - 32px);
  color-scheme: dark;
}
:lang(en) { --display: var(--display-en); }

* { box-sizing: border-box; }
html { background: var(--night); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); background: var(--night);
  font: 16px/1.7 var(--body); word-break: keep-all; overflow-wrap: anywhere; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
picture { display: contents; }
a { color: var(--gold); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.25; margin: 0; }
:lang(en) h1, :lang(en) h2, :lang(en) h3 { font-weight: 700; }
p { margin: 0 0 0.8em; }
.wrap { width: var(--wrap); margin-inline: auto; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 8px 14px; border-radius: 8px; background: var(--gold); color: #1a1408; }
.skip:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px 20px;
  padding: 10px max(16px, calc((100% - 1160px) / 2));
  background: linear-gradient(#0d1522ee, #0d1522cc); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-brand { display: block; flex: none; }
.logo-small { width: 112px; height: auto; }
.topnav { display: flex; gap: 2px; margin-left: auto; }
.topnav a[aria-current='page'] { color: var(--gold); }
.topnav a, .lang a {
  color: var(--muted); text-decoration: none; font-size: 14px; padding: 6px 12px; border-radius: 999px;
  min-height: 36px; display: inline-flex; align-items: center;
}
.topnav a:hover, .lang a:hover { color: var(--ink); background: #ffffff0d; }
.lang { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: #0d152299; border: 1px solid var(--line); }
.lang a { padding: 4px 11px; min-height: 30px; }
.lang a[aria-current='true'] { background: var(--gold); color: #1a1408; font-weight: 600; }

/* sky */
.sky { position: absolute; inset: 0 0 auto 0; height: 520px; pointer-events: none; z-index: 0; }
.stars { width: 100%; height: 100%; display: block; }
.stars circle { fill: var(--star); }
.stars .s1 { opacity: 0.85; } .stars .s2 { opacity: 0.5; } .stars .s3 { opacity: 0.3; }
.stars .g { fill: var(--gold-soft); transform-box: fill-box; transform-origin: center; }
@keyframes twinkle { 0%, 100% { opacity: 0.85; } 50% { opacity: 0.4; } }
@keyframes glint { 0%, 100% { opacity: 0.25; transform: scale(0.8); } 50% { opacity: 0.95; transform: scale(1.1); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: no-preference) {
  .stars .s1 { animation: twinkle 5.5s ease-in-out infinite; }
  .stars .s2 { animation: twinkle 7s ease-in-out -2s infinite; }
  .stars .g1 { animation: glint 6s ease-in-out infinite; }
  .stars .g2 { animation: glint 8s ease-in-out -3s infinite; }
  .stars .g3 { animation: glint 7s ease-in-out -5s infinite; }
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 0.7s ease; }
  .js .reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

/* buttons + CTA */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 26px;
  border-radius: 999px; font: 600 17px/1.2 var(--body); text-decoration: none; text-align: center;
}
.btn-steam { color: #1a1408; background: linear-gradient(180deg, #f8e6bf, var(--gold) 55%, #d9b56f); box-shadow: 0 8px 28px #ecd09a33, inset 0 1px 0 #fff8; }
.btn-steam:hover { filter: brightness(1.06); }
.btn-steam.is-pending { cursor: default; color: var(--gold-soft); background: #ecd09a14; border: 1px dashed #ecd09a80; box-shadow: none; }
.btn-ghost { color: var(--gold-soft); border: 1px solid #ecd09a66; }
.btn-ghost:hover { background: #ecd09a14; }
.cta { display: grid; justify-items: start; gap: 10px; }
.btn-steam.is-pending { letter-spacing: 0.02em; }
.cta-note { color: var(--muted); font-size: 14px; margin: 0; }
.platform-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; }
.platform-badges span { font-size: 13px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: #0d152280; }

/* section headings */
.section { position: relative; padding: clamp(56px, 9vw, 112px) 0; }
.kicker { display: inline-block; margin-bottom: 10px; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.section-title { font-size: clamp(28px, 4.4vw, 44px); color: var(--gold-soft); text-shadow: 0 0 26px #ecd09a33; }
.section-lead { margin-top: 12px; max-width: 640px; color: var(--muted); font-size: 17px; }

/* features */
.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feature { padding: 24px 22px; border-radius: 18px; background: linear-gradient(160deg, #22344acc, #1a2738cc); border: 1px solid var(--line); }
.feature h3 { font-size: 22px; color: var(--gold-soft); margin: 10px 0 8px; }
.feature p { color: #c9d3dc; margin: 0; font-size: 15.5px; }
.feature-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-size: 18px; color: #1a1408; background: radial-gradient(circle at 35% 30%, #fff1cc, var(--gold) 70%); box-shadow: 0 0 14px #ecd09a55; }

/* characters */
.chars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 12px; }
.char { display: grid; justify-items: center; text-align: center; padding: 14px 8px 12px; border-radius: 16px; background: radial-gradient(circle at 50% 38%, #2c4258, #1a2738 70%); border: 1px solid var(--line); }
.char-art { display: grid; place-items: center; width: 100%; aspect-ratio: 1; }
.char-art img { max-height: 120px; width: auto; filter: drop-shadow(0 6px 10px #0008); }
.char-name { font-family: var(--display); font-size: 18px; color: var(--gold-soft); margin-top: 6px; }
.char-family { font-size: 13px; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) { .char:hover .char-art img { animation: bob 1.6s ease-in-out infinite; } }

/* screenshots */
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.shot { margin: 0; }
.shot-link { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 14px 40px #0007; background: var(--panel); }
.shot-link img { width: 100%; transition: transform 0.5s ease; }
.shot-link:hover img { transform: scale(1.02); }
.shot figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }

/* rivals */
.rivals { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.rival { display: grid; justify-items: center; text-align: center; gap: 2px; padding: 14px 8px; border-radius: 16px; background: #1c2b3b99; border: 1px solid var(--line); }
.rival img { width: 64px; height: 64px; }
.rival-name { font-family: var(--display); font-size: 18px; color: var(--gold-soft); margin-top: 6px; }
.rival-ability { font-size: 12.5px; color: var(--muted); line-height: 1.4; }

/* image-led tiles */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 230px; grid-auto-flow: dense; gap: 14px; }
.tile { position: relative; overflow: hidden; border-radius: 20px; border: 1px solid var(--line); background: radial-gradient(circle at 50% 40%, #2a4157, #142131 75%); box-shadow: 0 14px 40px #0006; }
.tile-wide { grid-column: span 2; }
.tile-tall { grid-row: span 2; }
.tile-art { position: absolute; inset: 0; display: grid; place-items: center; }
/* absolute fill: with picture{display:contents}, height:100% on a centred grid item is not resolved reliably
   (Chromium used the intrinsic height, WebKit/Safari also centred the overflow -> empty top band, 2026-10-07) */
.tile-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile-langs .tile-img { object-fit: contain; padding: 18px 18px 46px; }
.tile-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 14px; font-family: var(--display); font-size: clamp(19px, 2vw, 24px); color: var(--gold-soft);
  background: linear-gradient(0deg, #0d1522f2 0%, #0d152299 55%, #0d152200); text-shadow: 0 2px 8px #000; }
:lang(en) .tile-cap { font-weight: 700; }
.trio { display: flex; align-items: flex-end; justify-content: center; height: 100%; padding: 12px 8px 44px; }
.trio > span { display: block; flex: 0 1 34%; }
.trio img { width: 100%; height: auto; max-height: 170px; object-fit: contain; filter: drop-shadow(0 8px 12px #000a); }
.trio-1 { transform: translateY(-10px) scale(1.12); z-index: 1; }
.emblem-grid { display: grid; grid-template-columns: repeat(3, 52px); gap: 10px; padding-bottom: 36px; }
.emblem-grid img { width: 52px; height: 52px; }
@media (prefers-reduced-motion: no-preference) { .tile .tile-img, .tile .trio img { transition: transform 0.6s ease; } .tile:hover .tile-img { transform: scale(1.04); } }
.chars-big { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.chars-big .char-art img { max-height: 150px; }

/* footer */
.site-foot { position: relative; border-top: 1px solid var(--line); background: linear-gradient(180deg, #0f1826, #0a111b); padding: 48px 0 40px; color: var(--muted); font-size: 14px; }
.foot-inner { width: var(--wrap); margin-inline: auto; display: grid; gap: 18px; }
.foot-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.foot-brand p { margin: 0; color: var(--gold-soft); }
.foot-facts { margin: 0; color: var(--ink); }
.foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; }
.foot-links a { color: var(--gold); }
.foot-lang a { margin-right: 10px; color: var(--muted); }
.foot-lang a[aria-current='true'] { color: var(--ink); text-decoration: none; }
.foot-small { margin: 0; font-size: 13px; color: #8ea0b0; }
.foot-copy { margin: 0; font-size: 13px; color: #8ea0b0; }

/* lightbox */
.lightbox { padding: 0; border: 0; background: transparent; max-width: min(96vw, 1600px); width: 100%; color: var(--ink); }
.lightbox::backdrop { background: #050a12e6; }
.lightbox img { width: 100%; border-radius: 10px; }
.lightbox-caption { text-align: center; margin: 10px 0 0; color: var(--gold-soft); }
.lightbox-close { position: absolute; right: 8px; top: 8px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; font-size: 26px; line-height: 1; color: var(--ink); background: #0d1522cc; cursor: pointer; }

@media (max-width: 760px) {
  .topbar { gap: 8px; }
  .topnav a { padding: 6px 8px; font-size: 13.5px; }
  .topnav a[href^="/privacy/"] { display: none; }
  .lang a { padding: 4px 8px; font-size: 13px; }
  .logo-small { width: 84px; }
  .shots { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .cta { justify-items: stretch; }
}
@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 190px; }
  .tile-langs { grid-column: span 2; }
  .chars-big { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); }
}
@media (max-width: 420px) {
  .tiles { gap: 10px; grid-auto-rows: 160px; }
  .tile-cap { padding: 30px 12px 10px; }
  .emblem-grid { grid-template-columns: repeat(3, 38px); gap: 6px; }
  .emblem-grid img { width: 38px; height: 38px; }
  .trio img { max-height: 110px; }
  .chars-big { grid-template-columns: repeat(3, 1fr); }
  .chars-big .char-art img { max-height: 96px; }
  body { font-size: 15.5px; }
  .chars { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .char-art img { max-height: 88px; }
  .char-name { font-size: 16px; }
  .rivals { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}
.tile-tall .tile-img { object-position: 50% 35%; }

.brand-wordmark { display: block; color: #f6dfa8; font-size: 19px; font-weight: 700; line-height: 1.05; letter-spacing: .015em; }
.language-samples { display: grid; place-content: center; height: 100%; padding: 24px; text-align: center; font: 600 clamp(16px, 2vw, 24px)/1.8 system-ui, sans-serif; color: #e8d6b1; }
.topbar-brand { text-decoration: none; }
