/* ===================================================
   THE ARCHIVE — Common Styles
   Shared design tokens, fonts, and base utilities
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500&family=Inter:wght@300;400;500;600&display=swap');

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

/* ---- Design Tokens ---- */
:root {
    /* Core palette */
    --gold: #b8952e;
    --gold-light: #d4af37;
    --gold-muted: #8a7029;
    --gold-faint: rgba(184, 149, 46, 0.08);

    /* Text */
    --text-primary: #e8e4dd;
    --text-secondary: #9e9a93;
    --text-muted: #6b6762;

    /* Borders */
    --border: rgba(184, 149, 46, 0.1);
    --border-subtle: rgba(255, 255, 255, 0.04);

    /* Backgrounds */
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-card: #161618;
    --bg-elevated: #1c1c1f;
}

/* ---- Base ---- */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

::selection {
    background: var(--gold-muted);
    color: var(--text-primary);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--gold-muted);
    border-radius: 3px;
}

/* ===================================================
   PAYWALL & AUTH STYLES
   =================================================== */

/* ---- Nav Auth Button ---- */
.nav-auth-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.45rem 1rem;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.nav-auth-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* ---- Paywall Overlay ---- */
.paywall-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: linear-gradient(
        to bottom,
        rgba(10,10,11,0) 0%,
        rgba(10,10,11,0.6) 10%,
        rgba(10,10,11,0.92) 22%,
        rgba(10,10,11,0.98) 35%,
        rgba(10,10,11,1) 50%,
        rgba(10,10,11,1) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
}

.paywall-overlay-inner {
    text-align: center;
    padding: 2rem;
    transform: translateY(20px);
}

.paywall-lock-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.paywall-lock-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
}

.paywall-unlock-btn {
    background: linear-gradient(135deg, var(--gold), var(--gold-muted));
    border: none;
    border-radius: 2px;
    color: #0a0a0b;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.65rem 1.5rem;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}
.paywall-unlock-btn:hover { opacity: 0.88; transform: translateY(-1px); }

/* ---- Locked Modal ---- */
#lockedModal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}
#lockedModal.show { display: flex; }

.locked-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
}

.locked-modal-box {
    position: relative;
    z-index: 1;
    background: #161618;
    border: 1px solid rgba(184,149,46,0.25);
    border-radius: 4px;
    padding: 2.5rem 2rem;
    max-width: 420px;
    width: calc(100% - 2rem);
    text-align: center;
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.locked-modal-icon { font-size: 2.8rem; margin-bottom: 1rem; }

.locked-modal-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.locked-modal-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.8rem;
}

.locked-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.locked-btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-muted));
    border: none;
    border-radius: 2px;
    color: #0a0a0b;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}
.locked-btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }

.locked-btn-secondary {
    background: none;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 2px;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.75rem 1.2rem;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.locked-btn-secondary:hover { border-color: rgba(255,255,255,0.3); color: var(--text-secondary); }

/* ---- PayPal Section in Sidebar ---- */
.paypal-section {
    border-top: 1px solid var(--border);
    padding: 1.5rem 1.2rem;
    background: rgba(184,149,46,0.04);
}

.paypal-section-inner { text-align: center; }
.paypal-section-icon { font-size: 1.8rem; margin-bottom: 0.6rem; }

.paypal-section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.paypal-section-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.paypal-price-display {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    color: var(--gold);
    margin-bottom: 1rem;
}
.paypal-price-note {
    font-size: 0.65rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.paypal-secure-note {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    line-height: 1.5;
}

.paypal-login-prompt {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 3px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.paypal-login-prompt a { color: var(--gold); text-decoration: none; }
.paypal-login-prompt a:hover { text-decoration: underline; }

/* ---- Logout Modal ---- */
.logout-modal-container {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}
.logout-modal-container.show { display: flex; }

.logout-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
}

.logout-modal-box {
    position: relative;
    z-index: 1;
    background: #161618;
    border: 1px solid rgba(184,149,46,0.25);
    border-radius: 4px;
    padding: 2.5rem 2rem;
    max-width: 380px;
    width: calc(100% - 2rem);
    text-align: center;
    animation: modalIn 0.25s ease;
}

.logout-modal-icon {
    font-size: 1.8rem;
    color: var(--gold-muted);
    margin-bottom: 0.8rem;
}

.logout-modal-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

.logout-modal-email {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: var(--gold-muted);
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.logout-modal-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.8rem;
}

.logout-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.logout-btn-confirm {
    background: linear-gradient(135deg, #8a3a3a, #a04040);
    border: none;
    border-radius: 2px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}
.logout-btn-confirm:hover { opacity: 0.88; transform: translateY(-1px); }

.logout-btn-cancel {
    background: none;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 2px;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.75rem 1.2rem;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.logout-btn-cancel:hover { border-color: rgba(255,255,255,0.3); color: var(--text-secondary); }

