/* whitepaper.css — CryptoFather Whitepaper */

:root {
    --wp-toc-width: 280px;
}

/* ─── HERO overrides for whitepaper ─── */
.wp-hero-wallet-btn {
    font-size: .9rem;
}

/* ─── KEY METRICS STRIP ─── */
.wp-metrics {
    display: flex; justify-content: center; gap: 32px; flex-wrap: wrap;
    padding: 28px 20px; max-width: 1100px; margin: 0 auto 24px;
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px;
}
.wp-metric { text-align: center; min-width: 120px; }
.wp-metric-value { display: block; font-family: 'Montserrat', sans-serif; font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.wp-metric-label { color: var(--text-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: 1px; }

/* ─── HOW TO START (FA icons) ─── */
.wp-steps {
    max-width: 1100px; margin: 0 auto 40px; padding: 0 20px;
}
.wp-steps-title {
    font-family: 'Montserrat', sans-serif; font-size: 1.3rem; font-weight: 700;
    margin-bottom: 20px; text-align: center;
}
.wp-steps-grid {
    display: flex; gap: 16px; flex-wrap: wrap; justify-content: center;
}
.wp-step {
    flex: 1; min-width: 160px; max-width: 210px; text-align: center;
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px;
    padding: 28px 16px 22px; position: relative; transition: border-color .3s;
}
.wp-step:hover { border-color: rgba(255,202,4,.3); }
.wp-step-icon {
    display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center;
    border-radius: 14px; background: rgba(255,202,4,.1); color: var(--primary);
    font-size: 1.2rem; margin-bottom: 12px;
}
.wp-step-title {
    font-family: 'Montserrat', sans-serif; font-size: .88rem; font-weight: 700;
    color: var(--text-primary); margin-bottom: 6px;
}
.wp-step-desc {
    font-size: .78rem; color: var(--text-muted); line-height: 1.5;
}

/* ─── LAYOUT: TOC + CONTENT ─── */
.wp-layout {
    display: grid; grid-template-columns: var(--wp-toc-width) 1fr;
    max-width: 1300px; margin: 0 auto; padding: 40px 20px 80px; gap: 40px;
}

/* ─── TOC SIDEBAR ─── */
.wp-toc {
    position: sticky; top: 120px; align-self: start;
    max-height: calc(100vh - 140px); overflow-y: auto;
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px;
    padding: 20px 16px; scrollbar-width: thin; scrollbar-color: var(--border-color) transparent;
}
.wp-toc::-webkit-scrollbar { width: 4px; }
.wp-toc::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
.wp-toc-title {
    font-family: 'Montserrat', sans-serif; font-size: .85rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted);
    margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border-color);
}
.wp-toc ul { list-style: none; padding: 0; margin: 0; }
.wp-toc li { }
.wp-toc a {
    display: flex; align-items: center; gap: 10px;
    color: var(--text-secondary); text-decoration: none; font-size: .78rem;
    padding: 7px 10px; border-radius: 8px; transition: all .25s; border-left: 2px solid transparent;
}
.wp-toc a i {
    min-width: 16px; text-align: center; font-size: .72rem; color: var(--text-muted); transition: color .25s;
}
.wp-toc a:hover { color: var(--text-primary); background: rgba(255,202,4,.05); }
.wp-toc a:hover i { color: var(--primary); }
.wp-toc a.active {
    color: var(--primary); background: rgba(255,202,4,.08); border-left-color: var(--primary);
    font-weight: 600;
}
.wp-toc a.active i { color: var(--primary); }

/* Mobile TOC toggle */
.wp-toc-toggle {
    display: none; position: fixed; bottom: 450px; left: 16px; z-index: 999;
    width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border-color);
    background: rgba(17,17,17,.95); backdrop-filter: blur(10px);
    color: var(--primary); font-size: 1.2rem; cursor: pointer; align-items: center; justify-content: center;
}
.wp-toc-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 998;
}
.wp-toc-overlay.active { display: block; }

