/* ---------- Base ---------- */
:root {
    --brand: #8e1c3e;
    --brand-dark: #7a1839;
    --brand-deep: #3d0a1a;
    --accent: #f4951c;
    --accent-dark: #e0821b;
    --ink: #585a5b;
}

body.loading { overflow: hidden; }

::selection { background: var(--accent); color: #fff; }

.text-gradient {
    background: linear-gradient(90deg, #f9c27a, var(--accent), #f7ab4a);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 4s linear infinite;
}

/* ---------- Preloader ---------- */
.preloader-logo { animation: fadeUp .8s ease both; }
.preloader-bar { width: 0; animation: load 1.2s ease forwards; }
#preloader.done { opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s; }

/* ---------- Header ---------- */
.nav-link {
    position: relative;
    display: block;
    padding: .5rem 1rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    color: rgba(255, 255, 255, .85);
    transition: color .3s;
}
.nav-link::after {
    content: '';
    position: absolute;
    left: 1rem; right: 1rem; bottom: .2rem;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .35s ease;
}
.nav-link:hover, .nav-link.active { color: #fff; }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); transform-origin: left; }
.menu-btn { color: #fff; }

#header.scrolled {
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px -15px rgba(61, 10, 26, .25);
}
#header.scrolled nav { height: 4.5rem; }
#header.scrolled .nav-link { color: #1f1f22; }
#header.scrolled .nav-link:hover, #header.scrolled .nav-link.active { color: var(--brand); }
#header.scrolled .logo-light { display: none; }
#header.scrolled .logo-dark { display: block; }
#header.scrolled .menu-btn { color: var(--brand); }
#header nav { transition: height .4s ease; }

#menu-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
#menu-toggle.open span:nth-child(2) { opacity: 0; }
#menu-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero-slide {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.15);
    transition: opacity 1.6s ease, transform 7s ease-out;
}
.hero-slide.active { opacity: 1; transform: scale(1); }

.hero-grid {
    background-image:
        linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at 30% 50%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 30% 50%, #000 30%, transparent 75%);
}

.blob {
    position: absolute;
    border-radius: 9999px;
    filter: blur(80px);
    pointer-events: none;
}
.blob-1 { width: 28rem; height: 28rem; background: rgba(244, 149, 28, .35); top: -8rem; right: 10%; animation: blob 14s ease-in-out infinite; }
.blob-2 { width: 22rem; height: 22rem; background: rgba(168, 40, 79, .55); bottom: -6rem; left: -4rem; animation: blob 18s ease-in-out infinite reverse; }
.blob-3 { width: 34rem; height: 34rem; background: rgba(244, 149, 28, .18); top: 20%; right: -10rem; animation: blob 20s ease-in-out infinite; }

.hero-title .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(60px) rotate(4deg);
    filter: blur(8px);
}
.hero-ready .hero-title .word {
    animation: wordIn .9s cubic-bezier(.2, .8, .2, 1) forwards;
}
.hero-badge, .hero-sub, .hero-cta, .hero-tags { opacity: 0; }
.hero-ready .hero-badge { animation: fadeUp .8s .1s ease forwards; }
.hero-ready .hero-sub   { animation: fadeUp .8s .9s ease forwards; }
.hero-ready .hero-cta   { animation: fadeUp .8s 1.1s ease forwards; }
.hero-ready .hero-tags  { animation: fadeUp .8s 1.3s ease forwards; }

.tag {
    padding: .35rem .9rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .06);
}

.typed-cursor { animation: blink 1s step-end infinite; margin-left: 1px; }

.hero-dot {
    width: 12px; height: 12px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, .35);
    transition: all .4s ease;
}
.hero-dot.active { width: 36px; background: var(--accent); }

.mouse-wheel {
    position: absolute;
    left: 50%; top: 8px;
    width: 4px; height: 8px;
    margin-left: -2px;
    border-radius: 2px;
    background: currentColor;
    animation: wheel 1.8s ease-in-out infinite;
}

