:root {
  --bg: #07071a;
  --bg-alt: #0c0b26;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --text: #ecebff;
  --muted: #a4a3c7;
  --cyan: #7cf3ff;
  --violet: #b18cff;
  --pink: #ff7ac6;
  --grad: linear-gradient(110deg, var(--cyan), var(--violet) 50%, var(--pink));
  --radius: 18px;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

#starfield { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; }

.container { width: min(1160px, 100% - 32px); margin-inline: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .9em 1.6em; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 .98rem var(--font-body); color: #0a0920;
  background: var(--grad); background-size: 160% 100%;
  box-shadow: 0 8px 30px -8px rgba(177, 140, 255, .6);
  transition: transform .2s, background-position .4s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); background-position: 100% 0; box-shadow: 0 12px 36px -8px rgba(177, 140, 255, .8); }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.btn--ghost:hover { background: var(--surface-hover); box-shadow: none; }
.btn--small { padding: .6em 1.15em; font-size: .88rem; }
.btn--full { width: 100%; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55em;
  font: 600 .78rem var(--font-body); letter-spacing: .14em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 1rem;
}
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 7, 26, .6); border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.is-scrolled { border-color: var(--border); background: rgba(7, 7, 26, .85); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: .6rem; font: 700 1.2rem var(--font-head); letter-spacing: -0.01em; }
.logo em { font-style: normal; color: var(--muted); font-weight: 500; margin-left: .15em; }
.nav__links { display: flex; align-items: center; gap: 2rem; font-weight: 500; font-size: .95rem; }
.nav__links a:not(.btn) { color: var(--muted); transition: color .2s; }
.nav__links a:not(.btn):hover { color: var(--text); }
.nav__toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 6px 0; transition: transform .3s; }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* Hero */
.hero { position: relative; min-height: calc(100vh - 72px); display: flex; align-items: center; padding: 80px 0 100px; overflow: hidden; }
.hero__inner { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(2.6rem, 7.5vw, 5.4rem); font-weight: 700; margin-bottom: .4em; }
.hero__lead { max-width: 600px; font-size: clamp(1.05rem, 1.8vw, 1.2rem); color: var(--muted); margin-bottom: 2.2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 3rem; }
.hero__platforms { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; padding: 0; margin: 0; }
.hero__platforms li { font-size: .82rem; color: var(--muted); padding: .35em .9em; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }

.planet {
  position: absolute; right: -140px; top: 50%; translate: 0 -50%;
  width: 560px; aspect-ratio: 1; border-radius: 50%; z-index: 1;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.35), transparent 40%),
    radial-gradient(circle at 70% 75%, rgba(255,122,198,.55), transparent 55%),
    linear-gradient(140deg, #4b3bd1, #2a1d7a 55%, #120c3d);
  box-shadow: 0 0 120px 10px rgba(124, 92, 255, .35), inset -40px -40px 80px rgba(0,0,0,.55);
  animation: float 9s ease-in-out infinite;
}
.planet__ring {
  position: absolute; inset: 38% -22%; border-radius: 50%;
  border: 2px solid rgba(124, 243, 255, .45); transform: rotate(-18deg);
  box-shadow: 0 0 24px rgba(124, 243, 255, .25);
}
@keyframes float { 50% { translate: 0 calc(-50% - 18px); } }

/* Sections */
.section { padding: 110px 0; position: relative; }
.section--alt { background: linear-gradient(180deg, transparent, rgba(12, 11, 38, .75) 15%, rgba(12, 11, 38, .75) 85%, transparent); }
.section__head { max-width: 680px; margin-bottom: 3.5rem; }
.section__sub { color: var(--muted); font-size: 1.08rem; }

