/* ═══════════════════════════════════════════════════════════
   BRUTALISM DESIGN SYSTEM — Aamaq IT
   ═══════════════════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
    --bg-primary: #F4F7FB;
    --bg-secondary: #FFFFFF;
    --bg-dark: #0A0E27;
    --text-primary: #0A0E27;
    --text-secondary: #334155;
    --text-muted: #64748B;
    --border-color: #0A0E27;
    --border-width: 3px;
    --accent-red: #00D2FF;
    --accent-yellow: #00F0FF;
    --accent-blue: #1A0D6B;
    --accent-cyan: #00D2FF;
    --accent-green: #00CC66;
    --accent-purple: #8A2BE2;
    --shadow-offset: 6px;
    --shadow-hard: 6px 6px 0px #0A0E27;
    --shadow-hard-sm: 4px 4px 0px #0A0E27;
    --shadow-hard-hover: 8px 8px 0px #0A0E27;
    --shadow-hard-red: 6px 6px 0px #00D2FF;
    --shadow-hard-blue: 6px 6px 0px #1A0D6B;
    --shadow-hard-yellow: 6px 6px 0px #00F0FF;
    --font-mono: 'Space Mono', 'JetBrains Mono', monospace;
    --font-arabic: 'Tajawal', sans-serif;
}

/* ── Global Resets ── */
* {
    border-radius: 0 !important;
}

/* Allow some intentional rounding for specific elements */
.brutal-round {
    border-radius: 0 !important;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-arabic);
    overflow-x: hidden;
}

footer {
    position: relative;
    overflow: hidden;
}

::selection {
    background: var(--accent-yellow);
    color: var(--text-primary);
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-left: var(--border-width) solid var(--border-color);
}

::-webkit-scrollbar-thumb {
    background: var(--text-primary);
    border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-red);
}

/* ═══════════════════════════════════════════════════════════
   BRUTAL CARDS
   ═══════════════════════════════════════════════════════════ */

.brutal-card {
    background: var(--bg-secondary);
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-hard);
    padding: 2rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
    overflow: hidden;
}

.brutal-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: var(--shadow-hard-hover);
}

.brutal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--accent-red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

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

/* Card color variants */
.brutal-card--cyan::before { background: var(--accent-cyan); }
.brutal-card--blue::before { background: var(--accent-blue); }
.brutal-card--yellow::before { background: var(--accent-yellow); }
.brutal-card--green::before { background: var(--accent-green); }
.brutal-card--purple::before { background: var(--accent-purple); }

/* Glass card override to become brutal */
.glass-card,
.glass-panel,
.glass-lite {
    background: var(--bg-secondary) !important;
    border: var(--border-width) solid var(--border-color) !important;
    box-shadow: var(--shadow-hard) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.glass-card:hover,
.glass-panel:hover {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
    transform: translate(-3px, -3px) !important;
    box-shadow: var(--shadow-hard-hover) !important;
}

/* ═══════════════════════════════════════════════════════════
   BRUTAL BUTTONS
   ═══════════════════════════════════════════════════════════ */

.brutal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-hard-sm);
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    text-decoration: none;
}

.brutal-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-hard);
}

.brutal-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px var(--border-color);
}

.brutal-btn--primary {
    background: var(--accent-red);
    color: white;
}

.brutal-btn--secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.brutal-btn--dark {
    background: var(--bg-dark);
    color: white;
}

.brutal-btn--yellow {
    background: var(--accent-yellow);
    color: var(--text-primary);
}

.brutal-btn--blue {
    background: var(--accent-blue);
    color: white;
}

/* ═══════════════════════════════════════════════════════════
   LOGO IDENTITY UTILITIES (BRUTALISM ADAPTED)
   ═══════════════════════════════════════════════════════════ */

/* Diamond Dots (from the "ق" logo) */
.logo-diamond {
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: var(--accent-cyan);
    border: 2px solid var(--border-color);
    transform: rotate(45deg);
    box-shadow: 2px 2px 0 var(--border-color);
    margin-left: 8px; /* For RTL alignment */
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.logo-diamond-lg {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    box-shadow: 4px 4px 0 var(--border-color);
}

.brutal-card:hover .logo-diamond {
    background-color: var(--accent-blue);
    transform: rotate(135deg);
}

/* ═══════════════════════════════════════════════════════════
   BRUTAL SECTIONS
   ═══════════════════════════════════════════════════════════ */

.brutal-section {
    border-bottom: var(--border-width) solid var(--border-color);
    position: relative;
}

.brutal-section--alt {
    background: var(--bg-secondary);
}

.brutal-section--dark {
    background: var(--bg-dark);
    color: white;
}

.brutal-section--yellow {
    background: var(--accent-yellow);
    color: var(--text-primary);
}

.brutal-section--red {
    background: var(--accent-red);
    color: white;
}

/* ═══════════════════════════════════════════════════════════
   BRUTAL TYPOGRAPHY
   ═══════════════════════════════════════════════════════════ */

.brutal-heading {
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1;
    letter-spacing: -0.02em;
}

.brutal-heading--outlined {
    color: transparent;
    -webkit-text-stroke: 2px var(--text-primary);
}

.brutal-heading--shadow {
    text-shadow: 4px 4px 0 var(--accent-red);
}

.brutal-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border: 2px solid currentColor;
    padding: 0.25rem 0.75rem;
    display: inline-block;
}

