/* Affinity Gameworks: one small stylesheet, no framework. The spectrum comes from the logo. */

:root {
    --bg: #0b0b12;
    --panel: #14141f;
    --line: #262636;
    --text: #e9e9f2;
    --muted: #9a9ab0;
    --spectrum: linear-gradient(90deg, #ff1a00, #ff9a00, #ffe600, #2fd04a, #00cfff, #3a4cf0, #a63af0);
    --accent: #00cfff;
    --error: #ff6b6b;
    --ok: #2fd04a;
    --radius: 12px;
    color-scheme: dark;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main { flex: 1; }

a { color: var(--accent); }
a:hover { color: #7fe6ff; }

h1, h2, h3 { line-height: 1.2; letter-spacing: 0.01em; }
h1 { font-size: 2.2rem; margin: 0 0 1rem; }
h2 { font-size: 1.5rem; margin: 2.2rem 0 0.8rem; }
h3 { font-size: 1.2rem; margin: 0 0 0.4rem; }

.wrap { width: min(1080px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2.5rem); }
.section { padding: 2.5rem 0; }
.section > h2:first-child { margin-top: 0; }

.sr-only {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---- header / footer */

.site-header {
    position: sticky; top: 0; z-index: 10;
    background: rgba(11, 11, 18, 0.88);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.site-header::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
    background: var(--spectrum); opacity: 0.7;
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; font-weight: 700; }
.brand img { border-radius: 8px; }
.site-nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 0.35rem 0.7rem; border-radius: 8px; }
.site-nav a:hover { color: var(--text); background: var(--panel); }
.site-nav a.active { color: var(--text); }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.footer-row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.4rem 0; }
.footer-row nav { display: flex; gap: 1.2rem; }
.footer-row a { color: var(--muted); }

@media (max-width: 560px) {
    .brand span { display: none; }
}
@media (max-width: 400px) {
    .site-nav a { padding: 0.35rem 0.45rem; font-size: 0.95rem; }
}

/* ---- hero: the logo's outline echoes spread out from the solid wordmark */

.hero { text-align: center; padding: 3rem 1.25rem 1rem; }
.logo-stack { position: relative; width: min(900px, 100%); margin: 0 auto; aspect-ratio: 1280 / 564; }
.logo-stack img { position: absolute; inset: 0; width: 100%; height: auto; }
.logo-stack .echo { animation: echo 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.logo-stack .echo-1 { animation-delay: 0.15s; }
.logo-stack .echo-2 { animation-delay: 0.3s; }
.logo-stack .echo-3 { animation-delay: 0.45s; }
@keyframes echo {
    from { transform: scaleY(0.55); opacity: 0; }
    to { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .logo-stack .echo { animation: none; }
}
.lede { font-size: 1.25rem; color: var(--muted); margin: 0.5rem 0 0; }

/* ---- game cards */

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.2rem; }
.card {
    position: relative; overflow: hidden;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.5rem;
}
.card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--spectrum); }
.card h3 { font-size: 1.5rem; letter-spacing: 0.12em; }
.card .tagline { color: var(--text); font-weight: 600; margin-top: 0; }
.card p { color: var(--muted); }
.meta { display: flex; gap: 0.6rem; flex-wrap: wrap; font-size: 0.85rem; color: var(--muted); }
.card .meta span { border: 1px solid var(--line); border-radius: 999px; padding: 0.1rem 0.7rem; }
.card .links { display: flex; gap: 1.2rem; margin-bottom: 0; }

/* ---- forms */

.form { display: grid; gap: 0.35rem; margin-top: 1.5rem; }
.form label { font-weight: 600; margin-top: 0.8rem; }
.form .optional { font-weight: 400; color: var(--muted); }
.form input, .form select, .form textarea {
    width: 100%; font: inherit; color: var(--text);
    background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
    padding: 0.65rem 0.8rem;
}
.form textarea { resize: vertical; min-height: 10rem; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form .invalid { border-color: var(--error); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form .row > div { display: grid; gap: 0.35rem; }
@media (max-width: 560px) { .form .row { grid-template-columns: 1fr; } }
.validation-message { color: var(--error); font-size: 0.9rem; }
.form button {
    justify-self: start; margin-top: 1rem;
    position: relative; overflow: hidden;
    font: inherit; font-weight: 700; color: var(--bg); cursor: pointer;
    background: var(--text); border: 0; border-radius: 999px; padding: 0.7rem 1.8rem 0.8rem;
}
.form button::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--spectrum); }
.form button:hover { background: #fff; }
.form button:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.fineprint { color: var(--muted); font-size: 0.9rem; }

.notice { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1.2rem 0; background: var(--panel); }
.notice h2 { margin-top: 0; }
.notice.success { border-color: var(--ok); }
.notice.error { border-color: var(--error); }

/* ---- long-form text */

.prose ul { padding-left: 1.2rem; }
.prose li { margin: 0.6rem 0; }
.prose h2 { scroll-margin-top: 80px; }
