/*
  styles.css — simple, editable styles for Mad Moth Studio
  Colors and sections are commented so a beginner can change them easily.
*/
:root{
  --bg: #1a1033; /* deep purple background */
  --panel: #211235;
  --muted: #b8aee0;
  --accent: #ff8c42; /* warm orange/gold */
  --accent-2: #ffd07a;
  --glass: rgba(255,255,255,0.04);
  --white: #efeef6;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: radial-gradient(1200px 600px at 10% 10%, rgba(123,74,255,0.08), transparent), var(--bg);
  color:var(--white);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  scroll-behavior:smooth;
}

.container{max-width:1100px;margin:0 auto;padding:0 20px}
.center{text-align:center}

/* HERO */
.site-hero{
  min-height:72vh;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  padding:60px 0 40px;
}
.hero-inner{z-index:2;text-align:center}
.logo-wrap{width:240px;margin:0 auto 18px;filter:drop-shadow(0 10px 30px rgba(0,0,0,0.6));}
.logo{width:100%;height:auto;display:block}
.studio-name{letter-spacing:6px;margin:0;font-weight:700;font-size:26px}
.tagline{color:var(--muted);margin:12px 0 20px;max-width:720px;margin-left:auto;margin-right:auto}

.cta-row{display:flex;gap:12px;justify-content:center}
.btn{padding:10px 16px;border-radius:8px;text-decoration:none;display:inline-block;font-weight:600}
.btn.ghost{background:transparent;border:1px solid rgba(255,255,255,0.06);color:var(--muted)}
.btn.primary{background:linear-gradient(90deg,var(--accent),#ff5b1f);color:#14060a}
.btn:hover{transform:translateY(-3px);transition:all .2s ease}

.hero-decor{position:absolute;inset:0;z-index:1;pointer-events:none;background:radial-gradient(circle at 50% 20%, rgba(255,140,66,0.06), transparent 10%), linear-gradient(180deg, rgba(20,6,10,0.06), transparent 30%)}

/* Flame animation — target flame path and glow */
.flame{transform-origin:50% 30%; animation: flame-flicker 2s infinite ease-in-out}
.flame-glow{mix-blend-mode:screen; animation: glow-pulse 2.8s infinite ease-in-out}
@keyframes flame-flicker{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-2px) scale(1.02)}}
@keyframes glow-pulse{0%{opacity:0.75}50%{opacity:0.95}100%{opacity:0.75}}

/* SECTIONS */
.section{padding:60px 0}
.about .container p{max-width:820px;color:var(--muted);line-height:1.6}

.games .muted{color:var(--muted);margin-top:6px}
.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:20px}
.card{background:linear-gradient(180deg, rgba(255,255,255,0.02), transparent);border-radius:12px;padding:16px;box-shadow:0 6px 18px rgba(0,0,0,0.45);transition:transform .18s ease, box-shadow .18s ease}
.card:hover{transform:translateY(-6px);box-shadow:0 18px 38px rgba(0,0,0,0.6)}
.card-art{height:110px;border-radius:8px;margin-bottom:12px}
.card h3{margin:0 0 6px}
.muted{color:var(--muted)}

.social{padding-bottom:80px}
.social-links{display:flex;gap:16px;justify-content:center;margin-top:12px}
.social-link{width:44px;height:44px;border-radius:10px;background:var(--glass);display:inline-flex;align-items:center;justify-content:center;color:var(--accent);border:1px solid rgba(255,255,255,0.03);transition:transform .12s ease, background .12s ease}
.social-link:hover{transform:translateY(-4px);background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01))}

/* FOOTER */
.site-footer{border-top:1px solid rgba(255,255,255,0.03);padding:18px 0;background:transparent}
.footer-inner{display:flex;align-items:center;justify-content:space-between;gap:20px}
.footer-nav a{color:var(--muted);text-decoration:none;margin-left:12px}

