/* ============================================================
   Digital AIML — "Prism" homepage (Concept A: Apple × OpenAI × Stripe)
   home.css — design tokens, band system, navbar + mega menu,
   buttons, interaction layers, footer restyle.
   Scope: body:has(#dh-home) or body.dh-active (set by main.js).
   All Prism components use the `da-` prefix.
   ============================================================ */

:root {
    /* surfaces — synthesia light */
    --da-pearl: #FFFFFF;
    --da-tint: #F5F7FA;
    --da-space: #E2E8F0;
    --da-space-2: #CBD5E1;
    /* ink */
    --da-ink: #0F172A;
    --da-ink-2: #334155;
    --da-ink-3: #64748B;
    --da-ink-dark: #0F172A;
    /* accents */
    --da-indigo: #3858D6;
    --da-blue: #2563EB;
    --da-cyan: #3858D6;
    --da-violet: #6C8BF5;
    --da-pink: #3858D6;
    --da-success: #10B981;
    --da-grad: linear-gradient(135deg, #3858D6 0%, #2563EB 100%);
    /* type */
    --da-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --da-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --da-r: 1.25rem;
}

/* ---------- Page scope + hide legacy chrome ---------- */
body:has(#dh-home),
body.dh-active {
    background: #FFFFFF;
    color: var(--da-ink-2);
    font-family: var(--da-body);
    font-size: 16.5px;
}

body:has(#dh-home) #spinner,
body.dh-active #spinner {
    background: var(--da-pearl) !important;
}

body:has(#dh-home) #spinner .spinner-grow,
body.dh-active #spinner .spinner-grow {
    background: var(--da-grad) !important;
    box-shadow: 0 0 50px rgba(139, 92, 246, .55);
}

#dh-home {
    position: relative;
    overflow-x: clip;
    font-family: var(--da-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--da-ink-2);
    background: #FFFFFF;
    -webkit-font-smoothing: antialiased;
}

#dh-home ::selection {
    background: rgba(139, 92, 246, .3);
    color: var(--da-ink);
}

#dh-home a {
    text-decoration: none;
}

#dh-home img {
    max-width: 100%;
    height: auto;
}

/* ============================================================
   BAND SYSTEM — sections inherit component colors from their band
   ============================================================ */
.da-band {
    position: relative;
    z-index: 1;
    /* light syntheisa default */
    --fg: var(--da-ink);
    --fg2: var(--da-ink-2);
    --fg3: var(--da-ink-3);
    --line: rgba(15, 23, 42, .1);
    --line-soft: rgba(15, 23, 42, .05);
    --card: #FFFFFF;
    --card-brd: rgba(15, 23, 42, .08);
    --card-shadow: 0 10px 40px rgba(15, 23, 42, .05);
    --chip: rgba(56, 88, 214, .08);
    --chip-brd: rgba(56, 88, 214, .2);
    background: #F5F7FA;
    color: var(--fg2);
}

.da-band--light {
    --fg: #0F172A;
    --fg2: #334155;
    --fg3: #64748B;
    --line: rgba(15, 23, 42, .1);
    --line-soft: rgba(15, 23, 42, .05);
    --card: #FFFFFF;
    --card-brd: rgba(15, 23, 42, .1);
    --card-shadow: 0 10px 30px rgba(15, 23, 42, .05);
    background: #FFFFFF;
    color: var(--fg2);
}

.da-band--tint {
    background:
        radial-gradient(60rem 38rem at 20% 10%, rgba(139, 92, 246, .16), transparent 70%),
        radial-gradient(55rem 34rem at 80% 90%, rgba(37, 99, 235, .15), transparent 70%),
        radial-gradient(40rem 25rem at 50% 50%, rgba(6, 182, 212, .1), transparent 70%),
        linear-gradient(180deg, #EBEFFF, #E4EBFF 50%, #ECE4FF);
}

.da-band--dark {
    --fg: #F2F5FF;
    --fg2: #C6CFEA;
    --fg3: #8A96BD;
    --line: rgba(255, 255, 255, .14);
    --line-soft: rgba(255, 255, 255, .08);
    --card: rgba(255, 255, 255, .05);
    --card-brd: rgba(255, 255, 255, .12);
    --card-shadow: 0 28px 70px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .1);
    --chip: rgba(96, 165, 250, .12);
    --chip-brd: rgba(96, 165, 250, .3);
    background:
        radial-gradient(70rem 40rem at 85% -10%, rgba(139, 92, 246, .2), transparent 60%),
        radial-gradient(60rem 36rem at 0% 110%, rgba(37, 99, 235, .2), transparent 60%),
        linear-gradient(178deg, #050A15, #0A1029 55%, #050A15) !important;
    color: var(--fg2);
}

#dh-home h1,
#dh-home h2,
#dh-home h3,
#dh-home h4 {
    font-family: var(--da-display);
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.08;
    color: var(--fg, var(--da-ink));
}

