/* ============================================================
   flagship.css — Prism chapter 02: CAREERDNA.AI flagship spotlight.
   Full-featured adaptive theme support (Light + Dark).
   Scope: body:has(#dh-home) or body.dh-active (see home.css).
   ============================================================ */

.da-flagship {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 3.5rem 0 3.5rem !important;
}

/* Light mode background */
html:not([data-theme="dark"]) .da-flagship {
    background: transparent !important;
}

/* Dark mode background */
html[data-theme="dark"] .da-flagship,
[data-theme="dark"] .da-flagship {
    background: #060A12 !important;
}

/* faint constellation / ambient drift texture */
.da-flagship::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .4;
    background-image:
        radial-gradient(1.5px 1.5px at 14% 24%, rgba(59, 130, 246, .5) 0, transparent 60%),
        radial-gradient(1.5px 1.5px at 76% 18%, rgba(0, 212, 255, .4) 0, transparent 60%),
        radial-gradient(1.5px 1.5px at 34% 70%, rgba(59, 130, 246, .4) 0, transparent 60%),
        radial-gradient(1.5px 1.5px at 86% 66%, rgba(0, 212, 255, .35) 0, transparent 60%),
        radial-gradient(1.5px 1.5px at 55% 40%, rgba(139, 92, 246, .3) 0, transparent 60%),
        radial-gradient(1.5px 1.5px at 22% 88%, rgba(59, 130, 246, .3) 0, transparent 60%);
    animation: da-flagship-drift 34s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes da-flagship-drift {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        transform: translate3d(-1.2%, 1%, 0) scale(1.02);
    }
}

.da-flagship__glow {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(42rem 26rem at 50% -10%, rgba(59, 130, 246, .18), transparent 65%),
        radial-gradient(34rem 22rem at 4% 100%, rgba(0, 212, 255, .1), transparent 60%);
    pointer-events: none;
}

.da-flagship__head {
    max-width: 780px;
}

.da-flagship__eyebrow {
    justify-content: center;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}

html:not([data-theme="dark"]) .da-flagship__eyebrow {
    color: #2563EB !important;
}

[data-theme="dark"] .da-flagship__eyebrow {
    color: #7DD3FC !important;
}

.da-flagship__eyebrow::after {
    background: linear-gradient(90deg, transparent, #3B82F6, transparent);
    flex: 0 0 2.5rem;
}

.da-flagship__eyebrow::before {
    content: "";
    flex: 0 0 2.5rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, #3B82F6, transparent);
    order: -1;
}

.da-flagship__title {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-bottom: 1.35rem;
}

.da-flagship__title-line {
    font-size: clamp(1.9rem, 4vw, 3.1rem);
    font-weight: 700;
    line-height: 1.15;
}

html:not([data-theme="dark"]) .da-flagship__title-line:first-child {
    color: #0A0F26 !important;
}

[data-theme="dark"] .da-flagship__title-line:first-child {
    color: #F8FAFC !important;
}

.da-flagship__sub {
    font-size: 1.15rem;
    max-width: 620px;
    margin-inline: auto;
    font-weight: 500;
    line-height: 1.6;
}

html:not([data-theme="dark"]) .da-flagship__sub {
    color: #1E293B !important;
}

[data-theme="dark"] .da-flagship__sub {
    color: #CBD5E1 !important;
}

.da-flagship__body {
    font-size: 1rem;
    line-height: 1.75;
    max-width: 640px;
    margin: 1.5rem auto 2.25rem;
}

html:not([data-theme="dark"]) .da-flagship__body {
    color: #334155 !important;
}

[data-theme="dark"] .da-flagship__body {
    color: #94A3B8 !important;
}

.da-flagship__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.da-flagship__actions .da-btn--primary {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: #FFFFFF !important;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, .4), 0 8px 24px rgba(37, 99, 235, .35);
}

.da-flagship__actions .da-btn--primary:hover {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: #FFFFFF !important;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, .55), 0 12px 28px rgba(37, 99, 235, .45);
    transform: translateY(-2px);
}

html:not([data-theme="dark"]) .da-flagship__actions .da-btn--ghost {
    border: 1.5px solid #64748B !important;
    color: #0A0F26 !important;
    background: #FFFFFF !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
}

html:not([data-theme="dark"]) .da-flagship__actions .da-btn--ghost:hover {
    border-color: #2563EB !important;
    color: #2563EB !important;
    background: rgba(37, 99, 235, 0.06) !important;
    transform: translateY(-2px);
}

[data-theme="dark"] .da-flagship__actions .da-btn--ghost {
    border-color: rgba(255, 255, 255, .16);
    color: #E2E8F5;
    background: rgba(255, 255, 255, .02);
}

[data-theme="dark"] .da-flagship__actions .da-btn--ghost:hover {
    background: rgba(59, 130, 246, .1);
    border-color: rgba(125, 211, 252, .5);
    color: #fff;
    transform: translateY(-2px);
}

/* ---------- feature grid ---------- */
.da-flagship__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    gap: 1.25rem;
    margin: 3.5rem 0 3.5rem;
}

.da-flagship__card {
    display: flex;
    flex-direction: column;
    padding: 2.2rem 2rem;
    text-align: left;
    border-radius: var(--da-r, 1.25rem);
    position: relative;
    transition: transform .3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .3s ease, border-color .3s ease, background-color .3s ease;
}

/* Light mode card */
html:not([data-theme="dark"]) .da-flagship__card {
    background: #FFFFFF !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04) !important;
}

html:not([data-theme="dark"]) .da-flagship__card:hover {
    transform: translateY(-6px);
    border-color: rgba(37, 99, 235, 0.35) !important;
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.12), 0 0 0 1px rgba(37, 99, 235, 0.1) !important;
}

