/* Royal Snakes Arena — AMCRAFTS
 * Copyright (c) 2026 AMCRAFTS. All Rights Reserved.
 *
 * One sheet for the whole public site. It carries two registers, because the
 * site has two jobs:
 *
 *   - The home page is a shop window, and is allowed to be dark, gold and
 *     full-bleed, matching the game it is advertising.
 *   - The legal pages are read, sometimes by a reviewer looking for one clause,
 *     and are set as plain documents on the same ground: generous measure,
 *     ordinary link colour, no decoration competing with the text.
 *
 * The palette is the game's own: the night indigo the menu is painted on, and
 * the gold leaf of the castle's crest.
 */

:root {
    --night:      #0a0620;
    --night-soft: #151033;
    --raised:     #1d1749;
    --edge:       #312860;
    --gold:       #e8b75a;
    --gold-deep:  #b8862c;
    --ivory:      #f3eee2;
    --muted:      #a79bc8;
    --measure:    46rem;
}

* { box-sizing: border-box; }

html { background: var(--night); }

body {
    margin: 0;
    background: var(--night);
    color: var(--ivory);
    font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
}

/* `height: auto` is not decoration. Every <img> here carries width/height
   attributes so the browser can reserve the right box before the file arrives,
   and those attributes map to CSS *presentational hints* — a literal
   `height: 640px`. Overriding only the width therefore leaves the intrinsic
   height pinned, which silently stretches the wordmark, squashes the feature
   icons, and makes `aspect-ratio` below do nothing at all. */
img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold); text-underline-offset: 2px; }
a:hover { color: #f6d18c; }

/* ---------------------------------------------------------------- hero ---- */

.hero {
    position: relative;
    min-height: 78vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1.25rem 3.5rem;
    overflow: hidden;
}

/* The backdrop is the game's own menu art, anchored at the top where the castle
   is; letting a tall portrait painting centre on a wide window crops the castle
   out and leaves only sky.

   The negative inset matters: the painting has a *painted gold frame* around its
   edges, and at the hero's own size that frame runs down both sides of the page
   and reads as a browser chrome mistake. Bleeding the layer past the hero (which
   clips it) zooms the crop in beyond the frame. */
.hero::before {
    content: "";
    position: absolute;
    /* Asymmetric on purpose: the frame's top edge is the thickest, so the layer
       is pushed furthest past the hero there. The bottom needs almost none, as
       the gradient below already covers it. */
    inset: -16% -20% -4%;
    background: url("hero.webp") center top / cover no-repeat;
    opacity: .55;
}

/* A wash from transparent to the page ground, so the hero art ends rather than
   stops, and the text below it keeps its contrast whatever the art is doing. */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        rgba(10, 6, 32, .55) 0%,
        rgba(10, 6, 32, .35) 35%,
        rgba(10, 6, 32, .92) 82%,
        var(--night) 100%);
}

.hero > * { position: relative; z-index: 1; }

.hero img.wordmark {
    width: min(30rem, 82vw);
    filter: drop-shadow(0 6px 22px rgba(0, 0, 0, .65));
}

.hero p.tagline {
    max-width: 34rem;
    margin: 1.5rem auto 0;
    font-size: 1.15rem;
    color: var(--ivory);
    text-shadow: 0 2px 12px rgba(0, 0, 0, .8);
}

.badges {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    justify-content: center;
}

.badge {
    border: 1px solid var(--gold-deep);
    border-radius: 2rem;
    padding: .45rem 1.1rem;
    font-size: .88rem;
    font-weight: 600;
    letter-spacing: .01em;
    color: var(--gold);
    background: rgba(10, 6, 32, .55);
}

/* --------------------------------------------------------------- layout --- */

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 1.25rem; }

section { padding: 3.5rem 0; }

h1 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 .5rem; letter-spacing: -.01em; }

h2 {
    font-size: 1.35rem;
    margin: 0 0 1.5rem;
    color: var(--gold);
    letter-spacing: .005em;
}

h3 { font-size: 1.02rem; margin: 1.75rem 0 .5rem; }

