/* ============================================================
   FelixChess — comparison-component.css
   Positioning section: "the layer serious players add on top"
   ============================================================ */

/* ── Custom properties ──────────────────────────────────────── */
.fc-comp {
    --fc-comp-bg: #111311;
    --fc-comp-panel-bg: #ffffff;
    --fc-comp-panel-border: rgba(0 0 0 / 0.10);
    --fc-comp-accent: #aaff00;
    --fc-comp-accent-dark: #4f8f00;
    --fc-comp-accent-glow: rgba(170 255 0 / 0.18);
    --fc-comp-accent-panel-border: rgba(140 255 0 / 0.65);
    --fc-comp-text: #151915;
    --fc-comp-muted: #4b5563;
    --fc-comp-soft: #6b7280;
    --fc-comp-check-neutral: #7b8794;
    --fc-comp-connector: rgba(21 25 21 / 0.16);
    --fc-comp-ease: cubic-bezier(0.22, 1, 0.36, 1);
}


/* ── Section shell ──────────────────────────────────────────── */
.fc-comp {
    background: var(--fc-comp-bg);
    padding-block: 80px 72px;
}


/* ── Header ─────────────────────────────────────────────────── */
.fc-comp__header {
    text-align: center;
    max-width: 38rem;
    margin-inline: auto;
    margin-bottom: 56px;
    display: grid;
    gap: 14px;
}

.fc-comp__eyebrow {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fc-comp-accent);
    margin: 0;
}

.fc-comp__title {
    font-size: clamp(1.9rem, 3.8vw, 2.8rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin: 0;
}

.fc-comp__title-accent {
    color: var(--fc-comp-accent);
}

.fc-comp__subtitle {
    font-size: 20px;
    line-height: 1.65;
    color: #ffffff;
    margin: 0;
}

.fc-comp__subtitle p {
    color: inherit;
    font-size: inherit;
    margin: 0;
}


/* ── Three-panel grid ───────────────────────────────────────── */
.fc-comp__system-frame {
    width: min(100%, 860px);
    margin-inline: auto;
    padding: clamp(18px, 3vw, 28px);
    border: 1px solid rgba(170 255 0 / 0.24);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(170 255 0 / 0.045), rgba(170 255 0 / 0.018)),
        rgba(255 255 255 / 0.025);
    box-shadow:
        0 22px 58px rgba(0 0 0 / 0.24),
        0 0 30px rgba(170 255 0 / 0.08),
        inset 0 1px 0 rgba(255 255 255 / 0.06);
}

.fc-comp__panels {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0 24px;
    max-width: 780px;
    margin-inline: auto;
}


/* ── Individual panel ───────────────────────────────────────── */
.fc-comp__panel {
    background: var(--fc-comp-panel-bg);
    border: 1px solid var(--fc-comp-panel-border);
    border-radius: 14px;
    padding: 32px 28px;
    display: grid;
    gap: 20px;
    align-self: stretch;     /* both cards same height */
    box-shadow: 0 18px 44px rgba(17 24 39 / 0.08);
}

/* Neutral panel: chess.com / Lichess */
.fc-comp__panel--neutral {
    /* no special treatment — they're respected, not diminished */
}

/* Accent panel: FelixChess */
.fc-comp__panel--accent {
    border-color: var(--fc-comp-accent-panel-border);
    box-shadow:
        0 0 0 1px var(--fc-comp-accent-panel-border),
        0 18px 44px rgba(17 24 39 / 0.10),
        0 0 24px var(--fc-comp-accent-glow),
        inset 0 1px 0 rgba(170 255 0 / 0.18);
    position: relative;
    overflow: hidden;
}

/* Subtle lime shimmer across the top of the FC panel */
.fc-comp__panel--accent::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--fc-comp-accent) 40%,
        var(--fc-comp-accent) 60%,
        transparent 100%
    );
}

.fc-comp__panel-role {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fc-comp-soft);
    margin: 0;
}

.fc-comp__panel--accent .fc-comp__panel-role {
    color: var(--fc-comp-accent-dark);
    opacity: 1;
}

.fc-comp__panel-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--fc-comp-text);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.fc-comp__panel-sep {
    margin-inline: 6px;
    opacity: 0.35;
}


/* ── Feature list ───────────────────────────────────────────── */
.fc-comp__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.fc-comp__list-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 16px;
    line-height: 1.5;
    color: #374151;
}

.fc-comp__check {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--fc-comp-check-neutral);
    flex-shrink: 0;
    margin-top: 1px;
}

/* FC panel: checks are lime green */
.fc-comp__panel--accent .fc-comp__check {
    color: var(--fc-comp-accent-dark);
}

/* FC panel: item text is slightly brighter */
.fc-comp__panel--accent .fc-comp__list-item {
    color: #1f2937;
}