/* Dark mode card */
[data-theme="dark"] .da-flagship__card {
    background: rgba(15, 21, 36, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .da-flagship__card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(165deg, rgba(255, 255, 255, .14), transparent 40%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: .8;
}

[data-theme="dark"] .da-flagship__card:hover {
    transform: translateY(-6px);
    border-color: rgba(139, 92, 246, 0.6) !important;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.7), 0 0 25px rgba(139, 92, 246, 0.35) !important;
}

.da-flagship__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    margin-bottom: 1.35rem;
    font-size: 1.15rem;
    transition: background .3s ease, border-color .3s ease, color .3s ease, transform .3s ease;
}

html:not([data-theme="dark"]) .da-flagship__icon {
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.2);
    color: #2563EB;
}

html:not([data-theme="dark"]) .da-flagship__card:hover .da-flagship__icon {
    background: linear-gradient(135deg, #2563EB, #7C3AED);
    border-color: transparent;
    color: #FFFFFF;
    transform: scale(1.08);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

[data-theme="dark"] .da-flagship__icon {
    background: radial-gradient(circle at 30% 25%, rgba(59, 130, 246, .28), rgba(59, 130, 246, .1));
    border: 1px solid rgba(59, 130, 246, .32);
    color: #93C5FD;
}

[data-theme="dark"] .da-flagship__card:hover .da-flagship__icon {
    background: radial-gradient(circle at 30% 25%, rgba(59, 130, 246, .5), rgba(59, 130, 246, .2));
    border-color: rgba(125, 211, 252, .6);
    color: #fff;
    transform: scale(1.06);
}

.da-flagship__card h3 {
    font-size: 1.12rem;
    font-weight: 700;
    margin: 0 0 .7rem;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

html:not([data-theme="dark"]) .da-flagship__card h3 {
    color: #0A0F26 !important;
}

[data-theme="dark"] .da-flagship__card h3 {
    color: #F8FAFC !important;
}

.da-flagship__card p {
    font-size: .92rem;
    line-height: 1.68;
    margin: 0;
}

html:not([data-theme="dark"]) .da-flagship__card p {
    color: #334155 !important;
}

[data-theme="dark"] .da-flagship__card p {
    color: #94A3B8 !important;
}

/* ---------- stats strip ---------- */
.da-flagship__stats {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    padding: 2.75rem 2rem;
    border-radius: 1.25rem;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

html:not([data-theme="dark"]) .da-flagship__stats {
    background: #FFFFFF !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05) !important;
}

[data-theme="dark"] .da-flagship__stats {
    background: rgba(15, 21, 36, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
}

.da-flagship__stat {
    flex: 1 1 0;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 2rem;
}

html:not([data-theme="dark"]) .da-flagship__stat {
    border-left: 1px solid rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .da-flagship__stat {
    border-left: 1px solid rgba(255, 255, 255, .1);
}

.da-flagship__stat:first-child {
    border-left: none !important;
}

.da-flagship__stat-val {
    font-family: var(--da-display);
    font-weight: 700;
    font-size: clamp(2.1rem, 3.6vw, 2.9rem);
    letter-spacing: -.02em;
    line-height: 1;
    background: linear-gradient(95deg, #2563EB, #7C3AED 55%, #06B6D4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.da-flagship__stat-label {
    font-size: .92rem;
    font-weight: 500;
    margin-top: .65rem;
}

html:not([data-theme="dark"]) .da-flagship__stat-label {
    color: #334155 !important;
}

[data-theme="dark"] .da-flagship__stat-label {
    color: #94A3B8 !important;
}

/* ---------- tech footer pills ---------- */
.da-flagship__foot {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 3.5rem 0 0;
}

.da-tech-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 1.35rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

html:not([data-theme="dark"]) .da-tech-pill {
    background: #FFFFFF !important;
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
    color: #334155 !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
}

html:not([data-theme="dark"]) .da-tech-pill i {
    color: #2563EB !important;
    font-size: 0.95rem;
}

html:not([data-theme="dark"]) .da-tech-pill:hover {
    background: rgba(37, 99, 235, 0.06) !important;
    border-color: rgba(37, 99, 235, 0.3) !important;
    color: #0A0F26 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12) !important;
}

[data-theme="dark"] .da-tech-pill {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    color: #CBD5E1 !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

[data-theme="dark"] .da-tech-pill i {
    color: #38BDF8 !important;
    font-size: 0.95rem;
}

[data-theme="dark"] .da-tech-pill:hover {
    background: rgba(56, 189, 248, 0.1) !important;
    border-color: rgba(56, 189, 248, 0.3) !important;
    color: #FFFFFF !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 8px 25px rgba(56, 189, 248, 0.15) !important;
    transform: translateY(-2px);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .da-flagship__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .da-flagship {
        padding: 4rem 0 3rem !important;
    }

    .da-flagship__grid {
        grid-template-columns: 1fr;
        margin: 2.5rem 0;
    }

    .da-flagship__stats {
        flex-direction: column;
        gap: 1.5rem;
        padding: 2rem 1.5rem;
    }

    .da-flagship__stat {
        max-width: none;
        border-left: none !important;
        border-top: 1px solid rgba(15, 23, 42, 0.08);
        padding: 1.25rem 0 0;
    }

    [data-theme="dark"] .da-flagship__stat {
        border-top: 1px solid rgba(255, 255, 255, .07);
    }

    .da-flagship__stat:first-child {
        border-top: none !important;
        padding-top: 0;
    }

    .da-flagship__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .da-flagship__actions .da-btn {
        width: 100%;
    }
}

/* ---------- focus state ---------- */
.da-flagship__card:focus-within {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .da-flagship::before {
        animation: none;
    }
}

