/* ==========================================================
   Mangosphere — studio site
   Clean cream canvas, sticker-style cards with a warm ink
   outline and hard offset shadow, and a juicy fruit palette.
   ========================================================== */

:root {
  --cream: #fff6e6;
  --paper: #fffdf8;
  --ink: #231a12;
  --ink-soft: #5c4b3b;
  --mango: #ff9f1c;
  --mango-deep: #f2711c;
  --sun: #ffd23f;
  --leaf: #3dae5b;
  --leaf-deep: #237a3c;
  --berry: #ff5a7a;
  --sky: #7cc8ff;
  --display: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 26px;
  --shadow: 6px 6px 0 var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--body); font-size: 18px; line-height: 1.6;
  color: var(--ink);
  background: var(--cream) radial-gradient(rgba(35, 26, 18, .09) 1.2px, transparent 1.6px) 0 0 / 26px 26px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; }
::selection { background: var(--sun); color: var(--ink); }
:focus-visible { outline: 3px solid var(--mango-deep); outline-offset: 4px; border-radius: 10px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: var(--cream); padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 22px; }
section { position: relative; padding: 110px 0; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.05; margin: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
.kicker {
  display: inline-block; margin: 0 0 14px;
  font-family: var(--display); font-weight: 600; font-size: .95rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--mango-deep);
}
.sec-head { max-width: 680px; margin-bottom: 48px; }
.sec-lead { font-size: 1.2rem; color: var(--ink-soft); margin: 14px 0 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.45em;
  font-family: var(--display); font-weight: 600; font-size: 1.08rem; line-height: 1;
  color: var(--ink); text-decoration: none;
  border: 3px solid var(--ink); border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(4px); }
.btn-mango { background: var(--mango); }
.btn-sun { background: var(--sun); }
.btn-ink { background: var(--ink); color: var(--cream); box-shadow: 4px 4px 0 var(--mango); }
.btn-ink:hover { box-shadow: 6px 6px 0 var(--mango); }
.btn-ghost { background: var(--paper); }
.btn-sm { font-size: .95rem; padding: .62em 1.1em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 16px; }
.cta-row.center { justify-content: center; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px 24px;
  transition: background .25s, box-shadow .25s, padding .25s;
}
.nav.scrolled { background: rgba(255, 246, 230, .92); backdrop-filter: blur(10px); box-shadow: 0 3px 0 var(--ink); padding: 10px 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.55rem; letter-spacing: -.02em; }
.brand img { transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.brand:hover img { transform: rotate(-18deg) scale(1.1); }
.nav-links { display: flex; gap: 6px; margin-left: auto; }
.nav-links a {
  text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 1.05rem;
  padding: 8px 14px; border-radius: 999px; transition: background .15s;
}
.nav-links a:hover { background: rgba(255, 159, 28, .22); }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 130px 0 90px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; width: 100%; position: relative; z-index: 1; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px;
  padding: 7px 16px 7px 12px;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 999px; box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--display); font-weight: 600; font-size: .98rem;
}
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 0 3px rgba(61, 174, 91, .25); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(61, 174, 91, 0); } }
.hero h1 { font-size: clamp(2.9rem, 6.6vw, 5.6rem); line-height: .98; letter-spacing: -.025em; }
.hl { position: relative; white-space: nowrap; z-index: 0; }
.hl::after {
  content: ""; position: absolute; left: -.08em; right: -.08em; bottom: .04em; height: .38em; z-index: -1;
  background: var(--mango); border-radius: .2em; transform: rotate(-2deg) scaleX(0); transform-origin: left;
  animation: marker .7s .5s cubic-bezier(.3, 1.3, .5, 1) forwards;
}
@keyframes marker { to { transform: rotate(-2deg) scaleX(1); } }
.wiggle { color: var(--berry); display: inline-block; white-space: nowrap; }
.wiggle i { font-style: normal; display: inline-block; animation: bob 1.6s ease-in-out infinite; }
.wiggle i:last-child { animation-delay: -.8s; }
@keyframes bob { 50% { transform: translateY(-.1em) rotate(-8deg); } }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-soft); max-width: 32em; margin: 26px 0 34px; }
.lead a { color: var(--ink); font-weight: 700; text-decoration-color: var(--mango); text-decoration-thickness: 3px; text-underline-offset: 3px; }