/* ── Center connector ───────────────────────────────────────── */
.fc-comp__connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-block: 16px;
    flex-shrink: 0;
}

.fc-comp__plus {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid rgba(79 143 0 / 0.45);
    background: rgba(170 255 0 / 0.20);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--fc-comp-accent-dark);
    line-height: 1;
    flex-shrink: 0;
}

.fc-comp__connector-line {
    display: none;   /* visible only on mobile stack */
}


/* ── Tagline + nudge ────────────────────────────────────────── */
.fc-comp__tagline {
    text-align: center;
    margin-top: 42px;
    font-size: 20px;
    color: rgba(255 255 255 / 0.88);
    font-style: italic;
}

.fc-comp__cta-row {
    width: min(100%, 34rem);
    margin: 22px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(16px, 3vw, 26px);
}

.fc-comparison-symbol {
    width: clamp(180px, 19vw, 230px);
    height: auto;
    color: var(--fc-comp-accent);
    flex: 0 0 auto;
    filter: drop-shadow(0 0 7px rgba(79 143 0 / 0.18));
}

.fc-comparison-runner {
    opacity: 0.96;
}

.fc-comparison-symbol__board rect:first-child {
    fill: rgba(170 255 0 / 0.16);
    stroke: currentColor;
    stroke-width: 5;
}

.fc-comparison-symbol__board rect:not(:first-child) {
    fill: currentColor;
    stroke: none;
    opacity: 0.9;
}

.fc-comp__nudge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--fc-comp-accent-dark);
    text-decoration: none;
    max-width: 16rem;
    line-height: 1.45;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.fc-comp__nudge:hover,
.fc-comp__nudge:focus-visible {
    opacity: 0.8;
    transform: translateX(2px);
}


/* ── Scroll-triggered entrance ──────────────────────────────── */
.fc-comp__header,
.fc-comp__panel,
.fc-comp__connector,
.fc-comp__tagline,
.fc-comp__cta-row,
.fc-comp__nudge {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.7s var(--fc-comp-ease),
        transform 0.7s var(--fc-comp-ease);
}

/* JS adds this class when the element enters the viewport */
.fc-comp__header.is-visible,
.fc-comp__panel.is-visible,
.fc-comp__connector.is-visible,
.fc-comp__tagline.is-visible,
.fc-comp__cta-row.is-visible,
.fc-comp__nudge.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger: connector and right panel come in slightly after left */
.fc-comp__connector  { transition-delay: 0.10s; }
.fc-comp__panel:last-of-type { transition-delay: 0.18s; }
.fc-comp__tagline    { transition-delay: 0.05s; }
.fc-comp__cta-row    { transition-delay: 0.12s; }
.fc-comp__nudge      { transition-delay: 0.16s; }

/* If JS/IntersectionObserver isn't available, just show everything */
@media (prefers-reduced-motion: reduce) {
    .fc-comp__header,
    .fc-comp__panel,
    .fc-comp__connector,
    .fc-comp__tagline,
    .fc-comp__cta-row,
    .fc-comp__nudge {
        opacity: 1;
        transform: none;
        transition: none;
    }
}


/* ── Responsive: tablet ─────────────────────────────────────── */
@media (min-width: 48em) and (max-width: 64em) {
    .fc-comp__system-frame {
        padding: 20px;
        border-radius: 20px;
    }

    .fc-comp__panels {
        gap: 0 16px;
    }

    .fc-comp__panel {
        padding: 28px 22px;
    }
}


/* ── Responsive: mobile ─────────────────────────────────────── */
@media (max-width: 47.99em) {
    .fc-comp {
        padding-block: 56px 52px;
    }

    .fc-comp__system-frame {
        width: min(100%, 460px);
        padding: 16px;
        border-radius: 18px;
    }

    .fc-comp__panels {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 0;
        max-width: 420px;
    }

    .fc-comp__panel {
        padding: 28px 22px;
        border-radius: 12px;
    }

    /* On mobile: neutral card on top, connector in middle, accent card below */
    .fc-comp__panel--neutral { border-radius: 12px 12px 0 0; border-bottom: none; }
    .fc-comp__panel--accent  { border-radius: 0 0 12px 12px; }

    .fc-comp__connector {
        flex-direction: row;
        padding: 0;
        border-left: 1px solid var(--fc-comp-panel-border);
        border-right: 1px solid var(--fc-comp-panel-border);
        background: var(--fc-comp-panel-bg);
        justify-content: center;
        padding-block: 12px;
    }

    .fc-comp__connector-line {
        display: block;
        width: 40px;
        height: 1px;
        background: var(--fc-comp-connector);
    }

    .fc-comp__cta-row {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
        text-align: center;
    }

    .fc-comparison-symbol {
        width: clamp(112px, 35vw, 140px);
    }

    .fc-comp__nudge {
        max-width: 18rem;
    }
}
