:root {
    --purple-deep: #3a1f63;
    --night: #1a1030;
    --navy: #0b0715;
    --green: #3fe86b;
    --green-glow: #8cffa8;
    --green-dark: #1a9e45;
    --orange: #ff9633;
    --orange-dark: #c25e10;
    --gold: #ffd866;
    --moon: #fbf6e9;
    --rounded: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Arial Rounded MT Bold", "Nunito",
        system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--navy);
    color: var(--moon);
    font-family: var(--rounded);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--green-glow); }
a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    min-height: min(100svh, 880px);
    display: grid;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
}

.hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 60% 18%;
    z-index: -2;
}

.hero__shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(11, 7, 21, 0.88) 0%, rgba(11, 7, 21, 0.58) 48%, rgba(11, 7, 21, 0.18) 100%),
        linear-gradient(180deg, rgba(11, 7, 21, 0.4) 0%, rgba(11, 7, 21, 0) 35%, var(--navy) 100%);
}

.langs {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.35rem;
    z-index: 2;
}

.langs a {
    min-width: 2.6rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(26, 16, 48, 0.55);
    color: var(--moon);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-align: center;
    text-decoration: none;
    backdrop-filter: blur(6px);
}

.langs a[aria-current] {
    background: var(--gold);
    border-color: var(--gold);
    color: #4a2b05;
}

.hero__inner {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 5.5rem 1.5rem 4rem;
    display: grid;
    gap: 1.5rem;
    align-items: center;
}

.logo {
    margin: 0;
    font-size: clamp(3.4rem, 11vw, 7rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--green-glow);
    text-shadow: 3px 3px 0 var(--green-dark), 0 0 32px rgba(140, 255, 168, 0.5);
}

.tagline {
    margin: 0.6rem 0 1.2rem;
    font-size: clamp(1.1rem, 2.6vw, 1.55rem);
    font-style: italic;
    font-weight: 700;
    color: var(--gold);
}

.pitch {
    max-width: 34rem;
    margin: 0 0 1.8rem;
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: rgba(251, 246, 233, 0.92);
}

.pill {
    display: inline-block;
    margin: 0;
    padding: 0.75rem 1.6rem;
    border-radius: 999px;
    background: linear-gradient(#ffe08a, #e0a021);
    box-shadow: 0 4px 0 #8a5c0d, 0 12px 32px rgba(255, 216, 102, 0.22);
    color: #4a2b05;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-decoration: none;
    animation: glow 3.4s ease-in-out infinite;
}

.pill--link:hover { filter: brightness(1.06); }

.hero__art {
    position: relative;
    width: min(100%, 470px);
    margin-inline: auto;
}

.side-bleep {
    position: absolute;
    right: 2%;
    bottom: 1%;
    width: 27%;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.55));
    animation: bob 4.6s ease-in-out infinite reverse;
}

.agent {
    width: 100%;
    margin-inline: auto;
    filter: drop-shadow(0 22px 36px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 34px rgba(140, 255, 168, 0.18));
    animation: bob 6s ease-in-out infinite;
}

@media (min-width: 860px) {
    .hero__inner { grid-template-columns: 1.15fr 0.85fr; }
    .hero__bg { object-position: 50% 45%; }
}

@media (max-width: 859px) {
    .hero__inner { text-align: center; padding-top: 5rem; }
    .pitch { margin-inline: auto; }
    .hero__shade {
        background:
            linear-gradient(180deg, rgba(11, 7, 21, 0.5) 0%, rgba(11, 7, 21, 0.72) 55%, var(--navy) 100%);
    }
    .hero__art { width: min(78%, 360px); }
}

/* ---------- Sections ---------- */

.section {
    max-width: 1120px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem;
}

h2 {
    margin: 0 0 0.4rem;
    font-size: clamp(1.7rem, 4.4vw, 2.5rem);
    font-weight: 900;
    line-height: 1.15;
    color: var(--green-glow);
    text-shadow: 2px 2px 0 var(--green-dark);
}

.lead {
    margin: 0 0 2rem;
    max-width: 38rem;
    font-size: 1.05rem;
    color: rgba(251, 246, 233, 0.82);
}

/* Tiles: same colours as the game's glossy gems. */

.tiles {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    max-width: 640px;
}

@media (min-width: 1000px) {
    .tiles {
        grid-template-columns: repeat(8, 1fr);
        max-width: 1080px;
    }
}

.tile {
    --a: #888;
    --b: #444;
    position: relative;
    aspect-ratio: 1;
    border-radius: 22px;
    background:
        linear-gradient(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.18)),
        radial-gradient(circle at 35% 28%, var(--a), var(--b) 78%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 0 rgba(0, 0, 0, 0.4), 0 14px 26px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease;
}

.tile::before {
    content: "";
    position: absolute;
    inset: 4px 8px auto;
    height: 28%;
    border-radius: 16px 16px 40px 40px;
    background: linear-gradient(rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 9%;
    object-fit: contain;
    filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.4));
}

