/* ============================================
   PRIMENEST BROKERS FZ-LLC — Modern Dark Theme
   Stack: Montserrat · Purple/Blue accents
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@200;300;400;500;600;700;800&family=JetBrains+Mono:wght@300;400&display=swap');

:root {
    /* Paleta dark moderna */
    --bg: #0a0a0f;                    /* negro profundo con tinte azul */
    --bg-secondary: #0f0f17;          /* negro secundario */
    --bg-elevated: #161622;           /* superficie elevada */
    --bg-card: #12121c;               /* cards */
    --surface: rgba(255, 255, 255, 0.03);
    --surface-hover: rgba(255, 255, 255, 0.06);

    /* Acentos púrpura/azul */
    --purple: #a78bfa;                /* púrpura principal */
    --purple-bright: #c4b5fd;         /* púrpura claro */
    --purple-deep: #7c3aed;            /* púrpura profundo */
    --blue: #60a5fa;                  /* azul */
    --blue-bright: #93c5fd;           /* azul claro */
    --indigo: #818cf8;                /* indigo */

    /* Gradientes */
    --gradient: linear-gradient(135deg, #a78bfa 0%, #60a5fa 100%);
    --gradient-soft: linear-gradient(135deg, rgba(167, 139, 250, 0.15) 0%, rgba(96, 165, 250, 0.15) 100%);
    --gradient-text: linear-gradient(135deg, #c4b5fd 0%, #93c5fd 100%);

    /* Texto */
    --text: #f1f1f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --text-dim: #52525b;

    /* Líneas */
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    --border-accent: rgba(167, 139, 250, 0.3);

    /* Tipografía */
    --font: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Espaciado */
    --container: 1280px;
    --gutter: clamp(1.5rem, 4vw, 3rem);

    /* Movimiento */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-weight: 300;
    line-height: 1.6;
    letter-spacing: 0.005em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background grid sutil */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(rgba(167, 139, 250, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(167, 139, 250, 0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

/* Background gradient orb */
body::after {
    content: '';
    position: fixed;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    filter: blur(40px);
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ============= Tipografía ============= */
h1, h2, h3, h4, h5 {
    font-family: var(--font);
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-weight: 600;
}

h1 {
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    font-weight: 700;
    letter-spacing: -0.035em;
}

h2 {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    font-weight: 600;
    letter-spacing: -0.03em;
}

h3 {
    font-size: clamp(1.3rem, 2.4vw, 1.75rem);
    font-weight: 600;
}

h4 {
    font-size: clamp(1.1rem, 1.8vw, 1.25rem);
    font-weight: 600;
}

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

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--purple);
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
}

.eyebrow::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--purple);
}

p { color: var(--text-secondary); max-width: 62ch; font-weight: 300; }
p.lead { font-size: 1.1rem; color: var(--text); font-weight: 300; line-height: 1.55; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
    position: relative;
    z-index: 2;
}

/* ============= Header / Nav ============= */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 1.25rem var(--gutter);
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid transparent;
    transition: all 0.4s var(--ease);
}

.site-header.scrolled {
    border-bottom-color: var(--border);
    padding: 0.85rem var(--gutter);
    background: rgba(10, 10, 15, 0.95);
}

/* Fallback: navegadores sin backdrop-filter usan background sólido */
@supports not (backdrop-filter: blur(1px)) {
    .site-header {
        background: rgba(10, 10, 15, 0.98);
    }
    .site-header.scrolled {
        background: rgba(10, 10, 15, 0.99);
    }
}

.nav-wrap {
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    color: var(--text);
    width: 130px;
    transition: opacity 0.3s var(--ease);
}
.brand:hover { opacity: 0.8; }

.nav-menu {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    align-items: center;
}

.nav-menu a {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-secondary);
    padding: 0.65rem 1.1rem;
    border-radius: 999px;
    position: relative;
    transition: all 0.3s var(--ease);
}

.nav-menu a:hover {
    color: var(--text);
    background: var(--surface);
}

.nav-menu a.active {
    color: var(--text);
    background: var(--surface);
}

