/* ═══════════════════════════════════════════════════════════════════
   Rich Patterns — Extended Design System for Tari Electra
   Marquee · Bento · Comparison · Accordion · Pricing · Tooltips
═══════════════════════════════════════════════════════════════════ */

/* ── Scroll Progress Bar ───────────────────────────────────────── */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: #0B5F2A;
    z-index: 9999;
    width: 0%;
    transition: width 0.08s linear;
    pointer-events: none;
}

/* ── Marquee / Ticker ──────────────────────────────────────────── */
.marquee-root { overflow: hidden; position: relative; }
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 40s linear infinite;
}
.marquee-root:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 2.5rem;
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    white-space: nowrap;
}

/* ── Bento Grid ────────────────────────────────────────────────── */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
@media (max-width: 1024px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
    .bento-span-2 { grid-column: span 2 !important; }
}
@media (max-width: 640px) {
    .bento-grid { grid-template-columns: 1fr; }
    .bento-span-2 { grid-column: span 1 !important; }
    .bento-row-2 { grid-row: span 1 !important; }
}
.bento-span-2 { grid-column: span 2; }
.bento-row-2  { grid-row: span 2; }
.bento-card {
    background: #fff;
    border: 1px solid #E5EAE7;
    padding: 1.75rem;
    transition: border-color .22s, box-shadow .22s, transform .22s;
    position: relative;
    overflow: hidden;
}
.bento-card:hover {
    border-color: rgba(11,95,42,0.35);
    box-shadow: 0 10px 30px rgba(11,95,42,0.09);
    transform: translateY(-2px);
}
.bento-card-dark {
    background: #0E141B;
    border-color: #0E141B;
    color: #fff;
}
.bento-card-green {
    background: #0B5F2A;
    border-color: #0B5F2A;
    color: #fff;
}
.bento-card-muted {
    background: #FAFBFC;
    border-color: #E5EAE7;
}

/* ── Mini Bar Chart (Bento) ────────────────────────────────────── */
.mini-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 48px;
}
.mini-bar-chart .bar {
    flex: 1;
    background: currentColor;
    border-radius: 2px 2px 0 0;
    transition: height 1s cubic-bezier(.4,0,.2,1);
    opacity: 0.75;
}
.mini-bar-chart .bar.active { opacity: 1; }

/* ── Sparkline (inline SVG helper) ────────────────────────────── */
.sparkline-label {
    font-size: 0.625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #8A9199;
}

/* ── Pull Quote ────────────────────────────────────────────────── */
.pull-quote-section {
    position: relative;
    overflow: hidden;
}
.pull-quote-mark {
    font-size: 10rem;
    line-height: 0.65;
    font-weight: 900;
    display: block;
    user-select: none;
    color: #0B5F2A;
    opacity: 0.08;
}
.pull-quote-text {
    font-size: 1.625rem;
    font-weight: 900;
    color: #0E141B;
    line-height: 1.2;
    letter-spacing: -0.025em;
}
@media (min-width: 640px) { .pull-quote-text { font-size: 2.25rem; } }
@media (min-width: 1024px){ .pull-quote-text { font-size: 2.75rem; } }

