/* === toldyouso — "The Sealed Record" === */

/* --- Cormorant Garamond (local) --- */
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/cormorant-garamond/CormorantGaramond-Italic-400.ttf') format('truetype');
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: italic;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/cormorant-garamond/CormorantGaramond-Italic-500.ttf') format('truetype');
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/cormorant-garamond/CormorantGaramond-Regular-400.ttf') format('truetype');
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/cormorant-garamond/CormorantGaramond-Regular-500.ttf') format('truetype');
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/cormorant-garamond/CormorantGaramond-Regular-600.ttf') format('truetype');
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/cormorant-garamond/CormorantGaramond-Regular-700.ttf') format('truetype');
}

/* --- Source Sans 3 (local) --- */
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('/fonts/source-sans-3/SourceSans3-300.ttf') format('truetype');
}
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/source-sans-3/SourceSans3-400.ttf') format('truetype');
}
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/source-sans-3/SourceSans3-500.ttf') format('truetype');
}
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/source-sans-3/SourceSans3-600.ttf') format('truetype');
}
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/source-sans-3/SourceSans3-700.ttf') format('truetype');
}

:root {
    --void: #07060b;
    --surface: #0f0e17;
    --surface-2: #161524;
    --surface-3: #1e1d30;
    --gold: #d4a017;
    --gold-dim: #a67c10;
    --gold-glow: rgba(212, 160, 23, 0.12);
    --gold-bright: #f0c54d;
    --cream: #f5f0e1;
    --cream-dim: #c4b99a;
    --text: #e8e4d9;
    --text-dim: #8a8578;
    --text-faint: #5a5650;
    --danger: #c0392b;
    --success: #2d6a4f;
    --success-bg: rgba(45, 106, 79, 0.15);
    --radius: 4px;
    --serif: 'Cormorant Garamond', 'Georgia', serif;
    --sans: 'Source Sans 3', 'Segoe UI', sans-serif;
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--sans) !important;
    background: var(--void) !important;
    color: var(--text) !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 16px !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* Subtle grain texture */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 256px;
    pointer-events: none;
    z-index: 9999;
}

::selection { background: var(--gold-glow); color: var(--gold-bright); }

/* === Navbar === */
.navbar {
    background: transparent !important;
    border-bottom: 1px solid rgba(212, 160, 23, 0.08);
    min-height: 60px;
    padding: 0 32px !important;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: fixed !important;
    top: 0; left: 0; right: 0;
}
.navbar-brand {
    font-family: var(--serif) !important;
    font-weight: 600 !important;
    font-size: 1.5rem !important;
    color: var(--gold) !important;
    letter-spacing: 0.04em;
    text-transform: lowercase;
    text-decoration: none !important;
}
.navbar-brand:hover { color: var(--gold-bright) !important; }

.navbar-input {
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(212, 160, 23, 0.15) !important;
    color: var(--text) !important;
    border-radius: var(--radius) !important;
    padding: 8px 14px !important;
    font-size: 14px !important;
    height: 38px !important;
    width: 160px !important;
    transition: border-color 0.2s;
    font-family: var(--sans) !important;
}
.navbar-input:focus {
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 1px var(--gold-glow) !important;
    background: rgba(255,255,255,0.06) !important;
    color: var(--text) !important;
    outline: none;
}
.navbar-input::placeholder { color: var(--text-faint) !important; }

