/* Poppa Games Studio - one stylesheet, no external fonts or scripts. */

:root {
  --bg: #f4f3f0;
  --surface: #ffffff;
  --surface-2: #ecebe7;
  --text: #16181b;
  --muted: #5c626a;
  --line: #e2dfd9;
  --accent: #d9482b;
  --accent-text: #ffffff;
  --ok: #2f8f4e;
  --live: #2b6fd9;
  --soon: #a0670e;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 8px 24px rgb(0 0 0 / 6%);
  --max: 1120px;
  --gutter: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111214;
    --surface: #1a1c1f;
    --surface-2: #222529;
    --text: #eceef0;
    --muted: #9ba2aa;
    --line: #2b2e33;
    --accent: #ff6a45;
    --accent-text: #16181b;
    --ok: #57c27a;
    --live: #6ea2ff;
    --soon: #e0a245;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px rgb(0 0 0 / 30%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; }
.brand span { white-space: nowrap; }
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; padding: 8px 10px; border-radius: 10px; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
@media (max-width: 760px) {
  .site-header .wrap { gap: 0; padding-top: 10px; }
  .nav { margin: 4px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter) 8px; width: calc(100% + var(--gutter) * 2); }
}

/* Type */
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 12px; }
h1 { font-size: clamp(2.3rem, 6.2vw, 4.2rem); font-weight: 850; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 750; }
p { margin: 0 0 14px; }
.lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--muted); max-width: 40ch; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.muted { color: var(--muted); }

/* Sections */
section { padding: 72px 0; }
section + section { border-top: 1px solid var(--line); }
section[id], details[id] { scroll-margin-top: 80px; }
@media (max-width: 760px) { section[id], details[id] { scroll-margin-top: 108px; } }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.section-head p { margin: 0; max-width: 52ch; }
@media (max-width: 720px) { section { padding: 52px 0; } }

