/* FEI CV Page Styles */
/* Lab/Code aesthetic with animations and smartphone mockups */

/* =====================
   Beta Story Section
   ===================== */
.beta-story {
    padding: clamp(4rem, 9vw, 6.5rem) clamp(1.4rem, 6vw, 6rem);
    background: linear-gradient(135deg, rgba(3, 7, 18, 0.4), rgba(8, 14, 32, 0.6));
    border-top: 1px solid var(--stroke-soft);
    border-bottom: 1px solid var(--stroke-soft);
}

.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(1.8rem, 4vw, 2.8rem);
    margin-top: clamp(2.4rem, 6vw, 3.8rem);
}

.story-card {
    background: rgba(7, 12, 28, 0.82);
    border: 1px solid var(--stroke-soft);
    border-radius: var(--radius-md);
    padding: clamp(1.8rem, 3vw, 2.6rem);
    display: grid;
    gap: 1.2rem;
    position: relative;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    overflow: hidden;
}

.story-card::before {
    content: "";
    position: absolute;
    inset: -50% auto auto -50%;
    width: clamp(200px, 28vw, 360px);
    height: clamp(200px, 28vw, 360px);
    border-radius: 50%;
    opacity: 0.3;
    pointer-events: none;
}

.story-card--adoption::before {
    background: radial-gradient(circle, rgba(0, 245, 202, 0.25) 0%, rgba(0, 245, 202, 0) 70%);
}

.story-card--beta::before {
    background: radial-gradient(circle, rgba(120, 93, 255, 0.25) 0%, rgba(120, 93, 255, 0) 70%);
}

.story-card--innovation::before {
    background: radial-gradient(circle, rgba(255, 223, 109, 0.25) 0%, rgba(255, 223, 109, 0) 70%);
}

.story-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 245, 202, 0.35);
    box-shadow: 0 40px 80px rgba(0, 245, 202, 0.12);
}

.story-icon {
    font-size: 2.8rem;
    line-height: 1;
}

.story-card h3 {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    position: relative;
    z-index: 1;
}

.story-card p {
    margin: 0;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

/* =====================
   Features Section
   ===================== */
.features-section {
    padding: clamp(4rem, 9vw, 6.5rem) clamp(1.4rem, 6vw, 6rem);
}

.features-grid {
    display: grid;
    gap: clamp(3.2rem, 8vw, 5rem);
    margin-top: clamp(2.8rem, 7vw, 4.2rem);
}

.feature-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2.4rem, 6vw, 4rem);
    align-items: center;
}

.feature-card--alt {
    grid-template-columns: 1fr 1fr;
    direction: rtl;
}

.feature-card--alt > * {
    direction: ltr;
}

@media (max-width: 900px) {
    .feature-card,
    .feature-card--alt {
        grid-template-columns: 1fr;
    }
}

.feature-content {
    display: grid;
    gap: 1.2rem;
}

.feature-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(0, 245, 202, 0.12);
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    width: fit-content;
    border: 1px solid rgba(0, 245, 202, 0.25);
}

.feature-card h3 {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.4rem, 3vw, 1.8rem);
}

.feature-card p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.feature-bullets {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.8rem;
}

.feature-bullets li {
    position: relative;
    padding-left: 1.8rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.feature-bullets li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 5px rgba(0, 245, 202, 0.14);
}

/* Smartphone Mockup */
.feature-screenshot {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.phone-mockup {
    position: relative;
    width: clamp(260px, 90vw, 320px);
    aspect-ratio: 9 / 19.5;
    border-radius: clamp(30px, 5vw, 40px);
    border: 8px solid #1a1a1a;
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 60px 120px rgba(0, 0, 0, 0.8),
        inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    background: #000;
    overflow: hidden;
    transform: perspective(1200px) rotateY(-8deg);
    animation: phoneFloat 4s ease-in-out infinite;
}

.phone-mockup img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.phone-mockup::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 25px;
    background: #1a1a1a;
    border-radius: 0 0 20px 20px;
    z-index: 10;
}

/* Screenshot Placeholder */
.screenshot-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(7, 12, 28, 0.9), rgba(8, 14, 32, 0.7));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--text-muted);
}

.placeholder-icon {
    font-size: 3.2rem;
    animation: codePulse 2s ease-in-out infinite;
}

.placeholder-text {
    font-size: 0.85rem;
    text-align: center;
}

@keyframes phoneFloat {
    0%, 100% {
        transform: perspective(1200px) rotateY(-8deg) translateY(0);
    }
    50% {
        transform: perspective(1200px) rotateY(-8deg) translateY(-12px);
    }
}

@keyframes codePulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.08);
    }
}

