/* ══════════════════════════════════════════
   APP PAGE STYLES
   ══════════════════════════════════════════ */

/* ── App Card Icon (index) ── */
.app-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--card-bg);
}

.app-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 16px;
}

/* ── App Page Hero Icon ── */
.app-hero-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    object-fit: cover;
    display: block;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* ── App Hero ── */
.app-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 40px 80px;
    position: relative;
    overflow: hidden;
}

.app-hero .grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.app-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.app-hero-text {
    animation: fadeInUp 0.8s ease-out;
}

.app-hero-text .app-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: 1px solid rgba(201,255,87,0.3);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.app-hero-text h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.app-hero-text .app-subtitle {
    font-size: 1.2rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 20px;
}

.app-hero-text .app-description {
    color: var(--gray);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 500px;
}

.app-hero-cta {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.app-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--accent);
    color: #0a0a0a;
    border-radius: 100px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-store-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(201,255,87,0.3);
}

.app-store-btn svg { width: 20px; height: 20px; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gray);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.back-link:hover { color: var(--text); }

/* ── Screenshots ── */
.app-hero-screenshots {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.screenshot-phone {
    width: 200px;
    height: 420px;
    background: linear-gradient(145deg, #1a1a1a, #111);
    border-radius: 28px;
    border: 2px solid rgba(255,255,255,0.08);
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
    transition: transform 0.4s;
    flex-shrink: 0;
}

.screenshot-phone:hover { transform: translateY(-8px); }

.screenshot-phone:nth-child(2) {
    width: 220px;
    height: 460px;
    z-index: 2;
    box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 0 40px rgba(201,255,87,0.05);
}

.screenshot-phone .phone-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.screenshot-phone img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 26px;
}

.screenshot-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 3rem;
    opacity: 0.3;
}

.screenshot-placeholder span {
    font-size: 0.75rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ── App Features Section ── */
.app-features {
    padding: 120px 40px;
}

.app-features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.app-feature-card {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 24px;
    padding: 36px 28px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.app-feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.app-feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(201,255,87,0.15);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.app-feature-card:hover::before { opacity: 1; }

.app-feature-icon {
    width: 52px;
    height: 52px;
    background: rgba(201,255,87,0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.app-feature-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.app-feature-card p {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ── App Details ── */
.app-details {
    padding: 80px 40px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.app-details-inner {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.app-detail-block h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--accent);
}

.app-detail-block ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-detail-block li {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.5;
    padding-left: 20px;
    position: relative;
}

.app-detail-block li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

/* ── App CTA Section ── */
.app-cta {
    padding: 120px 40px;
    text-align: center;
    position: relative;
}

.app-cta .glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201,255,87,0.08) 0%, transparent 60%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.app-cta h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    position: relative;
    margin-bottom: 16px;
}

.app-cta p {
    color: var(--gray);
    font-size: 1.1rem;
    position: relative;
    margin-bottom: 32px;
}

.app-cta .app-store-btn {
    position: relative;
}

/* ── App Page Footer ── */
.app-footer {
    padding: 40px;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.app-footer .footer-text { color: var(--gray); font-size: 0.85rem; }
.app-footer .footer-links { display: flex; gap: 24px; }

.app-footer .footer-links a {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.app-footer .footer-links a:hover { color: var(--text); }

/* ══════════════════════════════════════════
   MAIN PAGE — APPS PORTFOLIO
   ══════════════════════════════════════════ */

.apps-section {
    padding: 120px 40px;
}

.apps-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.app-card {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 24px;
    padding: 32px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.app-card:hover {
    transform: translateY(-6px);
    border-color: rgba(201,255,87,0.15);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.app-card:hover::before { opacity: 1; }

.app-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.app-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.app-card-info h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.app-card-info .app-card-tagline {
    color: var(--gray);
    font-size: 0.85rem;
}

.app-card-desc {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.6;
    flex: 1;
}

.app-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.app-card-tag {
    padding: 4px 12px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--gray);
}

.app-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.app-card-price {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
}

.app-card-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(201,255,87,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 0.9rem;
    transition: all 0.3s;
}

.app-card:hover .app-card-arrow {
    background: var(--accent);
    color: #0a0a0a;
}

/* ── Main Hero (Portfolio) ── */
.main-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 120px 20px 80px;
    position: relative;
}

.main-hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.8rem, 7vw, 6rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    max-width: 900px;
    animation: fadeInUp 0.8s ease-out 0.1s both;
}

.main-hero > p {
    margin-top: 24px;
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--gray);
    max-width: 600px;
    line-height: 1.7;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    padding: 0 16px;
}

/* ══════════════════════════════════════════
   RESPONSIVE — APP PAGES
   ══════════════════════════════════════════ */

@media (max-width: 1024px) {
    .app-features-grid { grid-template-columns: repeat(2, 1fr); }
    .app-hero-inner { gap: 40px; }
}

@media (max-width: 768px) {
    /* App Hero */
    .app-hero { padding: 100px 16px 60px; min-height: auto; }
    .app-hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    .app-hero-text { order: 1; }
    .app-hero-screenshots { order: 2; }
    .app-hero-text .app-description { max-width: 100%; }
    .app-hero-cta { justify-content: center; }

    .screenshot-phone { width: 140px; height: 300px; }
    .screenshot-phone:nth-child(2) { width: 160px; height: 340px; }

    /* App Features */
    .app-features { padding: 80px 16px; }
    .app-features-grid { grid-template-columns: 1fr; gap: 16px; }

    /* App Details */
    .app-details { padding: 60px 16px; }
    .app-details-inner { grid-template-columns: 1fr; gap: 40px; }

    /* App CTA */
    .app-cta { padding: 80px 16px; }

    /* Portfolio grid */
    .apps-section { padding: 80px 16px; }
    .apps-grid { grid-template-columns: 1fr; }

    /* Main hero */
    .main-hero { padding: 100px 16px 60px; min-height: auto; }
    .main-hero h1 { font-size: clamp(2.2rem, 10vw, 3.5rem); }

    /* App footer */
    .app-footer {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 32px 16px;
    }
}

@media (max-width: 380px) {
    .screenshot-phone { width: 110px; height: 240px; }
    .screenshot-phone:nth-child(2) { width: 130px; height: 280px; }
    .app-hero-text h1 { font-size: 2rem; }
}
