:root {
  --blue: #0A6CFF;
  --blue-dark: #0030CC;
  --blue-deep: #071A52;
  --yellow: #FFD23F;
  --pink: #FF6FB5;
  --green: #3DDC97;
  --cream: #FFF7E8;
  --ink: #14193A;
  --muted: #59608A;
  --white: #fff;
  --radius: 28px;
  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
  --pad-x: max(var(--gutter), calc((100% - var(--wrap)) / 2));
  --shadow: 0 6px 0 rgba(20, 25, 58, .12);
  --font-head: "Fredoka", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.05; margin: 0; }
a { color: inherit; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--yellow); padding: 8px 16px; border-radius: 99px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 600; font-size: 1.1rem;
  text-decoration: none; padding: 14px 28px; border-radius: 99px;
  border: 3px solid var(--ink); background: var(--white); color: var(--ink);
  box-shadow: 0 5px 0 var(--ink);
  transition: transform .15s, box-shadow .15s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-3px) rotate(-1.5deg); box-shadow: 0 8px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.btn--yellow { background: var(--yellow); }
.btn--ghost { background: transparent; color: var(--white); border-color: var(--white); box-shadow: 0 5px 0 rgba(0,0,0,.25); }
.btn--big { font-size: clamp(1rem, 3.4vw, 1.5rem); padding: 18px 34px; word-break: break-all; }
.btn--play { background: var(--ink); color: var(--white); border-color: var(--ink); box-shadow: 0 5px 0 rgba(0,0,0,.25); }
.btn--play svg { width: 22px; height: 22px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 12px var(--pad-x);
  background: rgba(255, 247, 232, .9);
  backdrop-filter: blur(10px);
  transition: box-shadow .2s;
}
.nav.is-scrolled { box-shadow: 0 2px 0 rgba(20,25,58,.08); }
.nav__logo img { height: 52px; width: auto; transition: transform .3s; }
.nav__logo:hover img { transform: rotate(-4deg) scale(1.05); }
.nav__links { display: flex; gap: 6px; margin-left: auto; }
.nav__links a {
  font-family: var(--font-head); font-weight: 600; text-decoration: none;
  padding: 8px 16px; border-radius: 99px; transition: background .2s;
}
.nav__links a:hover { background: var(--yellow); }
.lang {
  font-family: var(--font-head); font-weight: 700; font-size: .95rem;
  width: 48px; height: 48px; border-radius: 50%;
  border: 3px solid var(--ink); background: var(--white); cursor: pointer;
  transition: transform .2s;
}
.lang:hover { transform: rotate(12deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 32px;
  padding: clamp(48px, 8vw, 96px) var(--pad-x) clamp(110px, 12vw, 160px);
  background: radial-gradient(circle at 80% 20%, #3D9BFF 0, var(--blue) 40%, var(--blue-dark) 100%);
  color: var(--white);
  overflow: hidden;
}
.hero__kicker {
  display: inline-block; margin: 0 0 16px;
  font-family: var(--font-head); font-weight: 600; font-size: .95rem; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(255,255,255,.16); padding: 6px 14px; border-radius: 99px;
}
.hero h1 { font-size: clamp(2.6rem, 6.5vw, 5.2rem); font-weight: 700; }
.wobble { display: inline-block; color: var(--yellow); animation: wobble 3s ease-in-out infinite; }
.hero__lead { font-size: clamp(1.05rem, 1.8vw, 1.3rem); max-width: 34ch; margin: 20px 0 32px; opacity: .95; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 16px; }

.hero__art { position: relative; aspect-ratio: 1; max-width: 560px; width: 100%; justify-self: center; }
.mascot { position: absolute; inset: 14%; animation: bob 4s ease-in-out infinite; filter: drop-shadow(0 18px 0 rgba(0,0,0,.18)); }
.mascot__svg { width: 100%; height: 100%; overflow: visible; }
#pupil { transition: transform .12s ease-out; }
.mascot.blink #pupil { transform-box: fill-box; }
.float-icons { position: absolute; inset: 0; }
.float-icon {
  position: absolute; width: 22%; aspect-ratio: 1;
  border-radius: 24%; overflow: hidden;
  border: 4px solid var(--white);
  box-shadow: 0 8px 0 rgba(0,0,0,.2);
  animation: float 5s ease-in-out infinite;
  transition: transform .3s;
}
.float-icon img { width: 100%; height: 100%; object-fit: cover; }

.wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: clamp(50px, 8vw, 110px); }
.wave path { fill: var(--cream); }

/* ---------- Stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: -20px auto 0; padding: 0 var(--gutter); position: relative; z-index: 2;
}
.stat {
  background: var(--white); border: 3px solid var(--ink); border-radius: var(--radius);
  box-shadow: 0 6px 0 var(--ink); padding: 22px; text-align: center;
}
.stat:nth-child(1) { transform: rotate(-1.5deg); }
.stat:nth-child(3) { transform: rotate(1.5deg); }
.stat strong, .stat__suffix { font-family: var(--font-head); font-size: clamp(2.2rem, 5vw, 3.4rem); color: var(--blue); line-height: 1; }
.stat p { margin: 6px 0 0; font-weight: 700; color: var(--muted); }

/* ---------- Sections ---------- */
.section-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem); text-align: center; margin-bottom: 32px;
}
.featured, .games { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(56px, 8vw, 96px) var(--gutter) 0; }

