/* =====================================================
   BRUTALIST EDITORIAL — SHARED STYLESHEET
   Cream paper, ink black, accent red. No radius. 2px lines.
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=IBM+Plex+Mono:wght@300;400;500;700&family=IBM+Plex+Sans:wght@300;400;500;700&display=swap');

:root {
    --paper: #f2f0eb;
    --ink: #1a1a1a;
    --ink-soft: #2a2a2a;
    --red: #d93a1f;
    --red-dim: #b8311a;
    --line: #1a1a1a;
    --muted: #7a7a78;
    --paper-deep: #ebe8e1;
    --paper-tint: #ece9e2;

    --display: 'Bebas Neue', 'Impact', sans-serif;
    --mono: 'IBM Plex Mono', 'Courier New', monospace;
    --sans: 'IBM Plex Sans', system-ui, sans-serif;
}

* {
    box-sizing: border-box;
    border-radius: 0 !important;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, .display {
    font-family: var(--display);
    font-weight: 400;
    line-height: 0.92;
    letter-spacing: 0.01em;
    margin: 0;
    text-transform: uppercase;
}

h1 { font-size: clamp(48px, 9vw, 128px); }
h2 { font-size: clamp(32px, 5vw, 64px); }
h3 { font-size: clamp(20px, 2.5vw, 32px); }

.label, .mono {
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 11px;
    font-weight: 500;
}

.mono-sm { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; }
.mono-md { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; }
.mono-lg { font-family: var(--mono); font-size: 14px; letter-spacing: 0.08em; }

p { font-family: var(--sans); font-weight: 300; line-height: 1.5; margin: 0; }

a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--ink); }
a:hover { color: var(--red); border-color: var(--red); }

/* ===== GHOST TEXT ===== */
.ghost {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.ghost span {
    font-family: var(--display);
    font-size: 26vw;
    line-height: 0.85;
    color: var(--ink);
    opacity: 0.04;
    letter-spacing: -0.02em;
    white-space: nowrap;
    user-select: none;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 22px;
    border: 2px solid var(--ink);
    background: var(--ink);
    color: var(--paper);
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.08s linear, color 0.08s linear, border-color 0.08s linear;
    text-decoration: none;
    line-height: 1;
}
.btn:hover { background: var(--red); border-color: var(--red); color: var(--paper); }
.btn:active { transform: translate(1px, 1px); }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-red { background: var(--red); border-color: var(--red); color: var(--paper); }
.btn-red:hover { background: var(--ink); border-color: var(--ink); }
.btn-sm { padding: 8px 12px; font-size: 10px; letter-spacing: 0.14em; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* ===== INPUTS ===== */
.input, textarea.input, select.input {
    display: block;
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--ink);
    background: var(--paper);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: 0.06em;
    outline: none;
}
.input::placeholder { color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em; font-size: 11px; }
.input:focus { background: var(--paper-deep); border-color: var(--red); }
textarea.input { min-height: 120px; resize: vertical; font-family: var(--sans); font-size: 14px; letter-spacing: 0; line-height: 1.5; }
.input-group { display: flex; flex-direction: column; gap: 8px; }
.input-group label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink); }

/* ===== STATUS / DOT ===== */
.dot {
    display: inline-block;
    width: 8px; height: 8px;
    background: var(--red);
    border-radius: 50% !important;
    animation: blink 1.2s infinite;
    vertical-align: middle;
    margin-right: 8px;
}
.dot.green { background: #2a7a3f; }
.dot.gray { background: var(--muted); animation: none; }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0.15; } }

.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border: 2px solid var(--ink);
    background: var(--paper);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 500;
    line-height: 1;
}
.tag.red { background: var(--red); color: var(--paper); border-color: var(--red); }
.tag.black { background: var(--ink); color: var(--paper); }
.tag.outline { background: transparent; }
.tag.muted { color: var(--muted); border-color: var(--muted); }

/* ===== LAYOUT ===== */
.line-x { border-top: 2px solid var(--ink); }
.line-y { border-left: 2px solid var(--ink); }
.thick-bottom { border-bottom: 2px solid var(--ink); }
.thick-top { border-top: 2px solid var(--ink); }

/* ===== TOAST ===== */
#toast-root {
    position: fixed;
    bottom: 0; right: 0;
    z-index: 1000;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast {
    border: 2px solid var(--ink);
    background: var(--paper);
    padding: 12px 18px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    pointer-events: auto;
    min-width: 280px;
    animation: slide-in 0.18s ease-out;
}
.toast.error { background: var(--red); color: var(--paper); border-color: var(--red); }
.toast.success { background: var(--ink); color: var(--paper); }
@keyframes slide-in { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ===== UTILITIES ===== */
.hidden { display: none !important; }
.spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 12px; }
.col { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.muted { color: var(--muted); }
.uppercase { text-transform: uppercase; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Scrollbars: keep brutal */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper); border-left: 2px solid var(--ink); }
::-webkit-scrollbar-thumb { background: var(--ink); }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* Selection */
::selection { background: var(--red); color: var(--paper); }