.nav-cta {
    background: var(--gradient) !important;
    color: var(--bg) !important;
    font-weight: 500 !important;
    padding: 0.7rem 1.5rem !important;
}
.nav-cta:hover {
    background: var(--gradient) !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(167, 139, 250, 0.35);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 28px;
    height: 22px;
    position: relative;
}
.menu-toggle span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: var(--text);
    transition: all 0.3s var(--ease);
}
.menu-toggle span:nth-child(1) { top: 4px; }
.menu-toggle span:nth-child(2) { top: 50%; }
.menu-toggle span:nth-child(3) { bottom: 4px; }

@media (max-width: 900px) {
    .menu-toggle { display: block; z-index: 120; position: relative; }
    .nav-menu {
        position: fixed;
        top: 0; right: -100%;
        width: 80%; max-width: 360px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        justify-content: center;
        align-items: stretch;
        gap: 0.5rem;
        padding: 4rem 2rem;
        transition: right 0.5s var(--ease);
        border-left: 1px solid var(--border);
        z-index: 105;
    }
    .nav-menu.open { right: 0; }
    .nav-menu a { font-size: 1rem; padding: 1rem; }
    .menu-toggle.open span:nth-child(1) { top: 50%; transform: rotate(45deg); }
    .menu-toggle.open span:nth-child(2) { opacity: 0; }
    .menu-toggle.open span:nth-child(3) { top: 50%; transform: rotate(-45deg); }
}

/* ============= Botones ============= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.95rem 1.85rem;
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.4s var(--ease);
    border: 1px solid transparent;
    border-radius: 999px;
    background: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient);
    color: #0a0a0f;
    font-weight: 600;
}
.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #c4b5fd 0%, #93c5fd 100%);
    opacity: 0;
    transition: opacity 0.4s var(--ease);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(167, 139, 250, 0.4);
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary > * { position: relative; z-index: 1; }

.btn-ghost {
    color: var(--text);
    border-color: var(--border-strong);
    background: var(--surface);
}
.btn-ghost:hover {
    border-color: var(--purple);
    background: rgba(167, 139, 250, 0.1);
    color: var(--purple-bright);
}

.btn .arrow {
    width: 14px; height: 1.5px;
    background: currentColor;
    position: relative;
    transition: width 0.3s var(--ease);
}
.btn .arrow::after {
    content: '';
    position: absolute;
    right: 0; top: 50%;
    width: 6px; height: 6px;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    transform: translateY(-50%) rotate(45deg);
}
.btn:hover .arrow { width: 22px; }

/* ============= Hero ============= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 9rem var(--gutter) 5rem;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    max-width: var(--container);
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
}

/* Tag pill encima del título */
.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
}
.hero-tag .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--purple);
    box-shadow: 0 0 12px var(--purple);
    animation: pulse 2s ease-in-out infinite;
}

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

.hero h1 { margin-bottom: 1.75rem; }

.hero p.lead {
    font-size: 1.1rem;
    max-width: 56ch;
    color: var(--text-secondary);
}

.hero-meta {
    display: flex;
    gap: 3rem;
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border);
}
.hero-meta .stat .num {
    font-size: 2.4rem;
    color: var(--text);
    font-weight: 700;
    display: block;
    line-height: 1;
    letter-spacing: -0.02em;
}
.hero-meta .stat .num .plus,
.hero-meta .stat .num .symbol {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-meta .stat .label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-top: 0.6rem;
    display: block;
    font-weight: 400;
}

.hero-actions { margin-top: 2.5rem; display: flex; gap: 0.85rem; flex-wrap: wrap; }

/* Hero Visual — mesh + emblema */
.hero-visual {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Anillos giratorios */
.ring {
    position: absolute;
    border: 1px solid var(--border);
    border-radius: 50%;
}
.ring-1 { width: 100%; height: 100%; opacity: 0.5; }
.ring-2 { width: 78%; height: 78%; opacity: 0.4; border-color: var(--purple); border-style: dashed; }
.ring-3 { width: 58%; height: 58%; border-color: var(--blue); opacity: 0.5; }

/* Glow del emblema */
.hero-visual::before {
    content: '';
    position: absolute;
    width: 50%;
    height: 50%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.4) 0%, transparent 60%);
    filter: blur(40px);
    z-index: 0;
}

.hero-visual .emblem-wrap {
    width: 36%;
    color: var(--text);
    z-index: 2;
    position: relative;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.15), rgba(96, 165, 250, 0.15));
    border-radius: 24px;
    border: 1px solid var(--border-accent);
    backdrop-filter: blur(10px);
}

