/* =========================================================================
   A4D Digital (App Development) Specific Styles
   ========================================================================= */

:root {
    /* A4D Digital Specific Colors */
    --c-a4d-magenta: #ff007f;
    /* Brighter magenta for digital feel */
    --c-a4d-dark: #0f1115;
    /* Deep dark background */
    --c-a4d-card: #181a20;
    /* Card background */
    --c-a4d-border: #2a2d35;
    /* Subtle borders */
    --c-a4d-text: #e0e0e0;
    /* Light text for dark bg */
    --c-a4d-text-muted: #8b92a5;
    /* Muted text */
}

/* Base Dark Theme Override */
.dark-theme {
    background-color: var(--c-a4d-dark);
    color: var(--c-a4d-text);
}

.dark-theme .header {
    background: rgba(15, 17, 21, 0.85);
    border-bottom: 1px solid var(--c-a4d-border);
}

.dark-theme .global-nav a {
    color: var(--c-white);
}

.dark-theme .global-nav a.active {
    color: var(--c-a4d-magenta);
}

.dark-theme .global-nav a::after {
    background-color: var(--c-a4d-magenta);
}

.dark-theme .hamburger-line {
    background-color: var(--c-white);
}

.dark-theme .global-nav.active {
    background: var(--c-a4d-dark);
}

.header-logo-img {
    height: 40px;
    /* Specific height for the A4D logo to balance with AIM logo */
    width: auto;
}

/* =========================================================================
   Dev Hero Section (Digital Grid & Stars Animation)
   ========================================================================= */
.dev-hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--h-header);
    overflow: hidden;
}

.digital-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-color: var(--c-a4d-dark);
    overflow: hidden;
}

/* Perspective Grid */
.grid-layer {
    position: absolute;
    bottom: -20%;
    left: -50%;
    width: 200%;
    height: 60%;
    background-image:
        linear-gradient(to right, rgba(255, 0, 127, 0.1) 1px, transparent 1px),
        linear-gradient(to top, rgba(255, 0, 127, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg);
    animation: gridMove 10s linear infinite;
    mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
}

@keyframes gridMove {
    0% {
        transform: perspective(500px) rotateX(60deg) translateY(0);
    }

    100% {
        transform: perspective(500px) rotateX(60deg) translateY(50px);
    }
}

/* Glowing Stars Base */
.stars-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(2px 2px at 20px 30px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.8), rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 90px 40px, rgba(255, 0, 127, 0.6), rgba(0, 0, 0, 0));
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: twinkle 5s infinite alternate;
    opacity: 0.5;
}

@keyframes twinkle {
    0% {
        opacity: 0.3;
    }

    100% {
        opacity: 0.7;
    }
}

/* Shooting Stars */
.shooting-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotateZ(45deg);
}

.shooting-stars span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: var(--c-white);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1),
        0 0 0 8px rgba(255, 255, 255, 0.1),
        0 0 20px rgba(255, 255, 255, 1);
    animation: shooting 3s linear infinite;
}

.shooting-stars span::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 1px;
    background: linear-gradient(90deg, var(--c-white), transparent);
}

.shooting-stars span:nth-child(1) {
    top: 0;
    right: 0;
    left: initial;
    animation-delay: 0;
    animation-duration: 4s;
}

.shooting-stars span:nth-child(2) {
    top: 100px;
    right: 150px;
    left: initial;
    animation-delay: 1.2s;
    animation-duration: 5s;
}

.shooting-stars span:nth-child(3) {
    top: -100px;
    right: 500px;
    left: initial;
    animation-delay: 2.5s;
    animation-duration: 3s;
}

@keyframes shooting {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(-1500px);
        opacity: 0;
    }
}

/* Hero Content */
.dev-hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 0 20px;
    animation: fadeInDown 1s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.hero-logo-wrapper {
    margin-bottom: 40px;
}

.hero-main-logo {
    max-width: 400px;
    width: 80%;
    margin: 0 auto;
    filter: drop-shadow(0 0 20px rgba(255, 0, 127, 0.4));
}

.dev-hero-title {
    font-size: 3.5rem;
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--c-white);
    letter-spacing: -0.02em;
}

.highlight-magenta {
    color: var(--c-a4d-magenta);
    text-shadow: 0 0 20px rgba(255, 0, 127, 0.5);
}

.dev-hero-sub {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--c-a4d-text-muted);
    letter-spacing: 0.1em;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--c-a4d-text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    font-family: 'Inter', sans-serif;
    z-index: 1;
}

.mouse {
    width: 24px;
    height: 36px;
    border: 2px solid var(--c-a4d-text-muted);
    border-radius: 12px;
    margin-top: 8px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background-color: var(--c-a4d-magenta);
    border-radius: 2px;
    animation: scrollWheel 1.5s infinite;
}

@keyframes scrollWheel {
    0% {
        transform: translate(-50%, 0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 15px);
        opacity: 0;
    }
}

/* =========================================================================
   Dev Core Sections
   ========================================================================= */
.dev-section {
    padding: 120px 0;
    position: relative;
}

.dev-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--c-a4d-border), transparent);
}

.dev-section-title-wrapper {
    text-align: center;
    margin-bottom: 80px;
}

.dev-section-en {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    color: var(--c-a4d-magenta);
    font-size: 1.125rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.dev-section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--c-white);
    margin-bottom: 16px;
    letter-spacing: 0.05em;
}

.dev-section-line {
    width: 40px;
    height: 2px;
    background: var(--c-a4d-magenta);
    margin: 0 auto;
    box-shadow: 0 0 10px var(--c-a4d-magenta);
}

