:root {
  --sky-1: #7ccff2;
  --sky-2: #c8ecfb;
  --sea: #1b84b5;
  --sea-dark: #08465c;
  --sand: #fff3d6;
  --parchment: #fbe7b8;
  --wood: #a0561b;
  --wood-dark: #6b3510;
  --ink: #2b1a0e;
  --sun: #ffb321;
  --leaf: #5aa12b;
  --radius: 20px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Baloo 2', system-ui, sans-serif;
  color: var(--ink);
  background: var(--sand);
  line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--sea-dark); }

/* ---------- language switch ---------- */
[data-l] { display: none; }
html[lang="es"] [data-l="es"], html[lang="en"] [data-l="en"], html[lang="pt"] [data-l="pt"] { display: revert; }

/* ---------- top bar ---------- */
.topbar {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
}
.topbar .home { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--sea-dark); font-weight: 800; }
.topbar .home img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.topbar nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.topbar nav a { text-decoration: none; font-weight: 700; color: var(--sea-dark); padding: 2px 8px; }
.lang button {
  font: inherit; font-weight: 800; border: 2px solid var(--sea-dark); background: #fff; color: var(--sea-dark);
  border-radius: 999px; padding: 0 10px; cursor: pointer; min-width: 40px;
}
.lang button[aria-pressed="true"] { background: var(--sea-dark); color: #fff; }

/* ---------- sky hero ---------- */
.sky {
  position: relative;
  background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 75%, #e4f6ff 100%);
  padding: 84px 16px 0;
  text-align: center;
  overflow: hidden;
}
.cloud { position: absolute; opacity: .95; pointer-events: none; animation: drift linear infinite; }
.cloud.c1 { top: 70px; width: 200px; animation-duration: 70s; }
.cloud.c2 { top: 160px; width: 150px; animation-duration: 95s; animation-delay: -40s; }
.cloud.c3 { top: 110px; width: 120px; animation-duration: 120s; animation-delay: -80s; }
@keyframes drift { from { transform: translateX(110vw); } to { transform: translateX(-260px); } }

.logo { width: min(420px, 78vw); filter: drop-shadow(0 6px 10px rgba(0,0,0,.18)); position: relative; z-index: 2; }
.tagline { font-size: clamp(1.15rem, 3.4vw, 1.65rem); font-weight: 700; margin: 4px auto 0; max-width: 640px; position: relative; z-index: 2; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-16px) rotate(2deg); } }

.stores { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 20px 0 0; position: relative; z-index: 3; }
.store {
  background: var(--ink); color: #fff; text-decoration: none; border-radius: 14px; padding: 8px 22px; font-weight: 800;
  min-width: 200px; text-align: center; box-shadow: 0 4px 0 #000;
}
.store small { display: block; font-weight: 600; opacity: .75; font-size: .8rem; }

/* ---------- home hero: the original key art ---------- */
.topbar.over { position: relative; background: #bfe6f7; padding: 8px 16px; }
.hero2 { position: relative; background: #fdf0cf; }
.hero-art { display: block; width: 100%; height: auto; max-height: calc(100svh - 230px); min-height: 220px; object-fit: cover; object-position: 35% 40%; }
.hero2 { overflow: hidden; }
.hero2 picture { display: block; overflow: hidden; }
.hero-art { animation: kenburns 22s ease-in-out infinite alternate; transform-origin: 40% 45%; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.07) translateX(-1.2%); } }
.hero-stage { position: relative; overflow: hidden; }
/* sand-coloured wavy edge rolling along the bottom of the art */
.hero-edge {
  position: absolute; left: -240px; right: -240px; bottom: -1px; height: 30px; z-index: 2;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='30' viewBox='0 0 240 30'><path d='M0 18 Q30 2 60 18 T120 18 T180 18 T240 18 V30 H0 Z' fill='%23fdf0cf'/></svg>") repeat-x 0 100% / 240px 30px;
  animation: roll 7s linear infinite;
}
@keyframes roll { from { transform: translateX(0); } to { transform: translateX(240px); } }
.hero-copy { text-align: center; padding: 18px 16px 8px; }
.hero-copy .tagline { margin-top: 0; }

/* ---------- sections ---------- */
main { max-width: 1040px; margin: 0 auto; padding: 8px 16px; }
section { margin: 56px 0; }
h1, h2 { color: var(--wood); line-height: 1.15; }
h2 { font-size: clamp(1.7rem, 4vw, 2.2rem); margin: 0 0 14px; text-align: center; }
.lead { font-size: 1.15rem; max-width: 760px; margin: 0 auto; text-align: center; }

.parchment {
  background: var(--parchment);
  border: 3px solid #e3bd72; border-radius: var(--radius);
  box-shadow: inset 0 0 40px rgba(160, 86, 27, .18), 0 6px 18px rgba(0,0,0,.08);
  padding: 22px 24px;
}

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; padding: 0; list-style: none; margin: 0; }
.features li { background: #fff; border-radius: 16px; padding: 14px 16px 14px 52px; box-shadow: 0 3px 10px rgba(0,0,0,.06); font-weight: 700; position: relative; }
.features li::before { content: "★"; position: absolute; left: 16px; top: 10px; font-size: 1.5rem; color: var(--sun); text-shadow: 0 1px 0 var(--wood-dark); }

/* crew */
.crew-bg {
  background: url(../img/bg-deck.webp) center bottom / cover;
  border-radius: var(--radius); padding: 24px 16px 8px;
}
.crew { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; align-items: stretch; }
.mate {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: rgba(255, 243, 214, .92); border-radius: 18px; padding: 12px 10px; box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.mate img { height: 170px; width: auto; max-width: none; transition: transform .2s; position: relative; z-index: 1; }
.mate:hover img { transform: translateY(-6px) rotate(-2deg); }
.mate h3 { margin: 6px 0 2px; color: var(--wood-dark); font-size: 1.2rem; }
.mate p { margin: 0; font-size: .95rem; }

/* screenshots */
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; }
.shots img { border-radius: 14px; box-shadow: 0 6px 16px rgba(0,0,0,.18); border: 4px solid #fff; }

/* parents */
.parents { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .parents { grid-template-columns: 1fr; } }

/* plain pages (support / privacy) */
.page-head { padding-bottom: 36px; }
.page-head .logo { width: min(230px, 55vw); }
.page-head h1 { position: relative; z-index: 2; margin: 6px 0 0; font-size: clamp(1.7rem, 5vw, 2.4rem); }
.doc { max-width: 780px; margin: 0 auto; }
.doc h2 { text-align: left; font-size: 1.45rem; margin-top: 28px; }
details { background: #fff; border-radius: 14px; padding: 10px 16px; margin: 10px 0; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
summary { font-weight: 800; cursor: pointer; color: var(--sea-dark); }
.muted { opacity: .7; font-size: .92rem; }
.mail { font-size: 1.25rem; font-weight: 800; }

/* footer */
footer {
  background: var(--sea-dark);
  color: #d9f1fb; text-align: center; padding: 56px 16px 28px; margin-top: 56px;
}
footer a { color: #fff; }
footer .links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  .cloud, .hero-art, .hero-edge { animation: none; }
}
/* wide artwork (spyglass, swords) overflowed the card: draw these two smaller */
.mate img.wide { height: 135px; margin-top: 35px; }