.orbit-dot {
    position: absolute;
    width: 10px; height: 10px;
    background: var(--gradient);
    border-radius: 50%;
    top: 50%; left: 50%;
    box-shadow: 0 0 20px var(--purple);
    z-index: 3;
}

/* ============= Sections ============= */
section { padding: 7rem 0; position: relative; }

.section-alt {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-head {
    max-width: 740px;
    margin-bottom: 4rem;
}
.section-head h2 { margin: 1.5rem 0 1.5rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }

/* ============= Trust bar ============= */
.trust-bar {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1.4rem 0;
    overflow: hidden;
    position: relative;
}
.trust-track {
    display: flex;
    gap: 4rem;
    animation: marquee 40s linear infinite;
    white-space: nowrap;
}
.trust-track span {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4rem;
    font-weight: 400;
}
.trust-track span::after {
    content: '◆';
    color: var(--purple);
    font-size: 0.55rem;
    opacity: 0.7;
}

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

/* ============= Services ============= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
@media (max-width: 768px) { .services-grid { grid-template-columns: 1fr; } }

.service-card {
    background: var(--bg-card);
    padding: 2.75rem 2.5rem;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: all 0.5s var(--ease);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--purple), transparent);
    transform: translateX(-100%);
    transition: transform 0.7s var(--ease);
}

.service-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-4px);
    background: var(--bg-elevated);
}
.service-card:hover::before { transform: translateX(100%); }

.service-card .num {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--purple);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.service-card h3 {
    margin: 1.25rem 0 1rem;
    transition: transform 0.5s var(--ease);
}

.service-card .icon {
    width: 52px; height: 52px;
    color: var(--purple-bright);
    margin-bottom: 1.5rem;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.4s var(--ease);
}

.service-card:hover .icon {
    background: var(--gradient-soft);
    border-color: var(--border-accent);
    color: var(--text);
}

.service-card .read-more {
    margin-top: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--purple-bright);
}
.service-card .read-more::after {
    content: '→';
    transition: transform 0.3s var(--ease);
}
.service-card:hover .read-more::after { transform: translateX(6px); }

/* ============= Process ============= */
.process-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
}
@media (max-width: 900px) { .process-wrap { grid-template-columns: 1fr; gap: 3rem; } }

.process-steps { position: relative; }
.process-steps::before {
    content: '';
    position: absolute;
    left: 28px; top: 28px; bottom: 28px;
    width: 1px;
    background: var(--border);
}
.process-steps::after {
    content: '';
    position: absolute;
    left: 28px; top: 28px;
    width: 1px;
    height: var(--progress, 0%);
    background: var(--gradient);
    transition: height 0.6s var(--ease);
    box-shadow: 0 0 16px var(--purple);
}

.step {
    display: flex;
    gap: 2rem;
    padding: 1.5rem 0;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.4s var(--ease);
}
.step.active { opacity: 1; }

.step-num {
    width: 56px; height: 56px;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 500;
    flex-shrink: 0;
    background: var(--bg-card);
    color: var(--text-secondary);
    transition: all 0.4s var(--ease);
    z-index: 2;
    position: relative;
}
.step.active .step-num {
    background: var(--gradient);
    border-color: transparent;
    color: var(--bg);
    box-shadow: 0 0 30px rgba(167, 139, 250, 0.5);
}

.step-content h4 { color: var(--text); margin-bottom: 0.5rem; }
.step-content p { color: var(--text-muted); font-size: 0.92rem; }
.step.active .step-content p { color: var(--text-secondary); }

.process-visual {
    position: sticky;
    top: 120px;
    aspect-ratio: 1;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    overflow: hidden;
}

@media (max-width: 900px) {
    .process-visual {
        position: relative;
        top: auto;
        padding: 2rem;
        max-width: 400px;
        margin: 0 auto;
    }
}

.process-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 30% 30%, rgba(167, 139, 250, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(96, 165, 250, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.process-illustration {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    z-index: 2;
}

.proc-shape {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
}
.proc-shape.active { opacity: 1; }
.proc-shape svg { width: 80%; height: 80%; }

/* ============= Stats / UAE cards ============= */
.uae-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
@media (max-width: 900px) { .uae-grid { grid-template-columns: 1fr; } }

.uae-card {
    padding: 2.5rem 2rem;
    border: 1px solid var(--border);
    background: var(--bg-card);
    border-radius: 20px;
    transition: all 0.4s var(--ease);
    position: relative;
    overflow: hidden;
}
.uae-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-soft);
    opacity: 0;
    transition: opacity 0.5s var(--ease);
    pointer-events: none;
}
.uae-card:hover::before { opacity: 1; }
.uae-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
}

