@font-face {
    font-family: 'Vazirmatn';
    src: url('Vazirmatn.woff2') format('woff2-variations'), /* will be the standard and works in Safari now */
    url('Vazirmatn.woff2') format('woff2');
    /* for the other supporting browsers */
    font-weight: 100 900;
    font-display: swap;
}

/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */

:root {
    --bg-deep: #050505;
    --bg-surface: #0a0a0a;
    /* Luxury Gold Palette */
    --gold-light: #FDE68A;
    --gold-main: #D97706;
    --gold-gradient: linear-gradient(135deg, #FDE68A 0%, #D97706 100%);
    /* Accents */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    /* Glass Effect */
    --glass-bg: rgba(20, 20, 20, 0.65);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-highlight: 1px solid rgba(255, 255, 255, 0.15);
    --glass-blur: blur(20px);
    --radius-lg: 24px;
    --radius-md: 16px;
    --container: 1200px;
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Vazirmatn', sans-serif;
    line-height: 1.8;
    overflow-x: hidden;
    width: 100%;
}

/* =========================================
   2. BACKGROUNDS
   ========================================= */

.grid-bg {
    position: fixed;
    inset: 0;
    z-index: -3;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.bg-noise {
    position: fixed;
    inset: 0;
    opacity: 0.04;
    z-index: -2;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='1'/%3E%3C/svg%3E");
}

.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(130px);
    z-index: -4;
    opacity: 0.2;
}

.glow-1 {
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--gold-main);
}

.glow-2 {
    bottom: -20%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: #3b82f6;
}

/* =========================================
   3. UTILITIES
   ========================================= */

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.text-center {
    text-align: center;
}

.text-justify {
    text-align: justify;
}

.mb-large {
    margin-bottom: 4rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.ltr {
    direction: ltr;
}

.text-gold {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.text-muted {
    color: var(--text-muted);
    font-weight: 300;
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s var(--ease-out);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0) rotateY(-10deg) rotateX(5deg);
    }
    50% {
        transform: translateY(-15px) rotateY(-10deg) rotateX(5deg);
    }
}

/* =========================================
   4. COMPONENTS
   ========================================= */

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-top: var(--glass-highlight);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    transition: transform 0.9s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6), 0 0 25px rgba(217, 119, 6, 0.15);
}

.btn-primary {
    background: var(--gold-gradient);
    color: #000;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 10px 20px -5px rgba(217, 119, 6, 0.4);
    display: inline-flex;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(217, 119, 6, 0.6);
}

.btn-outline {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--gold-main);
    color: var(--gold-light);
}

/* =========================================
   5. NAVIGATION
   ========================================= */

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: transform 0.3s ease-in-out, padding 0.3s ease, background 0.3s ease;
}

.navbar.nav-up {
    transform: translateY(0);
}

.navbar.nav-down {
    transform: translateY(-100%);
}

.navbar.scrolled {
    padding: 15px 0;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 40px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
}

.brand-name {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 30px;
    background: rgb(255 255 255 / .03);
    padding: 8px 30px;
    border-radius: 50px;
    border: 1px solid rgb(255 255 255 / .05)
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: .95rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 6px;
    height: 6px;
    background: var(--gold-main);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s cubic-bezier(.175, .885, .32, 1.275);
    box-shadow: 0 0 8px var(--gold-main)
}

.nav-link:hover::after,
.nav-link.active::after {
    opacity: 1;
    transform: translateX(-50%) scale(1)
}

.nav-link:hover,
.nav-link.active {
    color: #fff
}

/* =========================================
   6. HERO SECTION
   ========================================= */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
    overflow: hidden;
}

.hero-tech-bg {
    position: absolute;
    inset: 0;
    opacity: 0.5;
    pointer-events: none;
    mix-blend-mode: screen;
}

.circuit-svg {
    width: 100%;
    height: 100%;
}

/* SVG Styles */

.trace {
    fill: none;
    stroke: var(--gold-main);
    stroke-width: 1.5;
    opacity: 0.15;
}

.node {
    fill: var(--bg-deep);
    stroke: var(--gold-main);
    stroke-width: 2px;
    filter: drop-shadow(0 0 4px var(--gold-main));
    animation: nodePulse 3s infinite ease-in-out;
}

