/* mootrix.studio
 *
 * Black and white, because that is what the mascot is: a Holstein cow in a
 * dark suit and sunglasses. The palette is the LAUNCHER'S, value for value --
 * see moo/gui/theme.hpp, which carries the same reasoning.
 *
 * Both of them wore Wildeck's gold in a first draft, and both were wrong to.
 * The studio is not the card game; a site and a launcher that borrow a game's
 * colours are a site and a launcher that will look stale the day a second
 * title ships.
 *
 * The cast is very slightly COOL -- a couple of points of blue in the darks.
 * Neutral grey reads muddy; the cool tilt reads as night, chrome and glass,
 * which is the register the mascot is already in.
 *
 * The only chromatic values here cover a state dot and an error line. They are
 * held well back, the way a black-and-white film uses one red object.
 *
 * Plain CSS, no build step, no framework.
 */

:root {
    /* straight out of theme.hpp */
    --bg: #0b0b0d;
    --surface: #131316;
    --surface-raised: #1b1b1f;
    --surface-hover: #27272c;
    --outline: #3a3a41;

    --text: #f6f6f8;
    --text-muted: #a8a8b0;
    --text-faint: #8a8a93;

    /* Off-white at rest so hover has somewhere brighter to go. */
    --accent: #e9e9ed;
    --accent-hot: #ffffff;
    --accent-down: #b0b0b8;
    --accent-text: #0b0b0d;

    --success: #63b98d;
    --warning: #d4873f;
    --danger: #e05a63;

    --radius: 8px;
    --wrap: 1080px;
    --shadow: 0 20px 44px rgba(0, 0, 0, .6);

    --sans: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system,
            Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    /* Sans throughout. The serif in the previous draft was there to sit next
     * to Wildeck's parchment; with the gold gone it has nothing to agree with,
     * and a grotesque is the right voice for a suit. */
    font: 16px/1.65 var(--sans);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* One cold overhead light, slightly off-centre. It is what keeps a page of
     * forms from reading as a flat black rectangle, and it is cheap: a fixed
     * gradient, no image, no repaint on scroll. */
    background-image:
        radial-gradient(1100px 560px at 50% -12%, rgba(255, 255, 255, .07), transparent 68%),
        radial-gradient(520px 380px at 88% 2%, rgba(255, 255, 255, .035), transparent 62%);
    background-attachment: fixed;
}

a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--outline); transition: border-color .15s, color .15s; }
a:hover { color: var(--accent-hot); border-bottom-color: var(--accent-hot); text-decoration: none; }
/* Links that are already a shape of their own do not need an underline. */
.btn, .brand, header nav a, .footer-nav a, .tag { border-bottom: none; }

h1, h2, h3 { line-height: 1.18; margin: 0 0 .5em; font-weight: 640; letter-spacing: -.02em; }
h1 { font-size: clamp(1.75rem, 3.6vw, 2.15rem); }
h2 { font-size: 1.28rem; }
h3 { font-size: 1.02rem; }

p { margin: 0 0 1em; }
.hidden { display: none !important; }
.dim { color: var(--text-muted); }
.faint { color: var(--text-faint); font-size: .875rem; }

::selection { background: var(--accent); color: var(--accent-text); }

/* ---- header ---------------------------------------------------------- */

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .95rem 1.6rem;
    border-bottom: 1px solid var(--outline);
    background: rgba(11, 11, 13, .82);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    font-weight: 700;
    font-size: .98rem;
    letter-spacing: .22em;
    color: var(--text);
}
.brand:hover { color: var(--accent-hot); }
.brand img { width: 28px; height: 28px; object-fit: contain; }

header nav { display: flex; align-items: center; gap: .35rem 1.4rem; flex-wrap: wrap; }
header nav a { color: var(--text-muted); font-size: .92rem; }
header nav a:hover { color: var(--text); }

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

main { flex: 1; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 2.8rem 1.6rem 4.5rem; }
main.narrow { max-width: 460px; }

footer {
    border-top: 1px solid var(--outline);
    padding: 1.9rem 1.6rem 2.4rem;
    color: var(--text-faint);
    font-size: .86rem;
    text-align: center;
    background: rgba(19, 19, 22, .55);
}
.footer-nav { display: flex; flex-wrap: wrap; gap: .4rem 1.3rem; justify-content: center; margin-bottom: 1rem; }
.footer-nav a { color: var(--text-muted); font-size: .89rem; }