.uae-card .big-num {
    font-size: 3.5rem;
    color: var(--text);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    position: relative;
    z-index: 2;
}
.uae-card .big-num .symbol {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.uae-card h4 { margin: 1.5rem 0 0.75rem; position: relative; z-index: 2; }
.uae-card p { position: relative; z-index: 2; }

/* ============= CTA Block ============= */
.cta-block {
    padding: 6rem var(--gutter);
    text-align: center;
    position: relative;
    overflow: hidden;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.cta-block::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.12) 0%, transparent 60%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    filter: blur(40px);
}

.cta-block h2 { max-width: 800px; margin: 1.5rem auto 2rem; }
.cta-block p { color: var(--text-secondary); margin: 0 auto 2.5rem; max-width: 540px; }

/* ============= Footer ============= */
.site-footer {
    background: var(--bg-secondary);
    color: var(--text);
    padding: 5rem var(--gutter) 2rem;
    border-top: 1px solid var(--border);
}
.footer-grid {
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }

.footer-brand { color: var(--text); width: 150px; margin-bottom: 1.5rem; }
.footer-grid p { color: var(--text-muted); font-size: 0.9rem; }
.footer-col h5 {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--purple);
    font-weight: 400;
    margin-bottom: 1.5rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.75rem; }
.footer-col a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.3s var(--ease);
}
.footer-col a:hover { color: var(--purple-bright); }

.footer-bottom {
    max-width: var(--container);
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* ============= Reveal animations ============= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }
.reveal.delay-4 { transition-delay: 0.4s; }
.reveal.delay-5 { transition-delay: 0.5s; }

/* Hero entry animations */
.hero-anim-1 { animation: heroFade 1.2s var(--ease-out) 0.2s both; }
.hero-anim-2 { animation: heroFade 1.2s var(--ease-out) 0.35s both; }
.hero-anim-3 { animation: heroFade 1.2s var(--ease-out) 0.5s both; }
.hero-anim-4 { animation: heroFade 1.2s var(--ease-out) 0.65s both; }
.hero-anim-5 { animation: heroFade 1.2s var(--ease-out) 0.8s both; }

@keyframes heroFade {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero rings rotation */
.ring-1 { animation: rotate 60s linear infinite; }
.ring-2 { animation: rotate 40s linear infinite reverse; }
.ring-3 { animation: rotate 25s linear infinite; }
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Emblem float */
.emblem-wrap { animation: emblemFloat 6s ease-in-out infinite; }
@keyframes emblemFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.03); }
}

/* ============= Subpages ============= */
.page-hero {
    padding: 12rem var(--gutter) 5rem;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 20%; right: -20%;
    width: 700px; height: 700px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.1) 0%, transparent 60%);
    pointer-events: none;
    filter: blur(40px);
}

.page-hero h1 { margin: 1.5rem 0 1.5rem; max-width: 16ch; }
.page-hero p.lead { max-width: 60ch; }

.breadcrumb {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.breadcrumb a:hover { color: var(--purple-bright); }
.breadcrumb .sep { margin: 0 0.75rem; opacity: 0.5; }

/* ============= Detail layout ============= */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 5rem;
    align-items: start;
}
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; gap: 3rem; } }

.detail-grid aside {
    position: sticky;
    top: 110px;
    padding: 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    border-top: 2px solid var(--purple);
}

@media (max-width: 900px) {
    .detail-grid aside {
        position: relative;
        top: auto;
        padding: 2rem;
    }
}
.detail-grid aside h4 { margin-bottom: 1rem; }
.detail-grid aside ul { list-style: none; margin-top: 1rem; }
.detail-grid aside li {
    padding: 0.85rem 0;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 400;
}
.detail-grid aside li:first-child { border-top: none; }
.detail-grid aside li span { color: var(--text-muted); font-size: 0.8rem; font-family: var(--font-mono); }

