/* USI Industrial Styles — global reset, fonts, and shared utilities */

/* ── Font Faces ──────────────────────────────── */

@font-face {
    font-family: 'Hack';
    src: url('/static/fonts/hack/Hack-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Hack';
    src: url('/static/fonts/hack/Hack-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Hack';
    src: url('/static/fonts/hack/Hack-Italic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Hack';
    src: url('/static/fonts/hack/Hack-BoldItalic.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Libre Baskerville';
    src: url('/static/fonts/libre-baskerville/LibreBaskerville-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Libre Baskerville';
    src: url('/static/fonts/libre-baskerville/LibreBaskerville-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Libre Baskerville';
    src: url('/static/fonts/libre-baskerville/LibreBaskerville-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Nazi Typewriter';
    src: url('/static/fonts/nazi-typewriter/NaziTypewriter-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ── Reset / Base ─────────────────────────────── */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-mono);
    line-height: 1.6;
    color: var(--text-default);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

/* ── Shared Typography ───────────────────────── */

h1, h2, h3, h4, h5, h6,
.hero-title,
.section-title,
.card-title {
    font-family: var(--font-serif);
}

/* Fix whitespace from template blank lines */
nav, main, section, footer {
    display: block;
}

/* Hide SVG icon sprite */
svg[style*="display: none"] {
    display: none !important;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--brand-accent);
}

/* Main content offset for fixed nav */
main {
    padding-top: 96px;
    display: block;
}

main > * {
    margin: 0;
}

@media (max-width: 768px) {
    main {
        padding-top: 84px;
    }
}

/* ── Icon Utilities ──────────────────────────── */

.icon-sm {
    width: 1.5rem;
    height: 1.5rem;
}

.icon-md {
    width: 2rem;
    height: 2rem;
}

.icon-lg {
    width: 2.5rem;
    height: 2.5rem;
}

/* ── Shared Buttons ──────────────────────────── */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: #111827;
    color: white;
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: #f9fafb;
    color: var(--primary);
}

/* ── Utilities ───────────────────────────────── */

.text-accent {
    color: var(--accent);
}

.text-normal {
    color: var(--text-default);
}

.bg-section {
    background: var(--bg-section);
}

/* ── WASM Window ─────────────────────────────── */

.hrml-wasm-window {
    position: relative;
    display: block;
    min-height: 160px;
    margin: 1rem 0;
    border: 1px solid #0f172a;
    background: #0f172a;
    color: #e2e8f0;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
}

.hrml-wasm-window::before {
    content: "WASM Window";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.75);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.hrml-wasm-canvas {
    padding: 2.25rem 1rem 1rem;
}

.hrml-wasm-error {
    margin: 0;
    padding: 2.25rem 1rem 1rem;
    color: #fecaca;
    white-space: pre-wrap;
}

/* ── Inline code (outside prose-shell) ───────── */

code {
    background: #f3f4f6;
    padding: 0.125rem 0.375rem;
    font-family: 'Fira Mono', 'Liberation Mono', monospace;
    font-size: 0.875em;
}