.packet {
    fill: #fff;
    filter: drop-shadow(0 0 8px #fff);
}

@keyframes nodePulse {
    0%,
    100% {
        stroke-opacity: 0.5;
        stroke-width: 2px;
    }
    50% {
        stroke-opacity: 1;
        stroke-width: 4px;
        filter: drop-shadow(0 0 8px var(--gold-main));
    }
}

.hero-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    position: relative;
    z-index: 2;
}

.hero-text {
    max-width: 600px;
}

.badge {
    padding: 8px 16px;
    background: rgba(217, 119, 6, 0.1);
    border: 1px solid rgba(217, 119, 6, 0.3);
    color: var(--gold-light);
    border-radius: 100px;
    font-size: 0.85rem;
    margin-bottom: 25px;
    display: inline-block;
}

h1 {
    font-size: 3rem;
    line-height: 1.8;
    font-weight: 900;
    margin-bottom: 25px;
}

/* Text Glow */

.text-glow {
    position: relative;
    color: transparent;
    background: linear-gradient(110deg, var(--gold-main) 20%, #ffffff 50%, var(--gold-main) 80%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: electricShine 3s linear infinite;
    filter: drop-shadow(0 0 15px rgba(251, 191, 36, 0.6));
    display: inline-block;
    padding-bottom: 5px;
}

@keyframes electricShine {
    to {
        background-position: 200% center;
    }
}

.hero-desc {
    font-size: 1.15rem;
    margin-bottom: 40px;
    color: var(--text-muted);
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 15px;
}

.hero-visual {
    position: relative;
    perspective: 1000px;
}

.stat-card {
    min-width: 300px;
    padding: 40px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0));
    transform: rotateY(-10deg) rotateX(5deg);
    animation: float 6s ease-in-out infinite;
}
.stat-card:hover {
    border: 1px solid var(--gold-light);
    border-radius: var(--radius-lg);
    transition: transform 0.9s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.stat-val {
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    color: transparent;
    display: block;
}

.stat-lbl {
    font-size: 0.9rem;
    color: #fff;
    text-transform: uppercase;
    display: block;
    margin-top: 5px;
}

/* =========================================
   7. SECTIONS
   ========================================= */

.marquee-wrapper {
    background: rgba(255, 255, 255, 0.01);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 25px 0;
    margin-bottom: 80px;
    overflow: hidden;
}

.marquee-wrapper:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-track {
    display: flex;
    gap: 0;
    animation: scroll 40s linear infinite;
    width: max-content;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(50%);
    }
}

.client-grp {
    display: flex;
    gap: 60px;
    padding-right: 60px;
    align-items: center;
}

.client-grp span {
    font-size: 1.2rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    cursor: default;
}

.client-grp span:hover {
    color: var(--gold-light);
    text-shadow: 0 0 15px var(--gold-main);
}

.sep-icon {
    width: 20px;
    height: 20px;
    color: var(--gold-main);
    filter: drop-shadow(0 0 5px var(--gold-main));
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gold-gradient);
    margin-top: 15px;
    border-radius: 2px;
}

.about-card {
    padding: 40px;
    text-align: center;
    border-top: 3px solid var(--gold-main);
    margin-top: 20px;
}

.icon-circle {
    width: 70px;
    height: 70px;
    background: rgba(217, 119, 6, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border: 1px solid rgba(217, 119, 6, 0.3);
    color: var(--gold-main);
}

.section {
    padding: 80px 0;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: right;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gold-gradient);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.s-icon-box {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-light);
}

.s-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #fff;
}

.process-tabs {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin: 60px auto;
    max-width: 600px;
    width: 100%;
}

.p-tab {
    cursor: pointer;
    opacity: 0.5;
    transition: 0.4s;
    text-align: center;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    width: 90px;
}

.p-tab.active {
    opacity: 1;
    transform: scale(1.1);
}

.p-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-deep);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin: 0 auto 15px;
    transition: all 0.4s ease;
    box-shadow: 0 0 0 5px var(--bg-deep);
}

