/* ============================================================
   GREEN CODE — DOCUMENT GATE MODAL  v1.0
   Tier 2: Lead-gen (free signup)  |  Tier 3: Hard member lock
   ============================================================ */

/* ── OVERLAY BACKDROP ── */
#gc-gate-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000; /* above nav overlay (9000) and scanlines */
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Inter', 'Space Grotesk', system-ui, sans-serif;
}
#gc-gate-modal.open {
    display: flex;
}

.gc-gate-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 8, 20, 0.92);
    backdrop-filter: blur(18px) saturate(0.4);
    -webkit-backdrop-filter: blur(18px) saturate(0.4);
    cursor: pointer;
}

/* ── MODAL BOX ── */
.gc-gate-box {
    position: relative;
    background: #080f1a;
    border: 1px solid rgba(16, 185, 129, 0.35);
    box-shadow:
        0 0 0 1px rgba(16,185,129,0.08),
        0 0 60px rgba(16,185,129,0.18),
        0 32px 80px rgba(0,0,0,0.7);
    max-width: 520px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(16,185,129,0.25) transparent;
    animation: gcGateIn 0.28s cubic-bezier(0.16,1,0.3,1);
}
.gc-gate-box::-webkit-scrollbar { width: 4px; }
.gc-gate-box::-webkit-scrollbar-thumb { background: rgba(16,185,129,0.25); }

@keyframes gcGateIn {
    from { transform: scale(0.94) translateY(16px); opacity: 0; }
    to   { transform: scale(1)    translateY(0);    opacity: 1; }
}

/* ── PANE ── */
.gc-gate-pane {
    padding: 36px 32px 28px;
}
@media (max-width: 480px) {
    .gc-gate-pane { padding: 28px 20px 22px; }
}

/* ── CLOSE BUTTON ── */
.gc-gate-close {
    position: absolute;
    top: 14px; right: 14px;
    background: none;
    border: 1px solid rgba(16,185,129,0.3);
    color: rgba(16,185,129,0.7);
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.18s ease;
    font-family: inherit;
    z-index: 2;
}
.gc-gate-close:hover {
    background: rgba(16,185,129,0.1);
    color: #10b981;
    border-color: #10b981;
}

/* ── BADGES ── */
.gc-gate-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 4px 12px;
    margin-bottom: 18px;
    text-transform: uppercase;
}
.t2-badge {
    color: #34d399;
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.3);
}
.t3-badge {
    color: #fb923c;
    background: rgba(251,146,60,0.08);
    border: 1px solid rgba(251,146,60,0.3);
}

/* ── TITLE / SUBTITLE ── */
.gc-gate-title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: 0.5px;
    line-height: 1.25;
    margin-bottom: 4px;
}
.gc-gate-subtitle {
    font-size: 0.75rem;
    color: rgba(148,163,184,0.7);
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

/* ── DOC ROW ── */
.gc-gate-doc-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(16,185,129,0.04);
    border: 1px solid rgba(16,185,129,0.15);
    padding: 12px 14px;
    margin-bottom: 16px;
    border-radius: 4px;
}
.gc-gate-doc-icon {
    color: #10b981;
    font-size: 1.4rem;
    margin-top: 2px;
    flex-shrink: 0;
}
.gc-gate-doc-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #e2e8f0;
    letter-spacing: 0.5px;
    line-height: 1.4;
}
.gc-gate-doc-meta {
    font-size: 0.67rem;
    color: rgba(148,163,184,0.55);
    letter-spacing: 1px;
    margin-top: 3px;
}

/* ── WHY BOX ── */
.gc-gate-why {
    font-size: 0.72rem;
    color: rgba(148,163,184,0.6);
    letter-spacing: 0.5px;
    line-height: 1.7;
    margin-bottom: 22px;
    padding: 10px 12px;
    border-left: 2px solid rgba(16,185,129,0.3);
    background: rgba(16,185,129,0.03);
}
.gc-gate-why i {
    color: #10b981;
    margin-right: 6px;
}

/* ── FORM ── */
.gc-gate-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.gc-gate-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 400px) {
    .gc-gate-field-row { grid-template-columns: 1fr; }
}
.gc-gate-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.gc-gate-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: rgba(148,163,184,0.6);
    text-transform: uppercase;
}
.gc-gate-req { color: #10b981; }
.gc-gate-input {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(148,163,184,0.18);
    color: #e2e8f0;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.88rem;
    padding: 10px 12px;
    outline: none;
    border-radius: 3px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}
.gc-gate-input::placeholder { color: rgba(148,163,184,0.3); }
.gc-gate-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
}