/* ─── ANCHOR SCROLL OFFSET (accounts for fixed navbar) ─── */
.wp-section[id],
section[id]#wp-faq {
    scroll-margin-top: 120px;
}
@media (max-width: 768px) {
    .wp-section[id],
    section[id]#wp-faq {
        scroll-margin-top: 100px;
    }
}

/* ─── SECTION BANNER ─── */
.wp-banner {
    margin: -36px -32px 24px;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
}
.wp-banner-img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}
@media (max-width: 768px) {
    .wp-banner { margin: -24px -18px 18px; border-radius: 14px 14px 0 0; }
}
@media (max-width: 480px) {
    .wp-banner { margin: -18px -14px 14px; }
}

/* ─── SECTIONS ─── */
.wp-section {
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 20px;
    padding: 36px 32px; margin-bottom: 28px; transition: border-color .3s;
}
.wp-section:hover { border-color: rgba(255,202,4,.2); }

.wp-section-header {
    display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
}
.wp-section-icon {
    width: 44px; height: 44px; min-width: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px; background: rgba(255,202,4,.1); color: var(--primary);
    font-size: 1.1rem;
}
.wp-section-num {
    font-family: 'Montserrat', sans-serif; font-size: .7rem; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 1.5px;
}
.wp-section-title {
    font-family: 'Montserrat', sans-serif; font-size: 1.25rem; font-weight: 700; margin: 2px 0 0;
}

.wp-section p { color: var(--text-secondary); margin-bottom: 12px; font-size: .92rem; line-height: 1.75; }
.wp-section ul, .wp-section ol { color: var(--text-secondary); margin: 0 0 14px 20px; font-size: .92rem; }
.wp-section li { margin-bottom: 6px; }
.wp-section strong { color: var(--text-primary); }

/* ─── CALLOUT BOXES ─── */
.wp-callout {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 16px 20px; border-radius: 12px; margin: 16px 0; font-size: .88rem;
}
.wp-callout-icon {
    min-width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
    border-radius: 8px; font-size: .9rem;
}
.wp-callout-body { flex: 1; }
.wp-callout-label { font-weight: 700; margin-bottom: 4px; display: block; font-size: .82rem; text-transform: uppercase; letter-spacing: 1px; }

