:root {
    --sand-light: #FDF5E6;
    --sand-peach: #E9C4A6;
    --sand-warm: #D4A373;
    --sand-dark: #8B6B43;
    --deep-night: #0B0D0F;
    --dune-shadow: #141210;
    --uae-red: #CE1126;
    --uae-green: #007A3D;
    --uae-black: #000000;
    --text-muted: #A89F91;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--deep-night);
    color: var(--sand-light);
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
    line-height: 1.8;
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    opacity: 0.08;
    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='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

h1, h2, h3, .calligraphy-font {
    font-family: 'Amiri', serif;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.sand-text {
    background: linear-gradient(135deg, #FFDAB9 0%, #E9C4A6 50%, #D4A373 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% auto;
}

header {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center, #1c1814 0%, #0B0D0F 100%);
}

.hero-calligraphy-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    opacity: 0.02;
    pointer-events: none;
    filter: blur(2px);
}

.hero-content {
    z-index: 10;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeIn 2s ease forwards 0.5s;
}

.hero-title {
    font-size: clamp(5rem, 18vw, 14rem);
    line-height: 0.8;
    margin-bottom: 0.5rem;
    color: var(--sand-peach);
}

.hero-subtitle {
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-style: italic;
    opacity: 0.9;
    color: var(--sand-warm);
}

.hero-arabic {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-top: 2rem;
    display: block;
    color: var(--sand-peach);
}

section {
    padding: 10rem 2rem;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 6rem;
    text-align: center;
}

.section-header h2 {
    font-size: clamp(3rem, 7vw, 5rem);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 10 Q25 0 50 10 T100 10' stroke='%23E9C4A6' fill='none' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}


.patrol-image {
    width: 820px;             
    height: auto;
    opacity: 0.95;
    transform: rotate(-3deg);
    filter: sepia(20%) contrast(1.05);
    padding: 6px;

    position: absolute;
    left: -80px;
    top: 40px;
    
    animation: patrolFloat 6s ease-in-out infinite;

    z-index: -1;               
    pointer-events: none;   
}

@keyframes patrolFloat {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-15px) rotate(-2deg); }
}

.land-image {
    width: 580px;             
    height: auto;
    opacity: 0.9;
    transform: rotate(2deg);
    filter: sepia(25%) contrast(1.1);
    padding: 6px;

    position: absolute;
    right: -120px;
    top: 500px;
    
    animation: landFloat 5s ease-in-out infinite;

    z-index: 4;               
    pointer-events: none;   
}

@keyframes landFloat {
    0%, 100% { transform: translateY(0) rotate(2deg); }
    50% { transform: translateY(-12px) rotate(3deg); }
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
}

.calligraphy-card {
    background: rgba(233, 196, 166, 0.02);
    border: 1px solid rgba(233, 196, 166, 0.1);
    padding: 3.5rem 2.5rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-radius: 4px;
}

.calligraphy-card::before {
    content: '❁';
    position: absolute;
    top: 15px;
    right: 15px;
    color: var(--sand-peach);
    opacity: 0.3;
    font-size: 1.5rem;
}

.calligraphy-card:hover {
    background: rgba(233, 196, 166, 0.05);
    border-color: var(--sand-peach);
    transform: translateY(-12px);
}

.calligraphy-card h3 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--sand-peach);
}

.icon-accent {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--sand-warm);
    display: block;
    opacity: 0.8;
}

.timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.timeline-item {
    padding: 3rem 0;
    border-bottom: 1px solid rgba(233, 196, 166, 0.1);
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.timeline-year {
    font-family: 'Amiri', serif;
    font-size: 2.5rem;
    color: var(--sand-peach);
    min-width: 180px;
    line-height: 1;
}

.timeline-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* --- ANIMATED ROAD --- */
.road-section {
    background: #050505;
    padding: 12rem 2rem;
    text-align: center;
}

.ink-path-container {
    height: 150px;
    max-width: 800px;
    margin: 4rem auto;
    position: relative;
}

.ink-path {
    width: 100%;
    height: 100%;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawInk 10s linear infinite;
    stroke: var(--sand-peach);
    fill: none;
    stroke-width: 1.5;
    opacity: 0.6;
}

@keyframes drawInk {
    0% { stroke-dashoffset: 1000; }
    50% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -1000; }
}

.flag-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(to top, #000, #0B0D0F);
}

.ornament-divider {
    font-size: 2rem;
    color: var(--sand-warm);
    margin: 2rem 0;
    opacity: 0.5;
}

@keyframes heroFadeIn {
    to { opacity: 1; transform: translateY(0); }
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .timeline-item { flex-direction: column; gap: 1rem; }
    .hero-title { font-size: 4rem; }
    section { padding: 6rem 1.5rem; }
}
