/* Font declarations */
/* Lato - for logo and tagline */
@font-face {
    font-family: 'Lato';
    src: url('https://cdn.prereq.cards/fonts/logo4.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Lato';
    src: url('https://cdn.prereq.cards/fonts/tagline.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

/* Libertinus Sans - for card data (types, stats, effects) */
@font-face {
    font-family: 'Libertinus Sans';
    src: url('https://cdn.prereq.cards/fonts/cardtext.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Libertinus Sans';
    src: url('https://cdn.prereq.cards/fonts/cardtext-b.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Libertinus Sans';
    src: url('https://cdn.prereq.cards/fonts/cardtext-i.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

/* JetBrains Mono - for queries and code */
@font-face {
    font-family: 'JetBrains Mono';
    src: url('https://cdn.prereq.cards/fonts/code.woff2') format('woff2');
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}

/* Atkinson Hyperlegible - for UI text */
@font-face {
    font-family: 'Atkinson Hyperlegible Next';
    src: url('https://cdn.prereq.cards/fonts/ui2.woff2') format('woff2');
    /*src: url('https://cdn.prereq.cards/fonts/Atkinson_Hyperlegible_Next/AtkinsonHyperlegibleNext-VariableFont_wght.ttf');*/
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}

/* Crimson Text - for card titles and names */
@font-face {
    font-family: 'Crimson Text';
    src: url('https://cdn.prereq.cards/fonts/cardtitle.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* CSS Variables */
:root {
    /* Backgrounds */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #1a202c;

    /* Text colors */
    --text-primary: #e0e0e0;
    --text-muted: #a0a8b0;

    /* Accent colors - Purple/Pink */
    --accent-primary: #a855f7;
    --accent-secondary: #ec4899;
    --accent-hover: #c084fc;

    /* Gold accents */
    --gold-primary: #fbbf24;
    --gold-secondary: #f7df0e;

    /* Borders */
    --border-color: #30363d;
    --border-color-light: #4a5568;

    /* Element colors */
    --element-fire: #d94c2b;
    --element-fire-bg: #4a1515;
    --element-water: #4da4d8;
    --element-water-bg: #0056b8;
    --element-wind: #88c751;
    --element-wind-bg: #1b7a4c;
    --element-norm: #2a2a2a;
    --element-arcane: #1856b0;
    --element-luxem: #b4853b;
    --element-tera: #1f5e4a;
    --element-crux: #3b5ba8;
    --element-umbra: #3e1f6b;
    --element-astra: #4050a5;
    --element-neos: #986a2d;
    --element-exia: #5e1f1f;
    --element-exalted: #bba777;

    /* Cost colors */
    --cost-memory: #3fb8d4;
    --cost-memory-dark: #1a7896;
    --cost-reserve: #e8d46b;
    --cost-reserve-dark: #a0913b;

    /* Stat colors */
    --stat-yellow: #fff59d;
    --speed-fast: #fa676d;
    --speed-slow: #6e9bc5;

    /* Font stacks */
    --font-logo: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-card-data: 'Libertinus Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-card-title: 'Crimson Text', Georgia, 'Times New Roman', serif;
    --font-code: 'JetBrains Mono', 'Courier New', Consolas, monospace;
    --font-ui: 'Atkinson Hyperlegible Next', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Universal reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-ui);
    color: var(--text-primary);
    background: var(--bg-primary);
}

/* Ensure form elements inherit font styles for consistency */
button,
input,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: inherit;
    color: inherit;
}

/* Disable ligatures globally for code font */
code, pre, input[type="text"], input[type="search"], textarea {
    font-variant-ligatures: none;
}

/* Main Content */
main {
    max-width: 1150px;
    margin: 0 auto;
    padding: 30px 20px;
}

.content-box {
    background: var(--bg-secondary);
    padding: 30px;
    border: 1px solid var(--border-color);
}

/* Footer */
footer {
    margin-top: 30px;
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

footer a {
    color: var(--accent-primary);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Utility Classes */
.text-shadow-readable {
    text-shadow: 2px 1px 0 #000;
}

/* Link Styles */
a.link-purple {
    color: var(--accent-primary);
    text-decoration: none;
}

a.link-purple:hover {
    color: var(--accent-hover);
}

a.link-gold {
    color: var(--gold-primary);
    text-decoration: none;
}

a.link-gold:hover {
    color: var(--gold-secondary);
}

/* External link icon */
.external-link-icon {
    display: inline-block;
    width: 0.85em;
    height: 0.85em;
    margin-left: 0.15em;
    background-image: url('/images/icons/noun-external-link-3149642-min.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: baseline;
    filter: brightness(0) saturate(100%) invert(80%) saturate(500%);
}

.external-link-icon-purple {
    filter: brightness(0) saturate(100%) invert(50%) sepia(80%) saturate(500%) hue-rotate(230deg);
}

/* Responsive base */
@media (max-width: 768px) {
    main {
        padding: 20px 15px;
    }

    .content-box {
        padding: 20px;
    }
}
