﻿#home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 72px;
    position: relative;
    overflow: hidden;
}

    /* River pattern background */
    #home::before {
        content: '';
        position: absolute;
        inset: 0;
       /* background: radial-gradient(ellipse 80% 60% at 70% 50%, rgba(10,74,122,0.25) 0%, transparent 70%), radial-gradient(ellipse 50% 80% at 10% 80%, rgba(201,168,76,0.06) 0%, transparent 60%);
       */ pointer-events: none;
    }

/* Flowing river lines */
.river-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

    .river-lines svg {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        opacity: 0.12;
    }

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.7rem;
    font-family: 'IBM Plex Mono', monospace;
    color: var(--gold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1.8rem;
    background: rgba(201,168,76,0.05);
}

    .hero-badge::before {
        content: '';
        width: 6px;
        height: 6px;
        background: var(--gold);
        border-radius: 50%;
        animation: pulse 2s infinite;
    }

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.8);
    }
}

h1 {
    font-size: clamp(2.2rem, 4.5vw, 4rem);
    font-weight: 800;
    line-height: 1.08;
    color: var(--text);
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

    h1 .highlight {
        color: var(--gold);
        position: relative;
        display: inline-block;
    }

        h1 .highlight::after {
            content: '';
            position: absolute;
            bottom: 4px;
            right: 0;
            left: 0;
            height: 3px;
            background: linear-gradient(90deg, transparent, var(--gold), transparent);
            opacity: 0.6;
        }

.hero-sub {
    font-size: 1.05rem;
    color: var(--muted);
    line-height: 1.8;
    max-width: 480px;
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
}

.btn-primary {
    padding: 0.85rem 2rem;
    background: var(--gold);
    color: var(--deep);
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    font-family: 'Tajawal', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .btn-primary:hover {
        background: var(--gold-light);
        transform: translateY(-2px);
        box-shadow: 0 8px 30px rgba(201,168,76,0.25);
    }

.btn-secondary {
    padding: 0.85rem 2rem;
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    font-family: 'Tajawal', sans-serif;
}

    .btn-secondary:hover {
        border-color: var(--gold);
        color: var(--gold);
        background: var(--gold-dim);
    }

.hero-stats {
    display: flex;
    grid-template-columns: repeat(10, 1fr);
    gap: 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.stat {
    padding: 0 1.5rem 0 0;
    border-left: 1px solid var(--border);
}

    .stat:last-child {
        border-left: none;
    }

    .stat:first-child {
        padding-right: 0;
    }

.stat-num {
    font-size: 2rem;
    font-weight: 900;
    color: var(--gold);
    font-family: 'IBM Plex Mono', monospace;
    letter-spacing: -0.03em;
}

.stat-label {
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
    font-family: 'IBM Plex Mono', monospace;
}

/* Hero Visual - Gate */
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gate-container {
    position: relative;
    width: 420px;
    height: 460px;
}

.gate-glow {
    position: absolute;
    inset: -40px;
    background: radial-gradient(ellipse at center, rgba(201,168,76,0.15) 0%, transparent 70%);
    pointer-events: none;
}

/* Code terminal card */
.terminal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(201,168,76,0.1);
    position: relative;
}

    .terminal::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, var(--gold), transparent);
    }

.terminal-header {
    background: var(--surface2);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border);
}


/* three dots in the header */
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-r {
    background: rgba(255,80,80,0.4);
}

.dot-y {
    background: rgba(201,168,76,0.5);
}

.dot-g {
    background: rgba(80,200,120,0.4);
}

.terminal-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: var(--muted);
    margin-right: auto;
}

.terminal-body {
    padding: 1.5rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.9;
}

.tc-comment {
    color: #4A6A5A;
}

.tc-key {
    color: var(--muted);
}

.tc-string {
    color: #7EC8A0;
}

.tc-gold {
    color: var(--gold);
}

.tc-blue {
    color: #6EB4E8;
}

.tc-white {
    color: var(--text);
}

.tc-indent {
    padding-right: 1.5rem;
}


/*  حدود هندسية  */
.geo-accent {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 2px solid var(--gold);
    opacity: 0.3;
}

.geo-tl {
    top: -12px;
    right: -12px;
    border-bottom: none;
    border-left: none;
}

.geo-br {
    bottom: 50px;
    left: -12px;
    border-top: none;
    border-right: none;
}

/* SECTION BASE */
section {
    padding: 100px 0;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--gold);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.section-divider {
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), transparent);
    margin: 1.2rem 0;
}

.section-sub {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.8;
    max-width: 560px;
}

/* ============================================
   HERO - RESPONSIVE
   Breakpoints: 1024px | 768px | 480px
   ============================================ */

@media (max-width: 1024px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 3rem 2rem;
        text-align: center;
    }

    .hero-sub {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .gate-container {
        width: 100%;
        max-width: 480px;
        height: auto;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    #home {
        padding-top: 60px;
    }

    .hero-inner {
        padding: 2rem 1.5rem;
        gap: 2rem;
    }

    h1 {
        font-size: clamp(1.8rem, 6vw, 2.6rem);
    }

    .hero-sub {
        font-size: 0.95rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 320px;
        justify-content: center;
        text-align: center;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
    }

    .stat {
        padding: 0 1rem;
    }

    .gate-container {
        max-width: 360px;
    }

    .terminal-body {
        font-size: 0.72rem;
        padding: 1rem;
        line-height: 1.7;
    }
}

@media (max-width: 480px) {
    .hero-inner {
        padding: 1.5rem 1rem;
    }

    h1 {
        font-size: clamp(1.6rem, 7vw, 2.2rem);
    }

    .hero-badge {
        font-size: 0.6rem;
    }

    .hero-stats {
        grid-template-columns: 1fr 1fr;
    }

    .stat-num {
        font-size: 1.5rem;
    }

    .gate-container {
        max-width: 300px;
    }

    .terminal-body {
        font-size: 0.65rem;
        padding: 0.8rem;
    }

    .geo-accent {
        display: none;
    }
}

/* =========================================
   HERO EXTRA RESPONSIVE FIXES
   ========================================= */

.hero-inner > div {
    min-width: 0;
}

.hero-sub,
.terminal-title,
.terminal-body,
.stat-label {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.terminal {
    max-width: 100%;
}

@media (max-width: 992px) {
    #home {
        min-height: auto;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero-visual {
        width: 100%;
    }

    .gate-container {
        width: 100%;
        max-width: 460px;
        height: auto;
    }

    .hero-stats {
        max-width: 560px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .hero-stats {
        grid-template-columns: 1fr 1fr;
        border-top: 1px solid var(--border);
    }

    .stat {
        padding: 1rem;
        border-left: none;
        border-bottom: 1px solid var(--border);
    }

    .hero-stats .stat:nth-last-child(-n+2) {
        border-bottom: none;
    }

    .terminal-body {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tc-indent {
        padding-right: 0.75rem;
    }
}

@media (max-width: 480px) {
    #home {
        padding-top: 72px;
    }

    .hero-badge {
        justify-content: center;
        width: fit-content;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-sub {
        font-size: 0.88rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .stat {
        border-bottom: 1px solid var(--border);
        padding: 0.9rem 0;
    }

    .hero-stats .stat:last-child {
        border-bottom: none;
    }

    .stat-num {
        font-size: 1.35rem;
    }

    .gate-container {
        max-width: 100%;
    }

    .terminal-header {
        padding: 10px 12px;
    }

    .terminal-title {
        font-size: 0.62rem;
    }
}