.p-tab.active .p-icon {
    border-color: var(--gold-main);
    color: var(--gold-light);
    box-shadow: 0 0 0 5px var(--bg-deep), 0 0 25px rgba(217, 119, 6, 0.4);
}

.p-line {
    flex-grow: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    margin-top: 30px;
    border-radius: 4px;
    transition: background-color 0.6s ease, box-shadow 0.6s ease;
    min-width: 20px;
}

.p-line.active {
    background: var(--gold-main);
    box-shadow: 0 0 10px var(--gold-main);
}

.process-text-container {
    background: var(--glass-bg);
    border: var(--glass-border);
    border-radius: var(--radius-md);
    padding: 40px 60px;
    text-align: center;
    max-width: 800px;
    margin: 20px auto 0;
    position: relative;
}

.process-text-container::before {
    content: "“";
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 6rem;
    line-height: 1;
    color: var(--gold-main);
    opacity: 0.15;
    font-family: serif;
}

.process-text-container::after {
    content: "”";
    position: absolute;
    bottom: -30px;
    left: 20px;
    font-size: 6rem;
    line-height: 1;
    color: var(--gold-main);
    opacity: 0.15;
    font-family: serif;
}
#process-desc {
    color: var(--text-muted);
}

.contact-box {
    padding: 50px;
}

.c-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: 0.3s;
    color: inherit;
    text-decoration: none;
}

.c-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--gold-main);
}

.c-icon {
    color: var(--gold-light);
}

.c-info {
    display: flex;
    flex-direction: column;
}

.c-info .label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.c-info .value {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
}

.work-hours {
    margin-top: 25px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 10px #22c55e;
}

footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 0;
    margin-top: 80px;
    background: linear-gradient(to top, #000, var(--bg-deep));
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left a {
    color: var(--text-white);
    text-decoration: none;
    transition: 0.3s;
}

.footer-left a:hover {
    color: var(--gold-light);
}

/* =========================================
   10. MOBILE RESPONSIVE
   ========================================= */

@media (max-width: 992px) {
    .container {
        padding: 0 20px;
    }
    /* Hero & Titles */
    .hero-section {
        padding-top: 120px;
        min-height: auto;
        padding-bottom: 60px;
    }
    .hero-content-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 50px;
        justify-content: center;
    }
    /* Increased margin for titles on mobile */
    h1 {
        font-size: 1.8rem;
        margin-top: 50px;
        margin-bottom: 25px;
    }
    .section-title {
        font-size: 1.8rem;
        margin-top: 50px;
        margin-bottom: 30px;
    }
    /* --- MOBILE STATS: Wide but Two Rows (Default Stack) --- */
    .stat-card {
        transform: none;
        animation: none;
        margin-top: 40px;
        width: 100%;
        max-width: 400px;
        display: block;
        /* Vertical stack */
        padding: 40px 30px;
        /* Bigger padding for square look */
        margin-left: auto;
        margin-right: auto;
    }
    .stat-card>div[style*="height"] {
        /* Horizontal divider */
        height: 1px !important;
        width: 100% !important;
        background: rgba(255, 255, 255, 0.1);
        margin: 30px 0 !important;
    }
    /* Nav */
    .nav-links {
        display: none;
    }
    .nav-right {
        gap: 0;
    }
    .hero-actions {
        justify-content: center;
    }
    /* Layouts */
    .service-grid {
        grid-template-columns: 1fr;
    }
    .row-layout {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }
    .phones-row {
        grid-template-columns: 1fr !important;
    }
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    /* Process */
    .process-tabs {
        gap: 0;
    }
    .p-tab {
        width: auto;
        flex: 0 0 auto;
    }
    .p-icon {
        width: 50px;
        height: 50px;
    }
    .p-icon svg {
        width: 24px;
        height: 24px;
    }
    .p-line {
        margin-top: 25px;
        min-width: 10px;
    }
    .process-text-container {
        padding: 30px;
        margin-bottom: 30px;
    }
    /* Spacing Contact */
    #contact {
        padding-top: 60px;
        margin-top: 50px;
    }
    /* Contact Cards */
    .contact-box {
        padding: 30px 20px;
    }
    .c-item {
        padding: 15px;
    }
    .client-grp {
        gap: 30px;
        padding-right: 30px;
    }
}
