/* =========================================================================
   home.css - Homepage & Component Layouts
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Hero Section
   ------------------------------------------------------------------------- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: var(--header-height);
    background-color: var(--black);
    isolation: isolate;
}

.hero-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg-slide {
    position: absolute;
    top: -20px;
    left: -20px;
    width: calc(100% + 40px);
    height: calc(100% + 40px);
    opacity: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.28);
    transition: opacity 1.8s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateZ(0);
}

.hero-bg-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 48%, rgba(5, 5, 5, 0.45) 0%, rgba(5, 5, 5, 0.58) 36%, rgba(5, 5, 5, 0.78) 72%),
        linear-gradient(180deg, rgba(5, 5, 5, 0.35) 0%, rgba(5, 5, 5, 0.8) 100%);
}

/* Concentric decorative circles */
.hero-circles-decor {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 2;
}

.decor-circle {
    position: absolute;
    border: 1px solid rgba(247, 244, 238, 0.06);
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, rgba(247, 244, 238, 0.07), rgba(247, 244, 238, 0.025) 42%, rgba(247, 244, 238, 0.01) 72%);
    box-shadow: inset 0 0 90px rgba(247, 244, 238, 0.045);
    transform: translateZ(0);
}

.circle-outer {
    width: 82vw;
    height: 82vw;
    max-width: 1080px;
    max-height: 1080px;
    opacity: 0.72;
}

.circle-mid {
    width: 44vw;
    height: 44vw;
    max-width: 610px;
    max-height: 610px;
    opacity: 0.86;
}

/* Central circular mask */
.hero-mask-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    pointer-events: none;
}

.hero-mask-circle {
    width: 36vw;
    height: 36vw;
    max-width: 460px;
    max-height: 460px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(247, 244, 238, 0.14);
    box-shadow: 0 25px 65px rgba(0,0,0,0.8), inset 0 0 44px rgba(247, 244, 238, 0.06);
    will-change: transform, opacity, border-radius;
}

.hero-mask-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-mask-slide.active {
    opacity: 1;
}

.hero-mask-slide img {
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    filter: brightness(0.62) contrast(1.05);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--gold);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 3px;
    margin-bottom: 24px;
}

.hero-label::before {
    content: '';
    display: block;
    width: 32px;
    height: 1px;
    background-color: var(--gold);
}

