/* Dungeon Maze — site styles. Same palette as the app, and the same idea:
   lit stone, gold, and a lot of dark you can't see into. */

:root {
    --night: #12101f;
    --night-deep: #0b0a14;
    --card: #1c1836;
    --edge: #332a52;
    --text: #e8e5f5;
    --text-soft: #9a94b8;
    --gold: #f5c84c;
    --violet: #8f70db;
    --radius: 18px;
    --font: "SF Pro Rounded", ui-rounded, "Hiragino Maru Gothic ProN",
            -apple-system, "Segoe UI", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background: var(--night);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.wrap {
    width: min(1040px, 100% - 40px);
    margin: 0 auto;
}

img { max-width: 100%; }

/* ---------- nav ---------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(11, 10, 20, 0.86);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--edge);
}

.nav .wrap {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text);
    text-decoration: none;
}

.brand img {
    width: 34px;
    height: 34px;
    border-radius: 9px;
}

.nav-links {
    margin-left: auto;
    display: flex;
    gap: 22px;
    align-items: center;
}

.nav-links a {
    color: var(--text-soft);
    text-decoration: none;
    font-size: 0.94rem;
    font-weight: 600;
}

.nav-links a:hover { color: var(--gold); }

/* Narrow phones: keep the nav on one line by trimming the optional links */
@media (max-width: 700px) {
    .nav-links { gap: 14px; }
    .nav-links a { font-size: 0.86rem; }
    .nav-links a[href*="#features"],
    .nav-links a[href*="#screens"],
    .nav-links a[href*="#worlds"] { display: none; }
    .brand { font-size: 1.05rem; }
}

/* ---------- hero ---------- */
/* Dungeon stone, then the game's own trick on top: a torch-lit clearing that
   falls away to nothing at the edges. */

.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    text-align: center;
    padding: 84px 0 72px;
    background: url("img/stone.png") repeat;
    background-size: 62px 62px;
    border-bottom: 1px solid var(--edge);
}

.hero-fog {
    position: absolute;
    inset: -10%;
    z-index: -1;
    background:
        radial-gradient(closest-side at 50% 38%,
            rgba(245, 200, 76, 0.16) 0%,
            rgba(11, 10, 20, 0.35) 42%,
            rgba(11, 10, 20, 0.88) 68%,
            var(--night-deep) 100%);
    animation: breathe 9s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-fog { animation: none; }
}

.hero-inner { position: relative; }

.hero img.icon {
    width: 112px;
    height: 112px;
    border-radius: 26px;
    box-shadow: 0 22px 50px rgba(0,0,0,0.7);
}

.hero h1 {
    font-size: clamp(2.6rem, 9vw, 4.4rem);
    font-weight: 900;
    line-height: 0.98;
    letter-spacing: -0.01em;
    color: var(--gold);
    margin: 22px 0 10px;
    text-shadow: 0 6px 26px rgba(0,0,0,0.75);
}

.hero .sub {
    font-size: clamp(1.05rem, 3vw, 1.35rem);
    font-weight: 700;
    color: var(--text);
}

.hero p.lede {
    max-width: 620px;
    margin: 16px auto 0;
    color: var(--text-soft);
    font-size: 1.05rem;
}

/* ---------- App Store badge ---------- */

.store {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
    padding: 13px 26px;
    background: var(--gold);
    color: #1a1508;
    font-weight: 800;
    font-size: 1.02rem;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 14px 34px rgba(245, 200, 76, 0.28);
    transition: transform 0.12s ease, filter 0.12s ease;
}

.store:hover { transform: translateY(-2px); filter: brightness(1.05); }

.store small {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    opacity: 0.7;
    letter-spacing: 0.04em;
}

.soon {
    margin-top: 12px;
    color: var(--text-soft);
    font-size: 0.85rem;
}

/* ---------- sections ---------- */

section { padding: 66px 0; }

h2 {
    font-size: clamp(1.7rem, 4vw, 2.2rem);
    font-weight: 900;
    text-align: center;
    margin-bottom: 10px;
}

.section-lede {
    text-align: center;
    color: var(--text-soft);
    max-width: 620px;
    margin: 0 auto 40px;
}

/* ---------- worlds ---------- */
/* Each swatch is the world's actual wall texture, straight out of the game. */

/* 16 worlds divide evenly by 4 and by 2 — an auto-fit grid would leave a
   ragged last row at most widths. */