/* ---------- Marquee ---------- */
.marquee { animation: marquee 40s linear infinite; width: max-content; }
.marquee:hover { animation-play-state: paused; }
.spin-slow { animation: spin 12s linear infinite; }

/* ---------- Section headings ---------- */
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: .85rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--brand);
}
.section-kicker::before {
    content: '';
    width: 28px; height: 2px;
    background: var(--accent);
}
.section-title {
    margin-top: 1rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    letter-spacing: -.02em;
    color: #1f1f22;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .9s cubic-bezier(.2, .8, .2, 1), transform .9s cubic-bezier(.2, .8, .2, 1);
}
.reveal[data-reveal="left"]  { transform: translateX(-60px); }
.reveal[data-reveal="right"] { transform: translateX(60px); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- About ---------- */
.vm-card {
    padding: 1.75rem;
    border-radius: 1.5rem;
    background: #fff;
    border: 1px solid #f1f1f3;
    box-shadow: 0 20px 40px -25px rgba(61, 10, 26, .25);
    transition: transform .4s ease, box-shadow .4s ease;
}
.vm-card:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -25px rgba(142, 28, 62, .4); }
.vm-icon {
    width: 3.25rem; height: 3.25rem;
    border-radius: 1rem;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.25rem;
}
.float-y { animation: floatY 6s ease-in-out infinite; }
.float-y-delay { animation: floatY 6s 1.5s ease-in-out infinite; }

/* ---------- Services ---------- */
.service-card {
    position: relative;
    border-radius: 1.75rem;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 25px 50px -30px rgba(61, 10, 26, .35);
    transition: box-shadow .5s ease, transform .2s ease-out;
    transform-style: preserve-3d;
    will-change: transform;
}
.service-card:hover { box-shadow: 0 40px 70px -30px rgba(142, 28, 62, .5); }
.service-card::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .5s ease;
}
.service-card:hover::after { transform: scaleX(1); }
.service-icon {
    position: absolute;
    left: 1.75rem; bottom: -1.75rem;
    width: 3.5rem; height: 3.5rem;
    border-radius: 1rem;
    background: var(--accent);
    color: #fff;
    font-size: 1.4rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 25px -8px rgba(244, 149, 28, .7);
    transition: transform .5s ease, background .3s;
    z-index: 2;
}
.service-card:hover .service-icon { transform: rotate(-8deg) scale(1.08); background: var(--brand); }

.service-card-feature {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
    min-height: 100%;
}
.service-card-feature::before {
    content: '';
    position: absolute;
    width: 18rem; height: 18rem;
    right: -6rem; top: -6rem;
    border-radius: 9999px;
    background: radial-gradient(circle, rgba(244, 149, 28, .45), transparent 70%);
    animation: blob 12s ease-in-out infinite;
}

