/* ==============
   Mana Storia
================ */

:root {
  --bg:        #ecf5fb;
  --fg:        #2a2450;
  --muted:    #6d6a95;
  --ink:       #2a2450;               /* dark outline color */
  --white:     #ffffff;
  --sunny-1:  #ffd766;
  --sunny-2:  #f39b3a;
  --sky-1:    #7cc2ef;
  --sky-2:    #4a89d6;
  --leaf-1:   #8adba4;
  --leaf-2:   #4bb373;
  --berry-1:  #ff8a8a;
  --berry-2:  #e85a5a;

  --grad-hero:  linear-gradient(180deg, #a9dcf4 0%, #d3ecfa 55%, #e6f7e5 100%);
  --grad-sunny: linear-gradient(180deg, var(--sunny-1), var(--sunny-2));
  --grad-sky:   linear-gradient(180deg, var(--sky-1), var(--sky-2));
  --grad-leaf:  linear-gradient(180deg, var(--leaf-1), var(--leaf-2));
  --grad-berry: linear-gradient(180deg, var(--berry-1), var(--berry-2));

  --shadow-chunk: 0 6px 0 0 rgba(42,36,80,.15), 0 14px 30px -12px rgba(42,36,80,.3);

  --radius: 20px;
  --radius-lg: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 600;
  color: var(--fg);
  background: var(--grad-hero) fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }

h1, h2, h3, h4 {
  font-family: "Fredoka One", "Nunito", sans-serif;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0;
}
h1 { font-size: clamp(2.6rem, 5.5vw, 5rem); line-height: 1.05; }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.1; }
h3 { font-size: 1.5rem; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Text color helpers */
.text-sunny {
  background: linear-gradient(180deg, #ffd766, #db7f2b);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.text-sky   { color: var(--sky-2); }
.text-leaf  { color: var(--leaf-2); }
.text-berry { color: var(--berry-2); }

/* ---------- Panels & stickers ---------- */
.panel {
  background: rgba(255,255,255,.95);
  border: 2px solid #fff;
  outline: 2px solid rgba(42,36,80,.1);
  outline-offset: -2px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-chunk);
}

.sticker {
  display: grid; place-items: center;
  width: 64px; height: 64px;
  border-radius: 18px;
  border: 3px solid var(--ink);
  box-shadow: 0 5px 0 0 var(--ink);
  font-size: 30px;
  color: #fff;
  flex-shrink: 0;
}
.sticker-sunny { background: var(--grad-sunny); }
.sticker-sky   { background: var(--grad-sky); }
.sticker-leaf  { background: var(--grad-leaf); }
.sticker-berry { background: var(--grad-berry); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: "Fredoka One", sans-serif; font-weight: 400;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 14px 26px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, filter .15s ease;
  text-align: center;
}
.btn-sm { padding: 10px 20px; font-size: .9rem; }
.btn-lg { padding: 18px 34px; font-size: 1.15rem; }

.btn-sunny {
  background: var(--grad-sunny);
  color: #5b3c11;
  box-shadow: 0 6px 0 0 var(--ink);
}
.btn-sunny:hover {
  transform: translateY(-3px);
  box-shadow: 0 9px 0 0 var(--ink);
  filter: brightness(1.04);
}
.btn-sunny:active { transform: translateY(2px); box-shadow: 0 3px 0 0 var(--ink); }

.btn-ghost {
  background: rgba(255,255,255,.85);
  color: var(--ink);
  box-shadow: 0 5px 0 0 var(--ink);
}
.btn-ghost:hover { transform: translateY(-2px); box-shadow: 0 7px 0 0 var(--ink); }

.play-dot {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--grad-berry); color: #fff; font-size: .7rem;
}

/* ---------- Nav ---------- */
#nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .25s, backdrop-filter .25s, border-color .25s;
  background: rgba(32, 31, 31, 0.9);
  backdrop-filter: blur(10px);
  border-bottom-color: rgba(42,36,80,.15);
}
#nav.scrolled {
  /*background: rgba(255,255,255,.75);*/
  background: rgba(32, 31, 31, 0.9);
  backdrop-filter: blur(10px);
  border-bottom-color: rgba(42,36,80,.15);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-badge {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 16px;
  background: var(--grad-sunny);
  color: #5b3c11;
  font-family: "Fredoka One", sans-serif; font-size: 1.25rem;
  border: 3px solid var(--ink);
  box-shadow: 0 5px 0 0 var(--ink);
}
.brand-name { font-family: "Fredoka One", sans-serif; font-size: 1.5rem; color: var(--ink); }
.nav-links { display: none; gap: 6px; }
.nav-links a {
  padding: 8px 16px; border-radius: 999px;
  font-family: "Nunito", sans-serif; font-size: 1.1rem; color: white;
  font-weight: bold;
  opacity: .8;
}
.nav-links a:hover { background: rgba(92, 91, 91, 0.7); color: white; opacity: 1; }
@media (min-width: 900px) { .nav-links { display: inline-flex; } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 70vh; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-fade-top {
  position: absolute; inset: 0 0 auto 0; height: 140px;
  background: linear-gradient(to bottom, rgba(255,255,255,.7), transparent);
}
.hero-fade-bottom {
  position: absolute; inset: auto 0 0 0; height: 260px;
  background: linear-gradient(to top, var(--bg), rgba(236,245,251,.4), transparent);
}
.hero-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  min-height: 75vh; justify-content: flex-end; padding-bottom: 80px; padding-top: 160px;
}
@media (min-width: 900px) { .hero-content { padding-bottom: 110px; } }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 2px solid var(--ink);
  padding: 8px 20px; border-radius: 999px;
  box-shadow: 0 4px 0 0 var(--ink);
  font-family: "Fredoka One", sans-serif; font-size: .9rem; color: var(--ink);
  margin-bottom: 24px;
}
.hero-content h1 { max-width: 900px; text-shadow: 0 3px 0 rgba(255,255,255,.9); }
.lead {
  max-width: 620px; margin: 24px auto 0;
  font-size: 1.15rem; font-weight: 700; color: rgba(42,36,80,.8);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 40px; }
