/* Manohar Labs: shared styles for every page. */

@font-face {
  font-family: "Fredoka";
  src: url("../fonts/Fredoka.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --ink: #3b2a1a;
  --cream: #fff8e7;
  --paper: #fffdf6;
  --honey: #ffd23f;
  --honey-dark: #f2a900;
  --orange: #ff9f1c;
  --sky: #5ec8ff;
  --sky-dark: #1f78c1;
  --pink: #ff5fa2;
  --green: #4cd964;
  --green-dark: #1e8a36;
  --purple: #9b7bff;
  --radius: 22px;
  --shadow: 0 6px 0 var(--ink);
  --shadow-sm: 0 4px 0 var(--ink);
  --heading: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sky-dark); }
a:hover { color: var(--pink); }
h1, h2, h3, h4 { font-family: var(--heading); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.center { text-align: center; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--honey); padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 248, 231, .92);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--ink);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--heading); font-weight: 700; font-size: 1.35rem; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--honey); border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink);
  font-size: 1.1rem; transform: rotate(-6deg);
}
.nav { display: flex; gap: 6px; align-items: center; }
.nav a {
  font-family: var(--heading); font-weight: 600; text-decoration: none; color: var(--ink);
  padding: 8px 14px; border-radius: 999px;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--honey); }
.nav-toggle { display: none; background: var(--honey); border: 3px solid var(--ink); border-radius: 12px; padding: 6px 10px; font: 600 1rem var(--heading); color: var(--ink); cursor: pointer; }
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: var(--cream); border-bottom: 3px solid var(--ink); padding: 10px 20px 18px; }
  .nav.open { display: flex; }
  .nav a { width: 100%; text-align: center; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 1.1rem var(--heading); text-decoration: none; color: #fff;
  padding: 14px 26px; border-radius: 18px; border: 3px solid var(--ink);
  background: var(--green); box-shadow: var(--shadow);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .25);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 8px 0 var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.btn.blue { background: var(--sky); }
.btn.orange { background: var(--orange); }
.btn.pink { background: var(--pink); }
.btn.ghost { background: var(--paper); color: var(--ink); text-shadow: none; }
.btn.ghost:hover { color: var(--ink); }
.btn[aria-disabled="true"] { cursor: default; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #4fc3ff 0%, #8fdcff 60%, #c8f0ff 100%);
  border-bottom: 3px solid var(--ink);
  padding: 70px 0 120px;
}
.hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; text-align: center; } }
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem); color: var(--honey);
  -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill;
  text-shadow: 0 6px 0 var(--ink);
  letter-spacing: .5px;
}
.hero .lead { font-size: 1.25rem; max-width: 34ch; font-weight: 500; }
@media (max-width: 860px) { .hero .lead { margin-inline: auto; } }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
@media (max-width: 860px) { .hero .actions { justify-content: center; } }
.sun {
  position: absolute; top: -60px; right: 8%; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #fff6b0, #ffd23f 60%, #ffb800);
  box-shadow: 0 0 0 30px rgba(255, 220, 80, .25), 0 0 0 70px rgba(255, 220, 80, .12);
  z-index: 1;
}
.cloud { position: absolute; z-index: 1; opacity: .95; animation: drift linear infinite; }
.cloud svg { width: 100%; height: auto; }
@keyframes drift { from { transform: translateX(-30vw); } to { transform: translateX(130vw); } }
.hills { position: absolute; left: 0; right: 0; bottom: -2px; z-index: 1; }
.hills svg { width: 100%; height: 110px; display: block; }

.bee-float { width: 100%; height: auto; display: block; overflow: visible; animation: bob 3.2s ease-in-out infinite; transform-origin: center; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-16px) rotate(4deg); } }
.wing { animation: flap .18s ease-in-out infinite alternate; transform-origin: 50% 100%; transform-box: fill-box; }
@keyframes flap { from { transform: rotate(-14deg); } to { transform: rotate(10deg); } }

.phone {
  width: min(300px, 80vw); margin-inline: auto; border-radius: 38px; padding: 12px;
  background: var(--ink); box-shadow: 0 12px 0 rgba(59, 42, 26, .35);
  transform: rotate(3deg);
}
.phone img { border-radius: 28px; aspect-ratio: 9 / 20; object-fit: cover; width: 100%; }