.detail-grid article h2 { margin: 2.5rem 0 1.25rem; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.detail-grid article h2:first-child { margin-top: 0; }
.detail-grid article p { margin-bottom: 1.25rem; max-width: none; }
.detail-grid article ul { padding-left: 1.5rem; margin: 1rem 0 1.5rem; list-style: none; }
.detail-grid article li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1rem;
}
.detail-grid article li::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 0.6rem;
    width: 6px; height: 6px;
    background: var(--gradient);
    border-radius: 50%;
}
.detail-grid article strong { color: var(--text); font-weight: 600; }
.detail-grid article em { color: var(--purple-bright); font-style: italic; }

.callout {
    margin: 2.5rem 0;
    padding: 2rem 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}
.callout::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-soft);
    opacity: 0.5;
}
.callout::after {
    content: '"';
    position: absolute;
    top: -1rem; left: 1rem;
    font-size: 5rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: var(--font);
    font-weight: 800;
    line-height: 1;
}
.callout p { color: var(--text); font-size: 1.1rem; max-width: none; padding-left: 2rem; position: relative; z-index: 2; font-weight: 400; }

/* ============= Contact ============= */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 3rem; } }

.contact-info { padding-top: 1rem; }
.contact-info dl { margin-top: 2rem; }
.contact-info dt {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--purple);
    margin-bottom: 0.5rem;
    margin-top: 1.75rem;
}
.contact-info dt:first-of-type { margin-top: 0; }
.contact-info dd { color: var(--text); font-size: 1rem; font-weight: 300; }
.contact-info dd a { color: var(--text); transition: color 0.3s var(--ease); }
.contact-info dd a:hover { color: var(--purple-bright); }

.contact-form {
    background: var(--bg-card);
    padding: 3rem;
    border: 1px solid var(--border);
    border-radius: 24px;
}
.form-row { margin-bottom: 1.75rem; }
.form-row label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}
.form-row input,
.form-row textarea,
.form-row select {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    font-family: var(--font);
    font-size: 0.95rem;
    color: var(--text);
    transition: all 0.3s var(--ease);
    font-weight: 300;
}
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15);
}
.form-row textarea { resize: vertical; min-height: 100px; font-family: var(--font); }
.form-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 600px) { .form-cols { grid-template-columns: 1fr; } }

/* Style select options */
.form-row select option { background: var(--bg); color: var(--text); }

/* ============= FAQ ============= */
.faq-list { max-width: 850px; margin: 0 auto; }
.faq-item {
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 0.85rem;
    overflow: hidden;
    transition: all 0.4s var(--ease);
    background: var(--bg-card);
}
.faq-item:hover { border-color: var(--border-strong); }
.faq-item.open { border-color: var(--border-accent); }

.faq-q {
    width: 100%;
    background: none;
    border: none;
    padding: 1.5rem 1.75rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    font-family: var(--font);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text);
    transition: color 0.3s var(--ease);
}
.faq-q:hover { color: var(--purple-bright); }

.faq-q .toggle {
    width: 22px; height: 22px;
    position: relative;
    flex-shrink: 0;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
}
.faq-q .toggle::before,
.faq-q .toggle::after {
    content: '';
    position: absolute;
    background: currentColor;
    transition: transform 0.3s var(--ease);
}
.faq-q .toggle::before {
    top: 50%; left: 25%;
    width: 50%; height: 1.5px;
    transform: translateY(-50%);
}
.faq-q .toggle::after {
    left: 50%; top: 25%;
    width: 1.5px; height: 50%;
    transform: translateX(-50%);
}
.faq-item.open .toggle::after { transform: translateX(-50%) scaleY(0); }
.faq-item.open .toggle { border-color: var(--purple); color: var(--purple); }

.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s var(--ease);
}
.faq-a-inner { padding: 0 1.75rem 1.5rem; }
.faq-a p { color: var(--text-secondary); }
.faq-item.open .faq-a { max-height: 400px; }