/* ---------------------------------------------------------------- modes --- */

.modes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 1.1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.modes li {
    background: var(--night-soft);
    border: 1px solid var(--edge);
    border-radius: .9rem;
    overflow: hidden;
}

/* The card art is painted 3:4 with its subject — the candlelit desk, the table,
   the lobby door — sitting low in the frame, under a lot of dark ceiling. Shown
   at its native ratio the tile is mostly gloom, so it is cropped to a landscape
   window pulled down the image to where the scene actually is. */
.modes img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center 72%;
}

.modes .caption { padding: .85rem 1rem 1.1rem; }

.modes strong { display: block; color: var(--gold); margin-bottom: .2rem; }

.modes span { font-size: .92rem; color: var(--muted); }

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

.features { list-style: none; margin: 0; padding: 0; }

.features li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 0;
    border-top: 1px solid var(--edge);
}

.features li:first-child { border-top: 0; }

.features img { width: 2.75rem; flex: none; }

.features strong { display: block; color: var(--ivory); }

.features span { color: var(--muted); font-size: .95rem; }

/* ------------------------------------------------------------ documents --- */

/* The legal pages: a single column of prose, lighter than the hero, sized to be
   read rather than skimmed. */

.doc { max-width: var(--measure); margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }

.doc header {
    border-bottom: 1px solid var(--edge);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.doc h2 {
    font-size: 1.2rem;
    margin: 2.5rem 0 .75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--edge);
}

.meta { color: var(--muted); margin: .25rem 0; font-size: .92rem; }

.lede {
    background: var(--raised);
    border-left: 3px solid var(--gold);
    border-radius: 0 6px 6px 0;
    padding: 1rem 1.15rem;
    margin: 0 0 1.25rem;
}

.lede p:first-child { margin-top: 0; }
.lede p:last-child  { margin-bottom: 0; }

.doc ul, .doc ol { padding-left: 1.25rem; }
.doc li { margin: .45rem 0; }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: .94rem;
    display: block;
    overflow-x: auto;
}

th, td {
    text-align: left;
    padding: .6rem .7rem;
    border-bottom: 1px solid var(--edge);
    vertical-align: top;
}

th { color: var(--muted); font-weight: 600; white-space: nowrap; }

code {
    background: var(--raised);
    border: 1px solid var(--edge);
    border-radius: 4px;
    padding: .1rem .35rem;
    font-size: .9em;
}

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

nav.pages {
    margin: 0 0 2rem;
    font-size: .95rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

nav.pages strong { color: var(--ivory); }

/* ----------------------------------------------------------------- form --- */

label { display: block; margin: 1.25rem 0 .3rem; font-weight: 600; }

input[type=email], input[type=password], input[type=text] {
    width: 100%;
    padding: .65rem .75rem;
    border: 1px solid var(--edge);
    border-radius: .5rem;
    background: var(--night-soft);
    color: var(--ivory);
    font-size: 1rem;
}

button {
    margin-top: 1.5rem;
    padding: .75rem 1.5rem;
    border: 0;
    border-radius: 2rem;
    background: var(--gold);
    color: #2a1c00;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}

button:disabled { opacity: .55; cursor: default; }

.result { margin-top: 1.25rem; padding: .85rem 1rem; border-radius: .5rem; }
.result.ok   { background: #14331f; border: 1px solid #2f6b42; }
.result.bad  { background: #3a1620; border: 1px solid #7c2d42; }

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

footer {
    border-top: 1px solid var(--edge);
    padding: 1.75rem 1.25rem 3rem;
    color: var(--muted);
    font-size: .9rem;
}

footer .wrap { padding: 0 1.25rem; }

footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: .9rem;
}

/* Windows at phone width get a shorter hero, so the fold still shows the first
   line of prose rather than ending on the art. */
@media (max-width: 30rem) {
    .hero { min-height: 62vh; padding: 3rem 1.25rem 2.5rem; }
    .hero p.tagline { font-size: 1.05rem; }
    section { padding: 2.5rem 0; }
}
