/* The game's fonts (OFL, licences in /licenses/): Lilita One for headings, Fredoka for labels and short lines. */
@font-face {
  font-family: "Lilita One";
  src: url("/assets/LilitaOne-Regular.f5b641c45c.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Fredoka";
  font-weight: 600;
  src: url("/assets/Fredoka-SemiBold.a395a54ed3.ttf") format("truetype");
  font-display: swap;
}

/* Colour tokens. Every text/background pair meets WCAG 2.2 AA (4.5:1) in both themes. */
:root {
  --bg: #fff8ec;
  --surface: #ffffff;
  --surface-2: #fdf1dc;
  --text: #2b2140;
  --muted: #5d5470;
  --link: #0a7686;
  --button-bg: #0a7686;
  --button-text: #ffffff;
  --sun: #ffb43a;
  --sun-2: #ffd27a;
  --coral: #f2605a;
  --border: #ecdcbf;
  --brand-ink: #3b2414;
  --sky-1: #08497f;
  --sky-2: #0d5c9e;
  --sky-3: #1572bd;
  --focus: #08497f;
  --mark: #ffe08a;
  --shadow: 0 12px 30px rgba(43, 33, 64, 0.14);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14202b;
    --surface: #1c2b38;
    --surface-2: #223443;
    --text: #f3ede2;
    --muted: #b3bcc6;
    --link: #7ad8e6;
    --button-bg: #43c6d9;
    --button-text: #0b2a33;
    --border: #2b3d4c;
    --focus: #7ad8e6;
    --mark: #6b5310;
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #14202b;
  --surface: #1c2b38;
  --surface-2: #223443;
  --text: #f3ede2;
  --muted: #b3bcc6;
  --link: #7ad8e6;
  --button-bg: #43c6d9;
  --button-text: #0b2a33;
  --border: #2b3d4c;
  --focus: #7ad8e6;
  --mark: #6b5310;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; }

a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  box-shadow: var(--shadow);
}
.skip:focus { top: 12px; }

.draft-banner {
  margin: 0;
  padding: 8px 16px;
  background: #b00020;
  color: #ffffff;
  text-align: center;
  font-size: 15px;
}

mark { background: var(--mark); color: inherit; padding: 0 4px; border-radius: 4px; }

/* Header and footer */

header.site {
  background: linear-gradient(180deg, var(--sun) 0%, var(--sun-2) 100%);
  border-bottom: 4px solid var(--coral);
}

.bar { max-width: 1120px; margin: 0 auto; padding: 10px 16px; }

header.site .bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

header.site .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-ink);
  text-decoration: none;
  font-family: "Lilita One", system-ui, sans-serif;
  font-size: 22px;
  line-height: 1.2;
}

header.site .brand img { width: 40px; height: 40px; border-radius: 10px; }

header.site nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }

header.site nav a {
  color: var(--brand-ink);
  text-decoration: none;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: 16px;
  padding: 8px 10px;
  border-radius: 999px;
}

header.site nav a:hover { background: rgba(255, 255, 255, 0.45); }
header.site nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.7); }

footer.site { border-top: 1px solid var(--border); color: var(--muted); font-size: 15px; }
footer.site .bar { padding: 22px 16px 40px; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; }
footer.site nav a { color: var(--text); font-weight: 600; }
footer.site p { margin: 6px 0; }
footer.site p a { color: var(--muted); }

/* Text pages (privacy, terms, support, account deletion) */

main { display: block; }

body:not(.page-index) main { max-width: 760px; margin: 0 auto; padding: 28px 16px 56px; }

h1, h2 { font-family: "Lilita One", system-ui, sans-serif; font-weight: 400; line-height: 1.2; }
h1 { font-size: 34px; margin: 8px 0 4px; }
h2 { font-size: 24px; margin: 40px 0 8px; }
h3 { font-size: 18px; margin: 26px 0 4px; line-height: 1.35; }
h2, h3 { scroll-margin-top: 16px; }