/* ============= Values grid ============= */
.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
@media (max-width: 768px) { .values-grid { grid-template-columns: repeat(2, 1fr); } }
.value-cell {
    background: var(--bg-card);
    padding: 2.5rem 1.75rem;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: all 0.4s var(--ease);
}
.value-cell:hover {
    border-color: var(--border-accent);
    transform: translateY(-3px);
}
.value-cell .icon-mini {
    width: 48px; height: 48px;
    margin: 0 auto 1.25rem;
    color: var(--purple-bright);
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.value-cell h5 {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.value-cell p { font-size: 0.85rem; margin: 0 auto; }

/* ============= Timeline ============= */
.timeline {
    position: relative;
    padding-left: 2.5rem;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--purple), transparent);
}
.timeline-item {
    position: relative;
    padding-bottom: 3rem;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.95rem;
    top: 8px;
    width: 12px; height: 12px;
    background: var(--bg);
    border: 2px solid var(--purple);
    border-radius: 50%;
    transition: all 0.4s var(--ease);
}
.timeline-item:hover::before {
    background: var(--purple);
    transform: scale(1.4);
    box-shadow: 0 0 20px var(--purple);
}
.timeline-item .year {
    font-family: var(--font-mono);
    color: var(--purple-bright);
    font-size: 0.85rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.timeline-item h4 { margin-bottom: 0.5rem; }

/* ============= Splash ============= */
.splash {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease);
}
.splash.hidden { opacity: 0; visibility: hidden; }
.splash-emblem {
    width: 56px;
    color: var(--text);
    animation: splashPulse 1.5s ease-in-out infinite;
}
@keyframes splashPulse {
    0%, 100% { opacity: 0.4; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.05); filter: drop-shadow(0 0 20px var(--purple)); }
}

/* ============= Selection ============= */
::selection {
    background: var(--purple);
    color: var(--bg);
}

/* ============= Scrollbar ============= */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

@media print {
    .site-header, .site-footer, .menu-toggle { display: none; }
    body { background: white; color: black; }
}

/* ============================================
   RESPONSIVE FIXES — Comprehensive
   Solves: sticky overlap, header padding,
   section padding, font scaling, spacing
   ============================================ */

/* Tablet & below (≤900px) */
@media (max-width: 900px) {
    section { padding: 4.5rem 0; }

    .hero {
        min-height: auto;
        padding: 8rem var(--gutter) 4rem;
    }

    .hero-meta {
        flex-wrap: wrap;
        gap: 2rem;
        margin-top: 2.5rem;
        padding-top: 2rem;
    }

    .hero-meta .stat .num { font-size: 2rem; }

    .hero-visual {
        max-width: 380px;
        margin: 0 auto;
    }

    .page-hero {
        padding: 9rem var(--gutter) 4rem;
    }

    .section-head { margin-bottom: 3rem; }

    .detail-grid article h2 {
        font-size: clamp(1.4rem, 5vw, 1.8rem);
    }

    .callout { padding: 1.5rem 1.75rem; }
    .callout p { padding-left: 1.5rem; font-size: 1rem; }

    .cta-block { padding: 4.5rem var(--gutter); }
}

/* Mobile (≤600px) */
@media (max-width: 600px) {
    :root { --gutter: 1.25rem; }

    section { padding: 3.5rem 0; }

    h1 { font-size: clamp(2rem, 9vw, 2.8rem); }
    h2 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
    h3 { font-size: 1.2rem; }

    p.lead { font-size: 1rem; }

    .hero {
        padding: 7rem var(--gutter) 3rem;
        min-height: auto;
    }

    .hero-tag {
        font-size: 0.72rem;
        padding: 0.4rem 0.85rem;
    }

    .hero-meta {
        gap: 1.5rem 2rem;
        margin-top: 2rem;
    }

    .hero-meta .stat .num { font-size: 1.7rem; }
    .hero-meta .stat .label { font-size: 0.65rem; }

    .hero-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-visual { max-width: 280px; }

    .page-hero {
        padding: 7.5rem var(--gutter) 3rem;
    }
    .page-hero h1 { max-width: none; }

    /* Cards más compactas en móvil */
    .service-card {
        padding: 2rem 1.5rem;
    }

    .uae-card {
        padding: 2rem 1.5rem;
    }

    .uae-card .big-num { font-size: 2.8rem; }

    .value-cell { padding: 2rem 1.25rem; }

    /* Detail grid: aside ocupa todo el ancho con mejor padding */
    .detail-grid {
        gap: 2rem;
    }
    .detail-grid aside {
        padding: 1.75rem 1.5rem;
    }
    .detail-grid aside ul { font-size: 0.85rem; }
    .detail-grid aside li {
        flex-direction: column;
        gap: 0.25rem;
        align-items: flex-start;
    }
    .detail-grid aside li span { font-size: 0.72rem; }

    .detail-grid article h2 {
        margin: 1.75rem 0 0.85rem;
    }

    /* Process steps más legibles */
    .step {
        gap: 1.25rem;
        padding: 1rem 0;
    }
    .step-num {
        width: 44px;
        height: 44px;
        font-size: 0.85rem;
    }
    .process-steps::before,
    .process-steps::after {
        left: 22px;
    }

    /* Process visual más pequeño en móvil */
    .process-visual {
        max-width: 320px;
        padding: 1.5rem;
    }

    /* Form fields full width */
    .contact-form {
        padding: 2rem 1.5rem;
    }

    /* FAQ */
    .faq-q {
        font-size: 0.95rem;
        padding: 1.25rem 1.25rem;
        gap: 1rem;
    }
    .faq-a-inner {
        padding: 0 1.25rem 1.25rem;
    }

    /* CTA */
    .cta-block {
        padding: 3.5rem var(--gutter);
    }

    /* Footer compacto */
    .site-footer {
        padding: 3.5rem var(--gutter) 2rem;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        margin-bottom: 3rem;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.75rem;
    }

    /* Trust bar más pequeña */
    .trust-track span {
        font-size: 0.7rem;
        gap: 2.5rem;
    }
    .trust-track { gap: 2.5rem; }

    /* Timeline ajustado */
    .timeline { padding-left: 2rem; }
    .timeline-item::before { left: -2.45rem; }

    /* Breadcrumb */
    .breadcrumb { font-size: 0.7rem; }

    /* Button ajuste */
    .btn {
        padding: 0.85rem 1.5rem;
        font-size: 0.82rem;
    }
}