.mascot-wrap { position: relative; display: grid; justify-items: center; }
.mascot {
  display: block; width: min(520px, 100%); aspect-ratio: 116 / 104;
  padding: 0; border: 0; background: none; cursor: pointer;
  animation: float 5s ease-in-out infinite;
}
.mascot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.mascot .fruit { transform-box: fill-box; transform-origin: 50% 90%; }
.mascot.boing .fruit { animation: boing .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes boing { 0% { transform: none; } 30% { transform: scale(1.1, .88); } 60% { transform: scale(.94, 1.07); } 100% { transform: none; } }
.mascot .eye { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
.mascot .eye + .eye { animation-delay: .02s; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.mascot .leaf { transform-box: fill-box; transform-origin: 0% 100%; animation: sway 3.4s ease-in-out infinite; }
@keyframes sway { 50% { transform: rotate(-9deg); } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-14px) rotate(1.5deg); } }
.mascot-shadow { width: 46%; height: 22px; margin-top: -8px; border-radius: 50%; background: rgba(35, 26, 18, .12); animation: shadow 5s ease-in-out infinite; }
@keyframes shadow { 50% { transform: scaleX(.86); opacity: .7; } }
.bubble {
  position: absolute; top: 2%; right: 4%; z-index: 2; margin: 0;
  padding: 10px 16px; max-width: 220px;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 18px 18px 18px 4px; box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--display); font-weight: 600; font-size: 1.05rem; line-height: 1.2;
  transform-origin: 0 100%; transform: scale(0) rotate(-6deg); opacity: 0;
  transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), opacity .2s;
}
.bubble.show { transform: none; opacity: 1; }

.confetti { position: absolute; inset: 0; pointer-events: none; }
.c { position: absolute; display: block; border: 3px solid var(--ink); animation: drift 9s ease-in-out infinite; }
.c1 { width: 26px; height: 26px; border-radius: 50%; background: var(--sun); left: 6%; top: 22%; }
.c2 { width: 20px; height: 20px; border-radius: 6px; background: var(--berry); left: 44%; top: 14%; animation-delay: -2s; transform: rotate(18deg); }
.c3 { width: 34px; height: 14px; border-radius: 999px; background: var(--sky); left: 3%; bottom: 16%; animation-delay: -4s; }
.c4 { width: 18px; height: 18px; border-radius: 50%; background: var(--leaf); right: 6%; top: 18%; animation-delay: -1s; }
.c5 { width: 22px; height: 22px; border-radius: 6px; background: var(--mango); right: 40%; bottom: 10%; animation-delay: -6s; }
.c6 { width: 14px; height: 14px; border-radius: 50%; background: var(--berry); right: 4%; bottom: 22%; animation-delay: -3s; }
.c7 { width: 30px; height: 12px; border-radius: 999px; background: var(--sun); left: 30%; bottom: 6%; animation-delay: -5s; transform: rotate(-20deg); }
@keyframes drift { 0%, 100% { translate: 0 0; rotate: 0deg; } 33% { translate: 10px -16px; rotate: 40deg; } 66% { translate: -8px 10px; rotate: -30deg; } }

/* ---------- Marquee band ---------- */
.band-clip { overflow: hidden; padding-block: 30px; margin-block: -30px; position: relative; z-index: 2; }
.band {
  background: var(--ink); color: var(--cream); overflow: hidden;
  border-block: 3px solid var(--ink);
  transform: rotate(-1.6deg); margin: 0 -20px; position: relative; z-index: 2;
}
.band-track { display: flex; width: max-content; animation: slide 40s linear infinite; }
.band span, .band b { font-family: var(--display); font-weight: 600; font-size: 1.45rem; padding: 16px 20px; white-space: nowrap; text-transform: uppercase; letter-spacing: .02em; }
.band b { color: var(--mango); padding-inline: 4px; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Games ---------- */
.games { padding-top: 130px; }
.game-feature {
  position: relative; display: grid; grid-template-columns: 1fr 1.05fr; align-items: center; gap: 20px;
  padding: 46px 20px 46px 50px; overflow: hidden;
  text-decoration: none; color: #f4eedb;
  background: radial-gradient(ellipse 70% 90% at 75% 55%, #3a4a31 0%, #25301f 55%, #1a2016 100%);
  border: 4px solid var(--ink); border-radius: calc(var(--radius) + 6px);
  box-shadow: 10px 10px 0 var(--ink);
  transition: transform .25s ease, box-shadow .25s ease;
  transform-style: preserve-3d;
}
.game-feature:hover { box-shadow: 14px 14px 0 var(--ink); }
.game-feature::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 30% 18% at 72% 78%, transparent 88%, rgba(0, 0, 0, .12) 89% 92%, transparent 93%);
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 10px;
  background: var(--sun); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 999px;
  font-family: var(--display); font-weight: 600; font-size: .92rem;
}
.gf-title {
  margin: 18px 0 6px;
  font-family: 'Lilita One', var(--display); font-weight: 400; letter-spacing: .005em;
  font-size: clamp(3rem, 6.4vw, 5.4rem); line-height: .95; color: #f6cf4c;
  text-shadow:
    -.04em -.04em 0 #141414, .04em -.04em 0 #141414, -.04em .04em 0 #141414, .04em .04em 0 #141414,
    0 -.055em 0 #141414, 0 .055em 0 #141414, -.055em 0 0 #141414, .055em 0 0 #141414, 0 .1em 0 #141414;
}
.gf-tag { font-family: 'Lilita One', var(--display); font-size: 1.45rem; line-height: 1.2; margin: 0 0 12px; }
.gf-body { color: #bfc3b0; margin: 0 0 20px; max-width: 30em; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 26px; }
.tags li { padding: 4px 12px; border: 2px solid rgba(244, 238, 219, .35); border-radius: 999px; font-size: .92rem; font-weight: 500; }
.gf-go {
  display: inline-flex; align-items: center; gap: 10px;
  padding: .75em 1.3em;
  background: #e9c064; color: #2a2410;
  border: 4px solid #141414; border-radius: 12px; box-shadow: 0 5px 0 #141414;
  font-family: 'Lilita One', var(--display); font-size: 1.2rem; letter-spacing: .02em;
  transition: transform .15s;
}
.gf-go .arrow { transition: transform .2s; }
.game-feature:hover .gf-go { transform: translateY(-2px); }
.game-feature:hover .gf-go .arrow { transform: translateX(5px); }
.gf-art { position: relative; transform: translateZ(40px); }
.gf-robot { display: block; width: 100%; height: auto; filter: drop-shadow(0 24px 24px rgba(0, 0, 0, .35)); transition: transform .4s cubic-bezier(.3, 1.4, .5, 1); }
.game-feature:hover .gf-robot { transform: scale(1.04) rotate(-1deg); }
.gf-alien { position: absolute; height: auto; filter: drop-shadow(0 8px 6px rgba(0, 0, 0, .35)); animation: alien-bob 2.8s ease-in-out infinite; }
.gf-alien.a1 { width: 19%; left: -2%; top: -4%; }
.gf-alien.a2 { width: 14%; right: 4%; top: -10%; animation-delay: -1.3s; }
@keyframes alien-bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-12px) rotate(4deg); } }