/* ── SUBMIT BUTTON ── */
.gc-gate-submit {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #000;
    border: none;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 1.5px;
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 3px;
    box-shadow: 0 4px 20px rgba(16,185,129,0.35);
    margin-top: 4px;
}
.gc-gate-submit:hover {
    background: linear-gradient(135deg, #34d399, #10b981);
    box-shadow: 0 6px 28px rgba(16,185,129,0.55);
    transform: translateY(-1px);
}
.gc-gate-submit:active { transform: translateY(0); }

/* ── FINE PRINT ── */
.gc-gate-fine {
    font-size: 0.65rem;
    color: rgba(148,163,184,0.4);
    text-align: center;
    letter-spacing: 0.3px;
    line-height: 1.6;
}
.gc-gate-fine a {
    color: rgba(16,185,129,0.6);
    text-decoration: none;
}
.gc-gate-fine a:hover { color: #10b981; }

/* ── SUCCESS STATE ── */
.gc-gate-success {
    text-align: center;
    padding: 10px 0 8px;
}
.gc-gate-success-icon {
    font-size: 3rem;
    color: #10b981;
    margin-bottom: 14px;
    filter: drop-shadow(0 0 20px rgba(16,185,129,0.4));
}
.gc-gate-success-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #10b981;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.gc-gate-success-msg {
    font-size: 0.78rem;
    color: rgba(148,163,184,0.65);
    line-height: 1.65;
    margin-bottom: 22px;
    letter-spacing: 0.3px;
}
.gc-gate-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #000;
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    padding: 13px 28px;
    text-transform: uppercase;
    border-radius: 3px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(16,185,129,0.4);
    margin-bottom: 14px;
}
.gc-gate-dl-btn:hover {
    background: linear-gradient(135deg, #34d399, #10b981);
    box-shadow: 0 6px 28px rgba(16,185,129,0.6);
    transform: translateY(-1px);
}
.gc-gate-close-plain {
    background: none;
    border: none;
    color: rgba(148,163,184,0.4);
    font-family: inherit;
    font-size: 0.72rem;
    letter-spacing: 2px;
    cursor: pointer;
    padding: 6px 12px;
    text-transform: uppercase;
    transition: color 0.15s;
    display: block;
    margin: 10px auto 0;
}
.gc-gate-close-plain:hover { color: rgba(148,163,184,0.8); }

/* ══════════════════════════════════════
   TIER 3 LOCKED STATE
══════════════════════════════════════ */
.gc-gate-lock-icon {
    font-size: 2.8rem;
    color: #fb923c;
    margin: 4px 0 18px;
    filter: drop-shadow(0 0 16px rgba(251,146,60,0.3));
}
.gc-gate-t3-msg {
    font-size: 0.82rem;
    color: rgba(148,163,184,0.65);
    line-height: 1.7;
    letter-spacing: 0.3px;
    margin-bottom: 20px;
    padding: 14px 16px;
    background: rgba(251,146,60,0.04);
    border: 1px solid rgba(251,146,60,0.15);
    border-radius: 4px;
}
.gc-gate-t3-msg strong { color: #fcd34d; }
.gc-gate-t3-reasons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}
.gc-gate-t3-reason {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    color: rgba(148,163,184,0.6);
    letter-spacing: 0.3px;
}
.gc-gate-t3-reason i {
    color: #10b981;
    font-size: 0.7rem;
    flex-shrink: 0;
}
.gc-gate-t3-apply {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 1.5px;
    padding: 14px 24px;
    text-transform: uppercase;
    border-radius: 3px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(249,115,22,0.3);
}
.gc-gate-t3-apply:hover {
    background: linear-gradient(135deg, #fb923c, #f97316);
    box-shadow: 0 6px 28px rgba(249,115,22,0.5);
    transform: translateY(-1px);
}

/* ══════════════════════════════════════
   VISUAL INDICATORS ON GATED LINKS
   (added via data-gate-tier attribute)
══════════════════════════════════════ */
[data-gate-tier="2"]::after {
    content: ' 🔓';
    font-size: 0.75em;
    opacity: 0.7;
}
[data-gate-tier="3"]::after {
    content: ' 🔒';
    font-size: 0.75em;
    opacity: 0.8;
}

/* Suppress icon on button-styled links that have their own icon */
.btn[data-gate-tier]::after,
.doc-card[data-gate-tier]::after,
.action-button[data-gate-tier]::after,
.download-btn[data-gate-tier]::after,
.ob-btn-primary[data-gate-tier]::after,
.detail-btn[data-gate-tier]::after {
    content: none;
}
