/* Pocketgale: glossy toy look matching the games. Light only (the games' art is bright). */
@font-face {
  font-family: "Lilita One";
  src: url("/assets/fonts/LilitaOne-Regular.woff2") format("woff2");
  font-display: swap;
}

:root {
  --sea-1: #4cc4ff;
  --sea-2: #1683e0;
  --sea-3: #0b4f9c;
  --sea-4: #073a74;
  --sun-1: #ffe27a;
  --sun-2: #ffb21f;
  --sun-3: #d9820a;
  --coral: #ff6b5b;
  --leaf: #36b37e;
  --sand: #fff7e6;
  --sand-2: #f6e7c8;
  --card: #ffffff;
  --ink: #1f2b38;
  --ink-soft: #52606e;
  --rule: #ecdfc4;
  --link: #0f6fc6;
  --radius: 24px;
  --shadow: 0 2px 0 rgba(255, 255, 255, .9) inset, 0 14px 32px -12px rgba(11, 79, 156, .28), 0 3px 8px rgba(11, 79, 156, .08);
  --bounce: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --display: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font: 17px/1.65 var(--body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--sea-3); }
:focus-visible { outline: 3px solid var(--sun-2); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.15; letter-spacing: .01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 6vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 12px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 247, 230, .82);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(236, 223, 196, .8);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 40px; height: 40px; flex: none; transition: transform .45s var(--bounce); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.08); }
.brand-word { font-family: var(--display); font-size: 1.6rem; letter-spacing: .01em; color: var(--sea-3); }
.brand-light .brand-word { color: #fff; }

.nav { display: flex; gap: 4px; }
.nav a {
  font-family: var(--display); font-size: 1.05rem; letter-spacing: .02em;
  color: var(--sea-4); text-decoration: none;
  padding: 8px 14px; border-radius: 999px;
  transition: background .2s, transform .3s var(--bounce);
}
.nav a:hover { background: rgba(22, 131, 224, .1); transform: translateY(-2px); }
.nav a[aria-current] { background: var(--sea-2); color: #fff; box-shadow: 0 3px 0 var(--sea-3); }

.menu-btn { display: none; }
@media (max-width: 720px) {
  .menu-btn {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 46px; height: 46px; padding: 0 12px; border: 0; border-radius: 14px; cursor: pointer;
    background: var(--sea-2); box-shadow: 0 4px 0 var(--sea-3);
  }
  .menu-btn span { display: block; height: 3px; border-radius: 3px; background: #fff; transition: transform .35s var(--bounce), opacity .2s; }
  .menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 6px; padding: 12px 16px 18px;
    background: var(--sand); border-bottom: 1px solid var(--rule);
    box-shadow: 0 18px 30px -18px rgba(7, 58, 116, .35);
    transform-origin: top center; transform: scaleY(.6); opacity: 0; visibility: hidden;
    transition: transform .4s var(--bounce), opacity .2s, visibility 0s .4s;
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; transition: transform .4s var(--bounce), opacity .2s; }
  .nav a { font-size: 1.2rem; padding: 12px 16px; }
}

/* ---------- Buttons ---------- */
.btn {
  --b1: var(--sun-1); --b2: var(--sun-2); --b3: var(--sun-3); --bt: #5a3300;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--display); font-size: 1.2rem; letter-spacing: .02em; text-decoration: none;
  color: var(--bt); padding: 14px 28px 15px; border-radius: 999px; border: 0; cursor: pointer;
  background: linear-gradient(var(--b1), var(--b2));
  box-shadow: 0 2px 0 rgba(255, 255, 255, .7) inset, 0 6px 0 var(--b3), 0 14px 22px -8px rgba(0, 0, 0, .3);
  transition: transform .35s var(--bounce), box-shadow .2s;
}
.btn::after {
  content: ""; position: absolute; left: 14%; right: 14%; top: 4px; height: 38%;
  border-radius: 999px; background: linear-gradient(rgba(255, 255, 255, .65), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.btn:hover { color: var(--bt); transform: translateY(-3px) scale(1.03); }
.btn:active { transform: translateY(4px) scale(1.02, .94); box-shadow: 0 2px 0 rgba(255, 255, 255, .7) inset, 0 2px 0 var(--b3), 0 6px 10px -6px rgba(0, 0, 0, .3); }
.btn-blue { --b1: #5fd0ff; --b2: var(--sea-2); --b3: var(--sea-3); --bt: #fff; }
.btn-blue:hover, .btn-blue:active { color: #fff; }
.btn-play { --b1: #3a4652; --b2: #1c242c; --b3: #0b1015; --bt: #fff; flex-direction: column; gap: 0; line-height: 1.05; padding: 10px 26px 12px; }
.btn-play:hover { color: #fff; }
.btn-play-small { font-family: var(--body); font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.btn.is-soon { cursor: default; }
.btn.is-soon:hover, .btn.is-soon:active { transform: none; box-shadow: 0 2px 0 rgba(255, 255, 255, .7) inset, 0 6px 0 var(--b3), 0 14px 22px -8px rgba(0, 0, 0, .3); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff; isolation: isolate;
  background: radial-gradient(120% 90% at 80% 0%, #6fd6ff 0%, var(--sea-2) 45%, var(--sea-3) 100%);
  padding: clamp(56px, 9vw, 110px) 0 clamp(120px, 14vw, 170px);
}
.hero h1 { color: #fff; text-shadow: 0 4px 0 var(--sea-4), 0 10px 24px rgba(4, 30, 64, .35); }
.hero h1 .sun { color: var(--sun-1); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero-lead { font-size: clamp(1.1rem, 2.1vw, 1.3rem); max-width: 34ch; color: #e8f6ff; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-art { position: relative; justify-self: center; width: min(440px, 100%); }
.hero-card {
  position: relative; border-radius: 32px; overflow: hidden; transform: rotate(3deg);
  box-shadow: 0 0 0 6px #fff, 0 24px 50px -10px rgba(4, 30, 64, .55);
}
.hero-icon {
  position: absolute; left: -30px; bottom: -64px; width: 27%; border-radius: 26%;
  box-shadow: 0 0 0 5px #fff, 0 16px 30px -8px rgba(4, 30, 64, .5);
  animation: bob 4.5s ease-in-out infinite;
}
.bubble { position: absolute; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .55), rgba(255, 255, 255, .08) 60%); z-index: -1; animation: rise linear infinite; }
.waves { position: absolute; left: 0; right: 0; bottom: -2px; height: 120px; z-index: 1; }
.waves svg { position: absolute; bottom: 0; width: 200%; height: 100%; }
.waves .w1 { fill: rgba(255, 255, 255, .25); animation: drift 14s linear infinite; }
.waves .w2 { fill: rgba(255, 255, 255, .4); animation: drift 9s linear infinite reverse; bottom: -10px; }
.waves .w3 { fill: var(--sand); animation: drift 18s linear infinite; bottom: -22px; }

.page-hero { padding: clamp(44px, 7vw, 76px) 0 clamp(100px, 11vw, 130px); }
.page-hero h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); margin-bottom: .25em; }
.page-hero p { color: #e8f6ff; margin: 0; font-size: 1.1rem; }

@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-12px) rotate(3deg); } }
@keyframes rise { from { transform: translateY(0) scale(1); opacity: 0; } 10% { opacity: 1; } to { transform: translateY(-120vh) scale(1.3); opacity: 0; } }

/* Entrance: scale up with a slight bouncy overshoot. */
.js .pop { opacity: 0; transform: translateY(26px) scale(.92); }
.js .pop.in { animation: popIn .8s var(--bounce) forwards; animation-delay: calc(var(--d, 0) * 90ms); }
@keyframes popIn { to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }
.eyebrow {
  display: inline-block; font-family: var(--display); letter-spacing: .08em; text-transform: uppercase; font-size: .9rem;
  color: var(--sun-3); background: #fff1cc; padding: 4px 14px; border-radius: 999px; margin-bottom: 12px;
}
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid #f3e8d2; }

.game-card { display: grid; grid-template-columns: 1.15fr 1fr; overflow: hidden; }
.game-card-art { position: relative; min-height: 280px; background: var(--sea-2); }
.game-card-art img { width: 100%; height: 100%; object-fit: cover; object-position: 8% center; transition: transform .8s var(--ease-out); }
.game-card:hover .game-card-art img { transform: scale(1.05); }
.game-card-body { padding: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; justify-content: center; }
.game-title { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.game-title img { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .35); }
.game-title h3 { font-size: 1.8rem; margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.tags li { font-size: .85rem; font-weight: 600; color: var(--sea-3); background: #e5f4ff; padding: 4px 12px; border-radius: 999px; }
.game-card-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.next-card { margin-top: 24px; padding: 28px; text-align: center; border: 3px dashed #e3d2ad; background: transparent; box-shadow: none; color: var(--ink-soft); }
.next-card h3 { color: var(--sun-3); margin-bottom: .2em; }
.next-card p { margin: 0; }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.value { padding: 30px 26px; transition: transform .45s var(--bounce); }
.value:hover { transform: translateY(-6px) rotate(-.6deg); }
.value-icon {
  width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center; margin-bottom: 16px; font-size: 1.9rem;
  background: linear-gradient(#fff3c4, #ffd56b); box-shadow: 0 2px 0 #fff inset, 0 5px 0 #e3a31d;
}
.value:nth-child(2) .value-icon { background: linear-gradient(#d6f1ff, #7fd0ff); box-shadow: 0 2px 0 #fff inset, 0 5px 0 #2e8fd6; }
.value:nth-child(3) .value-icon { background: linear-gradient(#dcf7e8, #7fdcaa); box-shadow: 0 2px 0 #fff inset, 0 5px 0 #2f9e68; }
.value p { color: var(--ink-soft); margin: 0; }

.contact-band {
  position: relative; overflow: hidden; text-align: center; color: #fff; padding: clamp(36px, 6vw, 56px) 24px;
  background: linear-gradient(135deg, var(--sea-2), var(--sea-3));
}
.contact-band h2 { color: #fff; text-shadow: 0 3px 0 var(--sea-4); }
.contact-band p { color: #e8f6ff; max-width: 46ch; margin: 0 auto 24px; }

/* ---------- Game page ---------- */
.feature-banner { border-radius: 28px; overflow: hidden; box-shadow: 0 0 0 6px #fff, 0 24px 50px -10px rgba(4, 30, 64, .55); }
.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 240px); gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 4px 26px; margin: 0 -4px;
  scrollbar-width: thin;
}
.shots figure { margin: 0; scroll-snap-align: start; }
.shots img {
  border-radius: 22px; border: 5px solid #fff; background: var(--sea-2);
  box-shadow: 0 16px 30px -14px rgba(4, 30, 64, .5);
  transition: transform .45s var(--bounce);
}
.shots img:hover { transform: translateY(-6px) scale(1.02); }
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.feature { padding: 26px; }
.feature p, .feature ul { color: var(--ink-soft); margin: 0; }
.feature ul { padding-left: 20px; }
.feature li { margin-bottom: 4px; }
.place-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0 !important; margin: 0; }
.place-list li { background: var(--sand-2); color: #6b4a14; font-weight: 600; font-size: .9rem; padding: 4px 12px; border-radius: 999px; margin: 0; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 22px; }
.fact { text-align: center; padding: 20px 10px; }
.fact strong { display: block; font-family: var(--display); font-weight: 400; font-size: 2rem; color: var(--sea-2); line-height: 1; }
.fact span { font-size: .9rem; color: var(--ink-soft); }

/* ---------- Legal and support pages ---------- */
.doc-layout { display: grid; grid-template-columns: 240px 1fr; gap: 36px; align-items: start; margin-top: -70px; position: relative; z-index: 2; }
.toc { position: sticky; top: 88px; padding: 20px 18px; font-size: .93rem; }
.toc strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.1rem; color: var(--sea-3); margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 4px; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--link); text-decoration: underline; }
.doc { padding: clamp(24px, 4vw, 44px); min-width: 0; }
.doc h2 { font-size: 1.55rem; color: var(--sea-3); margin: 1.8em 0 .5em; padding-top: 1.2em; border-top: 2px dashed var(--rule); scroll-margin-top: 90px; }
.doc h2:first-of-type { margin-top: 1em; }
.doc h3 { font-size: 1.15rem; color: var(--ink); margin: 1.4em 0 .4em; scroll-margin-top: 90px; }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 1em; }
.doc li { margin-bottom: 6px; }
.doc .meta { color: var(--ink-soft); font-size: .95rem; }
.summary {
  background: linear-gradient(#f0f9ff, #e2f2ff); border: 2px solid #c4e4fb; border-radius: 18px;
  padding: 18px 22px; margin: 18px 0 8px;
}
.summary strong.summary-title { display: block; font-family: var(--display); font-weight: 400; font-size: 1.2rem; color: var(--sea-3); margin-bottom: 6px; }
.summary ul { margin: 0; }
.table-scroll { overflow-x: auto; margin: 10px 0 18px; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 10px; border-bottom: 1px solid var(--rule); }
th { font-family: var(--display); font-weight: 400; color: var(--sea-3); font-size: 1rem; background: #fbf4e4; }
@media (max-width: 640px) {
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tr { padding: 10px 0; border-bottom: 1px solid var(--rule); }
  td { border: 0; padding: 3px 0; }
  td::before { content: attr(data-label); display: block; font-weight: 700; color: var(--sea-3); font-size: .85rem; }
}

.faq { display: grid; gap: 14px; }
.faq details { background: #fff; border-radius: 18px; border: 1px solid #f0e3c8; box-shadow: 0 8px 18px -12px rgba(11, 79, 156, .25); overflow: hidden; }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 56px 18px 22px; position: relative;
  font-family: var(--display); font-size: 1.12rem; color: var(--sea-4);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 16px; top: 50%; width: 30px; height: 30px; margin-top: -15px;
  display: grid; place-items: center; border-radius: 50%; color: #fff; font-size: 1.3rem; line-height: 1;
  background: var(--sea-2); box-shadow: 0 3px 0 var(--sea-3); transition: transform .4s var(--bounce);
}
.faq details[open] summary::after { transform: rotate(135deg); }
.faq .answer { padding: 0 22px 18px; color: var(--ink-soft); }
.faq details[open] .answer { animation: popIn .5s var(--bounce) both; }
.faq .answer p:last-child { margin-bottom: 0; }

.mail-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: 26px 28px; margin: 24px 0; }
.mail-card h3 { margin: 0 0 4px; }
.mail-card p { margin: 0; color: var(--ink-soft); }

.notfound { text-align: center; }
.notfound .big { font-family: var(--display); font-size: clamp(5rem, 18vw, 9rem); line-height: 1; color: #fff; text-shadow: 0 6px 0 var(--sea-4); }

/* ---------- Footer ---------- */
.footer { margin-top: clamp(40px, 7vw, 80px); color: #cfe6ff; }
.footer-wave { display: block; width: 100%; height: 50px; fill: var(--sea-4); }
.footer-body { background: var(--sea-4); padding: 26px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; }
.footer-tag { margin: 8px 0 0; color: #9fc6ee; }
.footer-links { display: grid; gap: 6px; }
.footer-links a, .footer-contact a { color: #fff; text-decoration: none; }
.footer-links a:hover, .footer-contact a:hover { color: var(--sun-1); text-decoration: underline; }
.footer-label { display: block; font-family: var(--display); color: var(--sun-1); font-size: 1.1rem; margin-bottom: 4px; }
.footer-copy { margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .88rem; color: #9fc6ee; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .game-card { grid-template-columns: 1fr; }
  .hero-art { margin-top: 10px; width: min(380px, 92%); }
  .values { grid-template-columns: 1fr; }
  .doc-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .features { grid-template-columns: 1fr; }
  .hero-icon { left: -8px; }
  .footer-grid { grid-template-columns: 1fr; }
  .mail-card { padding: 22px; }
  .btn { font-size: 1.1rem; padding: 13px 24px 14px; }
}

@media print {
  .js .pop { opacity: 1; transform: none; }
  .topbar, .waves, .bubble, .footer-wave { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .pop { opacity: 1; transform: none; }
  .bubble { display: none; }
}