/* ═══════════════════════════════════════════════════════════
   BRUTAL FORMS
   ═══════════════════════════════════════════════════════════ */

.brutal-input,
input[class*="bg-white"],
textarea[class*="bg-white"],
select[class*="bg-white"] {
    background: var(--bg-secondary) !important;
    border: var(--border-width) solid var(--border-color) !important;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: box-shadow 0.15s ease;
    outline: none;
    color: var(--text-primary);
}

.brutal-input:focus,
input:focus,
textarea:focus,
select:focus {
    box-shadow: var(--shadow-hard-sm) !important;
    border-color: var(--accent-red) !important;
    transform: none !important;
}

/* Checkout form override */
#checkout-form input,
#checkout-form select,
#checkout-form textarea {
    transition: box-shadow 0.15s ease !important;
    transform: none !important;
    background: var(--bg-secondary) !important;
    border: var(--border-width) solid var(--border-color) !important;
}

#checkout-form input:focus,
#checkout-form select:focus,
#checkout-form textarea:focus {
    transform: none !important;
    box-shadow: var(--shadow-hard-sm) !important;
    border-color: var(--accent-red) !important;
}

#checkout-form button:hover {
    transform: translate(-2px, -2px) !important;
    box-shadow: var(--shadow-hard) !important;
}

/* ═══════════════════════════════════════════════════════════
   BRUTAL DECORATIVE ELEMENTS
   ═══════════════════════════════════════════════════════════ */

/* Geometric shapes for backgrounds */
.brutal-geo {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.brutal-geo--cross {
    width: 40px;
    height: 40px;
    background:
        linear-gradient(var(--border-color), var(--border-color)) center/100% 3px no-repeat,
        linear-gradient(var(--border-color), var(--border-color)) center/3px 100% no-repeat;
}

.brutal-geo--circle {
    width: 60px;
    height: 60px;
    border: 3px solid var(--accent-red);
    border-radius: 50% !important;
}

.brutal-geo--square {
    width: 40px;
    height: 40px;
    border: 3px solid var(--accent-blue);
    transform: rotate(45deg);
}

.brutal-geo--dots {
    width: 100px;
    height: 100px;
    background-image: radial-gradient(circle, var(--text-primary) 1.5px, transparent 1.5px);
    background-size: 12px 12px;
    opacity: 0.15;
}

.brutal-geo--lines {
    width: 150px;
    height: 150px;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 5px,
        var(--text-primary) 5px,
        var(--text-primary) 6px
    );
    opacity: 0.08;
}

/* ═══════════════════════════════════════════════════════════
   MARQUEE (Brutalized)
   ═══════════════════════════════════════════════════════════ */

.marquee-container {
    overflow: hidden;
    border-top: var(--border-width) solid var(--border-color);
    border-bottom: var(--border-width) solid var(--border-color);
    mask-image: none;
    -webkit-mask-image: none;
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    width: max-content;
    animation: marquee-scroll 40s linear infinite;
    gap: 4rem;
}

.marquee-content > * {
    flex-shrink: 0;
}

@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.marquee-container:hover .marquee-content {
    animation-play-state: paused;
}

[dir="rtl"] .marquee-content {
    animation: marquee-scroll-rtl 40s linear infinite;
}

@keyframes marquee-scroll-rtl {
    from { transform: translateX(0); }
    to { transform: translateX(50%); }
}

.marquee-content-slow {
    display: flex;
    white-space: nowrap;
    width: max-content;
    animation: marquee-scroll 60s linear infinite;
    gap: 3rem;
}

.marquee-content-slow > * {
    flex-shrink: 0;
}

[dir="rtl"] .marquee-content-slow {
    animation: marquee-scroll-rtl 60s linear infinite;
}

.marquee-container:hover .marquee-content-slow {
    animation-play-state: paused;
}

/* ═══════════════════════════════════════════════════════════
   BRUTAL BADGE / TAG
   ═══════════════════════════════════════════════════════════ */

.brutal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 2px solid currentColor;
}

.brutal-badge--red {
    background: var(--accent-red);
    color: white;
    border-color: var(--text-primary);
}

.brutal-badge--yellow {
    background: var(--accent-yellow);
    color: var(--text-primary);
    border-color: var(--text-primary);
}