/* Games */
.games { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.game {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .3s, border-color .3s, background .3s;
}
.game:hover { transform: translateY(-4px); border-color: rgba(177, 140, 255, .35); background: var(--surface-hover); }
.game__art { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.game__art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.art--mayor { background: linear-gradient(180deg, #3b1f6e, #a5477a 70%, #ff8f6b); }
.art--orbit { background: radial-gradient(circle at 50% 50%, #1b2a6b, #070720 75%); }
.art--lantern { background: linear-gradient(180deg, #0a1a2e, #123a3a); }
.badge {
  position: absolute; top: 14px; left: 14px;
  font-size: .75rem; font-weight: 600; letter-spacing: .04em;
  padding: .35em .8em; border-radius: 999px;
  background: rgba(7, 7, 26, .7); border: 1px solid var(--border); backdrop-filter: blur(6px);
}
.badge--live { color: #0a0920; background: #8dffb0; border-color: transparent; }
.game__body { padding: 1.6rem; display: flex; flex-direction: column; flex: 1; }
.game__body p { color: var(--muted); }
.game__genre { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--violet) !important; margin-bottom: .5rem; font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; padding: 0; margin: 0 0 1.4rem; }
.tags li { font-size: .78rem; padding: .25em .7em; border-radius: 6px; background: rgba(255,255,255,.06); color: var(--muted); }
.game__links { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: auto; }

/* Services */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.service {
  padding: 1.9rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color .3s, background .3s, transform .3s;
}
.service:hover { border-color: rgba(124, 243, 255, .3); background: var(--surface-hover); transform: translateY(-3px); }
.service p { color: var(--muted); margin: 0; font-size: .96rem; }
.service__icon {
  width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 1.2rem;
  border-radius: 12px; background: linear-gradient(135deg, rgba(124,243,255,.15), rgba(177,140,255,.15));
  border: 1px solid rgba(124, 243, 255, .2);
}
.service__icon svg { width: 24px; height: 24px; fill: none; stroke: var(--cyan); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stack { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: 3rem; }
.stack span { font-size: .85rem; color: var(--muted); padding: .4em 1em; border-radius: 999px; border: 1px dashed var(--border); }

/* Process */
.process { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.process li { position: relative; padding: 1.8rem 1.6rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.process p { color: var(--muted); font-size: .95rem; margin: 0; }
.process__num { display: block; font: 700 2.4rem var(--font-head); margin-bottom: .6rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* About */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: 4rem; align-items: center; }
.about__text p { color: var(--muted); font-size: 1.05rem; }
.values { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.values li { padding: 1.2rem 1.4rem; border-left: 3px solid var(--violet); background: var(--surface); border-radius: 0 12px 12px 0; }
.values strong { display: block; font-family: var(--font-head); font-size: 1.08rem; margin-bottom: .15rem; }
.values span { color: var(--muted); font-size: .95rem; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.25fr; gap: 4rem; align-items: start; }
.contact__intro p { color: var(--muted); font-size: 1.08rem; }
.contact__mail { display: inline-block; margin-top: .5rem; font: 600 1.15rem var(--font-head); border-bottom: 1px solid var(--violet); padding-bottom: 2px; }
.contact__mail:hover { color: var(--cyan); border-color: var(--cyan); }
.form, .form__success {
  padding: 2.2rem; border-radius: var(--radius);
  background: rgba(12, 11, 38, .8); border: 1px solid var(--border);
  box-shadow: 0 30px 80px -30px rgba(124, 92, 255, .35);
}
.form { display: grid; gap: 1.1rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form label { display: grid; gap: .45rem; }
.form label span { font-size: .85rem; font-weight: 500; color: var(--muted); }
.form input, .form select, .form textarea {
  width: 100%; padding: .85em 1em; border-radius: 10px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--border); color: var(--text);
  font: 400 .98rem var(--font-body); transition: border-color .2s, background .2s;
}
.form textarea { resize: vertical; min-height: 120px; }
.form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(-45deg, transparent 50%, var(--muted) 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.5em; }
.form select option { background: var(--bg-alt); color: var(--text); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--violet); background: rgba(255, 255, 255, .07); }
.form .is-invalid { border-color: #ff7a8a; }
.form__error { color: #ff9aa6; font-size: .9rem; margin: 0; }
.form__success { text-align: center; padding: 3.5rem 2rem; grid-column: 2; }
.form__success:focus { outline: none; }
.form__success p { color: var(--muted); margin: 0; }
.form__success-icon { font-size: 2.6rem; margin-bottom: .6rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; animation: pop .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { from { transform: scale(0) rotate(-90deg); } }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 2.5rem 0; background: rgba(7, 7, 26, .8); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem; }
.footer__links { display: flex; gap: 1.6rem; color: var(--muted); font-size: .92rem; }
.footer__links a:hover { color: var(--text); }
.footer__copy { color: var(--muted); font-size: .85rem; margin: 0; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1000px) {
  .games { grid-template-columns: repeat(2, 1fr); }
  .services { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); }
  .about, .contact { grid-template-columns: 1fr; gap: 2.5rem; }
  .form__success { grid-column: auto; }
  .planet { width: 420px; right: -180px; opacity: .7; }
}
@media (max-width: 760px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: 1rem 16px 1.5rem;
    background: rgba(7, 7, 26, .97); border-bottom: 1px solid var(--border);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
  }
  .nav__links.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__links a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid var(--border); }
  .nav__links .btn { margin-top: 1rem; }
  .hero { min-height: auto; padding: 70px 0 90px; }
  .planet { width: 300px; right: -150px; top: 22%; opacity: .45; }
  .section { padding: 80px 0; }
  .games, .services, .process { grid-template-columns: 1fr; }
  .form { padding: 1.5rem; }
  .form__row { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; text-align: center; }
}

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

/* Indonesia touches */
.flag { width: 1.35em; height: .9em; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .15); display: inline-block; vertical-align: -0.08em; }
.service--wide { grid-column: 1 / -1; display: flex; gap: 1.4rem; align-items: flex-start; border-color: rgba(231, 0, 17, .3); background: linear-gradient(100deg, rgba(231, 0, 17, .08), var(--surface) 45%); }
.service--wide h3 { margin-top: .2rem; }
.service--wide p { max-width: 720px; }
.service__icon--flag { flex: none; margin: 0; background: rgba(255, 255, 255, .04); border-color: var(--border); }
.service__icon--flag .flag { width: 28px; height: 19px; }
.contact__address { margin-top: 1.6rem; font-style: normal; color: var(--muted); font-size: .95rem; line-height: 1.7; }
.footer__meta { text-align: right; }
.footer__made { margin: 0 0 .2rem; font-size: .92rem; display: inline-flex; align-items: center; gap: .4em; }
.heart { color: #ff5a7a; }
@media (max-width: 760px) {
  .service--wide { flex-direction: column; }
  .footer__meta { text-align: center; }
}
.service__icon--flag svg { stroke: none; }
.eyebrow--hero { padding: .45em 1em .45em .75em; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.eyebrow--hero .flag { width: 1.6em; height: 1.05em; }
.eyebrow__sep { color: var(--muted); }
.eyebrow--hero { white-space: nowrap; }
@media (max-width: 480px) { .eyebrow__studio { display: none; } }

/* App portfolio */
.games--apps { grid-template-columns: repeat(2, 1fr); }
.art--lapakio { background: linear-gradient(150deg, #ffb070, #e2553f); }
.art--antreo { background: linear-gradient(150deg, #14b8a6, #0f4f4a); }
.art--ruangkos { background: linear-gradient(150deg, #4f46e5, #1e1b4b); }
.art--kata { background: linear-gradient(150deg, #22a05a, #134e2e); }
@media (max-width: 760px) { .games--apps { grid-template-columns: 1fr; } }

/* Legal and support pages */
.legal { padding: 64px 0 110px; }
.legal__inner { max-width: 780px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: .3em; }
.legal h2 { font-size: 1.35rem; margin: 2.4rem 0 .7rem; }
.legal h3 { font-size: 1.05rem; margin: 1.6rem 0 .5rem; }
.legal p, .legal li { color: var(--muted); }
.legal strong { color: var(--text); font-weight: 600; }
.legal ul, .legal ol { padding-left: 1.3rem; margin: 0 0 1.2rem; }
.legal li { margin-bottom: .45rem; }
.legal a:not(.btn) { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.legal__meta { font-size: .9rem; margin-bottom: 1.8rem; }
.lang-switch { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 2.2rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.lang-switch button { border: 0; background: transparent; color: var(--muted); font: 500 .88rem var(--font-body); padding: .45em 1.1em; border-radius: 999px; cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
mark.todo { background: #ffd36e; color: #07071a; padding: 0 .3em; border-radius: 3px; }
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.notfound__code { font: 700 clamp(4rem, 14vw, 8rem) var(--font-head); line-height: 1; margin-bottom: .2em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound__id { font-size: .95rem; }
.footer__legal { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; padding-top: 1.2rem; margin-top: .4rem; border-top: 1px solid var(--border); font-size: .85rem; color: var(--muted); }
.footer__legal a:hover { color: var(--text); }
@media (max-width: 760px) { .footer__legal { justify-content: center; } }