.updated { color: var(--muted); margin: 0 0 24px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 20px;
  margin: 20px 0;
}

.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card ul, .card ol { padding-left: 22px; }

.card-title { font-family: "Lilita One", system-ui, sans-serif; font-weight: 400; font-size: 21px; margin: 0 0 6px; }

.toc { background: var(--surface-2); border-color: transparent; }
.toc ol { margin: 6px 0 0; columns: 2 15em; column-gap: 28px; }
.toc li { break-inside: avoid; margin: 2px 0; }

.ways { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin: 20px 0; }
.ways .card { margin: 0; }

table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; }
td:first-child { width: 42%; }

.button {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-text);
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: 17px;
  line-height: 1.3;
  text-decoration: none;
}
.button:hover { filter: brightness(1.08); }

/* Home page */

.hero {
  background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 55%, var(--sky-3) 100%);
  color: #ffffff;
  border-bottom-left-radius: 50% 48px;
  border-bottom-right-radius: 50% 48px;
  overflow: hidden;
}

.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 16px 64px;
  display: grid;
  gap: 28px;
  align-items: center;
  text-align: center;
}

.hero h1 { margin: 0; line-height: 0; }
.hero-logo { width: min(380px, 86%); }

.hero .lead {
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: 21px;
  line-height: 1.45;
  max-width: 34em;
  margin: 14px auto 0;
}

.soon {
  display: inline-block;
  margin: 22px 0 0;
  padding: 10px 26px 12px;
  border-radius: 20px;
  background: #ffffff;
  color: #0b4f8a;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 8px 20px rgba(4, 38, 63, 0.3);
}
.soon strong { display: block; color: #08497f; font-family: "Lilita One", system-ui, sans-serif; font-weight: 400; font-size: 24px; letter-spacing: 0.01em; }

.badges { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 22px 0 0; }
.badge img { display: block; height: 50px; width: auto; }

.hero .age { font-size: 15px; margin: 14px 0 0; }

.hero-art { position: relative; width: min(560px, 100%); margin: 0 auto; }
.hero-art .island {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 1195;
  border: 6px solid #ffffff;
  border-radius: 30px;
  box-shadow: 0 20px 44px rgba(4, 38, 63, 0.45);
}
.hero-art .mango { position: absolute; width: 36%; left: -2%; bottom: -10%; filter: drop-shadow(0 10px 14px rgba(4, 38, 63, 0.35)); }

@media (min-width: 720px) {
  .hero-inner { grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 48px); padding: 48px 24px 84px; text-align: left; }
  .hero .lead { margin-left: 0; }
  .badges { justify-content: flex-start; }
  .hero-logo { width: min(440px, 100%); }
  .hero-art .mango { left: -7%; }
}

.section { max-width: 1120px; margin: 0 auto; padding: 36px 16px 8px; }
.section > h2 { text-align: center; margin: 0 0 18px; font-size: 30px; }

.shots ul {
  list-style: none;
  margin: 0;
  padding: 6px 4px 18px;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}
.shots li { flex: 0 0 auto; scroll-snap-align: center; }
.shots img { display: block; width: 210px; border-radius: 22px; box-shadow: var(--shadow); }

@media (min-width: 1100px) {
  .shots ul { justify-content: center; overflow-x: visible; }
  .shots img { width: 168px; }
}

.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.feature h3 { font-family: "Lilita One", system-ui, sans-serif; font-weight: 400; font-size: 22px; margin: 0 0 6px; }
.feature p { margin: 0; color: var(--muted); }

.good-to-know { max-width: 760px; margin: 28px auto 48px; }
.good-to-know ul { margin: 6px 0 0; }

/* 404 */

.lost { text-align: center; padding: 12px 0 24px; }
.lost img { width: 200px; }

@media (max-width: 560px) {
  h1 { font-size: 30px; }
  .section > h2 { font-size: 26px; }
  header.site nav { margin-left: -10px; width: 100%; }
  td:first-child { width: 38%; }
}
