:root {
  --bg: #120c0a;
  --bg-2: #1c1310;
  --card: #211613;
  --line: #3a2620;
  --text: #f6e9df;
  --dim: #b59a8b;
  --ember: #ff5a1f;
  --amber: #ffb02e;
  --cream: #fff1c9;
  --sage: #8fd694;
  --px: "Silkscreen", ui-monospace, monospace;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(255, 90, 31, 0.16), transparent 70%),
    linear-gradient(var(--bg), var(--bg));
  background-attachment: fixed;
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  /* Faint pixel grid */
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: -1;
}

a { color: inherit; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.dim { color: var(--dim); }

/* Nav */
.nav { display: flex; align-items: center; justify-content: space-between; padding: 24px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 20px var(--px); letter-spacing: 1px; }
.brand img { image-rendering: pixelated; }
.nav nav { display: flex; gap: 24px; }
.nav nav a { font: 400 14px var(--px); text-decoration: none; color: var(--dim); transition: color .2s; }
.nav nav a:hover { color: var(--amber); }

/* Hero */
.hero { position: relative; padding: 72px 0 40px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: center; }
.hero > :not(.phone) { grid-column: 1; }
.cta { display: flex; flex-wrap: wrap; gap: 16px; }
.eyebrow { font: 400 13px var(--px); color: var(--amber); letter-spacing: 2px; text-transform: uppercase; }
h1 { font: 700 clamp(38px, 6.4vw, 72px)/1.05 var(--px); margin: 16px 0 20px; letter-spacing: -1px; }
.glow {
  background: linear-gradient(180deg, var(--cream) 0%, var(--amber) 45%, var(--ember) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 24px rgba(255, 90, 31, 0.45));
}
.lead { max-width: 52ch; color: var(--dim); font-size: 19px; }
.cta { margin-top: 32px; }
.btn {
  display: inline-block; font: 700 14px var(--px); text-decoration: none; padding: 14px 22px;
  border: 2px solid var(--text); box-shadow: 4px 4px 0 var(--text); transition: transform .1s, box-shadow .1s;
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--text); }
.btn-hot { background: var(--ember); color: var(--bg); border-color: var(--cream); box-shadow: 4px 4px 0 var(--amber); }
.btn-hot:hover { box-shadow: 2px 2px 0 var(--amber); }