.tile:hover { transform: translateY(-6px) rotate(-3deg); }

.tile--skull { --a: #b89cf0; --b: #5c33a8; }
.tile--fuzz { --a: #ffb05c; --b: #c25e10; }
.tile--glow { --a: #66e6e0; --b: #0d6b73; }
.tile--squid { --a: #ff94c7; --b: #b31f6b; }
.tile--yellow { --a: #ffe87d; --b: #c2991a; }
.tile--ghost { --a: #c4c2d4; --b: #575470; }
.tile--zombie { --a: #a8ffbf; --b: #1a9e45; }
.tile--coffin { --a: #a36630; --b: #2e1c0f; }

/* Sunken Atlantis tiles */
.tile--atl-jellyfish { --a: #f28cd9; --b: #8c268c; }
.tile--atl-seahorse { --a: #ffb05c; --b: #c25e10; }
.tile--atl-dolphin { --a: #73d9ff; --b: #0d4da6; }
.tile--atl-crab { --a: #ff7366; --b: #94141f; }
.tile--atl-pufferfish { --a: #ffe87d; --b: #c2991a; }
.tile--atl-skeletonfish { --a: #dbe0eb; --b: #576179; }
.tile--atl-anglerfish { --a: #a8ffbf; --b: #1a9e45; }
.tile--atl-can { --a: #a36630; --b: #2e1c0f; }

.tiles--atlantis { margin-bottom: 2rem; }


/* Areas */

.areas {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.area {
    --accent: var(--green-glow);
    position: relative;
    margin: 0;
    aspect-ratio: 4 / 5;
    border-radius: 28px;
    overflow: hidden;
    border: 2px solid var(--accent);
    box-shadow: 0 0 36px color-mix(in srgb, var(--accent) 28%, transparent), 0 18px 40px rgba(0, 0, 0, 0.5);
}

.area--orange { --accent: var(--orange); }
.area--teal { --accent: #66e6e0; }
.area--pink { --accent: #f27fd9; }
.area--blue { --accent: #4d9fff; }
.area--ice { --accent: #8fe3ff; }
.areas--one { grid-template-columns: minmax(0, 340px); }
.areas--two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 340px)); }

.area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 38%;
    transition: transform 0.6s ease;
}

.area:hover img { transform: scale(1.04); }

.area figcaption {
    position: absolute;
    inset: auto 0 0;
    display: grid;
    gap: 0.2rem;
    padding: 4rem 1.4rem 1.3rem;
    background: linear-gradient(180deg, rgba(11, 7, 21, 0) 0%, rgba(11, 7, 21, 0.92) 70%);
}

.area figcaption strong {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--accent);
}

.area figcaption span { color: rgba(251, 246, 233, 0.9); }

/* Closing band */

.closing {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
    text-align: center;
}

.closing .lead { margin-inline: auto; }

.closing__bleep {
    width: min(52%, 190px);
    margin: 0 auto 0.6rem;
    filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.5));
    animation: bob 5s ease-in-out infinite;
}

.footer {
    padding: 1.6rem 1.5rem 2.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.85rem;
    color: rgba(251, 246, 233, 0.6);
}

.footer p { margin: 0; }

/* ---------- Motion ---------- */

@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 4px 0 #8a5c0d, 0 12px 32px rgba(255, 216, 102, 0.18); }
    50% { box-shadow: 0 4px 0 #8a5c0d, 0 12px 44px rgba(255, 216, 102, 0.42); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .agent, .side-bleep, .closing__bleep, .pill { animation: none; }
    .tile, .area img { transition: none; }
}

/* ---------- Text pages (privacy, support) ---------- */

.topbar {
    max-width: 760px;
    margin: 0 auto;
    padding: 1.2rem 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar__home {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.01em;
    color: var(--green-glow);
    text-decoration: none;
    text-shadow: 2px 2px 0 var(--green-dark);
}

.topbar .langs { position: static; }

.doc {
    max-width: 760px;
    margin: 0 auto;
    padding: 2.2rem 1.5rem 3rem;
}

.doc h1 {
    margin: 0 0 0.4rem;
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 900;
    line-height: 1.1;
    color: var(--green-glow);
    text-shadow: 3px 3px 0 var(--green-dark);
}

.doc h2 {
    margin: 2rem 0 0.5rem;
    font-size: 1.25rem;
    text-shadow: none;
    color: var(--gold);
}

.doc p, .doc li { color: rgba(251, 246, 233, 0.9); }
.doc p { margin: 0 0 0.9rem; }
.doc ul { margin: 0 0 0.9rem; padding-left: 1.3rem; }

.doc__meta { font-size: 0.85rem; color: rgba(251, 246, 233, 0.6) !important; }
.doc__intro { font-size: 1.1rem; margin-top: 1.2rem !important; }
.doc__back { margin-top: 2.4rem !important; }

.footer a { color: rgba(251, 246, 233, 0.85); }