.brutal-badge--blue {
    background: var(--accent-blue);
    color: white;
    border-color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════
   BRUTAL HEADER
   ═══════════════════════════════════════════════════════════ */

#header {
    min-height: 80px;
    background: var(--bg-primary);
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

#header nav {
    background: var(--bg-primary) !important;
    border: var(--border-width) solid var(--border-color) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

#header .nav-link,
#header .nav-link-mobile {
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    transition: color 0.1s, background 0.1s;
    padding: 0.25rem 0.5rem;
}

#header .nav-link:hover,
#header .nav-link-mobile:hover {
    background: var(--accent-yellow);
    color: var(--text-primary) !important;
}

#header .nav-link.text-accent {
    background: var(--accent-red);
    color: white !important;
}

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS (Minimal Brutal)
   ═══════════════════════════════════════════════════════════ */

/* No float animation — too soft for brutalism */
.animate-float,
.animate-float-delayed {
    animation: none;
}

/* Brutal bounce — snappy */
@keyframes brutal-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.brutal-bounce {
    animation: brutal-bounce 0.6s ease-in-out infinite;
}

/* Brutal shake */
@keyframes brutal-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.brutal-shake:hover {
    animation: brutal-shake 0.3s ease;
}

/* Glitch text effect */
@keyframes brutal-glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

.brutal-glitch:hover {
    animation: brutal-glitch 0.3s ease;
}

/* AOS Fallback */
/* AOS Fallback (Placeholder for potential future needs) */

html:not(.js-ready) [data-aos] {
    opacity: 1 !important;
    transform: none !important;
}

#hero [data-aos],
section:first-of-type [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

/* ═══════════════════════════════════════════════════════════
   MOBILE OVERRIDES
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    :root {
        --shadow-offset: 4px;
        --shadow-hard: 4px 4px 0px #111111;
        --shadow-hard-hover: 6px 6px 0px #111111;
        --border-width: 2px;
    }

    .brutal-heading {
        font-size: 2rem !important;
    }

    #header nav {
        background: var(--bg-primary) !important;
    }

    #header {
        padding-top: max(1.5rem, env(safe-area-inset-top)) !important;
        margin-top: env(safe-area-inset-top) !important;
    }

    #mobile-menu .glass-panel,
    #header .glass-panel {
        background: var(--bg-primary) !important;
        border: var(--border-width) solid var(--border-color) !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   UTILITY OVERRIDES
   ═══════════════════════════════════════════════════════════ */

/* Remove all rounded corners globally (Tailwind override) */
.rounded-full { border-radius: 0 !important; }
.rounded-3xl { border-radius: 0 !important; }
.rounded-2xl { border-radius: 0 !important; }
.rounded-xl { border-radius: 0 !important; }
.rounded-lg { border-radius: 0 !important; }
.rounded-md { border-radius: 0 !important; }
.rounded-sm { border-radius: 0 !important; }
.rounded { border-radius: 0 !important; }
.rounded-t-sm { border-radius: 0 !important; }
.rounded-b-lg { border-radius: 0 !important; }
.rounded-bl-full { border-radius: 0 !important; }

/* Remove all blurs */
[class*="blur-"],
[class*="backdrop-blur-"] {
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Remove soft shadows */
.shadow-lg, .shadow-xl, .shadow-2xl {
    box-shadow: var(--shadow-hard) !important;
}

/* Override gradient text to solid */
.text-transparent {
    color: var(--accent-red) !important;
    -webkit-text-fill-color: var(--accent-red) !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
}

/* Drop shadow overrides */
[class*="drop-shadow-"] {
    filter: none !important;
}

/* ═══════════════════════════════════════════════════════════
   WILL-CHANGE REMOVAL (No 3D transforms needed)
   ═══════════════════════════════════════════════════════════ */

.will-change-transform {
    will-change: auto;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER — Force dark background
   ═══════════════════════════════════════════════════════════ */

#footer {
    background-color: var(--bg-dark) !important;
    color: white !important;
    border-top: var(--border-width) solid var(--border-color) !important;
}

/* Ensure project images still look good */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 2;
}

/* ═══════════════════════════════════════════════════════════
   TYPEWRITER EFFECT
   ═══════════════════════════════════════════════════════════ */

@keyframes typewriter-blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

.typewriter-cursor {
    margin-right: 4px;
    font-weight: 700;
    animation: typewriter-blink 0.7s infinite;
}

[dir="rtl"] .typewriter-cursor {
    margin-right: -4px;
    margin-left: 4px;
}

/* ═══════════════════════════════════════════════════════════
   NATIVE MOBILE FALLBACKS (Bypasses CDN blockages)
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
    .hide-on-mobile {
        display: none !important;
    }
}