/* ==========================================================================
   ROYALS MARKETING FZ - MODERN SAAS REDESIGN (WHITE + RED ACCENT)
   ========================================================================== */

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

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f5f5f7;
    --bg-card: #ffffff;
    --bg-card-hover: #fafafa;
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(220, 38, 38, 0.3);
    --text-primary: #0a0a0a;
    --text-secondary: #525252;
    --text-muted: #a3a3a3;
    --accent: #dc2626;
    --accent-dark: #b91c1c;
    --accent-light: #ef4444;
    --accent-soft: #fef2f2;
    --gradient-1: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    --gradient-soft: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.08);
    --shadow-red: 0 12px 32px rgba(220, 38, 38, 0.25);
    --radius: 16px;
    --radius-sm: 10px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle background grid */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 10%, rgba(220, 38, 38, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 85% 90%, rgba(220, 38, 38, 0.04) 0%, transparent 40%);
    z-index: 0;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
    pointer-events: none;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 80%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   HEADER / NAV
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    text-decoration: none;
}

.logo img {
    height: 28px;
    width: auto;
    image-rendering: -webkit-optimize-contrast;
}

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border);
    padding: 6px;
    border-radius: 100px;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav a:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.cta-btn {
    background: var(--gradient-1);
    color: white !important;
    padding: 10px 22px !important;
    border-radius: 100px;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    box-shadow: var(--shadow-red);
}

.cta-btn:hover {
    background: var(--gradient-1) !important;
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(220, 38, 38, 0.4);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 140px 0 80px;
    overflow: hidden;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.8s ease;
    box-shadow: var(--shadow-sm);
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accent);
    animation: pulse 2s infinite;
}

.hero h1 {
    font-size: clamp(48px, 7vw, 88px);
    line-height: 1.02;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease 0.1s backwards;
    color: var(--text-primary);
}

.hero h1 .gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    font-style: italic;
    padding-right: 0.15em;
    margin-right: -0.05em;
}

.hero-sub {
    font-size: clamp(16px, 1.5vw, 19px);
    color: var(--text-secondary);
    max-width: 620px;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.3s backwards;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: var(--shadow-red);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 48px rgba(220, 38, 38, 0.4);
    color: white;
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: rgba(0, 0, 0, 0.15);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.stat .stat-num {
    font-size: 38px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1;
}

.stat .stat-num .red {
    color: var(--accent);
}

.stat .stat-label {
    color: var(--text-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 8px;
    font-weight: 500;
}

/* Floating orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.35;
    pointer-events: none;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--accent);
    top: 5%;
    right: -150px;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: #fca5a5;
    bottom: 0%;
    left: -100px;
    animation-delay: -10s;
    opacity: 0.5;
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */
section {
    padding: 120px 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 72px;
}

.section-tag {
    display: inline-block;
    background: var(--accent-soft);
    color: var(--accent-dark);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    border: 1px solid rgba(220, 38, 38, 0.15);
}

.section-header h2 {
    font-size: clamp(36px, 4.5vw, 56px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.section-header h2 .gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-style: italic;
    display: inline-block;
    padding-right: 0.15em;
    margin-right: -0.05em;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 18px;
}

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-text p {
    color: var(--text-secondary);
    font-size: 17px;
    margin-bottom: 24px;
    line-height: 1.7;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.about-feature::before {
    content: '✓';
    width: 24px;
    height: 24px;
    background: var(--gradient-1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.about-visual {
    position: relative;
    height: 540px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(220, 38, 38, 0.15) 100%);
}

.about-visual-tag {
    position: absolute;
    bottom: 24px;
    left: 24px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 16px 20px;
    border-radius: 16px;
    z-index: 2;
    box-shadow: var(--shadow-md);
}

.about-visual-tag .label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.about-visual-tag .value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ==========================================================================
   SERVICES / CARDS
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

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

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
}

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

.service-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--gradient-soft);
    border: 1px solid rgba(220, 38, 38, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--accent);
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--gradient-1);
    color: white;
    border-color: transparent;
    transform: scale(1.05);
}

.service-card h3 {
    font-size: 21px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    font-size: 14.5px;
    line-height: 1.6;
}

/* ==========================================================================
   LOCATIONS
   ========================================================================== */
.locations {
    padding: 80px 0 40px;
}

.locations-label {
    text-align: center;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 28px;
    font-weight: 600;
}

.locations-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
    background: white;
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 18px 12px;
    box-shadow: var(--shadow-md);
    max-width: fit-content;
    margin: 0 auto;
}

