/* ====================================
   PERFORMANCE SECTION STYLES
   Apple-style feature grid with animations
   Adapted from ai_studio_code(162).html
   ==================================== */

/* --- THE SECTION --- */
.cupertino-section {
    width: 100%;
    padding: 120px 24px;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Header Typography - Adapted to match existing design */
.cupertino-section .header {
    text-align: center;
    margin-bottom: 100px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.cupertino-section .eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
    display: block;
}

.cupertino-section .header h2 {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6vw, 4rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0;
}

/* Text gradient styling */
.cupertino-section .header h2.text-gradient {
    background: linear-gradient(180deg, #FFFFFF 0%, #A5B4FC 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cupertino-section .header h2 span {
    color: var(--text-secondary);
    display: block;
    margin-top: 10px;
}

/* --- GRID LAYOUT --- */
.feature-grid {
    display: flex;
    flex-direction: column;
    gap: 100px;
    max-width: 1240px;
    margin: 0 auto;
}

.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 80px;
}

.feature-row.reversed {
    direction: rtl; /* Quick hack to swap columns */
}
.feature-row.reversed > * {
    direction: ltr; /* Reset text direction */
}

/* Text Content */
.feature-row .text-block h3 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.feature-row .text-block p {
    font-size: 18px;
    line-height: 1.6;
    font-weight: 400;
    color: var(--text-secondary);
}

/* Illustration Container */
.ui-stage {
    position: relative;
    width: 100%;
    height: 320px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* --- APPLE-STYLE ILLUSTRATIONS --- */

/* 1. SYNTHESIS: The Magic Summary */
.ui-doc-stack {
    position: relative;
    width: 140px;
    height: 180px;
}

/* The "Long" Report */
.doc-sheet {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transform-origin: center top;
    animation: collapseSheet 6s infinite cubic-bezier(0.25, 1, 0.5, 1);
}

.line-gl {
    height: 6px;
    background: #e5e5ea;
    border-radius: 4px;
    width: 100%;
}
.line-gl.short { width: 60%; }

/* The "Summary" Result */
.doc-result {
    position: absolute;
    top: 40px;
    left: -10px;
    width: 160px;
    height: 90px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    animation: popResult 6s infinite cubic-bezier(0.25, 1, 0.5, 1);
}

.sparkle-icon {
    font-size: 24px;
    background: linear-gradient(135deg, var(--accent), #a259ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.result-text {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    margin-left: 8px;
}

@keyframes collapseSheet {
    0%, 20% { transform: scale(1); opacity: 1; }
    35%, 85% { transform: scale(0.9) translateY(10px); filter: blur(2px); opacity: 0.6; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes popResult {
    0%, 25% { transform: scale(0.9) translateY(20px); opacity: 0; }
    40%, 80% { transform: scale(1) translateY(0); opacity: 1; }
    100% { transform: scale(0.9) translateY(20px); opacity: 0; }
}


/* 2. WRITING: The Gradient Flow */
.ui-chat-bubble {
    width: 200px;
    background: #fff;
    border-radius: 18px 18px 18px 4px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    position: relative;
}

/* The text lines */
.text-skeleton {
    height: 8px;
    border-radius: 4px;
    margin-bottom: 10px;
    background: #f5f5f7;
    position: relative;
    overflow: hidden;
}

/* The "Siri" Gradient Fill Animation */
.text-fill {
    position: absolute;
    top: 0; left: 0; height: 100%; width: 0;
    background: linear-gradient(90deg, #00C6FF, var(--accent));
    animation: fillText 4s infinite cubic-bezier(0.4, 0, 0.2, 1);
}
.tf-1 { animation-delay: 0.2s; }
.tf-2 { animation-delay: 0.6s; width: 0; --target: 80%; }

@keyframes fillText {
    0% { width: 0; opacity: 0.5; }
    30% { width: var(--target, 100%); opacity: 1; }
    80% { width: var(--target, 100%); opacity: 1; }
    100% { width: 100%; opacity: 0; } /* Fade out for loop */
}


/* 3. PRIVACY: The Frosted Shield */
.ui-profile-card {
    width: 160px;
    height: 200px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 20px;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.p-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e5e5ea;
}
.p-bar {
    height: 8px;
    width: 100%;
    background: #e5e5ea;
    border-radius: 4px;
}

/* The Blur Overlay */
.blur-shield {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: backdrop-filter 0.5s ease;
    animation: togglePrivacy 5s infinite ease-in-out;
}

.lock-icon {
    width: 40px; height: 40px;
    background: #34c759; /* Apple Green */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transform: scale(0);
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.5);
    animation: popLock 5s infinite cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes togglePrivacy {
    0%, 20% { backdrop-filter: blur(0px); -webkit-backdrop-filter: blur(0px); background: rgba(255,255,255,0); }
    40%, 80% { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); background: rgba(255,255,255,0.6); }
    100% { backdrop-filter: blur(0px); -webkit-backdrop-filter: blur(0px); background: rgba(255,255,255,0); }
}
@keyframes popLock {
    0%, 25% { transform: scale(0); }
    40%, 80% { transform: scale(1); }
    100% { transform: scale(0); }
}

/* --- RESPONSIVE --- */

/* Tablet */
@media (max-width: 900px) {
    .cupertino-section {
        padding: 80px 24px;
    }

    .cupertino-section .header {
        margin-bottom: 80px;
    }

    .cupertino-section .header h2 {
        font-size: clamp(2.5rem, 5.5vw, 3.5rem);
    }

    .feature-grid {
        gap: 80px;
    }

    .feature-row, .feature-row.reversed {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
        direction: ltr;
    }

    .ui-stage {
        height: 280px;
    }

    .feature-row .text-block p {
        font-size: 17px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .cupertino-section {
        padding: 60px 24px;
    }

    .cupertino-section .header {
        margin-bottom: 60px;
    }

    .cupertino-section .header h2 {
        font-size: clamp(2rem, 5vw, 3rem);
    }

    .cupertino-section .eyebrow {
        font-size: 11px;
        margin-bottom: 16px;
    }

    .feature-grid {
        gap: 60px;
    }

    .feature-row {
        gap: 32px;
    }

    .ui-stage {
        height: 240px;
    }

    .feature-row .text-block h3 {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .feature-row .text-block p {
        font-size: 16px;
    }
}

/* Small mobile */
@media (max-width: 400px) {
    .cupertino-section {
        padding: 50px 16px;
    }

    .cupertino-section .header {
        margin-bottom: 50px;
    }

    .cupertino-section .header h2 {
        font-size: clamp(1.8rem, 4.5vw, 2.5rem);
    }

    .feature-grid {
        gap: 50px;
    }

    .ui-stage {
        height: 220px;
    }

    .feature-row .text-block h3 {
        font-size: 22px;
    }

    .feature-row .text-block p {
        font-size: 15px;
    }
}
