/* ===========================================================================
 * MavWise v2 — custom styles layered on top of Tailwind
 * Brand: dark navy (#0B1638) + pink/purple/blue gradient
 * ======================================================================== */

:root {
    --grad-signature: linear-gradient(135deg, #EC4899 0%, #8B5CF6 50%, #3B82F6 100%);
    --grad-signature-hover: linear-gradient(135deg, #DB2777 0%, #7C3AED 50%, #2563EB 100%);
}

/* ---------------------------------------------------------------------------
 * Gradient text — clip the signature gradient onto text
 * ------------------------------------------------------------------------- */
.gradient-text {
    background: var(--grad-signature);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Gradient border (used on hover for cards & on the nav CTA) */
.gradient-border {
    position: relative;
    background-clip: padding-box;
    border: 1px solid transparent;
}
.gradient-border::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    margin: -1px;
    border-radius: inherit;
    background: var(--grad-signature);
}

/* ---------------------------------------------------------------------------
 * Marquee — seamless infinite scroll (track is duplicated in markup)
 * ------------------------------------------------------------------------- */
.marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
    display: flex;
    width: max-content;
    flex-wrap: nowrap;
    gap: 0.75rem;
    will-change: transform;
}
.marquee:hover .marquee__track {
    animation-play-state: paused;
}

/* ---------------------------------------------------------------------------
 * Scroll reveal (subtle, respects reduced motion)
 * ------------------------------------------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------------------------------------------------------------------------
 * Accordion (FAQ) — smooth height
 * ------------------------------------------------------------------------- */
.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.32s ease;
}
.faq-item.is-open .faq-answer {
    grid-template-rows: 1fr;
}
.faq-answer > div {
    overflow: hidden;
}
.faq-item.is-open .faq-chevron {
    transform: rotate(180deg);
}

/* ---------------------------------------------------------------------------
 * Focus ring (accessibility)
 * ------------------------------------------------------------------------- */
:focus-visible {
    outline: 2px solid #A78BFA;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------------------------------------------------------------------------
 * Legal pages typography (.legal-content) — brand colors
 * ------------------------------------------------------------------------- */
.legal-content {
    margin-top: 2.5rem;
    font-size: 0.9375rem;
    line-height: 1.75;
    color: #94a3b8;
}
.legal-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 0.875rem;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #ffffff;
}
.legal-content p { margin-bottom: 1rem; }
.legal-content ul {
    margin: 0 0 1.25rem 0;
    padding-left: 1.5rem;
    list-style: disc;
}
.legal-content ul li { margin-bottom: 0.5rem; padding-left: 0.25rem; }
.legal-content ul li::marker { color: #8b5cf6; }
.legal-content a {
    color: #93c5fd;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}
.legal-content a:hover { color: #c4b5fd; }
.legal-content strong { color: #e2e8f0; font-weight: 600; }
.legal-content em { color: #cbd5e1; }
.legal-content code {
    padding: 0.125rem 0.375rem;
    border-radius: 0.375rem;
    background: rgba(139, 92, 246, 0.14);
    color: #c4b5fd;
    font-size: 0.8125rem;
}
.legal-content table {
    width: 100%;
    margin: 1rem 0 1.5rem 0;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.legal-content th {
    padding: 0.625rem 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    font-weight: 600;
    text-align: left;
}
.legal-content td {
    padding: 0.625rem 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: top;
}
.legal-content button { text-decoration: none; }

/* ---------------------------------------------------------------------------
 * Reduced motion — disable all heavy motion
 * ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
    .marquee__track { animation: none !important; }
}

/* Hide horizontal scrollbars on scroll-snap rows */
.hide-scroll { scrollbar-width: none; -ms-overflow-style: none; }
.hide-scroll::-webkit-scrollbar { display: none; }

/* ===========================================================================
 * Founding Partner assessment portal (apply.php)
 * ======================================================================== */
.opt-card.is-selected {
    border-color: rgba(139, 92, 246, 0.7);
    background: rgba(139, 92, 246, 0.12);
}
.opt-card.is-selected .opt-tick {
    border-color: transparent;
    background-image: linear-gradient(135deg, #EC4899 0%, #8B5CF6 50%, #3B82F6 100%);
}
.opt-card.is-selected .opt-tick::after {
    content: "";
    width: 0.6rem;
    height: 0.35rem;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translateY(-1px);
}
.scale-btn.is-selected {
    border-color: transparent;
    color: #fff;
    background-image: linear-gradient(135deg, #EC4899 0%, #8B5CF6 50%, #3B82F6 100%);
}
/* internship — track selection cards */
.track-card.is-track-selected {
    border-color: rgba(139, 92, 246, 0.7);
    background: rgba(139, 92, 246, 0.12);
}
.track-card.is-track-selected .track-tick {
    border-color: transparent;
    background-image: linear-gradient(135deg, #EC4899 0%, #8B5CF6 50%, #3B82F6 100%);
}
.track-card.is-track-selected .track-tick svg { opacity: 1; }

/* AI chat widget — typing indicator */
.mav-typing { display: inline-flex; align-items: center; gap: 4px; }
.mav-dot {
    width: 6px; height: 6px; border-radius: 9999px;
    background: #A78BFA;
    animation: mav-bounce 1.2s infinite ease-in-out;
}
.mav-dot:nth-child(2) { animation-delay: 0.15s; }
.mav-dot:nth-child(3) { animation-delay: 0.30s; }
@keyframes mav-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30%           { transform: translateY(-4px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .mav-dot { animation: none; } }
/* assessment step transition */
.step { animation: fp-fade 0.32s ease; }
@keyframes fp-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .step { animation: none; } }

/* ===========================================================================
 * Hover micro-interactions — smooth lift + glow (200–300ms)
 * (the 3D hero crystal, parallax + scroll-reveal live in index.php / main.js)
 * ======================================================================== */
#hero-3d-canvas { pointer-events: none; }

.mav-hover-btn { transition: transform .25s ease, box-shadow .25s ease, filter .25s ease; }
.mav-hover-btn:hover { transform: translateY(-2px) scale(1.02); }

.mav-hover-card { transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease; }
.mav-hover-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.45);
    box-shadow: 0 20px 55px -24px rgba(139, 92, 246, 0.6);
}

@media (prefers-reduced-motion: reduce) {
    .mav-hover-btn:hover, .mav-hover-card:hover { transform: none; box-shadow: none; }
}