.stats {
  display: flex;
  justify-content: center;
  margin: 56px auto 0;
  width: 100%;
}

.stat {
  padding: 14px 8px;
  text-align: center;
  background: rgba(255,255,255,.95);
  border-radius: var(--radius);
  border: 2px solid #fff;
  outline: 2px solid rgba(42,36,80,.1);
  outline-offset: -2px;
  box-shadow: var(--shadow-chunk);
  width: 150px;
}
.stat-emoji { font-size: 1.4rem; }
.stat-value { font-family: "Fredoka One", sans-serif; font-size: 1.7rem; color: var(--ink); }
.stat-label { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: 4px; }

/* Clouds */
.clouds { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.cloud {
  position: absolute; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,255,255,.95), rgba(255,255,255,0));
  filter: blur(2px);
  animation: drift 12s ease-in-out infinite alternate;
}

/* ---------- Sections ---------- */
.section { padding: 50px 0; position: relative; }
.section-head { margin-bottom: 56px; }
.section-head.center { text-align: center; }
.section-head.between {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap;
}
.eyebrow { font-family: "Fredoka One", sans-serif; font-size: 1.1rem; margin: 0 0 8px; }
.section-lead { max-width: 620px; margin: 20px auto 0; font-size: 1.1rem; color: var(--muted); font-weight: 700; }