/* ---- panels ------------------------------------------------------------ */

.panel {
    position: relative;
    background: var(--surface-raised);
    border: 1px solid var(--outline);
    border-radius: var(--radius);
    padding: 1.9rem;
    box-shadow: var(--shadow);
    animation: rise .4s cubic-bezier(.2, .7, .3, 1) both;
}
/* A one-pixel gleam along the top edge -- the light above the page catching a
 * hard surface. Same trick the launcher's panels use, and what makes them sit
 * IN the page rather than on it. */
.panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    border-radius: var(--radius) var(--radius) 0 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28), transparent);
}
.panel + .panel { margin-top: 1.3rem; }
.panel > :last-child { margin-bottom: 0; }

@keyframes rise {
    from { opacity: 0; transform: translateY(9px); }
    to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .panel, .hero img { animation: none; }
    html { scroll-behavior: auto; }
}

.sub { color: var(--text-muted); margin-top: -.45em; }

main > h1 {
    padding-bottom: .65rem;
    border-bottom: 1px solid transparent;
    border-image: linear-gradient(90deg, var(--outline), transparent 70%) 1;
}

/* ---- forms -------------------------------------------------------------- */

label {
    display: block;
    margin: 1.1rem 0 .4rem;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-faint);
}

input[type=text], input[type=email], input[type=password], input:not([type]) {
    width: 100%;
    padding: .7rem .8rem;
    background: var(--bg);
    border: 1px solid var(--outline);
    border-radius: 6px;
    color: var(--text);
    font: inherit;
    transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: var(--text-faint); }
input:hover { border-color: var(--surface-hover); }
input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .1);
}
input:focus-visible, button:focus-visible, a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.check { display: flex; align-items: flex-start; gap: .65rem; margin: 1.2rem 0; }
.check input { margin-top: .35rem; flex: none; accent-color: var(--accent); }
.check label {
    margin: 0; text-transform: none; letter-spacing: 0; font-size: .91rem;
    font-weight: 400; color: var(--text-muted);
}

.btn {
    display: inline-block;
    padding: .66rem 1.2rem;
    border: 1px solid var(--outline);
    border-radius: 6px;
    background: var(--surface-raised);
    color: var(--text);
    font: inherit;
    font-size: .93rem;
    font-weight: 600;
    letter-spacing: .01em;
    cursor: pointer;
    text-align: center;
    transition: background .15s, border-color .15s, color .15s, transform .08s;
}
.btn:hover { background: var(--surface-hover); border-color: var(--accent-down); color: var(--text); }
.btn:active { transform: translateY(1px); }

/* White fill, black letters. The dress shirt against the suit. */
.btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-text);
}
.btn.primary:hover {
    background: var(--accent-hot);
    border-color: var(--accent-hot);
    color: var(--accent-text);
    box-shadow: 0 0 22px rgba(255, 255, 255, .16);
}
.btn.danger { color: var(--danger); background: transparent; border-color: var(--outline); }
.btn.danger:hover { border-color: var(--danger); background: rgba(224, 90, 99, .1); color: var(--danger); }
.btn.small { padding: .36rem .8rem; font-size: .84rem; }
.btn.block { display: block; width: 100%; margin-top: 1.4rem; }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }

/* ---- messages ----------------------------------------------------------- */

.error, .notice {
    display: none;
    margin-top: 1rem;
    padding: .68rem .85rem;
    border-radius: 6px;
    font-size: .91rem;
}
/* The error is the one place colour is allowed to be loud, because it is the
 * one place the reader has to notice something without being told to look. */
.error {
    background: rgba(224, 90, 99, .1);
    border: 1px solid rgba(224, 90, 99, .32);
    border-left: 3px solid var(--danger);
    color: #f0a2a8;
}
/* Success stays monochrome. A confirmation nobody needed to be alerted to
 * does not need a colour of its own. */