/* Title Container & Slides */
.hero-title-container {
    margin-bottom: 28px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-title {
    display: none;
    font-size: 3.2rem;
    line-height: 1.2;
    font-weight: 700;
    color: var(--off-white);
    text-shadow: 0 2px 10px rgba(0,0,0,0.95), 0 4px 30px rgba(0,0,0,0.95), 0 0 20px rgba(0,0,0,0.4);
    letter-spacing: 6px;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

html[lang="en"] .hero-title {
    letter-spacing: 6px;
}

html[lang="ar"] .hero-title {
    font-size: 3.4rem;
    line-height: 1.35;
    letter-spacing: 0 !important; /* mathematically prevent joined letters from breaking! */
}

.hero-title.active {
    display: block;
}

.hero-title span {
    color: var(--gold);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(247, 244, 238, 0.88);
    margin-bottom: 48px;
    max-width: 680px;
    line-height: 1.7;
    text-shadow: 0 2px 10px rgba(0,0,0,0.95), 0 4px 30px rgba(0,0,0,0.95);
    text-align: center;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
}

.scroll-hint {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.scroll-hint-text {
    font-size: 0.75rem;
    color: var(--stone);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scroll-hint-line {
    width: 1px;
    height: 32px;
    background-color: rgba(200, 164, 93, 0.2);
    position: relative;
    overflow: hidden;
}

.scroll-hint-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background-color: var(--gold);
    animation: scrollLine 2s infinite ease-in-out;
}

@keyframes scrollLine {
    0% { top: -20px; }
    100% { top: 32px; }
}

/* -------------------------------------------------------------------------
   2. Project Scroll Film (Desktop grid & styling)
   ------------------------------------------------------------------------- */
.film-slide .slide-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 80px;
    align-items: center;
    width: 100%;
    position: relative;
}

/* Big structural background elements */
.film-slide .big-num {
    position: absolute;
    font-size: 28rem;
    font-weight: 700;
    color: var(--gold);
    opacity: 0.03;
    z-index: 0;
    pointer-events: none;
    font-family: var(--font-heading-en);
    inset-inline-start: -40px;
    top: 45%;
    transform: translateY(-50%);
}

.slide-info {
    position: relative;
    z-index: 2;
}

.slide-media {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Project Info details */
.project-name {
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--off-white);
}

.project-title {
    font-size: 1.35rem;
    color: var(--gold);
    margin-bottom: 24px;
    line-height: 1.4;
    font-weight: 500;
}

.project-desc {
    color: var(--stone);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 520px;
}

.project-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 40px;
}

.fact-badge {
    background: rgba(200, 164, 93, 0.04);
    border: 1px solid var(--border-color);
    padding: 10px 18px;
    border-radius: 2px;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
}

.fact-val {
    color: var(--gold);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.fact-lbl {
    color: var(--stone);
    font-size: 0.75rem;
}

/* Custom premium image frame */
.image-frame {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 4/5;
    border: 1px solid var(--border-color);
    padding: 12px;
    background: var(--charcoal);
    box-shadow: 0 25px 60px rgba(0,0,0,0.6);
    transition: border-color var(--transition-smooth);
}

.image-frame:hover {
    border-color: var(--border-color-hover);
}

.image-frame-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-frame:hover img {
    transform: scale(1.06);
}

/* Coming soon/logo overlay card */
.project-logo-card {
    position: absolute;
    bottom: -24px;
    inset-inline-start: -24px;
    background: var(--charcoal);
    border: 1px solid var(--border-color);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
    z-index: 10;
}

.project-logo-card img {
    max-height: 48px;
    width: auto;
    object-fit: contain;
}

/* -------------------------------------------------------------------------
   3. Vertical Progress Indicator (Desktop Film Scroll)
   ------------------------------------------------------------------------- */
.progress-indicator {
    position: absolute;
    inset-inline-end: 48px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    z-index: 100;
}

.progress-num {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gold);
    font-family: var(--font-heading-en);
}

.progress-track {
    width: 1px;
    height: 180px;
    background-color: rgba(255,255,255,0.06);
    position: relative;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background-color: var(--gold);
    transition: height 0.3s ease;
}

.progress-dots {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.progress-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.15);
    cursor: pointer;
    transition: var(--transition-fast);
}

.progress-dot.active {
    background-color: var(--gold);
    transform: scale(1.4);
}

/* -------------------------------------------------------------------------
   4. About Preview Section
   ------------------------------------------------------------------------- */
.about-preview {
    padding: 140px 0;
    background-color: var(--charcoal);
    border-top: 1px solid rgba(255,255,255,0.02);
}

.about-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: flex-start;
}

.about-preview-title h2 {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--off-white);
}

html[lang="ar"] .about-preview-title h2 {
    font-size: 3.2rem;
    line-height: 1.3;
}

.about-preview-title h2 span {
    color: var(--gold);
}

.about-preview-content p {
    color: var(--stone);
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 48px;
}

.about-preview-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

.preview-point {
    border-inline-start: 1px solid var(--gold);
    padding-inline-start: 20px;
}

.point-header {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 8px;
    font-family: var(--font-heading-en);
}

html[lang="ar"] .point-header {
    font-family: var(--font-heading-ar);
}

.point-text {
    color: var(--stone);
    font-size: 0.9rem;
}

/* -------------------------------------------------------------------------
   5. Final Call to Action (Parallax Image Showcase)
   ------------------------------------------------------------------------- */
.final-cta {
    position: relative;
    padding: 160px 0;
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    text-align: center;
    overflow: hidden;
    transform: translateZ(0);
}

.final-cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(5,5,5,0.85) 0%, rgba(5,5,5,0.95) 100%);
    z-index: 1;
}