/* Mobile pequeño (≤380px) */
@media (max-width: 380px) {
    h1 { font-size: 1.85rem; }
    h2 { font-size: 1.5rem; }

    .hero-meta { gap: 1.25rem 1.5rem; }
    .hero-meta .stat .num { font-size: 1.5rem; }

    .service-card,
    .uae-card,
    .value-cell {
        padding: 1.75rem 1.25rem;
    }

    .contact-form { padding: 1.5rem 1.25rem; }
}

/* Reducir motion para usuarios con preferencia */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .ring-1, .ring-2, .ring-3, .emblem-wrap, .orbit-dot, .trust-track {
        animation: none !important;
    }
}


/* ============================================
   PRIMENEST — additions for new branding
   ============================================ */

/* Brand width adjusted for the new wordmark (PRIMENEST · BROKERS · FZ-LLC) */
.brand { width: 165px; }
@media (max-width: 900px) { .brand { width: 145px; } }
@media (max-width: 380px) { .brand { width: 125px; } }

/* Footer brand */
.footer-brand { width: 175px; }
@media (max-width: 600px) { .footer-brand { width: 155px; } }

/* Footer grid: 5 columns on desktop (Navigate / Services / Contact / Legal + brand) */
.footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr 1.2fr !important;
    gap: 2.5rem !important;
}
@media (max-width: 1080px) {
    .footer-grid { grid-template-columns: 1fr 1fr 1fr !important; }
    .footer-grid > div:first-child { grid-column: 1 / -1; margin-bottom: 1rem; }
}
@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 2rem !important; }
}
@media (max-width: 540px) {
    .footer-grid { grid-template-columns: 1fr !important; gap: 2.25rem !important; }
    .footer-grid > div:first-child { margin-bottom: 0; }
}

/* Footer li copy uniform sizing */
.footer-col li {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}
.footer-col a { font-size: 0.88rem; }

/* License number — small distinctive badge */
.license-no {
    font-family: var(--font-mono);
    color: var(--purple-bright);
    font-size: 0.82rem;
    background: rgba(167, 139, 250, 0.08);
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(167, 139, 250, 0.2);
    user-select: all;
    margin-left: 0.25rem;
    display: inline-block;
}

/* Postal address tagline */
.footer-addr {
    color: var(--text-secondary) !important;
}

/* Contact page — license details */
.contact-info dd .lic-detail {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--purple-bright);
    margin-top: 0.35rem;
}

/* Footer legal stacking on mobile */
@media (max-width: 540px) {
    .footer-legal {
        padding-top: 1.5rem;
        border-top: 1px solid var(--border);
        margin-top: -0.5rem;
    }
}

/* Tighter header padding on very small screens to fit the wider logo */
@media (max-width: 420px) {
    .site-header { padding: 1rem var(--gutter); }
    .site-header.scrolled { padding: 0.7rem var(--gutter); }
}