.location-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 28px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.location-item:not(:last-child) {
    border-right: 1px solid var(--border);
}

.location-item .pin {
    color: var(--accent);
    font-size: 14px;
}

/* ==========================================================================
   PORTFOLIO / MARQUEE
   ========================================================================== */
.portfolio {
    padding: 100px 0;
    overflow: hidden;
}

.marquee {
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: flex;
    gap: 20px;
    animation: marquee 50s linear infinite;
    width: max-content;
}

.marquee-item {
    width: 280px;
    height: 360px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
    flex-shrink: 0;
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-sm);
    background: var(--bg-tertiary);
}

.marquee-item:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
}

.marquee-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

/* ==========================================================================
   WHY US
   ========================================================================== */
.why-us {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.why-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    text-align: left;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.why-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.why-number {
    font-size: 13px;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 20px;
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
    letter-spacing: 0.05em;
}

.why-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.why-card p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact {
    padding: 120px 0;
}

.contact-wrap {
    max-width: 720px;
    margin: 0 auto;
    background: white;
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 64px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.contact-wrap::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.contact-form {
    display: grid;
    gap: 16px;
    position: relative;
}

.contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 14px 18px;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 15px;
    transition: all 0.2s ease;
    outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent);
    background: white;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-muted);
}

.contact-form textarea {
    resize: vertical;
    min-height: 140px;
}

.contact-form button {
    background: var(--gradient-1);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-red);
}

.contact-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 48px rgba(220, 38, 38, 0.4);
}

#sendmessage, #errormessage {
    display: none;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
}

#sendmessage {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

#errormessage {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

#sendmessage.show, #errormessage.show {
    display: block;
}

.contact-email {
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-secondary);
    font-size: 15px;
}

.contact-email a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 1px;
    transition: color 0.2s ease;
}

.contact-email a:hover {
    color: var(--accent);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    border-top: 1px solid var(--border);
    padding: 60px 0 30px;
    background: var(--bg-secondary);
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 22px;
    margin-bottom: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    max-width: 360px;
}

.footer-col h4 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 10px;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 13px;
}

.footer-cities {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 13px;
    align-items: center;
}

.footer-cities span:not(:last-child)::after {
    content: '·';
    margin-left: 20px;
    color: var(--text-muted);
}

/* ==========================================================================
   BACK TO TOP
   ========================================================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 46px;
    height: 46px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    box-shadow: var(--shadow-red);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 50;
}

.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    transform: translateY(-3px);
    color: white;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
    }
    33% {
        transform: translate(40px, -40px);
    }
    66% {
        transform: translate(-30px, 30px);
    }
}

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

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    .services-grid, .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .about-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    .about-visual {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    .hero h1 .gradient-text,
    .section-header h2 .gradient-text {
        padding-right: 0.25em;
        margin-right: -0.1em;
    }

    .nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 16px;
        right: 16px;
        flex-direction: column;
        padding: 16px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        gap: 4px;
        box-shadow: var(--shadow-lg);
    }

    .nav.open {
        display: flex;
    }

    .nav a {
        width: 100%;
        text-align: center;
    }

    section {
        padding: 80px 0;
    }

    .hero {
        padding: 120px 0 60px;
    }

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

    .services-grid, .why-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .contact-wrap {
        padding: 32px 24px;
    }

    .contact-row {
        grid-template-columns: 1fr;
    }

    .locations-bar {
        padding: 16px 20px;
        flex-direction: column;
        gap: 12px;
        border-radius: 20px;
    }

    .location-item {
        padding: 4px 0;
        border-right: none !important;
    }

    .marquee-item {
        width: 220px;
        height: 280px;
    }
}

/* Splide overrides */
.splide__slide img {
    border-radius: 16px;
}
