/* =============================================================
   RattleVale: game landing page and its legal pages.
   Styled after the game's own UI rather than /shared/style.css:
   night-sky navy, gold, parchment cards, Grenze Gotisch headings.
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:wght@500;600;700&family=Grenze+Gotisch:wght@600;700&display=swap');

:root {
    --rv-night:       #10152a;
    --rv-night-deep:  #0a0e1d;
    --rv-panel:       #1b2340;
    --rv-panel-edge:  #39456e;
    --rv-gold:        #f5d17a;
    --rv-gold-deep:   #e0a93c;
    --rv-parchment:   #efe3c4;
    --rv-parchment-2: #e2d1a6;
    --rv-ink:         #3a2a1a;
    --rv-ink-soft:    #6b5236;
    --rv-text:        #dfe4f2;
    --rv-text-dim:    #9aa3c0;
    --rv-frost:       #9fd8ff;
    --rv-heading: 'Grenze Gotisch', 'Georgia', serif;
    --rv-body: 'Barlow Semi Condensed', 'Arial Narrow', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--rv-body);
    font-weight: 500;
    font-size: 18px;
    line-height: 1.55;
    color: var(--rv-text);
    background-color: var(--rv-night);
    /* A loose starfield, like the level map's Star Chart. */
    background-image:
        radial-gradient(1.5px 1.5px at 12% 8%, rgba(255, 240, 200, 0.8), transparent 60%),
        radial-gradient(1px 1px at 78% 4%, rgba(255, 255, 255, 0.7), transparent 60%),
        radial-gradient(1.5px 1.5px at 44% 18%, rgba(255, 240, 200, 0.6), transparent 60%),
        radial-gradient(1px 1px at 90% 26%, rgba(255, 255, 255, 0.6), transparent 60%),
        radial-gradient(1px 1px at 6% 34%, rgba(255, 255, 255, 0.5), transparent 60%),
        radial-gradient(1.5px 1.5px at 64% 42%, rgba(255, 240, 200, 0.5), transparent 60%),
        radial-gradient(1px 1px at 28% 55%, rgba(255, 255, 255, 0.5), transparent 60%),
        radial-gradient(1px 1px at 86% 63%, rgba(255, 255, 255, 0.4), transparent 60%),
        radial-gradient(1.5px 1.5px at 18% 76%, rgba(255, 240, 200, 0.4), transparent 60%),
        radial-gradient(1px 1px at 56% 88%, rgba(255, 255, 255, 0.4), transparent 60%),
        linear-gradient(180deg, #19213f 0%, var(--rv-night) 40%, var(--rv-night-deep) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--rv-gold); text-decoration: none; }
a:hover { text-decoration: underline; }

img, video { display: block; max-width: 100%; }

h1, h2, h3 {
    font-family: var(--rv-heading);
    font-weight: 700;
    color: var(--rv-gold);
    line-height: 1.1;
    letter-spacing: 0.01em;
}

h2 { font-size: clamp(34px, 5vw, 48px); margin-bottom: 16px; }
h3 { font-size: 26px; }

strong { color: #fff; font-weight: 700; }

.wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

section { padding: 88px 0; }

.lede {
    color: var(--rv-text-dim);
    max-width: 640px;
    margin-bottom: 40px;
}

.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

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

.hero {
    padding: 72px 0 56px;
    overflow: hidden;
}

.hero .wrap {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 64px;
    align-items: center;
}

.hero-icon {
    width: 96px;
    height: 96px;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(245, 209, 122, 0.25);
    margin-bottom: 28px;
}

.wordmark {
    font-size: clamp(64px, 10vw, 112px);
    text-shadow: 0 4px 0 #7a5317, 0 10px 40px rgba(245, 180, 60, 0.25);
    margin-bottom: 12px;
}

.motto {
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
}

.hero p.intro {
    color: var(--rv-text-dim);
    max-width: 520px;
    margin-bottom: 32px;
}

/* The game's gold "Play" button, slanted ends and all. */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 34px;
    font-family: var(--rv-body);
    font-weight: 700;
    font-size: 18px;
    color: #3b2606;
    background: linear-gradient(180deg, #fbe39a 0%, var(--rv-gold) 45%, var(--rv-gold-deep) 100%);
    clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2);
}

.stores {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.price-panel .stores {
    justify-content: center;
    margin-top: 28px;
}

a.badge:hover {
    text-decoration: none;
    filter: brightness(1.08);
}

.badge::before {
    content: '';
    border-left: 11px solid #3b2606;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
}

/* Store not live yet: same shape, greyed out, not clickable. */
.badge.soon {
    filter: grayscale(1);
    opacity: 0.6;
    cursor: default;
}

.platforms {
    margin-top: 14px;
    font-size: 15px;
    color: var(--rv-text-dim);
}

.phone {
    width: 300px;
    padding: 10px;
    border-radius: 30px;
    background: linear-gradient(160deg, #3a4470, #151a30);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 120px rgba(245, 209, 122, 0.12);
    transform: rotate(2deg);
}

.phone video {
    width: 100%;
    height: auto;
    aspect-ratio: 600 / 1300;
    border-radius: 20px;
    background: var(--rv-night-deep);
}

/* ----- Feature rows ----- */

.feature {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 64px;
    align-items: center;
}

.feature.flip { grid-template-columns: 300px 1fr; }
.feature > *, .hero .wrap > * { min-width: 0; }
.feature.flip .shot { order: -1; }

.feature p { color: var(--rv-text-dim); margin-bottom: 16px; max-width: 560px; }

.shot {
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
    width: 100%;
    height: auto;
}

/* ----- Endless: leaderboard badge over a grid of achievements ----- */

.medals {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.feature.flip .medals { order: -1; }

.medals img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.medals .medal-main {
    grid-column: 1 / -1;
    width: 70%;
    margin: 0 auto 8px;
    border-radius: 24px;
}

.band {
    background: linear-gradient(180deg, rgba(27, 35, 64, 0.85), rgba(16, 21, 42, 0.85));
    border-top: 1px solid rgba(245, 209, 122, 0.12);
    border-bottom: 1px solid rgba(245, 209, 122, 0.12);
}

/* ----- Heroes: parchment cards like the in-game hero cards ----- */

.roster {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.card {
    background: linear-gradient(180deg, var(--rv-parchment) 0%, var(--rv-parchment-2) 100%);
    color: var(--rv-ink);
    border-radius: 14px;
    padding: 16px 18px 20px;
    box-shadow:
        inset 0 0 0 2px rgba(122, 83, 23, 0.35),
        inset 0 0 0 5px var(--rv-parchment),
        inset 0 0 0 6px rgba(122, 83, 23, 0.2),
        0 12px 30px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease;
}

.card:hover { transform: translateY(-4px) rotate(-0.5deg); }

.card img {
    width: auto;
    height: 150px;
    margin: 4px auto 10px;
    filter: drop-shadow(0 8px 6px rgba(58, 42, 26, 0.35));
}

.card h3 { color: var(--rv-ink); font-size: 28px; }

.card .spell {
    font-weight: 700;
    font-size: 15px;
    color: #9a4f12;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.card p { font-size: 16px; line-height: 1.45; color: var(--rv-ink-soft); }

/* ----- Foes: dark cards that glow cold ----- */

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

.foes.bosses { grid-template-columns: repeat(2, 1fr); margin-top: 16px; }

.foe {
    display: flex;
    align-items: center;
    gap: 16px;
    background: radial-gradient(circle at 15% 50%, #26305a 0%, var(--rv-panel) 55%);
    border: 1px solid var(--rv-panel-edge);
    border-radius: 14px;
    padding: 14px 18px 14px 14px;
}

.foe img {
    flex: 0 0 84px;
    height: 100px;
    width: 84px;
    object-fit: contain;
    filter: drop-shadow(0 0 14px rgba(159, 216, 255, 0.25));
}

.foe h3 { font-size: 22px; color: var(--rv-frost); margin-bottom: 4px; }
.foe p { font-size: 15px; line-height: 1.4; color: var(--rv-text-dim); }

.foe.boss {
    border-color: rgba(214, 140, 255, 0.55);
    background: radial-gradient(circle at 15% 50%, #3a2a5e 0%, var(--rv-panel) 55%);
    padding: 18px 24px 18px 18px;
}
.foe.boss img { flex-basis: 140px; width: 140px; height: 160px; filter: drop-shadow(0 0 18px rgba(214, 140, 255, 0.35)); }
.foe.boss h3 { color: #e3b5ff; font-size: 28px; }
.foe.boss .tag {
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #c79bff;
    margin-bottom: 2px;
}
.foe.boss p { font-size: 16px; }

/* ----- Screenshot strip ----- */

.trailer {
    display: block;
    width: 100%;
    max-width: 1000px;
    height: auto;
    aspect-ratio: 1280 / 854;
    margin: 16px auto 40px;
    border-radius: 20px;
    background: var(--rv-night-deep);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.strip {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 8px 24px 28px;
    max-width: 1100px;
    margin: 0 auto;
    justify-content: safe center;
    scrollbar-color: var(--rv-panel-edge) transparent;
}

.strip img {
    flex: 0 0 auto;
    width: 240px;
    height: auto;
    scroll-snap-align: center;
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
}

/* ----- Price ----- */

.price-panel {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    padding: 48px 40px;
    border-radius: 20px;
    background: linear-gradient(180deg, var(--rv-parchment) 0%, var(--rv-parchment-2) 100%);
    color: var(--rv-ink);
    box-shadow:
        inset 0 0 0 2px rgba(122, 83, 23, 0.35),
        inset 0 0 0 7px var(--rv-parchment),
        inset 0 0 0 8px rgba(122, 83, 23, 0.2),
        0 24px 60px rgba(0, 0, 0, 0.45);
}

.price-panel h2 { color: var(--rv-ink); }
.price-panel p { color: var(--rv-ink-soft); margin-bottom: 12px; }
.price-panel strong { color: var(--rv-ink); }

.ticks {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 24px;
    margin-top: 24px;
    font-weight: 700;
    color: var(--rv-ink);
}

.ticks li::before { content: '\2605'; color: var(--rv-gold-deep); margin-right: 8px; }

/* ----- FAQ ----- */

.faq { max-width: 760px; margin: 0 auto; }

.faq details {
    border-bottom: 1px solid rgba(245, 209, 122, 0.15);
    padding: 18px 0;
}

.faq summary {
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    font-size: 20px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--rv-gold); font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { color: var(--rv-text-dim); margin-top: 10px; }

/* ----- Footer ----- */

.footer {
    margin-top: auto;
    padding: 36px 24px 44px;
    text-align: center;
    font-size: 15px;
    color: var(--rv-text-dim);
    background: var(--rv-night-deep);
    border-top: 1px solid rgba(245, 209, 122, 0.12);
}

.footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 28px; margin-bottom: 14px; }
.footer .credit { font-size: 13px; opacity: 0.75; max-width: 720px; margin: 0 auto; }

/* ----- Legal pages ----- */

.legal {
    max-width: 780px;
    margin: 0 auto;
    padding: 56px 24px 80px;
    flex: 1;
}

.legal .back { display: inline-block; margin-bottom: 28px; font-weight: 600; }
.legal h1 { font-size: clamp(40px, 6vw, 56px); margin-bottom: 8px; }
.legal .effective { color: var(--rv-text-dim); margin-bottom: 32px; }
.legal h2 { font-size: 30px; margin: 36px 0 12px; }
.legal p, .legal li { color: var(--rv-text); }
.legal p { margin-bottom: 16px; }
.legal ul { padding-left: 24px; margin-bottom: 16px; }
.legal li { margin-bottom: 6px; }
.legal .summary {
    background: var(--rv-panel);
    border: 1px solid var(--rv-panel-edge);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 8px;
}
.legal .summary p:last-child { margin-bottom: 0; }

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

@media (max-width: 900px) {
    .hero .wrap, .feature, .feature.flip { grid-template-columns: 1fr; gap: 44px; }
    .hero { text-align: center; padding-top: 48px; }
    .hero-icon, .hero p.intro { margin-left: auto; margin-right: auto; }
    .hero .stores { justify-content: center; }
    .phone { margin: 0 auto; width: 270px; }
    .feature .shot, .feature.flip .shot { order: 0; max-width: 300px; margin: 0 auto; }
    .feature.flip .medals { order: 0; max-width: 300px; margin: 0 auto; }
    .roster { grid-template-columns: repeat(2, 1fr); }
    .foes, .foes.bosses { grid-template-columns: 1fr; }
    .foes { max-width: 560px; margin-left: auto; margin-right: auto; }
    section { padding: 64px 0; }
}

@media (max-width: 480px) {
    body { font-size: 17px; }
    .roster { grid-template-columns: 1fr 1fr; gap: 12px; }
    .card { padding: 12px 12px 16px; }
    .card img { height: 110px; }
    .card h3 { font-size: 22px; }
    .card p { font-size: 14px; }
    .foes { gap: 12px; }
    .foe.boss img { flex-basis: 100px; width: 100px; height: 120px; }
    .price-panel { padding: 36px 22px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .card { transition: none; }
    .card:hover { transform: none; }
}
