/* Dice Outpost guides — static pages, player-surface design system.
   Tokens mirror frontend/src/styles/_colors.scss. */

:root {
    --necromancer-blue: #131d25;
    --paladin-white: #fffaed;
    --dragon-teal: #1bbfca;
    --dragon-teal-dark: #0bafba;
    --sorcerer-red: #b50000;
    --treasure-gold: #d4af37;
    --text-body: rgba(255, 250, 237, 0.9);
    --text-muted: rgba(255, 250, 237, 0.55);
    --surface-card: rgba(255, 255, 255, 0.05);
    --surface-card-border: rgba(255, 255, 255, 0.1);
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--necromancer-blue);
    color: var(--text-body);
    font-family: "DM Sans", sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--dragon-teal);
    text-decoration: none;
    transition: color 0.2s var(--ease-out);
}

a:hover {
    color: var(--dragon-teal-dark);
}

h1,
h2,
h3,
h4 {
    color: var(--paladin-white);
    line-height: 1.25;
    margin: 2em 0 0.5em;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-top: 0.25em;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

/* ------------------------------------------------------------- header
   Mirrors the SPA header (src/app/header): sticky 64px frosted bar,
   SVG logo, white 600-weight links with a red pill hover. */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 64px;
    padding: 0 24px;
    background: rgba(19, 29, 37, 0.5);
    backdrop-filter: blur(10px);
}

.site-header .logo {
    display: flex;
    align-items: center;
}

.site-header .logo img {
    height: 40px;
    width: auto;
}

.site-header .logo img.logo-mark {
    display: none;
}

.site-header nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-header nav a {
    color: var(--paladin-white);
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .site-header nav a:hover {
        background: var(--sorcerer-red);
        color: var(--paladin-white);
    }
}

.site-header nav a.active {
    color: var(--dragon-teal);
}

@media (max-width: 600px) {
    .site-header {
        padding: 0 12px;
    }

    .site-header .logo img.logo-full {
        display: none;
    }

    .site-header .logo img.logo-mark {
        display: block;
        height: 36px;
    }

    .site-header nav {
        gap: 0;
    }

    .site-header nav a {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
}

/* --------------------------------------------------------------- main */

main {
    width: 100%;
    margin: 0 auto;
    padding: 32px 20px 64px;
    flex: 1;
}

main.article {
    max-width: 760px;
}

main.hub {
    max-width: 1100px;
}

.breadcrumbs {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.breadcrumbs span {
    color: var(--text-muted);
    margin: 0 2px;
}

.eyebrow {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0 0 4px;
}

.byline {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 0 32px;
}

article p {
    margin: 0 0 1.1em;
}

article ul,
article ol {
    padding-left: 1.4em;
    margin: 0 0 1.2em;
}

article li {
    margin-bottom: 0.4em;
}

article blockquote {
    margin: 1.5em 0;
    padding: 12px 20px;
    background: var(--surface-card);
    border: 1px solid var(--surface-card-border);
    border-radius: 12px;
    color: var(--text-muted);
}

article blockquote p {
    margin: 0;
}

article hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 2.5em 0;
}

article code {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.9em;
}

/* tables */

.table-scroll {
    overflow-x: auto;
    margin: 1.5em 0;
    border: 1px solid var(--surface-card-border);
    border-radius: 12px;
    background: var(--surface-card);
    backdrop-filter: blur(10px);
}

table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.92rem;
}

th,
td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: top;
}

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

tbody tr:last-child td {
    border-bottom: none;
}

/* ---------------------------------------------------------------- CTA */

.cta {
    margin: 48px 0;
    padding: 28px;
    background: var(--surface-card);
    border: 1px solid var(--surface-card-border);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    text-align: center;
}

.cta h2 {
    margin: 0 0 8px;
}

.cta p {
    color: var(--text-muted);
    margin: 0 auto 20px;
    max-width: 48ch;
}

.cta-button {
    display: inline-block;
    background: var(--sorcerer-red);
    color: var(--paladin-white);
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 8px;
    transition: filter 0.2s var(--ease-out);
}

.cta-button:hover {
    color: var(--paladin-white);
    filter: brightness(1.15);
}

/* ------------------------------------------------------ cards / grids */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.guide-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
    background: var(--surface-card);
    border: 1px solid var(--surface-card-border);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.guide-card:hover {
    border-color: var(--dragon-teal);
    transform: translateY(-2px);
}

.guide-card-category {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.7rem;
    font-weight: 600;
}

.guide-card-title {
    color: var(--paladin-white);
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.3;
}

.guide-card-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.related h2 {
    margin-top: 0;
}

/* ---------------------------------------------------------------- hub */

.hub-hero {
    text-align: center;
    padding: 24px 0 8px;
    max-width: 640px;
    margin: 0 auto;
}

.hub-hero h1 {
    font-size: 3rem;
}

.hub-hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.hub-section {
    margin-top: 48px;
}

.hub-section h2 {
    margin: 0;
}

.hub-blurb {
    color: var(--text-muted);
    margin: 4px 0 0;
}

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

.site-footer {
    padding: 32px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    text-align: center;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
}

.site-footer nav a {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.site-footer nav a:hover {
    color: var(--dragon-teal);
}

.site-footer p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.9rem;
    }

    .hub-hero h1 {
        font-size: 2.2rem;
    }
}

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

.landing-hero {
    text-align: center;
    padding: 40px 0 24px;
    margin-bottom: 24px;
}

.landing-hero h1 {
    font-size: 2.75rem;
    margin: 0 0 12px;
}

.landing-hero p {
    color: var(--text-muted);
    font-size: 1.15rem;
    max-width: 56ch;
    margin: 0 auto 24px;
}

/* ------------------------------------------------------ table of contents */

.toc {
    background: var(--surface-card);
    border: 1px solid var(--surface-card-border);
    border-radius: 12px;
    padding: 14px 18px;
    margin: 0 0 28px;
    font-size: 0.9rem;
}

.toc-label {
    display: block;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.toc ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
}
