/* PEERTRUST v9.6 - REFACTORED */

/* 1. CORE & RESET */
:root {
    --bg-body: #f4f4f6;
    --bg-surface: #ffffff;
    --text-main: #111111;
    --text-muted: #666666;
    --border-hard: #111111;
    --border-light: #e0e0e0;
    --brand-accent: #2563eb;
    --signal-safe: #10b981;
    --signal-alert: #d32f2f;
    --header-height: 64px;
    --max-w: 1440px;
    --font-sans: 'Inter', sans-serif;
    --font-serif: 'Playfair Display', serif;
    --font-mono: 'Menlo', monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { background: var(--bg-body); color: var(--text-main); font-family: var(--font-sans); margin: 0; line-height: 1.5; display:flex; flex-direction:column; min-height:100vh; }
a { text-decoration: none; color: inherit; }

/* 2. LAYOUT */
.app-wrapper { display: flex; flex-direction: column; min-height: 100vh; width: 100%; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 2rem; width: 100%; }

/* 3. HEADER */
.app-header { background: var(--bg-surface); border-bottom: 2px solid var(--border-hard); height: var(--header-height); display: flex; align-items: center; position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; justify-content: space-between; width: 100%; align-items: center; }

.brand {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--bg-surface); border: 2px solid var(--border-hard);
    padding: 0.5rem 1rem; font-family: var(--font-sans); font-weight: 900;
    font-size: 1.1rem; letter-spacing: -0.03em; text-transform: uppercase;
    color: var(--text-main); white-space: nowrap;
}
.brand span {
    display: block; font-weight: 400; font-size: 0.85em; color: var(--text-muted);
    padding-left: 10px; margin-left: 2px; border-left: 1px solid var(--border-light); line-height: 1;
}
.desktop-nav { display: flex; gap: 1.5rem; }
.desktop-nav a { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

/* 4. HERO */
.hero-section { display: grid; grid-template-columns: 1.2fr 0.8fr; border-bottom: 1px solid var(--border-light); background: var(--bg-surface); min-height: 60vh; }
.hero-text { padding: 5rem 3rem; display: flex; flex-direction: column; justify-content: center; }
.hero-visual { background: #eef0f2; border-left: 1px solid var(--border-light); display: flex; align-items: center; justify-content: center; padding: 2rem; }
h1.headline { font-family: var(--font-serif); font-size: 3.5rem; line-height: 1.1; margin-bottom: 1.5rem; letter-spacing: -0.03em; }
p.subhead { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2.5rem; max-width: 450px; }

/* 5. TERMINAL */
.terminal-monitor { width: 100%; max-width: 400px; background: #0f172a; border: 2px solid #111; box-shadow: 20px 20px 0 rgba(0,0,0,0.1); font-family: var(--font-mono); overflow: hidden; }
.terminal-header { background: #1e293b; color: #94a3b8; padding: 8px 12px; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; border-bottom: 1px solid #334155; display: flex; justify-content: space-between; }
.terminal-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 10px; height: 180px; }
.t-line { color: #f8fafc; font-size: 0.75rem; opacity: 0; animation: typeLine 0.1s forwards; }
.t-line:nth-child(1) { animation-delay: 0.5s; color: #64748b; }
.t-line:nth-child(2) { animation-delay: 1.2s; }
.t-line:nth-child(3) { animation-delay: 2.0s; }
@keyframes typeLine { to { opacity: 1; } }

/* 6. COMPONENTS */
.btn-solid { background: var(--text-main); color: #fff; padding: 1rem 2rem; font-weight: 700; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.05em; border: 2px solid var(--text-main); display: inline-block; cursor: pointer; }
.btn-outline { background: transparent; color: var(--text-main); padding: 1rem 2rem; font-weight: 700; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.05em; border: 2px solid var(--border-light); display: inline-block; cursor: pointer; }
.auth-wrapper { min-height: 80vh; display: flex; align-items: center; justify-content: center; }
.auth-box { background: #fff; padding: 3rem; border: 1px solid var(--border-light); width: 100%; max-width: 420px; }
.form-input { width: 100%; padding: 1rem; border: 1px solid var(--border-light); margin-bottom: 1rem; font-family: var(--font-sans); }

/* 7. FOOTER */
.app-footer { background: var(--bg-surface); border-top: 2px solid var(--border-hard); padding: 3rem 0; margin-top: auto; font-size: 0.75rem; }
.footer-tight-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; align-items: start; }
.f-block { display: flex; flex-direction: column; gap: 0.8rem; }
.f-block strong { text-transform: uppercase; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.05em; color: var(--text-muted); }
.f-links { display: flex; flex-direction: column; gap: 0.5rem; }
.f-links a:hover { color: var(--brand-accent); }
.system-status { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); background: #f0fdf4; color: #15803d; padding: 4px 8px; border-radius: 4px; font-weight: 700; font-size: 0.65rem; width: fit-content; }

/* 8. COMPLIANCE POPUP (Consolidated) */
#compliance-popup {
    position: fixed; bottom: 20px; right: 20px; width: 320px;
    background: #0f172a; border: 1px solid #334155; padding: 20px;
    z-index: 9999; box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    font-family: var(--font-sans); color: #fff;
    animation: slideIn 0.5s ease-out;
}
.comp-header { font-size: 11px; font-weight: 800; text-transform: uppercase; color: #fff; margin-bottom: 10px; border-bottom: 1px solid #334155; padding-bottom: 5px; }
.comp-body { font-size: 12px; line-height: 1.4; color: #94a3b8; margin-bottom: 15px; }
.comp-actions { display: flex; justify-content: space-between; align-items: center; }
.comp-link { font-size: 11px; text-decoration: underline; color: #64748b; text-transform: uppercase; font-weight: 700; }
#comp-btn { background: #fff; color: #0f172a; border: none; padding: 6px 12px; font-size: 11px; font-weight: 800; text-transform: uppercase; cursor: pointer; }
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* MOBILE */
@media (max-width: 768px) {
    .hero-section { grid-template-columns: 1fr; }
    .hero-visual { display: none; }
    .footer-tight-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .desktop-nav { display: none; }
    #compliance-popup { bottom: 0; right: 0; width: 100%; border-radius: 0; }
}