/* ==========================================================================
   Tably — Home Page Interactive Styles (home.css)
   ========================================================================== */

/* ---------- Hero Stats Bar ---------- */

.hero-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 36px;
    padding: 22px 24px;
}

.stat-box {
    display: flex;
    flex-direction: column;
}

.stat-value {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    line-height: 1;
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(34px, 3.8vw, 48px);
    font-weight: 700;
    line-height: 1;
    color: var(--emerald) !important;
}

.stat-suffix {
    font-family: var(--font-display);
    font-size: clamp(18px, 2vw, 24px);
    color: var(--violet-bright) !important;
    font-weight: 600;
    line-height: 1;
}

.stat-desc {
    margin-top: 8px;
    color: var(--text-soft);
    font-size: 13.5px;
    line-height: 1.4;
}

/* ---------- Side-by-Side Graph Comparison ---------- */

.graph-compare-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
}

.graph-col {
    background: rgba(14, 18, 25, 0.7);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px 18px 18px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.graph-col-raw {
    border-color: rgba(248, 113, 113, 0.25);
}

.graph-col-opt {
    border-color: rgba(52, 211, 153, 0.5);
    background: rgba(16, 26, 24, 0.65);
    box-shadow: inset 0 1px 0 rgba(52, 211, 153, 0.2), 0 0 32px -10px var(--glow-emerald);
}

.graph-col-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.graph-col-badge {
    font-size: 12.5px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
}

.badge-raw {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.35);
}

.badge-opt {
    background: rgba(52, 211, 153, 0.15);
    color: var(--emerald-bright);
    border: 1px solid rgba(52, 211, 153, 0.4);
}

.graph-col-metric {
    font-size: 13px;
    color: var(--text-soft);
    font-weight: 500;
}

.metric-opt {
    color: var(--emerald-bright);
    font-weight: 600;
}

.graph-svg-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 280px;
    position: relative;
}

.graph-svg-wrapper svg {
    width: 100%;
    height: 100%;
    display: block;
}

.graph-compare-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0 4px;
}

.compare-arrow {
    font-size: 24px;
    color: var(--violet-bright);
    font-weight: 700;
}

.compare-saving {
    font-size: 12px;
    font-weight: 800;
    color: var(--emerald-bright);
    background: rgba(52, 211, 153, 0.15);
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(52, 211, 153, 0.3);
    white-space: nowrap;
}

.graph-col-footer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}

.footer-desc-raw {
    font-size: 13px;
    color: var(--text-soft);
    line-height: 1.45;
}

.footer-desc-opt {
    font-size: 13px;
    color: #d1fae5;
    line-height: 1.45;
}

.graph-bottom-benefits {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

/* ---------- AI OCR Split Showcase ---------- */

.ocr-interactive-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-radius: 20px;
    overflow: hidden;
}

.receipt-tape {
    background: rgba(12, 15, 20, 0.75);
    padding: 28px;
    border-right: 1px solid var(--border);
}

.tape-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border);
}

.store-badge {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.tape-date {
    font-size: 12px;
    color: var(--text-faint);
}

.tape-items-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tape-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    color: var(--text-soft);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 14px;
    text-align: left;
    transition: all 0.2s var(--ease);
    width: 100%;
}

.tape-row:hover {
    border-color: var(--border);
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.tape-row.is-selected {
    border-color: var(--border-bright);
    background: rgba(52, 211, 153, 0.12);
    color: var(--text);
    box-shadow: 0 0 16px -4px var(--glow-emerald);
}

.tape-price {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.tape-price.is-negative {
    color: var(--emerald-bright);
}

.ocr-detail-card {
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(16, 20, 27, 0.5);
}

.ocr-detail-card .pill-soon {
    margin-bottom: 10px;
    display: inline-block;
}

.detail-header h3 {
    font-size: 22px;
    margin-bottom: 18px;
}

.detail-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.detail-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.detail-stat-row span {
    color: var(--text-soft);
}

.detail-stat-row strong {
    color: var(--text);
}

.accent-emerald {
    color: var(--emerald-bright) !important;
}

.detail-consumers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.consumer-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--text);
}

/* Feature Cards Graphite Touch */
.feature-card {
    background: rgba(14, 18, 25, 0.6);
}

.feature-card:hover {
    background: rgba(20, 26, 36, 0.85);
    border-color: rgba(52, 211, 153, 0.45);
}

/* ---------- Responsive Home ---------- */

@media (max-width: 920px) {
    .ocr-interactive-grid {
        grid-template-columns: 1fr;
    }
    .receipt-tape {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
}

@media (max-width: 820px) {
    .hero-stats-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .graph-compare-grid {
        grid-template-columns: 1fr;
    }
    .graph-compare-divider {
        flex-direction: row;
        justify-content: center;
        padding: 10px 0;
    }
}