/* Adoption Stats */
.adoption-box {
    margin-top: clamp(4rem, 9vw, 6rem);
    padding: clamp(2.4rem, 5vw, 3.8rem);
    background: linear-gradient(120deg, rgba(0, 245, 202, 0.08), rgba(120, 93, 255, 0.12));
    border: 1px solid var(--stroke-soft);
    border-radius: var(--radius-md);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.adoption-box::before {
    content: "";
    position: absolute;
    inset: -50% -50%;
    background: radial-gradient(circle, rgba(0, 245, 202, 0.15) 0%, transparent 70%);
    pointer-events: none;
    animation: radialPulse 6s ease-in-out infinite;
}

.adoption-stat {
    position: relative;
    z-index: 1;
    text-align: center;
    display: grid;
    gap: 0.6rem;
}

.adoption-number {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 700;
    background: linear-gradient(120deg, var(--accent), #67ffee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.adoption-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

@keyframes radialPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.4;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* =====================
   Roadmap Section
   ===================== */
.roadmap-section {
    padding: clamp(4rem, 9vw, 6.5rem) clamp(1.4rem, 6vw, 6rem);
    background: linear-gradient(135deg, rgba(3, 7, 18, 0.4), rgba(8, 14, 32, 0.6));
    border-bottom: 1px solid var(--stroke-soft);
}

.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(1.8rem, 4vw, 2.8rem);
    margin-top: clamp(2.8rem, 7vw, 4.2rem);
}

.roadmap-card {
    background: rgba(7, 12, 28, 0.85);
    border: 1px solid var(--stroke-soft);
    border-radius: var(--radius-md);
    padding: clamp(1.8rem, 3vw, 2.4rem);
    display: grid;
    gap: 1rem;
    position: relative;
    box-shadow: var(--shadow-card);
    transition: all var(--transition);
    overflow: hidden;
}

.roadmap-card::before {
    content: "";
    position: absolute;
    inset: -100% -100%;
    background: linear-gradient(45deg, 
        transparent 20%, 
        rgba(0, 245, 202, 0.1) 50%, 
        transparent 80%);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

.roadmap-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 245, 202, 0.35);
    box-shadow: 0 40px 80px rgba(0, 245, 202, 0.15);
}

.roadmap-phase {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-secondary);
    background: rgba(120, 93, 255, 0.12);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(120, 93, 255, 0.2);
    width: fit-content;
    position: relative;
    z-index: 1;
}

.roadmap-card--soon .roadmap-phase {
    color: var(--accent);
    background: rgba(0, 245, 202, 0.12);
    border-color: rgba(0, 245, 202, 0.2);
}

.roadmap-card--mid .roadmap-phase {
    color: rgb(255, 200, 80);
    background: rgba(255, 200, 80, 0.12);
    border-color: rgba(255, 200, 80, 0.2);
}

.roadmap-card--later .roadmap-phase {
    color: rgb(255, 150, 150);
    background: rgba(255, 150, 150, 0.12);
    border-color: rgba(255, 150, 150, 0.2);
}

.roadmap-icon {
    font-size: 2.4rem;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.roadmap-card h3 {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    position: relative;
    z-index: 1;
}

.roadmap-card p {
    margin: 0;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
    font-size: 0.95rem;
    line-height: 1.5;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Roadmap Note */
.roadmap-note {
    margin-top: clamp(3rem, 7vw, 4.5rem);
    padding: clamp(1.8rem, 3vw, 2.6rem);
    background: rgba(0, 245, 202, 0.08);
    border: 1px solid rgba(0, 245, 202, 0.25);
    border-radius: var(--radius-md);
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    box-shadow: var(--shadow-card);
}

.note-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    animation: ideaBounce 2.5s ease-in-out infinite;
}

.roadmap-note p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.roadmap-note a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition);
}

.roadmap-note a:hover {
    color: #67ffee;
    text-decoration: underline;
}

@keyframes ideaBounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-8px) rotate(-2deg);
    }
    75% {
        transform: translateY(-8px) rotate(2deg);
    }
}

/* =====================
   Responsive Design
   ===================== */
@media (max-width: 768px) {
    .feature-card {
        grid-template-columns: 1fr;
    }

    .feature-screenshot {
        order: -1;
    }

    .phone-mockup {
        width: clamp(240px, 70vw, 300px);
    }

    .roadmap-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    .adoption-box {
        grid-template-columns: 1fr;
    }
    
    .feature-row {
        flex-direction: column !important;
        gap: 2rem;
    }
    
    .feature-text {
        max-width: 100%;
    }
    
    .feature-mockup {
        max-width: 100%;
        min-height: 500px;
    }
    
    .feature-mockup img {
        max-width: 90%;
    }
}

/* =====================
   New Floating Mockups Layout
   ===================== */
.features-showcase {
    display: flex;
    flex-direction: column;
    gap: clamp(5rem, 12vw, 9rem);
    margin-top: clamp(3rem, 7vw, 5rem);
}

.feature-row {
    display: flex;
    align-items: center;
    gap: clamp(2rem, 5vw, 3.5rem);
    position: relative;
}

.feature-row--reverse {
    flex-direction: row-reverse;
}

.feature-text {
    flex: 1 1 60%;
    max-width: 580px;
}

.feature-text h3 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin: 0.8rem 0 1rem;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.feature-text p {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 1.4rem;
}

.feature-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.8rem;
}

.feature-bullets li {
    padding-left: 1.8rem;
    position: relative;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.feature-bullets li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-strong);
    font-weight: 600;
}

.feature-mockup {
    flex: 1 1 40%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 350px;
}