/* ---------- Sectors ---------- */
.sector-card {
    display: flex; flex-direction: column; align-items: center; gap: .75rem;
    padding: 1.75rem 1rem;
    border-radius: 1.25rem;
    border: 1px solid #ececef;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: #1f1f22;
    transition: all .4s ease;
}
.sector-card i { font-size: 1.9rem; color: var(--brand); transition: transform .4s ease, color .4s; }
.sector-card:hover { background: var(--brand); color: #fff; border-color: var(--brand); transform: translateY(-6px); box-shadow: 0 20px 40px -20px rgba(142, 28, 62, .7); }
.sector-card:hover i { color: var(--accent); transform: scale(1.2) rotate(-6deg); }

/* ---------- Values ---------- */
.value-card {
    position: relative;
    padding: 2rem;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .1);
    backdrop-filter: blur(6px);
    overflow: hidden;
    transition: transform .4s ease, background .4s ease, border-color .4s;
}
.value-card::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(244, 149, 28, .18), transparent 40%);
    opacity: 0;
    transition: opacity .4s;
}
.value-card:hover { transform: translateY(-6px); border-color: rgba(244, 149, 28, .5); }
.value-card:hover::before { opacity: 1; }
.value-icon {
    width: 3.5rem; height: 3.5rem;
    border-radius: 1rem;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    color: var(--accent);
    background: rgba(244, 149, 28, .12);
    transition: all .4s ease;
}
.value-card:hover .value-icon { background: var(--accent); color: #fff; transform: rotateY(180deg); }

/* ---------- Why ---------- */
.why-item {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid #f0f0f2;
    cursor: default;
    transition: all .35s ease;
}
.why-item:hover { border-color: var(--brand); box-shadow: 0 15px 30px -20px rgba(142, 28, 62, .6); transform: translateX(8px); }
.why-item:hover i { opacity: 1; transform: none; }
.why-num {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: .9rem;
    width: 2.5rem; height: 2.5rem;
    border-radius: .75rem;
    display: flex; align-items: center; justify-content: center;
    background: #fbf2f5;
    color: var(--brand);
    transition: all .35s;
}
.why-item:hover .why-num { background: var(--brand); color: #fff; }

.pulse-ring { position: relative; }
.pulse-ring::after, .pulse-ring-green::after {
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit;
    animation: ring 2s ease-out infinite;
}
.pulse-ring::after { color: rgba(244, 149, 28, .7); }
.pulse-ring-green::after { color: rgba(37, 211, 102, .6); }

/* ---------- Contact ---------- */
.contact-card {
    display: flex; align-items: center; gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 15px 35px -25px rgba(61, 10, 26, .35);
    transition: all .35s ease;
}
.contact-card:hover { transform: translateY(-4px); box-shadow: 0 25px 45px -25px rgba(142, 28, 62, .5); }
.contact-icon {
    width: 3.25rem; height: 3.25rem; flex-shrink: 0;
    border-radius: 1rem;
    display: flex; align-items: center; justify-content: center;
    background: #fbf2f5; color: var(--brand);
    font-size: 1.2rem;
    transition: all .35s;
}
.contact-card:hover .contact-icon { background: var(--brand); color: #fff; }

.map-frame { filter: grayscale(.3) contrast(1.05); }

.field { position: relative; }
.field input, .field textarea, .field select {
    width: 100%;
    padding: 1.5rem 1rem .6rem;
    border-radius: 1rem;
    border: 1.5px solid #e6e6ea;
    background: #fafafb;
    font-size: 1rem;
    outline: none;
    transition: border-color .3s, background .3s, box-shadow .3s;
    appearance: none;
}
.field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238e1c3e' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}
.field textarea { resize: vertical; }
.field label {
    position: absolute;
    left: 1rem; top: 1.05rem;
    color: #8a8c90;
    pointer-events: none;
    transition: all .25s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(142, 28, 62, .1);
}
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
    top: .45rem;
    font-size: .75rem;
    color: var(--brand);
}
.field.invalid input, .field.invalid textarea { border-color: #dc2626; animation: shake .4s; }

/* ---------- Buttons ---------- */
.btn-shine { position: relative; overflow: hidden; }
.btn-shine::before {
    content: '';
    position: absolute; top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .45), transparent);
    transform: skewX(-20deg);
}
.btn-shine:hover::before { animation: shine .8s ease; }

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

/* ---------- Keyframes ---------- */
@keyframes load { to { width: 100%; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes wordIn { to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes shimmer { to { background-position: 200% center; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes wheel { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(16px); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes blob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.1); }
    66% { transform: translate(-30px, 20px) scale(.95); }
}
@keyframes ring { 0% { box-shadow: 0 0 0 0 currentColor; opacity: 1; } 100% { box-shadow: 0 0 0 18px rgba(0, 0, 0, 0); opacity: 0; } }
@keyframes shine { to { left: 125%; } }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

@media (max-width: 1023px) {
    .bg-fixed { background-attachment: scroll; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .reveal, .hero-title .word, .hero-badge, .hero-sub, .hero-cta, .hero-tags { opacity: 1 !important; transform: none !important; filter: none !important; }
}