.wp-callout.info { background: rgba(59,130,246,.08); border-left: 3px solid #3b82f6; }
.wp-callout.info .wp-callout-icon { background: rgba(59,130,246,.15); color: #3b82f6; }
.wp-callout.info .wp-callout-label { color: #3b82f6; }

.wp-callout.warn { background: rgba(255,202,4,.06); border-left: 3px solid var(--primary); }
.wp-callout.warn .wp-callout-icon { background: rgba(255,202,4,.15); color: var(--primary); }
.wp-callout.warn .wp-callout-label { color: var(--primary); }

.wp-callout.risk { background: rgba(239,68,68,.07); border-left: 3px solid #ef4444; }
.wp-callout.risk .wp-callout-icon { background: rgba(239,68,68,.15); color: #ef4444; }
.wp-callout.risk .wp-callout-label { color: #ef4444; }

.wp-callout.tip { background: rgba(16,185,129,.07); border-left: 3px solid #10b981; }
.wp-callout.tip .wp-callout-icon { background: rgba(16,185,129,.15); color: #10b981; }
.wp-callout.tip .wp-callout-label { color: #10b981; }

/* ─── TABLES ─── */
.wp-table-wrap { overflow-x: auto; margin: 16px 0; border-radius: 12px; border: 1px solid var(--border-color); }
.wp-table {
    width: 100%; border-collapse: collapse; font-size: .85rem;
}
.wp-table th {
    background: var(--bg-card-light); color: var(--text-muted); font-size: .75rem;
    text-transform: uppercase; letter-spacing: 1px; padding: 12px 16px; text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.wp-table td {
    padding: 10px 16px; border-bottom: 1px solid var(--border-color); color: var(--text-secondary);
}
.wp-table tr:last-child td { border-bottom: none; }
.wp-table tr:hover td { background: rgba(255,202,4,.03); }
.wp-table .highlight { color: var(--primary); font-weight: 600; }

/* ─── PILL LINKS ─── */
.wp-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 18px; border-radius: 20px; border: 1px solid var(--border-color);
    color: var(--text-secondary); text-decoration: none; font-size: .82rem;
    transition: all .3s; margin: 4px 4px 4px 0;
}
.wp-pill:hover { border-color: var(--primary); color: var(--primary); }
.wp-pill i { font-size: .78rem; }

/* ─── FAQ ACCORDION ─── */
.wp-faq { margin-top: 20px; }
.wp-faq-item {
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px;
    margin-bottom: 12px; overflow: hidden; transition: border-color .3s;
}
.wp-faq-item:hover { border-color: rgba(255,202,4,.3); }
.wp-faq-q {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    padding: 18px 22px; background: transparent; border: none;
    color: var(--text-primary); font-size: .95rem; font-weight: 500;
    cursor: pointer; font-family: inherit; text-align: left;
}
.wp-faq-q svg { min-width: 18px; color: var(--primary); transition: transform .3s; }
.wp-faq-item.open .wp-faq-q svg { transform: rotate(45deg); }
.wp-faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.wp-faq-item.open .wp-faq-a { max-height: 600px; }
.wp-faq-a-inner { padding: 0 22px 18px; color: var(--text-secondary); font-size: .9rem; line-height: 1.7; }

/* ─── BACK TO TOP ─── */
.wp-back-top {
    position: fixed; bottom: 24px; right: 24px; z-index: 999;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--primary); color: #000; border: none;
    display: none; align-items: center; justify-content: center;
    cursor: pointer; font-size: 1.1rem; transition: all .3s;
    box-shadow: 0 4px 20px rgba(255,202,4,.3);
}
.wp-back-top.visible { display: flex; }
.wp-back-top:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(255,202,4,.3); }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
    .wp-layout { grid-template-columns: 1fr; }
    .wp-toc { display: none; }
    .wp-toc.mobile-open {
        display: block; position: fixed; top: 100px; left: 0; bottom: 0;
        width: 300px; max-width: 80vw; max-height: calc(100vh - 100px);
        border-radius: 0 16px 16px 0; z-index: 999;
        background: rgba(13,13,13,.98); backdrop-filter: blur(20px);
        border-right: 1px solid var(--border-color);
        padding: 24px 16px; overflow-y: auto;
    }
    .wp-toc-toggle { display: flex; }
}

@media (max-width: 768px) {
    .wp-metrics { gap: 20px; padding: 20px 16px; }
    .wp-metric-value { font-size: 1.1rem; }
    .wp-steps-grid { gap: 10px; }
    .wp-step { min-width: 130px; padding: 20px 12px 16px; }
    .wp-section { padding: 24px 18px; border-radius: 14px; }
    .wp-section-title { font-size: 1.05rem; }
    .wp-table { font-size: .78rem; }
    .wp-table th, .wp-table td { padding: 8px 10px; }
}

@media (max-width: 480px) {
    .wp-section { padding: 18px 14px; }
    .wp-callout { flex-direction: column; gap: 8px; }
}



/* =========================================
   PATCH 1: spacing between FA icon and text
   (View Contract / Read FAQ in hero)
   ========================================= */
.hero-buttons a.btn.btn-secondary{
  display: inline-flex;
  align-items: center;
  gap: 6px;              /* ← тот самый маленький пробел */
}

/* (на всякий случай) убираем возможные странные отступы/линия-хайт у иконки */
.hero-buttons a.btn.btn-secondary > i{
  line-height: 1;
}


/* =========================================
   PATCH 2: mobile TOC should not overlap header
   (Table of Contents drawer)
   ========================================= */
@media (max-width: 1024px){
  .wp-toc.mobile-open{
    top: calc(100px + 14px + env(safe-area-inset-top, 0px));
    max-height: calc(100vh - (100px + 14px + env(safe-area-inset-top, 0px)));
  }
}


/* Hide mobile TOC toggle button when TOC is open */
.wp-toc-toggle.is-hidden{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#tocToggle{
  will-change: transform;
}

.wp-toc-toggle.is-hidden,
#tocToggle.is-hidden{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