.notice {
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--outline);
    border-left: 3px solid var(--accent);
    color: var(--text-muted);
}
.error.show, .notice.show { display: block; }
.error.show { animation: shake .28s; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.swap { margin: 1rem 0 0; font-size: .9rem; color: var(--text-muted); text-align: center; }

/* ---- the library grid ---------------------------------------------------- */

.games { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }

.game {
    display: flex;
    gap: 1.1rem;
    align-items: flex-start;
    background: var(--surface-raised);
    border: 1px solid var(--outline);
    border-radius: var(--radius);
    padding: 1.2rem;
    transition: border-color .18s, transform .18s, box-shadow .18s;
}
.game:hover {
    border-color: var(--accent-down);
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .5);
}
/* Art keeps its own colours. The MONOCHROME is the interface -- the surfaces,
 * the type, the buttons -- and its job is to be the neutral room the artwork
 * hangs in. Draining the art too would just mean a page with nothing in it. */
.game img {
    width: 58px; height: 58px; object-fit: contain; flex: none;
    filter: drop-shadow(0 3px 10px rgba(0, 0, 0, .55));
}
.game h3 { margin-bottom: .25em; }
.game p { margin: 0; color: var(--text-muted); font-size: .91rem; }

.tag {
    display: inline-block;
    margin-top: .65rem;
    padding: .16rem .62rem;
    border: 1px solid var(--outline);
    border-radius: 3px;
    font-size: .67rem;
    text-transform: uppercase;
    letter-spacing: .16em;
    font-weight: 700;
    color: var(--text-faint);
}
.tag.live { color: var(--accent-text); background: var(--accent); border-color: var(--accent); }

/* ---- tables -------------------------------------------------------------- */

.rows { width: 100%; border-collapse: collapse; font-size: .92rem; }
.rows th, .rows td { text-align: left; padding: .68rem .55rem; border-bottom: 1px solid var(--outline); }
.rows th {
    color: var(--text-faint); font-size: .68rem; text-transform: uppercase;
    letter-spacing: .16em; font-weight: 700;
}
.rows tbody tr { transition: background .12s; }
.rows tbody tr:hover { background: rgba(255, 255, 255, .035); }
.rows td.right, .rows th.right { text-align: right; }
.rows tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.5rem; font-size: .95rem; }
.kv dt {
    color: var(--text-faint); font-size: .68rem; text-transform: uppercase;
    letter-spacing: .14em; font-weight: 700; align-self: center;
}
.kv dd { margin: 0; }

/* ---- legal prose ---------------------------------------------------------- */

.prose { max-width: 68ch; }
.prose h2 { margin-top: 2.2rem; padding-top: 1.3rem; border-top: 1px solid var(--outline); }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: .45em; }
.prose strong { color: var(--text); }

.stamp {
    display: inline-block;
    padding: .34rem .8rem;
    border: 1px solid var(--outline);
    border-radius: 3px;
    font-size: .7rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 1.6rem;
}

/* ---- landing --------------------------------------------------------------- */

.hero { text-align: center; padding: 3.6rem 0 4rem; }
.hero img {
    width: 112px; height: 112px; object-fit: contain; margin-bottom: 1.2rem;
    /* Lit, not drained: the glow is the same cold overhead light the page
     * background implies, so he stands IN the room rather than being recoloured
     * to match its walls. */
    filter: drop-shadow(0 0 40px rgba(255, 255, 255, .16));
    animation: rise .55s cubic-bezier(.2, .7, .3, 1) both;
}
.hero h1 {
    font-size: clamp(2.1rem, 6.5vw, 3.3rem);
    letter-spacing: -.035em;
    font-weight: 700;
    /* Lit from above, falling off toward the bottom of the letterforms. */
    background: linear-gradient(180deg, #ffffff 30%, #9a9aa3);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    border: none;
    padding: 0;
}
.hero p { color: var(--text-muted); max-width: 54ch; margin-inline: auto; font-size: 1.06rem; }
.hero .actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: 1.9rem; }

section { margin-top: 3.6rem; }
section > h2 {
    font-size: .7rem; text-transform: uppercase; letter-spacing: .24em;
    color: var(--text-faint); margin-bottom: 1.3rem; font-weight: 700;
}

@media (max-width: 560px) {
    header { padding: .8rem 1rem; }
    header nav { gap: .3rem .9rem; }
    main { padding: 1.7rem 1rem 3rem; }
    .panel { padding: 1.4rem; }
    .hero { padding: 2.2rem 0 2.6rem; }
}