.final-cta .container {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.final-cta h2 {
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 24px;
    color: var(--off-white);
}

html[lang="ar"] .final-cta h2 {
    font-size: 3.5rem;
    line-height: 1.35;
}

.final-cta h2 span {
    color: var(--gold);
}

.final-cta p {
    font-size: 1.15rem;
    color: var(--stone);
    margin-bottom: 48px;
    line-height: 1.7;
}

.final-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Lead Modal styles moved to globals.css for cross-page consistency */


/* -------------------------------------------------------------------------
   8. Responsive Page Width Tweaks
   ------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.8rem;
    }
    html[lang="ar"] .hero-title {
        font-size: 3rem;
    }
    .about-preview-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .about-preview-title h2 {
        font-size: 2.4rem;
    }
    html[lang="ar"] .about-preview-title h2 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .hero {
        height: auto;
        min-height: 100svh;
        align-items: flex-start;
        padding-top: calc(var(--header-height) + 24px);
        padding-bottom: 42px;
    }

    .hero-bg-container {
        opacity: 0.42;
        transform: translateZ(0);
    }

    .hero-bg-slide {
        filter: brightness(0.25);
        transition: none;
    }

    .hero-overlay {
        opacity: 1;
        background:
            radial-gradient(circle at 50% 42%, rgba(5, 5, 5, 0.5) 0%, rgba(5, 5, 5, 0.65) 48%, rgba(5, 5, 5, 0.9) 100%),
            linear-gradient(180deg, rgba(5, 5, 5, 0.4) 0%, rgba(5, 5, 5, 0.9) 100%);
    }

    .hero-circles-decor {
        opacity: 0.45;
        transform: translate(-50%, -50%);
    }

    .circle-outer {
        width: 138vw;
        height: 138vw;
    }

    .circle-mid {
        width: 84vw;
        height: 84vw;
    }

    .hero-mask-container {
        top: 46%;
        opacity: 0.55;
        transform: translate(-50%, -50%);
    }

    .hero-mask-circle {
        width: 44vw;
        height: 44vw;
        min-width: 142px;
        min-height: 142px;
        max-width: 190px;
        max-height: 190px;
        transform: none;
    }

    .hero-content {
        opacity: 1;
        transform: none;
        width: 100%;
        max-width: 100%;
        padding: 0 12px;
        padding-top: 8px;
    }

    .hero-label {
        font-size: 0.72rem;
        letter-spacing: 2px;
        margin-bottom: 12px;
    }

    .hero-motto {
        opacity: 1;
        transform: none;
        animation: none;
        font-size: 0.82rem;
        letter-spacing: 1.2px;
        line-height: 1.4;
        margin-bottom: 14px;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-title-container {
        height: auto !important;
        margin-bottom: 18px;
        overflow: visible !important;
    }

    .hero-title {
        display: none !important;
        opacity: 1;
        transform: none;
        position: relative !important;
        font-size: 1.6rem !important;
        line-height: 1.2;
        letter-spacing: 2px !important;
        max-width: 100%;
        margin: 0;
        transition: none !important;
    }

    .hero-title.active {
        display: block !important;
    }

    .hero-title span {
        display: block;
        overflow-wrap: normal;
    }

    html[lang="ar"] .hero-title {
        font-size: 1.7rem !important;
        line-height: 1.3;
        letter-spacing: 0 !important;
    }

    .hero-subtitle {
        opacity: 1;
        transform: none;
        font-size: 0.92rem;
        line-height: 1.5;
        max-width: 100%;
        margin-bottom: 24px;
    }

    .hero-buttons {
        opacity: 1;
        transform: none;
        gap: 12px;
    }

    .hero-buttons .btn {
        min-height: 54px;
        padding: 13px 18px;
    }

    .scroll-hint {
        display: none;
    }

    .film-slide .slide-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .film-slide .big-num {
        display: none;
    }
    .project-name {
        font-size: 2rem;
    }
    .image-frame {
        max-width: 100%;
    }
    .project-logo-card {
        bottom: -16px;
        inset-inline-start: 16px;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    html[lang="ar"] .hero-title {
        font-size: 2.5rem;
    }
    .about-preview {
        padding: 80px 0;
    }
    .final-cta {
        padding: 100px 0;
    }
    .final-cta h2 {
        font-size: 2.2rem;
    }
    html[lang="ar"] .final-cta h2 {
        font-size: 2.5rem;
    }
}