/* Grids */
.grid-2 { display: grid; gap: 24px; grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* Features */
.feature { padding: 32px; display: flex; gap: 20px; align-items: flex-start; transition: transform .3s ease; }
.feature:hover { transform: translateY(-4px); }
.feature p { color: var(--muted); font-weight: 600; margin: 10px 0 0; font-size: 1.05rem; }

/* Worlds */
.worlds { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .worlds { grid-template-columns: 1.6fr 1fr; } }
.world-showcase { position: relative; overflow: hidden; }
.world-showcase img { width: 100%; height: 520px; object-fit: cover; transition: opacity .4s; }
.world-shadow {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(42,36,80,.85), rgba(42,36,80,.25) 50%, transparent);
}
.world-caption { position: absolute; inset: auto 0 0 0; padding: 28px; color: #fff; }
.world-caption h3 { color: #fff; font-size: 2.3rem; margin: 12px 0 8px; }
.world-caption p { max-width: 500px; font-weight: 700; color: rgba(255,255,255,.9); }
.world-tag {
  display: inline-flex; align-items: center; gap: 6px;
  border: 2px solid #fff; background: var(--ink); color: #fff;
  padding: 4px 14px; border-radius: 999px; font-family: "Fredoka One", sans-serif; font-size: .85rem;
}

.world-list { display: flex; flex-direction: column; gap: 14px; }
.world-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; background: rgba(255,255,255,.7);
  border: 3px solid rgba(42,36,80,.15); border-radius: var(--radius);
  cursor: pointer; text-align: left; transition: transform .2s, border-color .2s, box-shadow .2s;
  font-family: inherit;
}
.world-item:hover { transform: translateY(-2px); border-color: rgba(42,36,80,.4); }
.world-item.active {
  background: #fff; border-color: var(--ink);
  box-shadow: 0 6px 0 0 var(--ink);
}
.world-item img { width: 90px; height: 72px; object-fit: cover; border-radius: 14px; border: 2px solid var(--ink); }
.world-item > div { flex: 1; min-width: 0; }
.w-eyebrow { font-family: "Fredoka One", sans-serif; font-size: .85rem; color: var(--muted); }
.w-title { font-family: "Fredoka One", sans-serif; font-size: 1.2rem; color: var(--ink); }
.w-arrow { font-family: "Fredoka One", sans-serif; font-size: 1.5rem; color: rgba(42,36,80,.4); }
.world-item.active .w-arrow { color: var(--berry-2); }

/* Heroes */
.hero-card { overflow: hidden; transition: transform .3s; }
.hero-card:hover { transform: translateY(-6px); }
.hero-portrait { position: relative; height: 280px; overflow: hidden; }
.hero-portrait img { width: 100%; height: 280px; object-fit: contain; object-position: center bottom; transition: transform .5s; transform: scale(1.05); }
.hero-card:hover .hero-portrait img { transform: scale(1.05); }
.bg-sky   { background: var(--grad-sky); }
.bg-berry { background: var(--grad-berry); }
.bg-leaf  { background: var(--grad-leaf); }
.hero-role {
  position: absolute; top: 16px; left: 16px;
  border: 2px solid var(--ink); background: #fff;
  padding: 5px 12px; border-radius: 999px;
  font-family: "Fredoka One", sans-serif; font-size: .8rem; color: var(--ink);
  box-shadow: 0 3px 0 0 var(--ink);
}
.hero-info { padding: 24px; }
.hero-name-row { display: flex; align-items: baseline; justify-content: space-between; }
.hero-name-row h3 { font-size: 1.8rem; }
.hero-tag { font-family: "Fredoka One", sans-serif; font-size: .85rem; color: var(--muted); }
.stats-list { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; font-weight: 800; }
.stats-list li { display: flex; align-items: center; gap: 12px; font-size: .85rem; }
.stat-name { width: 40px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.bar { position: relative; flex: 1; height: 12px; overflow: hidden; border-radius: 999px;
  border: 2px solid var(--ink); background: #fff; }
.fill { position: absolute; inset: 0 auto 0 0; height: 100%; }
.fill-berry { background: var(--grad-berry); }
.fill-sky   { background: var(--grad-sky); }
.fill-leaf  { background: var(--grad-leaf); }
.stat-num { width: 32px; text-align: right; font-family: "Fredoka One", sans-serif; color: var(--ink); }

/* News */
.news-card { padding: 24px; display: flex; flex-direction: column; gap: 18px; transition: transform .25s; }
.news-card:hover { transform: translateY(-4px); }
.news-card h3 { font-size: 1.5rem; }
.news-card p { color: var(--muted); font-weight: 600; margin: 0; }
.news-card:hover h3 { color: var(--berry-2); }
.news-meta { display: flex; gap: 10px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 2px solid var(--ink); background: #fff;
  padding: 3px 12px; border-radius: 999px;
  font-family: "Fredoka One", sans-serif; font-size: .75rem; color: var(--ink);
}
.date { font-family: "Fredoka One", sans-serif; font-size: .8rem; color: var(--muted); }

/* CTA */
.cta { position: relative; overflow: hidden; border-radius: 40px; }
.cta-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.cta-fade {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(255,255,255,.95), rgba(255,255,255,.7) 55%, rgba(255,255,255,.2));
}
.cta-inner {
  position: relative; display: grid; grid-template-columns: 1fr; gap: 32px;
  padding: 44px 32px;
}
@media (min-width: 900px) { .cta-inner { grid-template-columns: 1.4fr 1fr; padding: 64px; } }
.cta h2 { font-size: clamp(2.2rem, 4vw, 3.6rem); }
.platforms { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.cta-actions { display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.cta-actions .btn { justify-content: center; }
.fine-print { text-align: center; font-family: "Fredoka One", sans-serif; font-size: .8rem; color: var(--muted); margin: 8px 0 0; }

/* Footer */
.footer { background: rgba(255,255,255,.75); border-top: 2px solid rgba(42,36,80,.12); padding: 60px 0; backdrop-filter: blur(4px); }
.footer-grid { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-tag { margin-top: 18px; max-width: 340px; color: var(--muted); font-weight: 600; }
.footer-title { font-family: "Fredoka One", sans-serif; font-size: 1.1rem; color: var(--ink); }
.footer li { margin-top: 12px; }
.footer li a { font-weight: 700; color: var(--muted); }
.footer li a:hover { color: var(--berry-2); }
.footer-bottom {
  margin-top: 48px; padding-top: 28px;
  border-top: 2px dashed rgba(42,36,80,.15);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: "Fredoka One", sans-serif; font-size: .85rem; color: var(--muted);
}
.footer-legal { display: flex; gap: 24px; }
.footer-legal a:hover { color: var(--ink); }

/* Animations */
.bounce { animation: bounce-soft 3.2s ease-in-out infinite; }
.wobble { animation: wobble 3s ease-in-out infinite; }
@keyframes bounce-soft {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%      { transform: translateY(-6px) rotate(1deg); }
}
@keyframes wobble {
  0%, 100% { transform: rotate(-2deg); }
  50%      { transform: rotate(2deg); }
}
@keyframes drift {
  0%   { transform: translateX(-20px); }
  100% { transform: translateX(20px); }
}

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }


@font-face {
  font-family: "Thaleahfat";
  font-display: auto;
  src: url("/static/template/fonts/webfonts/thaleahfat.woff2");
}


.eightbit-btn {
  background: #3a4466;
  display: inline-block;
  position: relative;
  text-align: center;
  cursor: pointer;
  letter-spacing: 1px;
  font-size: 16px;
  padding: 5px;
  font-family: 'Thaleahfat';
  text-decoration: none;
  color: white;
  box-shadow: inset -3px -3px 0px 0px #262b44;
}
.eightbit-btn:hover, .eightbit-btn:focus {
  background: #343e5e;
  box-shadow: inset -4px -4px 0px 0px #262b44;
}
.eightbit-btn:active {
  box-shadow: inset 3px 3px 0px 0px #262b44;
}
.eightbit-btn:before, .eightbit-btn:after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  box-sizing: content-box;
}
.eightbit-btn:before {
  top: -3px;
  left: 0;
  border-top: 3px #202428 solid;
  border-bottom: 3px #202428 solid;
}
.eightbit-btn:after {
  left: -3px;
  top: 0;
  border-left: 3px #202428 solid;
  border-right: 3px #202428 solid;
}
.eightbit-btn--padding {
  padding: 7px;
}
.eightbit-btn--red {
  background: #E76E55;
  box-shadow: inset -3px -3px 0px 0px #8C2022;
}
.eightbit-btn--red:hover, .eightbit-btn--red:focus {
  background: #CE372B;
  box-shadow: inset -4px -4px 0px 0px #8C2022;
}
.eightbit-btn--red:active {
  box-shadow: inset 3px 3px 0px 0px #8C2022;
}
.eightbit-btn--yellow {
  background: #F7D51D;
  box-shadow: inset -3px -3px 0px 0px #E59400;
}
.eightbit-btn--yellow:hover, .eightbit-btn--yellow:focus {
  background: #F2C409;
  box-shadow: inset -4px -4px 0px 0px #E59400;
}
.eightbit-btn--yellow:active {
  box-shadow: inset 3px 3px 0px 0px #E59400;
}

.eightbit-btn--green {
  background: #1ca863;
  box-shadow: inset -3px -3px 0px 0px #197e4c;
}
.eightbit-btn--green:hover, .eightbit-btn--green:focus {
  background: #189a5a;
  box-shadow: inset -4px -4px 0px 0px #197e4c;
}
.eightbit-btn--green:active {
  box-shadow: inset 3px 3px 0px 0px #197e4c;
}

.eightbit-btn--blue {
  background: #1977b6;
  box-shadow: inset -3px -3px 0px 0px #125d90;
}
.eightbit-btn--blue:hover, .eightbit-btn--blue:focus {
  background: #146ca8;
  box-shadow: inset -4px -4px 0px 0px #125d90;
}
.eightbit-btn--blue:active {
  box-shadow: inset 3px 3px 0px 0px #125d90;
}
.eightbit-btn--disabled {
  background: #6f7484;
  pointer-events: none;
  box-shadow: inset -3px -3px 0px 0px #545966;
}