/* ---------- Studio ---------- */
.studio { background: var(--paper); border-block: 3px solid var(--ink); }
.studio-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 56px; align-items: center; }
.studio-copy p { font-size: 1.15rem; color: var(--ink-soft); margin: 18px 0 0; }
.studio-copy h2 { margin-bottom: 8px; }
.story-link { margin-top: 28px; }
.values { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.value {
  padding: 26px 24px 24px;
  border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.value:hover { transform: translate(-3px, -3px) rotate(-1deg); box-shadow: 9px 9px 0 var(--ink); }
.value h3 { font-size: 1.45rem; margin: 16px 0 6px; }
.value p { margin: 0; font-size: 1rem; }
.v-icon {
  width: 56px; height: 56px; display: grid; place-items: center;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 3px 3px 0 var(--ink);
}
.v-icon svg { width: 32px; height: 32px; fill: currentColor; }
.v-mango { background: #ffd79a; } .v-mango .v-icon { color: var(--mango-deep); }
.v-leaf { background: #c9efd2; } .v-leaf .v-icon { color: var(--leaf-deep); }
.v-berry { background: #ffd0da; } .v-berry .v-icon { color: #e0335a; }
.v-sky { background: #d2ecff; } .v-sky .v-icon { color: #2a86cf; }
.value:nth-child(3) { grid-column: 1 / -1; }

/* ---------- Contact ---------- */
.contact-card {
  position: relative; overflow: hidden; text-align: center;
  padding: 80px 30px 84px;
  background: var(--mango) radial-gradient(rgba(255, 255, 255, .22) 1.6px, transparent 2px) 0 0 / 22px 22px;
  color: var(--ink);
  border: 4px solid var(--ink); border-radius: calc(var(--radius) + 8px); box-shadow: 10px 10px 0 var(--ink);
}
.contact-card .kicker { color: var(--ink); opacity: .75; }
.contact-card h2 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
.contact-card > p:not(.kicker) { font-size: 1.2rem; max-width: 34em; margin: 16px auto 30px; }
.contact-mango { position: absolute; width: 150px; opacity: .95; pointer-events: none; }
.contact-mango.m1 { left: -30px; bottom: -34px; transform: rotate(18deg); }
.contact-mango.m2 { right: -24px; top: -30px; width: 120px; transform: rotate(-24deg); }

/* ---------- Footer ---------- */
.foot { padding: 50px 0 60px; }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot-links a { text-decoration: none; font-family: var(--display); font-weight: 600; }
.foot-links a:hover { color: var(--mango-deep); }
.foot-small { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; translate: 0 30px; transition: opacity .6s ease, translate .7s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.in { opacity: 1; translate: 0 0; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; text-align: left; }
  .mascot-wrap { max-width: 420px; margin: 0 auto; }
  .game-feature { grid-template-columns: 1fr; padding: 34px 26px 26px; }
  .game-feature::before { display: none; }
  .gf-art { order: -1; max-width: 560px; }
  .studio-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 720px) {
  body { font-size: 17px; }
  section { padding: 84px 0; }
  .nav { gap: 12px; padding: 12px 16px; }
  .nav.scrolled { padding: 10px 16px; }
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
  .brand { font-size: 1.3rem; }
  .brand img { width: 34px; height: 34px; }
  .values { grid-template-columns: 1fr; }
  .contact-card { padding: 60px 22px 64px; }
  .contact-mango { width: 96px; }
  .contact-mango.m2 { width: 80px; }
  .band span, .band b { font-size: 1.15rem; padding: 12px 14px; }
}
@media (max-width: 440px) {
  .nav .btn { font-size: .85rem; padding: .55em .8em; }
  .brand span { display: none; }
  .cta-row .btn { width: 100%; }
}

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