/* --- Solutions Grid --- */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.solution-card {
    background: var(--c-a4d-card);
    border: 1px solid var(--c-a4d-border);
    padding: 40px;
    border-radius: var(--radius);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.solution-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255, 0, 127, 0.1), transparent 50%);
    opacity: 0;
    transition: var(--transition);
}

.solution-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 0, 127, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 0, 127, 0.1);
}

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

.solution-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 0, 127, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-a4d-magenta);
    margin-bottom: 24px;
}

.solution-icon svg {
    width: 32px;
    height: 32px;
}

.solution-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--c-white);
    margin-bottom: 16px;
    font-family: 'Inter', sans-serif;
}

.solution-text {
    color: var(--c-a4d-text-muted);
    line-height: 1.7;
}

/* --- Featured Apps --- */
.featured-apps-section {
    background-color: #121418;
    /* Slightly different dark bg */
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.app-card {
    display: flex;
    flex-direction: column;
}

.app-image-wrapper {
    position: relative;
    background: var(--c-a4d-card);
    border: 1px solid var(--c-a4d-border);
    border-radius: var(--radius);
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    overflow: hidden;
    transition: var(--transition);
}

.app-card:hover .app-image-wrapper {
    border-color: rgba(255, 255, 255, 0.2);
}

.app-image-placeholder {
    color: var(--c-a4d-border);
}

.app-image-placeholder svg {
    width: 80px;
    height: 80px;
    opacity: 0.5;
}

.status-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    font-family: 'Inter', sans-serif;
}

.status-dev {
    background: rgba(56, 180, 139, 0.2);
    color: var(--c-green);
    border: 1px solid rgba(56, 180, 139, 0.5);
}

.status-soon {
    background: rgba(218, 165, 32, 0.2);
    color: var(--c-gold);
    border: 1px solid rgba(218, 165, 32, 0.5);
}

.app-title {
    font-size: 1.4rem;
    color: var(--c-white);
    margin-bottom: 12px;
}

.app-desc {
    color: var(--c-a4d-text-muted);
    line-height: 1.6;
}

/* --- Our Process --- */
.process-timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    position: relative;
}

.process-step {
    padding-top: 40px;
    position: relative;
}

/* Timeline connecting line */
.process-timeline::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--c-a4d-border);
}

.step-number {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--c-a4d-dark);
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--c-a4d-magenta);
    width: 40px;
    height: 32px;
    display: flex;
    align-items: center;
    z-index: 1;
}

.step-number::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: -10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c-a4d-magenta);
    box-shadow: 0 0 10px var(--c-a4d-magenta);
}

.step-title {
    font-size: 1.25rem;
    color: var(--c-white);
    margin-bottom: 16px;
}

.step-text {
    color: var(--c-a4d-text-muted);
    font-size: 0.95rem;
}

/* --- Contact & Compliance --- */
.contact-section {
    padding-bottom: 80px;
    /* Reduced since footer is directly below */
}

.contact-card {
    background: linear-gradient(135deg, var(--c-a4d-card) 0%, #1a1018 100%);
    border: 1px solid rgba(255, 0, 127, 0.2);
    border-radius: var(--radius);
    padding: 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 0, 127, 0.15) 0%, transparent 70%);
    transform: translate(50%, -50%);
}

.contact-title {
    font-size: 2rem;
    color: var(--c-white);
    margin-bottom: 16px;
}

.contact-text {
    color: var(--c-a4d-text-muted);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.btn-primary {
    display: inline-block;
    background: var(--c-a4d-magenta);
    color: var(--c-white);
    padding: 16px 40px;
    border-radius: 30px;
    font-weight: 700;
    letter-spacing: 0.05em;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(255, 0, 127, 0.3);
}

.btn-primary:hover {
    background: #ff1a8c;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 0, 127, 0.5);
    color: var(--c-white);
}

.compliance-links {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 0.85rem;
}

.compliance-link {
    color: var(--c-a4d-text-muted);
}

.compliance-link:hover {
    color: var(--c-white);
}

.divider {
    color: var(--c-a4d-border);
}

/* --- Dark Footer Overrides --- */
.dark-footer {
    background-color: #0a0b0e;
    border-top: 1px solid var(--c-a4d-border);
}

.footer-brand-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-corporate-logo {
    height: 40px;
    margin-bottom: 16px;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-corporate-logo:hover {
    opacity: 1;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.8));
}

.dark-footer .footer-nav a {
    color: var(--c-a4d-text-muted);
}

.dark-footer .footer-nav a:hover,
.dark-footer .footer-nav a.active-footer {
    color: var(--c-a4d-magenta);
}

.dark-footer .copyright {
    border-top-color: var(--c-a4d-border);
    color: #5a5f73;
}

/* =========================================================================
   Responsive Adjustments for Dev Page
   ========================================================================= */
@media screen and (max-width: 991px) {
    .solutions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-timeline {
        grid-template-columns: repeat(2, 1fr);
        gap: 50px 30px;
    }

    /* Adjust timeline connecting line for 2x2 grid */
    .process-timeline::before {
        display: none;
        /* Hide solid line to replace with segments or simpler logic */
    }

    .dev-hero-title {
        font-size: 2.8rem;
    }
}

@media screen and (max-width: 768px) {

    .solutions-grid,
    .apps-grid,
    .process-timeline {
        grid-template-columns: 1fr;
    }

    .process-timeline {
        gap: 40px;
    }

    .dev-hero {
        min-height: 500px;
    }

    .hero-main-logo {
        width: 90%;
    }

    .dev-hero-title {
        font-size: 2.2rem;
    }

    .dev-hero-sub {
        font-size: 1rem;
    }

    .contact-card {
        padding: 40px 20px;
    }

    .compliance-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}