/* Sixteen of these, so they want to read as one gallery rather than a slow
   column of postcards. auto-fill keeps it a grid at every width instead of
   snapping between fixed counts: ~5 across on a full-width wrap, 4 on a small
   laptop, 3 on a phone. */
.worlds {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

@media (max-width: 760px) {
    .worlds {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    /* Three across leaves little room, and "Drowned Halls" is not a short word. */
    .worlds span {
        font-size: 0.62rem;
        padding: 16px 6px 6px;
        line-height: 1.15;
    }
}

@media (max-width: 380px) {
    .worlds { grid-template-columns: repeat(2, 1fr); }
    .worlds span { font-size: 0.74rem; }
}

.worlds li {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--edge);
    background: var(--card);
    aspect-ratio: 1;
    transition: transform 0.14s ease, border-color 0.14s ease;
}

.worlds li:hover {
    transform: translateY(-3px);
    border-color: var(--gold);
}

.worlds img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.worlds span {
    position: absolute;
    inset: auto 0 0 0;
    padding: 22px 10px 9px;
    font-size: 0.82rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.9);
    background: linear-gradient(180deg, transparent, rgba(6, 5, 12, 0.92));
}

/* ---------- features ---------- */

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

.feature {
    background: var(--card);
    border: 1px solid var(--edge);
    border-radius: var(--radius);
    padding: 24px;
}

.feature img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    display: block;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}

.feature h3 {
    font-size: 1.06rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.feature p {
    color: var(--text-soft);
    font-size: 0.94rem;
}

/* ---------- screens ---------- */

.screens {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 6px 4px 6px;
    scroll-snap-type: x mandatory;
}

.screens img {
    width: 232px;
    flex: 0 0 auto;
    border-radius: 24px;
    border: 1px solid var(--edge);
    scroll-snap-align: center;
    box-shadow: 0 18px 40px rgba(0,0,0,0.45);
}

/* ---------- price panel ---------- */

.price {
    background: linear-gradient(180deg, var(--card), #171331);
    border: 1px solid var(--edge);
    border-radius: 26px;
    padding: 46px 30px;
    text-align: center;
}

.price .tag {
    font-size: 3rem;
    font-weight: 900;
    color: var(--gold);
    line-height: 1.1;
}

.price .once {
    color: var(--text-soft);
    font-weight: 700;
    margin-bottom: 22px;
}

.price ul {
    list-style: none;
    display: inline-flex;
    flex-direction: column;
    gap: 9px;
    text-align: left;
    margin-bottom: 6px;
}

.price li::before {
    content: "✓";
    color: var(--gold);
    font-weight: 900;
    margin-right: 10px;
}

/* ---------- the quiet promises ---------- */

.quiet { padding-top: 0; }

.quiet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.quiet-grid div {
    border: 1px solid var(--edge);
    border-left: 3px solid var(--gold);
    border-radius: 12px;
    padding: 16px 18px;
    color: var(--text-soft);
    font-size: 0.94rem;
}

.quiet-grid strong { color: var(--text); }

/* ---------- footer ---------- */

footer {
    border-top: 1px solid var(--edge);
    background: var(--night-deep);
    padding: 40px 0 52px;
}

.footer-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 30px;
    align-items: center;
    justify-content: space-between;
}

footer a {
    color: var(--text-soft);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.94rem;
}

footer a:hover { color: var(--gold); }

.footer-links {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
}

.copy {
    color: var(--text-soft);
    font-size: 0.86rem;
}

/* ---------- legal page ---------- */

.legal {
    padding: 56px 0 20px;
    max-width: 760px;
}

.legal h1 {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 6px;
}

.legal .updated {
    color: var(--text-soft);
    font-size: 0.9rem;
    margin-bottom: 34px;
}

.legal h2 {
    text-align: left;
    font-size: 1.25rem;
    margin: 34px 0 10px;
    color: var(--gold);
}

.legal p, .legal li {
    color: var(--text-soft);
    margin-bottom: 12px;
}

.legal ul { padding-left: 22px; }

.legal strong { color: var(--text); }

.legal a { color: var(--gold); }

.callout {
    background: var(--card);
    border: 1px solid var(--edge);
    border-left: 4px solid var(--gold);
    border-radius: 12px;
    padding: 18px 20px;
    margin: 26px 0;
}

.callout p { margin: 0; color: var(--text); font-weight: 600; }