/* Buttons */
.buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 10px 18px;
  border-radius: 999px; font-weight: 700; font-size: 16px; text-decoration: none;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { filter: brightness(1.05); background: var(--accent); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Hero */
.hero { padding: 56px 0 72px; border-top: 0; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.1fr 1fr; } }
@media (min-width: 900px) { .hero h1 { font-size: clamp(2.6rem, 4.4vw, 3.6rem); } }
.hero-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: center; max-width: 520px; width: 100%; margin: 0 auto; padding: 12px 8px 28px; }
.hero-shots img { width: 100%; aspect-ratio: 480 / 1040; object-fit: cover; border-radius: 16px; box-shadow: var(--shadow); background: var(--surface-2); transition: transform .25s ease; }
.hero-shots img:nth-child(1) { transform: rotate(-5deg) translateY(18px); }
.hero-shots img:nth-child(2) { transform: scale(1.08); position: relative; z-index: 1; }
.hero-shots img:nth-child(3) { transform: rotate(5deg) translateY(18px); }
.hero-shots:hover img:nth-child(1) { transform: rotate(-7deg) translate(-6px, 14px); }
.hero-shots:hover img:nth-child(3) { transform: rotate(7deg) translate(6px, 14px); }
@media (prefers-reduced-motion: reduce) { .hero-shots img { transition: none; } }
.hero-art { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 1024 / 500; background: var(--surface-2); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.hero .buttons { margin-top: 24px; }

/* Games */
.games { display: grid; gap: 24px; }
@media (min-width: 900px) { .games { grid-template-columns: 1.6fr 1fr; } }
.game-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.game-card .cover { aspect-ratio: 1024 / 500; background: var(--surface-2); }
.game-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.game-card .body { padding: 24px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.game-title { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.game-title img { width: 56px; height: 56px; border-radius: 14px; box-shadow: var(--shadow); }
.game-title h3 { margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 12px; padding: 0; list-style: none; }
.tags li { font-size: 13px; font-weight: 650; color: var(--muted); background: var(--surface-2); padding: 3px 10px; border-radius: 999px; }
.game-card .buttons { margin-top: auto; padding-top: 8px; }
.game-card.teaser { border-style: dashed; box-shadow: none; background: transparent; }
.teaser .cover { display: grid; place-items: center; background: repeating-linear-gradient(135deg, var(--surface-2) 0 14px, transparent 14px 28px); }
.teaser .cover span { font-size: 56px; font-weight: 850; color: var(--muted); opacity: .5; }

.strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 0 12px; margin-top: 24px; scrollbar-width: thin; }
.strip img { height: clamp(300px, 52vh, 520px); width: auto; aspect-ratio: 646 / 1400; border-radius: var(--radius-sm); scroll-snap-align: start; box-shadow: var(--shadow); background: var(--surface-2); }

/* Status badges */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.released { color: var(--ok); }
.status.live { color: var(--live); }
.status.testing { color: var(--soon); }
.status.planned { color: var(--muted); }

/* About */
.about { display: grid; gap: 32px; }
@media (min-width: 900px) { .about { grid-template-columns: 1.2fr 1fr; gap: 56px; } }
.about-text p { font-size: 1.08rem; }
.values { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.values li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 20px; }
.values strong { display: block; margin-bottom: 2px; }
.values span { color: var(--muted); font-size: 0.97rem; }

/* Roadmap */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 28px 36px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line); }
.timeline li.done::before { border-color: var(--ok); background: var(--ok); }
.timeline li.now::before { border-color: var(--soon); background: var(--surface); }
.timeline li.next::before { border-style: dashed; }
.timeline .when { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.timeline h3 { margin: 2px 0 6px; font-size: 1.15rem; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.timeline p { margin: 0; color: var(--muted); max-width: 60ch; }

/* Devlog */
.posts { display: grid; gap: 16px; }
@media (min-width: 760px) { .posts { grid-template-columns: repeat(2, 1fr); } }
.post-card { display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: transform .15s ease; }
.post-card:hover { transform: translateY(-2px); }
.post-card time { font-size: 14px; color: var(--muted); font-weight: 600; }
.post-card h3 { margin: 6px 0 8px; }
.post-card p { color: var(--muted); margin: 0; }

.article { max-width: 720px; margin: 0 auto; padding: 56px var(--gutter) 72px; }
.article header { margin-bottom: 28px; }
.article time { color: var(--muted); font-weight: 600; }
.article h2 { font-size: 1.5rem; margin-top: 36px; }
.article p, .article li { font-size: 1.08rem; }
.article figure { margin: 28px 0; }
.article figcaption { color: var(--muted); font-size: 0.95rem; margin-top: 8px; }
.back { display: inline-block; margin-bottom: 20px; color: var(--muted); text-decoration: none; font-weight: 600; }
.back:hover { color: var(--text); }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 28px 18px 0; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; font-size: 24px; color: var(--muted); }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 18px; color: var(--muted); }
.faq details > div p:last-child { margin-bottom: 0; }

/* Contact */
.contact { display: grid; gap: 32px; }
@media (min-width: 900px) { .contact { grid-template-columns: 1fr 1fr; align-items: center; } }
.email { font-size: clamp(1.25rem, 3.4vw, 2rem); font-weight: 800; letter-spacing: -0.01em; text-decoration-thickness: 2px; text-underline-offset: 6px; word-break: break-all; }
.socials { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.socials .btn { justify-content: center; }

/* Game page */
.game-hero { padding: 0 0 56px; border-top: 0; }
.game-hero .banner { aspect-ratio: 1024 / 500; max-height: 520px; width: 100%; overflow: hidden; background: var(--surface-2); }
.game-hero .banner img { width: 100%; height: 100%; object-fit: cover; }
.game-head { display: flex; gap: 20px; align-items: center; margin: -48px 0 20px; position: relative; flex-wrap: wrap; }
.game-head img { width: 112px; height: 112px; border-radius: 26px; border: 4px solid var(--bg); box-shadow: var(--shadow); }
.game-head h1 { margin: 40px 0 0; font-size: clamp(2rem, 5vw, 3.2rem); }
.features { display: grid; gap: 12px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 760px) { .features { grid-template-columns: repeat(2, 1fr); } }
.features li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; }
.features strong { display: block; }
.features span { color: var(--muted); font-size: 0.97rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 24px 0; padding: 0; list-style: none; }
.facts li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.facts span { display: block; font-size: 13px; color: var(--muted); font-weight: 650; }
.facts strong { font-size: 1rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: grid; gap: 12px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: var(--text); }
.site-footer p { margin: 0; }
