/* ============================================================
   FelixChess — features-component.css
   Feature showcase: 4 tabs — Move Tree, Opening Explorer,
   Game Analyzer, PGN Validator. Consolidates why-FC value props.
   ============================================================ */

/* ── Custom properties ──────────────────────────────────────── */
.fc-features {
    --fc-feat-bg: #111311;
    --fc-feat-panel-bg: #161918;
    --fc-feat-border: rgba(255 255 255 / 0.07);
    --fc-feat-accent: #aaff00;
    --fc-feat-accent-dim: rgba(170 255 0 / 0.15);
    --fc-feat-text: #ffffff;
    --fc-feat-muted: rgba(255 255 255 / 0.50);
    --fc-feat-body: rgba(255 255 255 / 0.70);
    --fc-feat-kicker: rgba(170 255 0 / 0.80);
    --fc-feat-tab-idle: rgba(255 255 255 / 0.45);
    --fc-feat-tab-hover: rgba(255 255 255 / 0.80);
    --fc-feat-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --fc-feat-radius: 14px;
    --fc-feat-video-radius: 10px;
}


/* ── Section shell ──────────────────────────────────────────── */
.fc-features {
    background: var(--fc-feat-bg);
    padding-block: 80px 88px;
    border-radius: 0;
    overflow: hidden;
}


/* ── Section header ─────────────────────────────────────────── */
.fc-features__header {
    text-align: center;
    max-width: 42rem;
    margin-inline: auto;
    margin-bottom: 52px;
    display: grid;
    gap: 16px;
}

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

.fc-features__title {
    font-size: clamp(2rem, 3.8vw, 2.9rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.022em;
    color: var(--fc-feat-text);
    margin: 0;
}

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

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


/* ── Tab navigation bar ─────────────────────────────────────── */
.fc-features__tablist {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.fc-features__tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 100px;
    border: 1.5px solid transparent;
    background: transparent;
    font-size: 18px;
    font-weight: 600;
    color: var(--fc-feat-tab-idle);
    cursor: pointer;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
    white-space: nowrap;
}

.fc-features__tab:hover {
    color: var(--fc-feat-tab-hover);
    border-color: rgba(255 255 255 / 0.20);
}

.fc-features__tab.is-active {
    background: var(--fc-feat-accent);
    color: #0a0c0a;
    border-color: transparent;
    font-weight: 700;
}

.fc-features__tab.is-active .fc-features__tab-icon {
    stroke: #0a0c0a;
}

.fc-features__tab-icon {
    /* Explicit dimensions override global svg { width: 100% } resets */
    width: 16px;
    height: 16px;
    min-width: 16px;
    max-width: 16px;
    flex-shrink: 0;
    align-self: center;
    stroke: currentColor;
    transition: stroke 0.2s ease;
}


/* ── Panels container ───────────────────────────────────────── */
.fc-features__panels {
    background: var(--fc-feat-panel-bg);
    border: 1px solid var(--fc-feat-border);
    border-radius: var(--fc-feat-radius);
    overflow: hidden;
}


/* ── Single panel ───────────────────────────────────────────── */
.fc-features__panel {
    /* hidden panels: display:none via the `hidden` attribute */
}

.fc-features__panel.is-active {
    animation: fc-feat-fadein 0.35s var(--fc-feat-ease) both;
}

@keyframes fc-feat-fadein {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Two-column grid: text left, video right */
.fc-features__panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 440px;
}


/* ── Panel text column ──────────────────────────────────────── */
.fc-features__panel-text {
    padding: 44px 40px 44px 44px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
    border-right: 1px solid var(--fc-feat-border);
}

.fc-features__panel-kicker {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fc-feat-kicker);
    margin: 0;
}

.fc-features__panel-heading {
    font-size: clamp(1.3rem, 2.2vw, 1.7rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.018em;
    color: var(--fc-feat-text);
    margin: 0;
}

.fc-features__panel-body {
    font-size: 18px;
    line-height: 1.70;
    color: var(--fc-feat-body);
    margin: 0;
}

.fc-features__panel-body p,
.fc-features__panel-body ul,
.fc-features__panel-body ol {
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.fc-features__panel-body p {
    margin: 0;
}

.fc-features__panel-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.fc-features__panel-list ul,
.fc-features__panel-list ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.fc-features__panel-list li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 18px;
    line-height: 1.5;
    color: var(--fc-feat-body);
}

/* Lime bullet */
.fc-features__panel-list li::before {
    content: "";
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--fc-feat-accent);
    flex-shrink: 0;
    margin-top: 6px;
}