/* Featured */
.featured__card {
  --c: var(--pink);
  position: relative; display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px; align-items: center;
  background: var(--c); border-radius: 40px; padding: clamp(24px, 5vw, 56px);
  color: var(--white); overflow: hidden; min-height: 460px;
  transition: background .5s;
}
.featured__card::before {
  content: ""; position: absolute; width: 520px; height: 520px; right: -140px; top: -160px;
  background: rgba(255,255,255,.14); border-radius: 50%;
}
.featured__info { position: relative; z-index: 1; }
.featured__icon { width: 96px; height: 96px; border-radius: 24px; border: 4px solid var(--white); box-shadow: 0 6px 0 rgba(0,0,0,.2); margin-bottom: 18px; }
.featured__info h3 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
.featured__info p { font-size: 1.15rem; max-width: 40ch; }
.featured__meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 26px; }
.pill { background: rgba(255,255,255,.22); border-radius: 99px; padding: 4px 14px; font-weight: 800; font-size: .95rem; }
.featured__phones { position: relative; z-index: 1; display: flex; justify-content: center; gap: 16px; }
.phone {
  width: 42%; max-width: 220px; aspect-ratio: 9/16; border-radius: 26px; overflow: hidden;
  border: 6px solid var(--ink); background: var(--ink); box-shadow: 0 10px 0 rgba(0,0,0,.2);
}
.phone:nth-child(1) { transform: rotate(-6deg) translateY(16px); }
.phone:nth-child(2) { transform: rotate(5deg) translateY(-12px); }
.phone img { width: 100%; height: 100%; object-fit: cover; }
.featured__dots { position: absolute; z-index: 2; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 10px; }
.featured__dots button {
  width: 14px; height: 14px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: rgba(255,255,255,.45); transition: transform .2s, background .2s;
}
.featured__dots button[aria-current="true"] { background: var(--white); transform: scale(1.35); }
.featured__swap { animation: pop .5s cubic-bezier(.3,1.6,.5,1); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 36px; }
.chip {
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  padding: 10px 20px; border-radius: 99px; cursor: pointer;
  border: 3px solid var(--ink); background: var(--white); color: var(--ink);
  transition: transform .15s, background .2s;
}
.chip:hover { transform: translateY(-2px); }
.chip[aria-selected="true"] { background: var(--ink); color: var(--white); }

/* Grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px; }
.card {
  --c: var(--blue);
  position: relative; display: flex; flex-direction: column;
  background: var(--white); border: 3px solid var(--ink); border-radius: var(--radius);
  box-shadow: 0 7px 0 var(--ink); overflow: hidden; cursor: pointer;
  transition: transform .25s cubic-bezier(.3,1.6,.5,1), box-shadow .25s;
  text-align: left; padding: 0; font: inherit; color: inherit;
}
.card:hover, .card:focus-visible { transform: translateY(-6px) rotate(var(--tilt, -1.5deg)); box-shadow: 0 13px 0 var(--ink); }
.card:nth-child(even) { --tilt: 1.5deg; }
.card__top {
  position: relative; height: 170px; background: var(--c);
  display: grid; place-items: center; overflow: hidden;
}
.card__top::before, .card__top::after {
  content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.18);
}
.card__top::before { width: 200px; height: 200px; left: -60px; bottom: -110px; }
.card__top::after { width: 120px; height: 120px; right: -30px; top: -40px; }
.card__icon {
  position: relative; z-index: 1; width: 116px; height: 116px; border-radius: 28px;
  border: 4px solid var(--white); box-shadow: 0 6px 0 rgba(0,0,0,.18);
  transition: transform .35s cubic-bezier(.3,1.6,.5,1);
}
.card:hover .card__icon { transform: scale(1.1) rotate(-6deg); }
.card__body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__body h3 { font-size: 1.45rem; }
.card__tags { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; font-weight: 800; }
.tag { background: var(--cream); border-radius: 99px; padding: 2px 12px; color: var(--muted); }
.tag--cat { background: color-mix(in srgb, var(--c) 18%, white); color: var(--ink); }
.card__desc { color: var(--muted); font-size: 1rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__more { margin-top: auto; font-family: var(--font-head); font-weight: 600; color: var(--blue); }
.card.is-hidden { display: none; }
.card.is-in { animation: pop .45s cubic-bezier(.3,1.6,.5,1) both; }

/* Marquee */
.marquee { margin-top: clamp(64px, 9vw, 110px); background: var(--yellow); border-block: 3px solid var(--ink); padding: 18px 0; overflow: hidden; transform: rotate(-2deg) scale(1.04); }
.marquee__track { display: flex; gap: 22px; width: max-content; animation: marquee 40s linear infinite; }
.marquee__track img { width: 76px; height: 76px; border-radius: 20px; border: 3px solid var(--ink); }
.marquee__track span { font-family: var(--font-head); font-weight: 700; font-size: 2.6rem; align-self: center; white-space: nowrap; }