.da-section {
    padding: 30px 0 !important;
}

.da-below {}

.da-wrap {
    width: min(1240px, 100% - 2.75rem);
    margin-inline: auto;
    position: relative;
    z-index: 1;
}

/* chapter labels — the numbered story spine */
.da-chapter {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--fg3);
}

.da-chapter::after {
    content: "";
    flex: 0 0 4.5rem;
    height: 1px;
    background: linear-gradient(90deg, var(--da-blue), transparent);
}

.da-chapter b {
    color: var(--da-blue);
    font-weight: 700;
}

.da-head {
    max-width: 800px;
    margin-bottom: 2rem;
}

.da-head h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.75rem);
    margin: 0 0 1.1rem;
}

.da-head p {
    font-size: 1.05rem;
    color: var(--fg3);
    margin: 0;
    max-width: 620px;
}

.da-head--center {
    margin-inline: auto;
    text-align: center;
}

.da-head--center .da-chapter {
    justify-content: center;
}

.da-head--center p {
    margin-inline: auto;
}

.da-grad-text {
    background: linear-gradient(95deg, #2563EB, #8B5CF6 50%, #06B6D4 105%);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: da-pan 7s linear infinite;
}

/* ---------- Buttons ---------- */
.da-btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: 1rem 2.1rem;
    font-size: .95rem;
    font-weight: 600;
    font-family: var(--da-body);
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease, color .25s ease;
    will-change: transform;
}

.da-btn:focus-visible {
    outline: 2px solid var(--da-cyan);
    outline-offset: 3px;
}

.da-btn--primary {
    background: #3858D6;
    color: #fff;
    box-shadow: 0 6px 16px rgba(56, 88, 214, .3), inset 0 1px 0 rgba(255, 255, 255, .15);
    border-radius: 8px;
    /* Synthesia uses smaller border radius for buttons */
}

.da-btn--primary:hover {
    transform: translateY(-2px);
    color: #fff;
    background: #2563EB;
    box-shadow: 0 8px 24px rgba(37, 99, 235, .4), inset 0 1px 0 rgba(255, 255, 255, .15);
}

.da-btn--ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--fg);
}

.da-btn--ghost:hover {
    transform: translateY(-2px);
    border-color: var(--da-blue);
    color: var(--da-blue);
    box-shadow: 0 10px 30px rgba(37, 99, 235, .15);
}

.da-band--dark .da-btn--ghost:hover {
    color: #fff;
    border-color: rgba(148, 197, 253, .7);
    box-shadow: 0 10px 30px rgba(37, 99, 235, .35);
}

/* ---------- Card primitive ---------- */
.da-card {
    background: var(--card);
    border: 1px solid var(--card-brd);
    border-radius: var(--da-r);
    box-shadow: var(--card-shadow);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.da-band--dark .da-card {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* ============================================================
   NAVBAR & STICKY HEADER TOP BANNER — transparent → white glass; ink text
   ============================================================ */
.da-header-sticky {
    position: sticky;
    top: 0;
    z-index: 1050;
    width: 100%;
}

#sticky-cta-bar {
    background: linear-gradient(90deg, #0A0F26 0%, #1E1B4B 45%, #2563EB 100%);
    color: #FFFFFF;
    padding: 0.55rem 1.25rem;
    font-size: 0.84rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    z-index: 1051;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

#sticky-cta-bar strong {
    color: #FDE047;
}

#sticky-cta-bar .btn-warning {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: #FFFFFF !important;
    border: none;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.22rem 0.85rem !important;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    text-decoration: none;
}

#sticky-cta-bar .modal-close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.4rem;
    margin-left: 0.5rem;
}

#sticky-cta-bar .modal-close-btn:hover {
    color: #FFFFFF;
}

.da-nav {
    position: relative;
    top: auto;
    z-index: 1050;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03) !important;
    transition: background .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.da-nav--scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 6px 25px rgba(15, 23, 42, 0.06) !important;
}

.da-nav__inner {
    width: min(1240px, 100% - 2.75rem);
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: 76px;
}

.da-nav__brand {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    text-decoration: none;
}

.da-nav__brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    background: #fff;
    border-radius: .7rem;
    padding: .3rem;
    box-shadow: 0 0 0 1px rgba(23, 37, 84, 0.08), 0 4px 12px rgba(23, 37, 84, 0.1);
    transition: box-shadow .3s ease;
}

.da-nav__brand strong {
    font-family: var(--da-display);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--da-ink);
    white-space: nowrap;
}

.da-nav__brand strong span {
    color: var(--da-blue);
}