.fc-features__panel-cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 16px;
    font-weight: 700;
    color: var(--fc-feat-accent);
    text-decoration: none;
    margin-top: 4px;
    width: fit-content;
    transition: gap 0.2s ease, opacity 0.2s ease;
}

.fc-features__panel-cta:hover,
.fc-features__panel-cta:focus-visible {
    gap: 11px;
    opacity: 0.80;
}


/* ── Panel media column ─────────────────────────────────────── */
.fc-features__panel-media {
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0e100e;
}

.fc-features__video-shell {
    width: 100%;
    border-radius: var(--fc-feat-video-radius);
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0 0 0 / 0.50);
    position: relative;
}

/* Maintains 16:9 aspect ratio */
.fc-features__video-placeholder {
    position: relative;
    aspect-ratio: 16 / 9;
    width: 100%;
    overflow: hidden;
    border-radius: var(--fc-feat-video-radius);
    cursor: pointer;
}

/* Unique tinted backgrounds per feature — evoke the UI without a real screenshot */
.fc-features__video-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s var(--fc-feat-ease);
}

.fc-features__video-placeholder:hover .fc-features__video-bg {
    transform: scale(1.03);
}

/* Move Tree: dark green nodes on near-black */
.fc-features__video-bg--movetree {
    background:
        radial-gradient(ellipse at 30% 50%, rgba(170 255 0 / 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 30%, rgba(170 255 0 / 0.04) 0%, transparent 50%),
        linear-gradient(135deg, #0d110d 0%, #0a0e0a 100%);
}

/* Opening Explorer: cooler blue-gray tint */
.fc-features__video-bg--explorer {
    background:
        radial-gradient(ellipse at 50% 40%, rgba(100 160 255 / 0.07) 0%, transparent 60%),
        linear-gradient(135deg, #0d0f14 0%, #090c10 100%);
}

/* Game Analyzer: deep amber engine glow */
.fc-features__video-bg--analyzer {
    background:
        radial-gradient(ellipse at 40% 55%, rgba(255 180 0 / 0.07) 0%, transparent 55%),
        linear-gradient(135deg, #120f0a 0%, #0e0c08 100%);
}

/* PGN Validator: neutral code-editor feel */
.fc-features__video-bg--pgn {
    background:
        radial-gradient(ellipse at 60% 40%, rgba(170 255 0 / 0.04) 0%, transparent 50%),
        linear-gradient(135deg, #0e100e 0%, #0b0d0b 100%);
}

/* Play button */
.fc-features__play-btn {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid rgba(255 255 255 / 0.25);
    background: rgba(0 0 0 / 0.55);
    backdrop-filter: blur(8px);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.fc-features__video-placeholder:hover .fc-features__play-btn {
    background: var(--fc-feat-accent);
    border-color: var(--fc-feat-accent);
    color: #0a0c0a;
    transform: translate(-50%, -50%) scale(1.08);
}

/* Caption bar at the bottom of each video */
.fc-features__video-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 14px;
    background: linear-gradient(to top, rgba(0 0 0 / 0.75) 0%, transparent 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: rgba(255 255 255 / 0.70);
    font-weight: 500;
}

.fc-features__video-badge {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--fc-feat-accent);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}


/* ── Responsive: tablet ─────────────────────────────────────── */
@media (min-width: 48em) and (max-width: 72em) {
    .fc-features__panel-text {
        padding: 36px 28px 36px 36px;
    }

    .fc-features__panel-media {
        padding: 24px 20px;
    }
}


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

    .fc-features__tablist {
        gap: 6px;
        margin-bottom: 28px;
    }

    .fc-features__tab {
        padding: 8px 16px;
        font-size: 0.82rem;
    }

    /* Stack: video on top, text below */
    .fc-features__panel-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        min-height: auto;
    }

    .fc-features__panel-media {
        order: -1;         /* video first on mobile */
        padding: 20px 20px 0;
        background: transparent;
    }

    .fc-features__panel-text {
        padding: 28px 24px 36px;
        border-right: none;
        border-top: 1px solid var(--fc-feat-border);
        gap: 14px;
    }
}


/* ── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .fc-features__panel.is-active {
        animation: none;
    }

    .fc-features__video-placeholder:hover .fc-features__video-bg {
        transform: none;
    }

    .fc-features__video-placeholder:hover .fc-features__play-btn {
        transform: translate(-50%, -50%);
    }

    .fc-features__tab,
    .fc-features__panel-cta {
        transition: none;
    }
}