/* Responsive */
@media (max-width:900px){
  .grid{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:640px){
  .logo-wrap{width:160px}
  .studio-name{font-size:18px;letter-spacing:4px}
  .grid{grid-template-columns:1fr}
  .footer-inner{flex-direction:column;align-items:center}
}

/* Utility */
.hidden{display:none}

/* Editable color guide: change --bg and --accent at top to update theme */

/* ---------- Illustration & Animation (moth + flame) ---------- */
/* Target inline SVG elements; use transform-box so transforms work as expected */
.illustration { overflow: visible }
.illustration-root{ will-change: transform, opacity; transform-box: fill-box; transform-origin: 50% 50%; animation: illustration-entrance 720ms cubic-bezier(.2,.9,.25,1) both }

/* Flame layers: outer (soft), inner (core), tip (hot center) */
.flame-glow{ filter: blur(6px); opacity:0.9 }
.flame-outer, .flame-inner, .flame-tip{ transform-box: fill-box; transform-origin: 50% 60%; will-change: transform, opacity }
.flame-outer{ animation: flame-outer 2800ms infinite ease-in-out }
.flame-inner{ animation: flame-inner 2000ms infinite ease-in-out }
.flame-tip{ animation: flame-tip 1400ms infinite ease-in-out }

@keyframes flame-outer{
  0%{transform: translateY(0) scale(1) skewX(0deg); opacity:0.92}
  35%{transform: translateY(-2px) scale(1.02) skewX(-1deg); opacity:0.98}
  70%{transform: translateY(1px) scale(0.995) skewX(1deg); opacity:0.9}
  100%{transform: translateY(0) scale(1) skewX(0deg); opacity:0.92}
}
@keyframes flame-inner{
  0%{transform: translateY(0) scale(1)}
  40%{transform: translateY(-3px) scale(1.04)}
  80%{transform: translateY(1px) scale(0.99)}
  100%{transform: translateY(0) scale(1)}
}
@keyframes flame-tip{
  0%{transform: translateY(0) scale(1); opacity:0.98}
  50%{transform: translateY(-4px) scale(1.08); opacity:1}
  100%{transform: translateY(0) scale(1); opacity:0.98}
}

/* wing flutter: small rotation around wing root */
.wing{ transform-box: fill-box; transform-origin: 20% 40%; will-change: transform }
.wing-left{ animation: wing-left 3300ms ease-in-out infinite }
.wing-right{ animation: wing-right 3300ms ease-in-out infinite 140ms }
@keyframes wing-left{
  0%{transform: rotate(-6deg)}
  50%{transform: rotate(-12deg)}
  100%{transform: rotate(-6deg)}
}
@keyframes wing-right{
  0%{transform: rotate(6deg)}
  50%{transform: rotate(12deg)}
  100%{transform: rotate(6deg)}
}

/* body bobbing */
.body{ transform-box: fill-box; transform-origin: 50% 50%; animation: body-bob 3600ms ease-in-out infinite; will-change: transform }
@keyframes body-bob{
  0%{transform: translateY(0)}
  40%{transform: translateY(-4px)}
  80%{transform: translateY(1px)}
  100%{transform: translateY(0)}
}

/* subtle bloom pulse behind flame */
.bloom{ transform-box: fill-box; transform-origin: 50% 50%; animation: bloom-pulse 3000ms ease-in-out infinite; will-change: transform, opacity }
@keyframes bloom-pulse{
  0%{transform: scale(0.98); opacity:0.75}
  50%{transform: scale(1.06); opacity:0.95}
  100%{transform: scale(0.98); opacity:0.75}
}

/* entrance */
@keyframes illustration-entrance{ from{opacity:0; transform: translateY(6px) scale(.985)} to{opacity:1; transform: translateY(0) scale(1)} }

/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .illustration-root, .flame-outer, .flame-inner, .flame-tip, .wing-left, .wing-right, .body, .bloom{ animation: none !important; }
}

