/* ============================================================
   COMPARE PAGE — Yesper AI vs M365 Copilot
   ============================================================ */

/* Hero */
.compare-hero {
    padding-top: 160px;
    padding-bottom: 0;
}

.compare-hero .case-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(10, 10, 10, 0.6);
    text-decoration: none;
    margin-bottom: 48px;
    transition: color 0.3s ease;
}

.compare-hero .case-back-link:hover {
    color: rgb(10, 10, 10);
}

@media (max-width: 768px) {
    .compare-hero .case-back-link {
        margin-bottom: 32px;
    }
}

.compare-hero h1 {
    font-family: 'Instrument Serif', serif;
    font-size: 120px;
    font-weight: 300;
    letter-spacing: -2.4px;
    line-height: 114px;
    margin-bottom: 16px;
}

.compare-hero .subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 22px;
    margin-bottom: 32px;
    max-width: 600px;
    opacity: 0.8;
}

/* Comparison table wrapper */
.compare-section {
    padding: 80px 0;
    animation: compareFadeIn 0.6s ease both;
}

@keyframes compareFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .compare-section {
        animation: none;
    }
}

.compare-note {
    font-size: 13px;
    line-height: 20px;
    color: rgba(10, 10, 10, 0.5);
    max-width: 700px;
    margin-bottom: 48px;
}

.compare-note--after {
    margin-top: 48px;
    margin-bottom: 0;
}

/* Legend */
.compare-legend {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.compare-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(10, 10, 10, 0.6);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot--green {
    background-color: rgb(52, 168, 83);
}

.dot--yellow {
    background-color: rgb(214, 172, 0);
}

.dot--red {
    background-color: rgb(210, 63, 49);
}

/* Section headers */
.compare-category {
    margin-bottom: 0;
}

.compare-category-label {
    font-family: 'Instrument Serif', serif;
    font-size: 24px;
    font-weight: 300;
    color: rgb(10, 10, 10);
    padding: 80px 0 16px;
    border-bottom: 1px solid rgba(10, 10, 10, 0.08);
}

.compare-category:first-child .compare-category-label {
    padding-top: 0;
}

/* Table header row */
.compare-header {
    display: grid;
    grid-template-columns: 2fr 3fr 3fr;
    gap: 0;
    border-bottom: 1px solid rgba(10, 10, 10, 0.08);
    position: sticky;
    top: 60px;
    background-color: rgb(254, 254, 252);
    z-index: 5;
}

/* Extend the sticky header's background upward to cover the gap
   between the fixed site nav and the table header when scrolling.
   Height matches the legend's margin-bottom so this sits in empty
   space and doesn't mask any content on initial load. */
.compare-header::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 24px;
    background-color: rgb(254, 254, 252);
    pointer-events: none;
}

.compare-header span {
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(10, 10, 10, 0.5);
    padding: 16px 24px 16px 0;
    display: flex;
    align-items: center;
}

.compare-header span:first-child {
    border-right: 1px solid rgba(10, 10, 10, 0.08);
}

.compare-header span:nth-child(2) {
    padding-left: 24px;
    border-right: 1px solid rgba(10, 10, 10, 0.08);
}

.compare-header span:nth-child(3) {
    padding-left: 24px;
}

/* Comparison rows — no padding, cells fill their grid area completely */
.compare-row {
    display: grid;
    grid-template-columns: 2fr 3fr 3fr;
    gap: 0;
    align-items: stretch;
}

/* Feature name column — full cell padding, continuous right border */
.compare-feature {
    padding: 24px 32px 24px 0;
    border-right: 1px solid rgba(10, 10, 10, 0.08);
    border-bottom: 1px solid rgba(10, 10, 10, 0.08);
    display: flex;
    align-items: center;
}

.compare-feature h4 {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: rgb(10, 10, 10);
    margin-bottom: 0;
}

/* Product columns — fill full cell area, continuous borders */
.compare-cell {
    display: flex;
    gap: 12px;
    padding: 24px;
    align-items: flex-start;
    border-bottom: 1px solid rgba(10, 10, 10, 0.08);
}

/* Continuous vertical line between M365 and Yesper columns */
.compare-cell--copilot {
    border-right: 1px solid rgba(10, 10, 10, 0.08);
}

/* Remove bottom border on very last row */
.compare-category:last-child .compare-row:last-child .compare-feature,
.compare-category:last-child .compare-row:last-child .compare-cell {
    border-bottom: none;
}

/* Color-coded cell backgrounds */
.compare-cell--green {
    background-color: rgba(52, 168, 83, 0.08);
}

.compare-cell--yellow {
    background-color: rgba(214, 172, 0, 0.08);
}

.compare-cell--red {
    background-color: rgba(210, 63, 49, 0.06);
}

.compare-cell .dot {
    margin-top: 5px;
}

.compare-cell p {
    font-size: 14px;
    line-height: 20px;
    color: rgba(10, 10, 10, 0.7);
    margin: 0;
}

/* Responsive */
@media (max-width: 1200px) {
    .compare-hero h1 {
        font-size: 88px;
        letter-spacing: -1.76px;
        line-height: 83.6px;
    }

    .compare-header {
        grid-template-columns: 1.5fr 2fr 2fr;
    }

    .compare-row {
        grid-template-columns: 1.5fr 2fr 2fr;
    }
}

@media (max-width: 768px) {
    .compare-hero {
        padding-top: 120px;
        padding-bottom: 48px;
    }

    .compare-hero h1 {
        font-size: 56px;
        letter-spacing: -1.12px;
        line-height: 53px;
        margin-bottom: 24px;
    }

    .compare-legend {
        flex-wrap: wrap;
        gap: 16px;
    }

    /* Hide desktop table header */
    .compare-header {
        display: none;
    }

    /* Stack rows vertically */
    .compare-row {
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding: 24px 0;
    }

    .compare-row:nth-child(even) {
        margin: 0 -16px;
        padding: 24px 16px;
    }

    .compare-feature {
        padding-right: 0;
    }

    .compare-cell {
        padding: 12px 16px;
        border-radius: 4px;
        margin: 0;
    }

    .compare-cell--copilot {
        border-right: none;
        border-radius: 4px;
    }

    .compare-cell::before {
        font-size: 11px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: rgba(10, 10, 10, 0.4);
        flex-shrink: 0;
        min-width: 80px;
    }

    .compare-cell--copilot::before {
        content: 'M365';
    }

    .compare-cell--yesper::before {
        content: 'Yesper';
    }
}