/* ---------- sections ---------- */
section { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 44px; }
.section-title h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
.section-title p { font-size: 1.12rem; max-width: 60ch; margin-inline: auto; opacity: .85; }
.tag {
  display: inline-block; font: 700 .85rem var(--heading); letter-spacing: 1px; text-transform: uppercase;
  background: var(--pink); color: #fff; padding: 4px 12px; border-radius: 999px; border: 2px solid var(--ink);
  margin-bottom: 12px; transform: rotate(-2deg);
}
.honeycomb {
  background-color: #fff3c4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath d='M28 66L0 50V16L28 0l28 16v34L28 66zm0 34L0 84V66l28 16 28-16v18L28 100z' fill='none' stroke='%23f5cf5a' stroke-width='2'/%3E%3C/svg%3E");
  border-block: 3px solid var(--ink);
}
.sky-band { background: linear-gradient(180deg, #c8f0ff, #eaf9ff); border-block: 3px solid var(--ink); }

.grid { display: grid; gap: 22px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.card {
  background: var(--paper); border: 3px solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px;
  transition: transform .15s ease;
}
.card:hover { transform: translateY(-4px) rotate(-.4deg); }
.card h3 { font-size: 1.35rem; }
.card .icon {
  width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 2rem;
  border: 3px solid var(--ink); box-shadow: var(--shadow-sm); margin-bottom: 14px;
}
.bg-honey { background: var(--honey); }
.bg-sky { background: var(--sky); }
.bg-pink { background: var(--pink); }
.bg-green { background: var(--green); }
.bg-orange { background: var(--orange); }
.bg-purple { background: var(--purple); }

/* game card on the studio home */
.game-card { display: grid; grid-template-columns: 180px 1fr; gap: 26px; align-items: center; padding: 28px; }
@media (max-width: 640px) { .game-card { grid-template-columns: 1fr; text-align: center; } .game-card img { margin-inline: auto; } }
.game-card img { width: 160px; border-radius: 34px; border: 3px solid var(--ink); box-shadow: var(--shadow); }
.game-card h3 { font-size: 2rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 18px; }
@media (max-width: 640px) { .chips { justify-content: center; } }
.chip {
  font: 600 .9rem var(--heading); padding: 5px 12px; border-radius: 999px;
  background: var(--cream); border: 2px solid var(--ink);
}
.soon { opacity: .75; border-style: dashed; box-shadow: none; text-align: center; display: grid; place-items: center; min-height: 200px; }
.soon .q { font: 700 3rem var(--heading); color: var(--honey-dark); }

/* steps */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 34px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -22px; left: 22px; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; font: 700 1.5rem var(--heading); color: #fff;
  background: var(--orange); border: 3px solid var(--ink); box-shadow: var(--shadow-sm);
}

/* gadgets */
.gadget { display: flex; gap: 16px; align-items: flex-start; }
.gadget svg { flex: none; width: 64px; height: 64px; filter: drop-shadow(0 4px 0 var(--ink)); }
.gadget h3 { margin-bottom: .25em; font-size: 1.2rem; }
.gadget p { margin: 0; font-size: .97rem; }
.gadget .where { display: inline-block; margin-top: 8px; font: 600 .78rem var(--heading); background: var(--cream); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 10px; }

/* screenshots strip */
.shots { display: flex; gap: 22px; overflow-x: auto; padding: 10px 6px 26px; scroll-snap-type: x mandatory; }
.shots figure { margin: 0; flex: none; width: 220px; scroll-snap-align: center; }
.shots img { border-radius: 26px; border: 4px solid var(--ink); box-shadow: var(--shadow); aspect-ratio: 9 / 20; object-fit: cover; width: 100%; }
.shots figcaption { text-align: center; font: 600 .95rem var(--heading); margin-top: 10px; }

/* worlds + bees */
.world-list { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.world-list span { font: 600 1rem var(--heading); padding: 8px 16px; border-radius: 14px; border: 3px solid var(--ink); background: var(--paper); box-shadow: 0 3px 0 var(--ink); }
.world-list span:nth-child(5n+1) { background: #fff1a8; }
.world-list span:nth-child(5n+2) { background: #c9efff; }
.world-list span:nth-child(5n+3) { background: #ffd6e8; }
.world-list span:nth-child(5n+4) { background: #d4f8dc; }
.world-list span:nth-child(5n+5) { background: #e6dcff; }
.bees { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 14px; }
.bee { text-align: center; background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; padding: 14px 8px; box-shadow: var(--shadow-sm); }
.bee .dot { width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 8px; border: 3px solid var(--ink); background: repeating-linear-gradient(90deg, var(--c1) 0 9px, var(--c2) 9px 15px); }
.bee b { display: block; font-family: var(--heading); }
.bee small { opacity: .8; }

/* daily rewards */
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
@media (max-width: 640px) { .days { grid-template-columns: repeat(4, 1fr); } }
.day { text-align: center; background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; padding: 12px 4px; box-shadow: var(--shadow-sm); font-family: var(--heading); }
.day b { display: block; font-size: 1.3rem; color: var(--honey-dark); }
.day:last-child { background: var(--honey); }
.day:last-child b { color: var(--ink); }

/* FAQ */
details { background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; padding: 16px 20px; box-shadow: var(--shadow-sm); margin-bottom: 14px; }
summary { font: 700 1.1rem var(--heading); cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; font-size: 1.4rem; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin: 12px 0 0; }

/* big call to action */
.cta { background: var(--pink); color: #fff; border-block: 3px solid var(--ink); text-align: center; }
.cta h2 { font-size: clamp(2rem, 5vw, 3rem); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink); }

/* ---------- legal pages ---------- */
.page-hero { background: var(--honey); border-bottom: 3px solid var(--ink); padding: 54px 0 46px; text-align: center; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.page-hero p { margin: 0; font-weight: 500; }
.doc { width: min(860px, 100% - 40px); margin: 40px auto 80px; }
.doc .card:hover { transform: none; }
.doc h2 { font-size: 1.6rem; margin-top: 1.8em; padding-top: .4em; border-top: 2px dashed rgba(59, 42, 26, .25); scroll-margin-top: 90px; }
.doc h2:first-of-type { border-top: 0; margin-top: .4em; }
.doc h3 { font-size: 1.2rem; margin-top: 1.3em; scroll-margin-top: 90px; }
.doc ul, .doc ol { padding-left: 1.3em; margin: 0 0 1em; }
.doc li { margin-bottom: .35em; }
.toc { background: var(--cream); border: 2px solid var(--ink); border-radius: 16px; padding: 16px 22px; margin-bottom: 28px; }
.toc b { font-family: var(--heading); }
.toc ol { margin: 8px 0 0; columns: 2 240px; }
.callout { background: #eaf9ff; border: 3px solid var(--ink); border-radius: 16px; padding: 16px 20px; margin: 18px 0; }
.callout.warn { background: #fff1a8; }
.callout.pinky { background: #ffe3ef; }
.callout h3 { margin-top: 0; }
.tldr { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 16px 0 10px; }
.tldr div { background: var(--cream); border: 2px solid var(--ink); border-radius: 14px; padding: 12px 14px; font-weight: 500; }
.tldr div b { display: block; font-family: var(--heading); font-size: 1.05rem; }
table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 12px 0 18px; border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; font-size: .97rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid rgba(59, 42, 26, .2); vertical-align: top; }
th { background: var(--honey); font-family: var(--heading); }
tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: #fffaf0; }
.table-scroll { overflow-x: auto; }
.meta { font-size: .95rem; opacity: .8; }
.app-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 4px; }
.app-tabs a { font: 600 1rem var(--heading); text-decoration: none; color: var(--ink); padding: 8px 16px; border-radius: 999px; border: 2px solid var(--ink); background: var(--paper); box-shadow: 0 3px 0 var(--ink); }
.app-tabs a:hover { background: var(--honey); }
.app-tabs a.muted { opacity: .55; border-style: dashed; box-shadow: none; pointer-events: none; }
.pending { background: #fff1a8; border: 2px dashed var(--ink); border-radius: 8px; padding: 0 6px; font-weight: 600; }
:lang(hi) { font-family: "Noto Sans Devanagari", var(--body); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--cream); padding: 50px 0 30px; }
.site-footer a { color: var(--honey); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { color: var(--honey); font-size: 1.1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-bottom { margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(255, 248, 231, .2); font-size: .9rem; opacity: .8; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }

/* reveal on scroll (only when the script runs, so content never stays hidden) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

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