.da-nav__menu {
    display: flex;
    align-items: center;
    gap: .25rem;
    margin: 0 0 0 auto;
    padding: 0;
    list-style: none;
}



.da-nav__item {
    position: relative;
}

.da-theme-item {
    display: flex;
    align-items: center;
    margin: 0 .35rem;
}

.da-theme-toggle {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(15, 23, 42, 0.03);
    color: var(--da-ink);
    cursor: pointer;
    overflow: hidden;
    transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.da-theme-toggle:hover,
.da-theme-toggle:focus-visible {
    border-color: rgba(37, 99, 235, 0.35);
    background: rgba(37, 99, 235, 0.08);
    outline: none;
}

.da-theme-toggle__icon {
    position: absolute;
    font-size: 1.05rem;
    transition: transform .4s cubic-bezier(.22, .61, .36, 1), opacity .3s ease;
}

.da-theme-toggle__icon--sun {
    color: #F59E0B;
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.da-theme-toggle__icon--moon {
    color: #6366F1;
    opacity: 0;
    transform: rotate(-90deg) scale(.4);
}

[data-theme="dark"] .da-theme-toggle__icon--sun {
    opacity: 0;
    transform: rotate(90deg) scale(.4);
}

[data-theme="dark"] .da-theme-toggle__icon--moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.da-nav__link {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: .45rem;
    padding: .7rem 1.1rem;
    color: var(--da-ink) !important;
    font-size: .95rem;
    font-weight: 600;
    border-radius: .65rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    text-align: left;
    transition: color .2s ease, background .2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.da-nav__link:hover,
.da-nav__link:focus-visible {
    color: var(--da-indigo) !important;
    background: rgba(15, 23, 42, 0.04);
}

.da-nav__link .fa-chevron-down {
    font-size: .55rem;
    opacity: .65;
    transition: transform .25s ease;
}

.da-nav__cta {
    margin-left: .8rem;
    padding: .68rem 1.5rem;
    font-size: .9rem;
}

/* dropdown panels — white glass */
.da-nav__panel {
    position: absolute;
    top: calc(100% + .8rem);
    left: 50%;
    translate: -50% 0;
    min-width: 250px;
    background: #FFFFFF;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 0;
    box-shadow: 0 20px 40px rgba(15, 23, 42, .1), 0 4px 12px rgba(15, 23, 42, .05);
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    z-index: 1050;
    transform: translateY(12px) scale(.98);
    transition: opacity .28s cubic-bezier(.22, .61, .36, 1), transform .28s cubic-bezier(.22, .61, .36, 1), visibility .28s;
}

.da-nav__item:hover>.da-nav__panel,
.da-nav__item:focus-within>.da-nav__panel,
.da-nav__item.da-open>.da-nav__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.da-nav__item:hover .fa-chevron-down,
.da-nav__item.da-open .fa-chevron-down {
    transform: rotate(180deg);
}

/* MEGA MENU — 6 category cards: icon, desc, count, featured, CTA */
.da-nav__panel--mega {
    width: min(1120px, calc(100vw - 2rem));
    padding: 1.6rem;
}

.da-mega {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.da-mega__cat {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .45rem;
    padding: 1rem 1.15rem;
    border-radius: .75rem;
    border: 1px solid transparent;
    background: transparent;
    transition: background-color .2s ease;
}

.da-mega__cat:hover,
.da-mega__cat:focus-within {
    background-color: rgba(15, 23, 42, .03);
}

.da-mega__top {
    display: flex;
    align-items: center;
    gap: .7rem;
}

.da-mega__top i {
    display: grid;
    place-items: center;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: .7rem;
    font-size: .95rem;
    color: #fff;
    background: var(--da-grad);
    box-shadow: 0 6px 16px rgba(79, 70, 229, .3);
    flex-shrink: 0;
}

.da-mega__top strong {
    font-size: .95rem;
    font-weight: 700;
    color: var(--da-ink);
}

.da-mega__count {
    margin-left: auto;
    font-size: .68rem;
    font-weight: 700;
    color: var(--da-blue);
    background: rgba(37, 99, 235, .1);
    border-radius: 999px;
    padding: .2rem .6rem;
    white-space: nowrap;
}

.da-mega__cat small {
    font-size: .78rem;
    color: var(--da-ink-3);
    line-height: 1.5;
}

.da-mega__featured {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin-top: .3rem;
    padding-top: .6rem;
    border-top: 1px dashed rgba(10, 15, 38, .1);
    font-size: .78rem;
    font-weight: 600;
    color: var(--da-ink-2);
}

.da-mega__featured b {
    color: var(--da-violet);
    font-weight: 700;
}

.da-mega__featured i {
    font-size: .6rem;
    color: var(--da-blue);
    transition: transform .25s ease;
}

.da-mega__cat:hover .da-mega__featured i {
    transform: translateX(4px);
}

.da-mega__footer {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: .35rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(10, 15, 38, .07);
    font-size: .875rem;
    color: var(--da-ink-3);
}

.da-mega__footer a {
    color: var(--da-blue);
    font-weight: 600;
}

.da-mega__footer a:hover {
    color: var(--da-violet);
}

/* simple dropdown */
.da-nav__panel--simple a {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .7rem;
    font-size: .875rem;
    color: var(--da-ink-2);
    border-radius: .6rem;
    transition: color .2s, background .2s, translate .2s;
}

.da-nav__panel--simple a i {
    width: 1.1rem;
    text-align: center;
    font-size: .8rem;
    color: var(--da-blue);
}

.da-nav__panel--simple a:hover {
    color: var(--da-ink);
    background: rgba(37, 99, 235, .08);
    translate: 3px 0;
}

.da-nav__toggle {
    display: none;
    margin-left: auto;
    background: rgba(255, 255, 255, .8);
    border: 1px solid rgba(10, 15, 38, .1);
    border-radius: .65rem;
    color: var(--da-ink);
    width: 44px;
    height: 44px;
    font-size: 1.05rem;
    cursor: pointer;
}

/* ============================================================
   MOBILE FLOATING CTA
   ============================================================ */
.da-mobile-cta {
    display: none;
    position: fixed;
    left: 50%;
    bottom: 1rem;
    translate: -50% 0;
    z-index: 1100;
    padding: .8rem 1.7rem;
    font-size: .9rem;
    box-shadow: 0 12px 36px rgba(79, 70, 229, .5);
}

.da-mobile-cta.da-hidden {
    display: none !important;
}

/* ============================================================
   LEGACY FOOTER RESTYLE (high-contrast dark cinema band)
   ============================================================ */
.footer {
    position: relative;
    background:
        radial-gradient(60rem 30rem at 50% 0%, rgba(139, 92, 246, 0.2), transparent 70%),
        radial-gradient(40rem 20rem at 15% 100%, rgba(37, 99, 235, 0.18), transparent 70%),
        linear-gradient(180deg, #070B1E, #050818 60%, #030511) !important;
    border-top: 1px solid rgba(139, 92, 246, 0.35) !important;
    box-shadow: 0 -15px 40px rgba(79, 70, 229, 0.15) !important;
    font-family: var(--da-body);
    color: #CBD5E1 !important;
}

.footer h5 {
    color: #FFFFFF !important;
    font-family: var(--da-display);
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    letter-spacing: -0.02em;
    border-left: 3px solid #8B5CF6;
    padding-left: 0.75rem;
    margin-bottom: 1.4rem !important;
}

.footer p {
    color: #FFFFFF !important;
    font-size: 1rem;
    line-height: 1.6;
}

.footer p i {
    color: #38BDF8 !important;
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.4));
}

.footer p a {
    color: #38BDF8 !important;
    font-weight: 600;
    transition: color 0.25s ease;
}

.footer p a:hover {
    color: #A855F7 !important;
    text-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
}

.footer .btn-link {
    color: #FFFFFF !important;
    font-size: 1rem !important;
    font-weight: 500;
    padding-left: 0 !important;
    margin-bottom: 0.35rem;
    transition: all 0.25s ease !important;
}

.footer .btn-link:hover {
    color: #38BDF8 !important;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
    transform: translateX(6px) !important;
}

.footer .btn-link::before {
    content: "› ";
    color: #8B5CF6;
    font-weight: 700;
    margin-right: 0.3rem;
}

.footer .btn-social {
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
    color: #E2E8F0 !important;
    margin-right: 0.4rem !important;
    transition: all 0.3s ease !important;
}

.footer .btn-social:hover {
    background: var(--da-grad) !important;
    border-color: transparent !important;
    color: #FFFFFF !important;
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.6) !important;
    transform: translateY(-3px) !important;
}

.footer .footerLogo img {
    background: #FFFFFF !important;
    border-radius: 1.25rem !important;
    padding: .6rem !important;
    width: 140px;
    height: 140px;
    object-fit: contain;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(139, 92, 246, 0.25) !important;
    transition: transform 0.3s ease !important;
}

.footer .footerLogo:hover img {
    transform: scale(1.04) !important;
}

.footer .copyrightOuterr {
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    /*  margin-top: 2rem !important;
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;*/
    color: #FFFFFF !important;
}

.footer .copyright a {
    color: #38BDF8 !important;
    text-decoration: none !important;
    transition: color 0.25s ease;
}

.footer .copyright a:hover {
    color: #A855F7 !important;
}