/* ── Comparison Table ──────────────────────────────────────────── */
.comp-table { width: 100%; border-collapse: collapse; }
.comp-table th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #8A9199;
    border-bottom: 2px solid #E5EAE7;
}
.comp-table th.col-us { background: #EAF4ED; color: #0B5F2A; border-bottom-color: #0B5F2A; }
.comp-table th.col-them { border-bottom-color: #E5EAE7; }
.comp-table td {
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
    border-bottom: 1px solid #F3F4F6;
    vertical-align: middle;
}
.comp-table tr:last-child td { border-bottom: none; }
.comp-table td.col-us { background: rgba(234,244,237,0.35); }
.comp-table .chk { color: #0B5F2A; font-size: 1.1rem; font-weight: 900; }
.comp-table .xmk { color: #CBD5E1; font-size: 1.1rem; }
.comp-table tr:hover td { background: rgba(234,244,237,0.2); }
.comp-table tr:hover td.col-us { background: rgba(234,244,237,0.55); }

/* ── Tooltip ───────────────────────────────────────────────────── */
[data-tip] { position: relative; cursor: help; }
[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #0E141B;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 60;
    border: 1px solid rgba(255,255,255,0.08);
}
[data-tip]:hover::after { opacity: 1; }

/* ── Capability Progress Bars ──────────────────────────────────── */
.cap-bar-track {
    height: 3px;
    background: #E5EAE7;
    overflow: hidden;
    margin-top: 0.5rem;
}
.cap-bar-fill {
    height: 100%;
    background: #0B5F2A;
    width: 0;
    transition: width 1.4s cubic-bezier(.4,0,.2,1);
}

/* ── Pricing Cards ─────────────────────────────────────────────── */
.pricing-card {
    border: 1px solid #E5EAE7;
    background: #fff;
    transition: border-color .22s, box-shadow .22s, transform .22s;
    display: flex;
    flex-direction: column;
}
.pricing-card:hover {
    border-color: rgba(11,95,42,0.3);
    box-shadow: 0 12px 32px rgba(11,95,42,0.1);
    transform: translateY(-3px);
}
.pricing-card.featured {
    border-color: #0B5F2A;
    border-width: 2px;
    box-shadow: 0 8px 28px rgba(11,95,42,0.14);
    position: relative;
}
.pricing-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #0B5F2A;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: 0.2rem 0.875rem;
    white-space: nowrap;
}

/* ── Feature Matrix Table ──────────────────────────────────────── */
.feat-matrix { width: 100%; border-collapse: collapse; }
.feat-matrix th {
    padding: 0.75rem 1rem;
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #8A9199;
    border-bottom: 1px solid #E5EAE7;
    text-align: center;
}
.feat-matrix th:first-child { text-align: left; }
.feat-matrix th.hl { color: #0B5F2A; background: #EAF4ED; }
.feat-matrix td {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    border-bottom: 1px solid #F5F7F5;
    text-align: center;
    color: #8A9199;
}
.feat-matrix td:first-child { text-align: left; font-weight: 600; color: #0E141B; }
.feat-matrix td.hl { background: rgba(234,244,237,0.3); }
.feat-matrix .yes { color: #0B5F2A; font-weight: 900; font-size: 1rem; }
.feat-matrix .no  { color: #CBD5E1; }
.feat-matrix tr:hover td { background: rgba(234,244,237,0.15); }
.feat-matrix tr:hover td.hl { background: rgba(234,244,237,0.4); }

/* ── Accordion (custom smooth) ─────────────────────────────────── */
.ac-item {
    border: 1px solid rgba(11,95,42,0.1);
    transition: border-color .2s;
    background: #fff;
}
.ac-item.open { border-color: rgba(11,95,42,0.25); box-shadow: 0 4px 16px rgba(11,95,42,0.06); }
.ac-btn {
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    gap: 1rem;
    transition: background .15s;
}
.ac-btn:hover { background: rgba(11,95,42,0.02); }
.ac-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #0B5F2A;
    flex-shrink: 0;
    transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.ac-item.open .ac-icon { transform: rotate(45deg); }
.ac-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s cubic-bezier(.4,0,.2,1);
}
.ac-item.open .ac-body { max-height: 600px; }
.ac-content {
    padding: 0 1.5rem 1.25rem;
    border-top: 1px solid rgba(11,95,42,0.08);
}

/* ── Category Pill Filter ──────────────────────────────────────── */
.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 1rem;
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    border: 1px solid #E5EAE7;
    color: #8A9199;
    background: #fff;
    transition: all .15s;
    user-select: none;
}
.cat-pill.active, .cat-pill:hover { background: #0B5F2A; border-color: #0B5F2A; color: #fff; }
.cat-pill .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.125rem;
    height: 1.125rem;
    background: rgba(255,255,255,0.25);
    font-size: 0.5625rem;
    border-radius: 50%;
}
.cat-pill:not(.active) .count { background: #F3F4F6; color: #8A9199; }

/* ── FAQ Search Input ──────────────────────────────────────────── */
.faq-search-wrap { position: relative; }
.faq-search-wrap .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.125rem;
    height: 1.125rem;
    color: #8A9199;
    pointer-events: none;
}
.faq-search {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 3rem;
    border: 1px solid #E5EAE7;
    background: #fff;
    font-family: inherit;
    font-size: 0.9375rem;
    color: #0E141B;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.faq-search:focus { border-color: #0B5F2A; box-shadow: 0 0 0 3px rgba(11,95,42,0.08); }
.faq-search::placeholder { color: #BCBFC2; }

/* ── Popular Badge ─────────────────────────────────────────────── */
.faq-popular {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.5rem;
    background: #EAF4ED;
    border: 1px solid rgba(11,95,42,0.2);
    color: #0B5F2A;
    font-size: 0.5625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    flex-shrink: 0;
}

/* ── Guarantee Badge ───────────────────────────────────────────── */
.guar-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.875rem;
    padding: 1.75rem 1.25rem;
    border: 1px solid #E5EAE7;
    background: #fff;
    text-align: center;
    transition: border-color .2s, transform .2s, box-shadow .2s;
}
.guar-badge:hover {
    border-color: rgba(11,95,42,0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(11,95,42,0.08);
}
.guar-icon {
    width: 3rem;
    height: 3rem;
    background: #EAF4ED;
    border: 1px solid rgba(11,95,42,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0B5F2A;
    flex-shrink: 0;
}

/* ── Live Status Dot ───────────────────────────────────────────── */
.live-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    background: #22C55E;
    border-radius: 50%;
    animation: live-pulse 2s ease-in-out infinite;
}
@keyframes live-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
    50% { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
}

/* ── Stat Trend (up/down arrow indicator) ──────────────────────── */
.trend-up   { color: #0B5F2A; }
.trend-down { color: #EF4444; }

/* ── Divider Ornament ──────────────────────────────────────────── */
.section-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 auto;
    width: 100%;
    max-width: 120px;
}
.section-divider::before, .section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E5EAE7;
}
.section-divider-dot {
    width: 5px;
    height: 5px;
    background: #0B5F2A;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Hidden / Visible FAQ filter helpers ───────────────────────── */
.faq-hidden { display: none; }