.feature-mockup img {
    position: relative;
    width: 100%;
    max-width: clamp(200px, 70%, 280px);
    height: auto;
    z-index: 2;
    filter: drop-shadow(0 0 60px rgba(0, 245, 202, 0.5));
    animation: mockupFloat 6s ease-in-out infinite;
}

.feature-row:nth-child(2) .feature-mockup img {
    filter: drop-shadow(0 0 100px rgba(120, 93, 255, 0.5));
}

.feature-row:nth-child(3) .feature-mockup img {
    filter: drop-shadow(0 0 100px rgba(255, 193, 7, 0.45));
}

.feature-row:nth-child(4) .feature-mockup img {
    filter: drop-shadow(0 0 100px rgba(0, 245, 202, 0.5));
}

.feature-row:nth-child(5) .feature-mockup img {
    filter: drop-shadow(0 0 100px rgba(120, 93, 255, 0.5));
}

.mockup-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    max-width: 250px;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.3;
    z-index: 1;
    animation: glowPulse 4s ease-in-out infinite;
    pointer-events: none;
}

.mockup-glow--cyan {
    background: radial-gradient(ellipse, rgba(0, 245, 202, 0.9) 0%, transparent 55%);
}

.mockup-glow--violet {
    background: radial-gradient(ellipse, rgba(120, 93, 255, 0.9) 0%, transparent 55%);
}

.mockup-glow--gold {
    background: radial-gradient(ellipse, rgba(255, 193, 7, 0.8) 0%, transparent 55%);
}

@keyframes mockupFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }
    25% {
        transform: translateY(-18px) rotate(1.5deg) scale(1.02);
    }
    50% {
        transform: translateY(-12px) rotate(-1deg) scale(1.01);
    }
    75% {
        transform: translateY(-22px) rotate(1deg) scale(1.02);
    }
}

@keyframes glowPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.25;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.4;
    }
}

/* Hero with Image Background */
body.page-feicv .hero {
    min-height: clamp(520px, 70vh, 680px);
    padding: clamp(5rem, 10vw, 8rem) 0;
}

body.page-feicv .hero-media {
    position: absolute;
    inset: 0;
    left: 0;
    right: 0;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

body.page-feicv .hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    filter: saturate(0.8);
}

body.page-feicv .hero-content {
    max-width: 780px;
    width: 100%;
    margin: 0;
    margin-left: clamp(2rem, 8vw, 7rem);
    position: relative;
    z-index: 1;
    text-align: left;
}

/* Updated Roadmap Colors */
.roadmap-card--p1 {
    border-color: rgba(255, 77, 77, 0.3);
}

.roadmap-card--p1::before {
    background: radial-gradient(circle, rgba(255, 77, 77, 0.2) 0%, rgba(255, 77, 77, 0) 70%);
}

.roadmap-card--p1 .roadmap-phase {
    background: linear-gradient(135deg, rgba(255, 77, 77, 0.18), rgba(255, 77, 77, 0.08));
    border-color: rgba(255, 77, 77, 0.25);
    color: #ff6b6b;
}

.roadmap-card--p2 {
    border-color: rgba(255, 193, 7, 0.3);
}

.roadmap-card--p2::before {
    background: radial-gradient(circle, rgba(255, 193, 7, 0.2) 0%, rgba(255, 193, 7, 0) 70%);
}

.roadmap-card--p2 .roadmap-phase {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.18), rgba(255, 193, 7, 0.08));
    border-color: rgba(255, 193, 7, 0.25);
    color: #ffc107;
}

.roadmap-card--p3 {
    border-color: rgba(0, 245, 202, 0.3);
}

.roadmap-card--p3::before {
    background: radial-gradient(circle, rgba(0, 245, 202, 0.2) 0%, rgba(0, 245, 202, 0) 70%);
}

.roadmap-card--p3 .roadmap-phase {
    background: linear-gradient(135deg, rgba(0, 245, 202, 0.18), rgba(0, 245, 202, 0.08));
    border-color: rgba(0, 245, 202, 0.25);
    color: var(--accent-strong);
}

.roadmap-card--vision {
    border-color: rgba(120, 93, 255, 0.3);
}

.roadmap-card--vision::before {
    background: radial-gradient(circle, rgba(120, 93, 255, 0.2) 0%, rgba(120, 93, 255, 0) 70%);
}

.roadmap-card--vision .roadmap-phase {
    background: linear-gradient(135deg, rgba(120, 93, 255, 0.18), rgba(120, 93, 255, 0.08));
    border-color: rgba(120, 93, 255, 0.25);
    color: #a78bfa;
}

/* =====================
   Reduced Motion Support
   ===================== */
@media (prefers-reduced-motion: reduce) {
    .story-card:hover,
    .roadmap-card:hover {
        transform: none;
    }

    .phone-mockup,
    .placeholder-icon,
    .roadmap-card,
    .note-icon,
    .feature-mockup img,
    .mockup-glow {
        animation: none;
    }

    .adoption-box::before {
        animation: none;
    }

    .adoption-number {
        background: var(--accent);
        -webkit-text-fill-color: unset;
        background-clip: unset;
    }
}
