/* static/css/base.css */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;1,8..60,300;1,8..60,400&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
    /* core tones — softened, not pure */
    --black: #0f0f0f;
    --white: #f5f4f0;
    --ink: #1a1a1a;
    --paper: #eeecea;
    --muted: #d6d3ce;

    /* accent — muted vermillion, like dried ink */
    --accent: #b84032;
    --accent-dark: #8f2e22;
    --accent-light: #d45744;
    --accent-wash: rgba(184, 64, 50, 0.08);

    /* grays */
    --gray-100: #f0efeb;
    --gray-200: #e0ddd8;
    --gray-300: #c8c4be;
    --gray-400: #a09b94;
    --gray-500: #78736c;
    --gray-600: #524e48;
    --gray-700: #363230;
    --gray-800: #252220;
    --gray-900: #161412;

    /* typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Serif 4', Georgia, serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-ui: var(--font-mono);

    /* scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;

    /* spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* layout */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
    --container-2xl: 1440px;

    /* borders */
    --border-thin: 1px solid var(--gray-200);
    --border-mid: 2px solid var(--gray-300);
    --border-heavy: 3px solid var(--ink);
    --border-accent: 2px solid var(--accent);
    --radius-sm: 2px;
    --radius-md: 4px;

    /* shadows */
    --shadow-sm: 0 1px 3px rgba(15, 15, 15, 0.08);
    --shadow-md: 0 4px 12px rgba(15, 15, 15, 0.10);
    --shadow-lg: 0 8px 24px rgba(15, 15, 15, 0.12);

    /* transitions */
    --transition-fast: 120ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 350ms ease;

    /* z-index */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-toast: 500;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scrollbar-color: var(--gray-400) var(--paper);
    scrollbar-width: thin;
}

/* webkit scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--paper);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border: 2px solid var(--paper);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

body {
    background-color: var(--white);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 300;
    line-height: 1.7;
    min-height: 100dvh;
}

/* typography */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--black);
    letter-spacing: -0.01em;
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
    margin-bottom: var(--space-4);
    max-width: 68ch;
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

strong, b {
    font-weight: 600;
}

em, i {
    font-style: italic;
}

small {
    font-size: var(--text-sm);
}

blockquote {
    border-left: 4px solid var(--accent);
    padding: var(--space-4) var(--space-6);
    margin: var(--space-8) 0;
    font-size: var(--text-xl);
    font-style: italic;
    color: var(--gray-700);
    background: var(--gray-100);
}

hr {
    border: none;
    border-top: var(--border-thin);
    margin: var(--space-8) 0;
}

hr.thick {
    border-top: var(--border-heavy);
}

hr.accent {
    border-top: var(--border-accent);
}

/* utility */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-accent { color: var(--accent); }
.text-muted { color: var(--gray-500); }
.text-small { font-size: var(--text-sm); }
.text-mono { font-family: var(--font-mono); font-size: var(--text-sm); }
.text-upper {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: var(--text-xs);
    font-family: var(--font-mono);
    font-weight: 500;
}

.italic { font-style: italic; }
.bold { font-weight: 700; }