/* Studio */
.studio { padding: clamp(80px, 10vw, 130px) var(--gutter) 0; }
.studio__inner { max-width: 900px; margin: 0 auto; text-align: center; }
.studio h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 20px; }
.studio p { font-size: 1.2rem; color: var(--muted); }
.values { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.values__item {
  background: var(--c); border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: 0 6px 0 var(--ink);
  padding: 24px 18px; display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.values__item span { font-size: 2.6rem; }
.values__face { width: 64px; height: 64px; border-radius: 18px; border: 3px solid var(--ink); transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.values__item:hover .values__face { transform: rotate(-8deg) scale(1.1); }
.values__item b { font-family: var(--font-head); font-size: 1.3rem; }

/* Contact */
.contact { padding: clamp(80px, 10vw, 130px) var(--gutter); }
.contact__box {
  max-width: 900px; margin: 0 auto; text-align: center; color: var(--white);
  background: radial-gradient(circle at 20% 0, #3D9BFF, var(--blue-dark));
  border-radius: 40px; padding: clamp(40px, 7vw, 72px) clamp(20px, 5vw, 56px);
}
.contact h2 { font-size: clamp(2.4rem, 6vw, 4rem); }
.contact p { font-size: 1.2rem; margin: 14px auto 30px; max-width: 40ch; }

/* Footer */
.footer {
  background: var(--blue-deep); color: var(--white);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  padding: 28px var(--pad-x);
}
.footer img { width: 56px; height: 56px; }
.footer nav { display: flex; gap: 22px; }
.footer a { text-decoration: none; font-weight: 700; opacity: .85; }
.footer a:hover { opacity: 1; text-decoration: underline; }
.footer p { margin: 0; opacity: .7; }

/* Modal */
.modal {
  --c: var(--blue);
  width: min(960px, calc(100% - 24px)); max-height: calc(100dvh - 32px);
  border: 3px solid var(--ink); border-radius: 36px; padding: 0; overflow: auto;
  background: var(--white); color: var(--ink); box-shadow: 0 10px 0 var(--ink);
  position: fixed;
}
.modal::backdrop { background: rgba(7, 26, 82, .6); backdrop-filter: blur(4px); }
.modal[open] { animation: pop .4s cubic-bezier(.3,1.6,.5,1); }
.modal__close {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--ink);
  background: var(--white); font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.modal__head { background: var(--c); color: var(--white); padding: 34px clamp(64px, 6vw, 72px) 34px clamp(20px, 4vw, 40px); display: flex; gap: 22px; align-items: center; }
.modal__head img { width: 110px; height: 110px; border-radius: 26px; border: 4px solid var(--white); flex-shrink: 0; }
.modal__head h3 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
.modal__content { padding: 26px clamp(20px, 4vw, 40px) 34px; }
.modal__content > p { font-size: 1.15rem; margin-top: 0; }
.shots { display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px 18px; scroll-snap-type: x mandatory; }
.shots img { width: 180px; flex-shrink: 0; aspect-ratio: 9/16; object-fit: cover; border-radius: 18px; border: 3px solid var(--ink); scroll-snap-align: start; }
.modal__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }
.video { margin-top: 22px; aspect-ratio: 16/9; border-radius: 22px; overflow: hidden; border: 3px solid var(--ink); }
.video iframe { width: 100%; height: 100%; border: 0; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(40px) scale(.98); transition: opacity .7s, transform .7s cubic-bezier(.3,1.4,.5,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* Animations */
@keyframes bob { 50% { transform: translateY(-14px) rotate(-2deg); } }
@keyframes float { 50% { transform: translateY(-16px) rotate(var(--r, 6deg)); } }
@keyframes wobble { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg) scale(1.06); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }

/* Responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero__lead { margin-inline: auto; }
  .hero__cta { justify-content: center; }
  .hero__art { max-width: 420px; }
  .featured__card { grid-template-columns: 1fr; text-align: center; padding-bottom: 56px; }
  .featured__icon, .featured__info p { margin-inline: auto; }
  .featured__meta { justify-content: center; }
  .values { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .nav { gap: 10px; }
  .nav__logo img { height: 40px; }
  .nav__links a { padding: 6px 8px; font-size: .95rem; }
  .lang { width: 40px; height: 40px; }
  .stats { gap: 10px; }
  .stat { padding: 14px 6px; border-radius: 20px; }
  .stat strong, .stat__suffix { font-size: 1.7rem; }
  .stat p { font-size: .8rem; line-height: 1.25; }
  .modal__head { flex-direction: column; text-align: center; }
  .shots img { width: 150px; }
}
@media (max-width: 420px) {
  .nav__links a[href="#studio"] { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