/* === Hero === */
.hero-section {
    background: var(--void);
    padding: 140px 0 80px;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212, 160, 23, 0.06) 0%, transparent 70%);
    pointer-events: none;
}
.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 160, 23, 0.2), transparent);
}
.hero-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
    position: relative;
}
.hero-title {
    font-family: var(--serif);
    color: var(--cream);
    font-size: 64px;
    font-weight: 400;
    font-style: italic;
    letter-spacing: -0.01em;
    margin: 0 0 28px;
    line-height: 1.05;
}
.hero-subtitle {
    color: var(--text-dim);
    font-size: 17px;
    line-height: 1.75;
    max-width: 480px;
    margin: 0 auto;
    font-family: var(--sans);
    font-weight: 300;
}
.hero-disclaimer {
    color: var(--text-faint);
    font-size: 12px;
    margin: 32px auto 0;
    line-height: 1.6;
    font-family: var(--sans);
    max-width: 400px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* === Content Area === */
.content-section {
    padding: 48px 0 24px;
    animation: fadeUp 0.5s ease both;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.container { max-width: 640px !important; }

/* === Buttons === */
.btn {
    border-radius: var(--radius) !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    padding: 10px 24px !important;
    border: none !important;
    transition: all 0.15s ease !important;
    cursor: pointer !important;
    line-height: 1.5 !important;
    box-shadow: none !important;
    font-family: var(--sans) !important;
    text-decoration: none !important;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.btn-sm {
    font-size: 12px !important;
    padding: 7px 16px !important;
}
.btn-primary {
    background: var(--gold) !important;
    color: var(--void) !important;
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--gold-bright) !important;
    color: var(--void) !important;
}
.btn-outline-secondary {
    background: transparent !important;
    color: var(--text-dim) !important;
    border: 1px solid var(--text-faint) !important;
}
.btn-outline-secondary:hover {
    background: rgba(255,255,255,0.04) !important;
    color: var(--text) !important;
    border-color: var(--text-dim) !important;
}
.btn-warning {
    background: rgba(212, 160, 23, 0.12) !important;
    color: var(--gold) !important;
    border: 1px solid rgba(212, 160, 23, 0.25) !important;
}
.btn-warning:hover {
    background: rgba(212, 160, 23, 0.2) !important;
    color: var(--gold-bright) !important;
}

/* === Card (Create Evidence) === */
.card-modern {
    background: var(--surface);
    border: 1px solid rgba(212, 160, 23, 0.1);
    border-radius: var(--radius);
    padding: 40px;
    position: relative;
}
.card-modern::before {
    content: '\2756';
    position: absolute;
    top: -14px;
    left: 40px;
    font-size: 18px;
    color: var(--gold);
    background: var(--void);
    padding: 0 12px;
}
.card-modern h2 {
    font-family: var(--serif);
    font-size: 28px;
    font-weight: 500;
    color: var(--cream);
    margin: 0 0 28px 0;
    letter-spacing: 0.01em;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(212, 160, 23, 0.1);
}

/* === Forms === */
.form-control {
    font-size: 15px !important;
    padding: 14px 16px !important;
    border-radius: var(--radius) !important;
    border: 1px solid rgba(212, 160, 23, 0.12) !important;
    font-family: var(--sans) !important;
    box-shadow: none !important;
    background: var(--surface-2) !important;
    color: var(--text) !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 2px var(--gold-glow) !important;
    background: var(--surface-3) !important;
    color: var(--text) !important;
}
.form-control::placeholder { color: var(--text-faint) !important; }
textarea.form-control {
    min-height: 180px !important;
    resize: vertical;
    line-height: 1.7;
    font-size: 16px !important;
}
.form-check-label {
    font-size: 14px;
    color: var(--text-dim);
}
.form-check-input {
    background-color: var(--surface-2) !important;
    border-color: var(--text-faint) !important;
}
.form-check-input:checked {
    background-color: var(--gold) !important;
    border-color: var(--gold) !important;
}

/* === Alerts === */
.alert {
    border-radius: var(--radius) !important;
    font-size: 15px;
    padding: 14px 18px !important;
}
.alert-success {
    background: var(--success-bg) !important;
    color: #6ee7b7 !important;
    border: none !important;
    border-left: 2px solid var(--success) !important;
}
.btn-close {
    filter: invert(1) !important;
}

/* === Evidence Display === */
.evidence-card {
    background: var(--surface);
    border: 1px solid rgba(212, 160, 23, 0.12);
    border-radius: var(--radius);
    padding: 48px 40px 40px;
    position: relative;
    overflow: hidden;
}
.evidence-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold-dim), var(--gold), var(--gold-dim));
}
/* Seal ornament */
.evidence-card::after {
    content: '\2766';
    position: absolute;
    top: 16px;
    right: 24px;
    font-size: 28px;
    color: rgba(212, 160, 23, 0.15);
    line-height: 1;
}
.evidence-fact {
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 400;
    line-height: 1.65;
    color: var(--cream);
    font-style: italic;
}
.evidence-meta {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid rgba(212, 160, 23, 0.08);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.date-badge, .author-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 12px;
    font-family: var(--sans);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.date-badge {
    background: var(--gold-glow);
    color: var(--gold);
    border: 1px solid rgba(212, 160, 23, 0.15);
}
.author-badge {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-dim);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.evidence-actions {
    margin-top: 20px;
}

/* === Not Found === */
.not-found-section {
    text-align: center;
    padding: 80px 20px;
}
.not-found-section h2 {
    font-family: var(--serif);
    font-size: 32px;
    font-weight: 400;
    font-style: italic;
    color: var(--text-dim);
}
.not-found-section p {
    font-size: 15px;
    color: var(--text-faint);
    font-family: var(--sans);
    margin-top: 12px;
}

/* === Register === */
.register-card {
    background: var(--surface);
    border: 1px solid rgba(212, 160, 23, 0.1);
    border-radius: var(--radius);
    padding: 40px;
    max-width: 440px;
    margin: 0 auto;
    position: relative;
}
.register-card::before {
    content: '\2756';
    position: absolute;
    top: -14px;
    left: 40px;
    font-size: 18px;
    color: var(--gold);
    background: var(--void);
    padding: 0 12px;
}
.register-card h2 {
    font-family: var(--serif);
    font-size: 28px;
    font-weight: 500;
    margin: 0 0 6px 0;
    color: var(--cream);
}
.register-card > p {
    color: var(--text-faint);
    font-size: 13px;
    margin: 0 0 28px 0;
    line-height: 1.6;
    font-family: var(--sans);
}
.btn-group-register {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(212, 160, 23, 0.08);
}

/* === Footer === */
.site-footer {
    background: var(--surface);
    border-top: 1px solid rgba(212, 160, 23, 0.06);
    color: var(--text-faint);
    text-align: center;
    padding: 24px 16px;
    font-size: 12px;
    margin-top: 80px;
    font-family: var(--sans);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.site-footer a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.15s;
}
.site-footer a:hover { color: var(--gold); }

/* === Validation === */
.text-danger {
    font-size: 13px !important;
    margin-top: 6px;
    color: var(--danger) !important;
}

/* === Responsive === */
@media (max-width: 768px) {
    .hero-title { font-size: 42px; }
    .hero-section { padding: 120px 0 60px; }
    .card-modern, .evidence-card, .register-card { padding: 28px 20px; }
    .card-modern::before, .register-card::before { left: 20px; }
    .navbar { padding: 0 16px !important; }
    .navbar-input { width: 120px !important; }
    .evidence-fact { font-size: 20px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 36px; }
    .navbar-input { width: 100px !important; font-size: 12px !important; }
    .btn-sm { font-size: 11px !important; padding: 6px 12px !important; }
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: var(--text-faint); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