/* Phone with a pixel kiln on screen */
.phone {
  grid-column: 2; grid-row: 1 / span 4; justify-self: center; position: relative;
  width: 230px; height: 440px; padding: 14px; border-radius: 36px;
  background: #2a1d18; border: 3px solid #4a3128;
  box-shadow: 0 0 80px rgba(255, 90, 31, 0.28), inset 0 0 0 2px #120c0a;
}
.phone::before { content: ""; position: absolute; top: 22px; left: 50%; width: 64px; height: 8px; margin-left: -32px; border-radius: 8px; background: #120c0a; z-index: 2; }
.screen {
  position: relative; height: 100%; border-radius: 24px; overflow: hidden;
  background: radial-gradient(ellipse 90% 60% at 50% 100%, rgba(255, 90, 31, .35), transparent 70%), #160f0c;
}
.icons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 48px 22px 0; }
.icons span { aspect-ratio: 1; border-radius: 12px; background: #2e201a; border: 2px solid #3a2620; }
.icons span:nth-child(1) { background: var(--ember); border-color: var(--amber); }
.icons span:nth-child(5) { background: var(--sage); border-color: #b9ecbc; }
.mini-kiln { position: absolute; left: 50%; bottom: 18px; width: 160px; height: 200px; margin-left: -80px; transform: scale(.85); transform-origin: bottom center; }
.bricks {
  position: absolute; bottom: 0; left: 0; right: 0; height: 90px;
  background:
    linear-gradient(#160f0c 0 0) center 20px / 72px 52px no-repeat,
    repeating-linear-gradient(0deg, #6b2e1d 0 14px, #3a1a12 14px 18px),
    #6b2e1d;
  border: 4px solid #3a1a12;
  box-shadow: 0 0 40px rgba(255, 90, 31, 0.35), inset 0 -6px 0 rgba(0, 0, 0, .25);
}
.flame { position: absolute; z-index: 1; left: 50%; bottom: 22px; transform-origin: bottom center; animation: flicker 1.4s steps(3) infinite; }
.f1 { width: 66px; height: 130px; margin-left: -33px; background: var(--ember);
  clip-path: polygon(50% 0, 62% 20%, 75% 14%, 80% 40%, 100% 55%, 100% 100%, 0 100%, 0 60%, 18% 42%, 25% 18%, 38% 28%); }
.f2 { width: 46px; height: 92px; margin-left: -23px; background: var(--amber); animation-delay: -.4s;
  clip-path: polygon(50% 0, 66% 26%, 82% 30%, 100% 60%, 100% 100%, 0 100%, 0 62%, 20% 34%, 36% 30%); }
.f3 { width: 24px; height: 48px; margin-left: -12px; background: var(--cream); animation-delay: -.8s;
  clip-path: polygon(50% 0, 72% 34%, 100% 60%, 100% 100%, 0 100%, 0 60%, 28% 34%); }
@keyframes flicker {
  0%, 100% { transform: scale(1, 1); }
  33% { transform: scale(1.04, .94); }
  66% { transform: scale(.96, 1.06); }
}

/* Embers */
.embers { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: -1; }
.embers i {
  position: absolute; bottom: -10px; width: 4px; height: 4px; background: var(--amber);
  box-shadow: 0 0 8px var(--ember); opacity: 0; animation: rise 9s linear infinite;
}
.embers i:nth-child(1)  { left: 6%;  animation-delay: 0s; }
.embers i:nth-child(2)  { left: 14%; animation-delay: 3.2s; animation-duration: 11s; }
.embers i:nth-child(3)  { left: 23%; animation-delay: 6s; }
.embers i:nth-child(4)  { left: 31%; animation-delay: 1.5s; animation-duration: 12s; }
.embers i:nth-child(5)  { left: 42%; animation-delay: 4.4s; }
.embers i:nth-child(6)  { left: 51%; animation-delay: 7.7s; animation-duration: 10s; }
.embers i:nth-child(7)  { left: 60%; animation-delay: 2.1s; }
.embers i:nth-child(8)  { left: 68%; animation-delay: 5.3s; animation-duration: 13s; }
.embers i:nth-child(9)  { left: 77%; animation-delay: .8s; }
.embers i:nth-child(10) { left: 85%; animation-delay: 3.9s; animation-duration: 11s; }
.embers i:nth-child(11) { left: 92%; animation-delay: 6.6s; }
.embers i:nth-child(12) { left: 97%; animation-delay: 8.4s; animation-duration: 12s; }
@keyframes rise {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: .9; }
  50% { transform: translate(16px, -50vh); }
  100% { transform: translate(-12px, -105vh); opacity: 0; }
}

/* Sections */
section { padding: 72px 0; }
.section-head { margin-bottom: 36px; }
h2 { font: 700 clamp(26px, 4vw, 38px)/1.1 var(--px); margin-bottom: 10px; }
.section-head p { color: var(--dim); }

/* Apps: cleaner, product-style cards */
.apps h2 { font: 700 clamp(30px, 4.4vw, 44px)/1.1 var(--sans); letter-spacing: -1px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.app-card {
  display: flex; gap: 20px; align-items: flex-start; padding: 24px; border-radius: 20px;
  background: linear-gradient(160deg, #241814, #1a110e); border: 1px solid var(--line);
  transition: transform .2s, border-color .2s;
}
.app-card:hover { transform: translateY(-3px); border-color: #5a3a2e; }
.app-card h3 { font: 700 20px var(--sans); margin: 8px 0 6px; }
.app-card p { color: var(--dim); font-size: 15px; }
.app-icon {
  flex: none; width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--amber), var(--ember)); color: var(--bg); font: 700 28px var(--sans);
  box-shadow: 0 8px 24px rgba(255, 90, 31, .3);
}
.app-ghost .app-icon { background: var(--bg-2); color: var(--line); border: 2px dashed var(--line); box-shadow: none; }
.pill { display: inline-block; font: 500 12px var(--sans); padding: 3px 10px; border-radius: 99px; background: rgba(255, 176, 46, .1); color: var(--amber); }

/* Game cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; }
.card {
  background: var(--card); border: 2px solid var(--line); display: flex; flex-direction: column;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); border-color: var(--ember); box-shadow: 6px 6px 0 rgba(255, 90, 31, .35); }
.card-ghost { opacity: .7; border-style: dashed; }
.card-ghost:hover { border-color: var(--line); box-shadow: none; }
.card-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
h3 { font: 700 22px var(--px); }
.card p { color: var(--dim); font-size: 15px; }
.meta { font: 400 12px var(--px); letter-spacing: 1px; color: var(--text) !important; }
.chip { align-self: flex-start; font: 400 11px var(--px); letter-spacing: 1px; text-transform: uppercase; padding: 4px 8px; border: 1px solid var(--line); color: var(--dim); }
.chip-warm { border-color: var(--ember); color: var(--amber); }
.links { margin-top: auto; display: flex; gap: 16px; padding-top: 8px; }
.links a { font: 400 13px var(--px); color: var(--amber); text-decoration: none; }
.links a:hover { text-decoration: underline; }

.art { height: 180px; position: relative; background: var(--bg-2); border-bottom: 2px solid var(--line); overflow: hidden; }
.art-sprig { background: linear-gradient(#2a3a2c, #1a221c); }
.art-sprig .pot { position: absolute; left: 50%; bottom: 24px; width: 64px; height: 44px; margin-left: -32px; background: var(--ember);
  clip-path: polygon(0 0, 100% 0, 88% 100%, 12% 100%); box-shadow: inset 0 8px 0 #c43f10; }
.art-sprig .stem { position: absolute; left: 50%; bottom: 68px; width: 6px; height: 40px; margin-left: -3px; background: var(--sage); }
.art-sprig .leaf { position: absolute; bottom: 92px; width: 28px; height: 16px; background: var(--sage); animation: sway 3s steps(4) infinite; }
.art-sprig .l1 { left: calc(50% - 30px); border-radius: 16px 0; transform-origin: right center; }
.art-sprig .l2 { left: calc(50% + 2px); bottom: 100px; border-radius: 0 16px; transform-origin: left center; animation-delay: -1.5s; }
@keyframes sway { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-8deg); } }
.art-ghost { display: grid; place-items: center; }
.art-ghost span { font: 700 64px var(--px); color: var(--line); }

/* Studio */
.studio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.studio p { color: var(--dim); max-width: 48ch; }
.values { list-style: none; display: grid; gap: 14px; }
.values li { border: 2px solid var(--line); padding: 16px 18px; color: var(--dim); display: grid; grid-template-columns: auto 1fr; column-gap: 16px; }
.values b { font: 700 22px var(--px); color: var(--ember); grid-row: span 2; }
.values span { font: 700 15px var(--px); color: var(--text); }

/* Footer */
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 32px 0 48px; border-top: 2px solid var(--line); font: 400 12px var(--px); }

/* Game card art: app icon */
.art-brawl { display: grid; place-items: center; background: linear-gradient(#3a2440, #1e1422); }
.art-brawl img { border-radius: 28px; box-shadow: 0 8px 32px rgba(255, 111, 163, .35); }
.card h3 a { text-decoration: none; }

/* Product + document pages */
.product, .doc { padding: 32px 0 64px; }
.product-hero { display: flex; gap: 32px; align-items: center; padding: 32px 0; }
.product-icon { flex: none; border-radius: 28px; box-shadow: 0 10px 40px rgba(255, 90, 31, .3); }
.product h1 { margin: 12px 0 14px; }
.features { padding: 24px 0; }
.features .values { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.doc-links { display: flex; flex-wrap: wrap; gap: 16px; }
.doc { max-width: 760px; }
.doc h1 { font-size: clamp(34px, 5vw, 52px); margin: 10px 0 16px; }
.doc h2 { font-size: clamp(20px, 3vw, 26px); margin: 36px 0 10px; }
.doc h3 { font: 700 18px var(--sans); margin: 22px 0 6px; }
.doc p { color: var(--dim); margin-bottom: 12px; max-width: 68ch; }
.doc p b { color: var(--text); }
.doc a { color: var(--amber); }

/* Error pages */
.error { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 16px; }
.error .code { font: 700 96px/1 var(--px); color: var(--ember); text-shadow: 6px 6px 0 var(--line); }
.error h1 { margin: 0; }
.error .btn { margin-top: 16px; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .phone { grid-column: 1; grid-row: auto; margin-top: 24px; transform: scale(.85); }
  .studio-grid { grid-template-columns: 1fr; gap: 28px; }
  .product-hero { flex-direction: column; align-items: flex-start; gap: 20px; }
  section { padding: 48px 0; }
}

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