/* ============================================
   AvaluAI — Design System
   Minimalistic High-Contrast Aesthetics
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #ffffff;
    color: #212121;
    font-family: 'Inter', 'Plus Jakarta Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

::selection {
    background: #09090b;
    color: #ffffff;
}

/* --- Capa de fondo: vectores inmobiliarios + legales (sutil) --- */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        radial-gradient(ellipse 80% 55% at 50% -10%, rgba(22, 39, 80, 0.05), transparent 60%),
        radial-gradient(ellipse 70% 50% at 100% 100%, rgba(201, 171, 99, 0.06), transparent 60%),
        url('bg-pattern.svg');
    background-repeat: no-repeat, no-repeat, repeat;
    background-position: center top, right bottom, center top;
    background-size: auto, auto, 520px 520px;
}

/* --- Clean Panels (formerly glassmorphism) --- */
.glass-panel, .glass-panel-static {
    background: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 12px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
    .glass-panel:hover {
        border-color: #d4d4d8;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
        transform: translateY(-2px);
    }
}

/* --- Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    background: #C9AB63;
    color: #ffffff;
    font-family: 'Inter', 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn-primary:hover {
    background: #b69752;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    background: #ffffff;
    color: #09090b;
    font-family: 'Inter', 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    border: 1px solid #e4e4e7;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: #f4f4f5;
}

.btn-secondary:active {
    transform: scale(0.98);
}

/* --- Navbar --- */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    max-width: none;
    z-index: 50;
    background: #162750;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .site-nav {
        top: 1.5rem;
        left: 50%;
        transform: translateX(-50%);
        width: 95%;
        max-width: 1200px;
        background: #162750;
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 9999px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }
}

.site-nav.scrolled {
    background: #162750;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    height: 72px;
}

@media (min-width: 768px) {
    .nav-container {
        padding: 0 24px;
    }
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #ffffff;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.02em;
}

.nav-brand .material-symbols-outlined {
    font-size: 24px;
    color: #ffffff;
}

.nav-links {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-link {
    color: #ffffff;
    opacity: 0.7;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: #ffffff;
    opacity: 1;
}

.nav-link.active {
    color: #ffffff;
    font-weight: 600;
    opacity: 1;
}

.nav-cta {
    display: flex;
}

/* On mobile the CTA stays visible but compact, pushed to the
   right next to the hamburger toggle. */
@media (max-width: 767px) {
    .nav-cta {
        margin-left: auto;
        margin-right: 0.5rem;
    }

    .nav-cta .btn-primary {
        padding: 0.5rem 0.875rem !important;
        font-size: 12px !important;
        white-space: nowrap;
    }

    .nav-cta .btn-primary .material-symbols-outlined {
        display: none;
    }
}

.nav-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
}

@media (min-width: 768px) {
    .nav-mobile-toggle {
        display: none;
    }
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    z-index: 49;
    padding: 2rem 1.5rem;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu .nav-link {
    font-size: 16px;
    padding: 1rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #162750;
    border-bottom: 1px solid #f4f4f5;
}

.mobile-menu .btn-primary {
    margin-top: 1rem;
    width: 100%;
}

/* --- Footer --- */
.site-footer {
    background: #ffffff;
    border-top: 1px solid #e4e4e7;
    width: 100%;
    padding: 3rem 1.5rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .site-footer {
        padding: 4rem 24px;
    }

    .footer-container {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
        gap: 3rem;
    }
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-brand-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #09090b;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
}

.footer-brand-logo .material-symbols-outlined {
    font-size: 20px;
}

.footer-brand p {
    color: #71717a;
    font-size: 13px;
    line-height: 20px;
    max-width: 280px;
}

.footer-col h4 {
    color: #09090b;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-col a {
    display: block;
    color: #71717a;
    text-decoration: none;
    font-size: 13px;
    line-height: 24px;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: #09090b;
}

.footer-bottom {
    grid-column: 1 / -1;
    border-top: 1px solid #e4e4e7;
    padding-top: 1.5rem;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.footer-bottom span {
    color: #a1a1aa;
    font-size: 12px;
}

/* --- Scroll Animations --- */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .fade-up {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* --- Accordion (FAQ) --- */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    opacity: 0;
}

.accordion-item {
    border-bottom: 1px solid #e4e4e7;
}

.accordion-item.active .accordion-content {
    max-height: 500px;
    opacity: 1;
    padding-top: 12px;
    padding-bottom: 16px;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-icon {
    transition: transform 0.2s ease;
}

/* --- Section Utilities --- */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Alternating section tint for a clear vertical rhythm. Replaces the
   near-invisible bg-white/50 so a new section reads as intentional
   instead of an empty white gap between blocks. */
section.bg-white\/50 {
    background-color: #f7f7f8;
}

/* --- Glow Border Card (Converted to standard card) --- */
.glow-border {
    background: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

/* --- Editorial Text --- */
.editorial-text {
    font-weight: 400;
    color: #71717a;
}

/* --- Form Inputs --- */
.form-input {
    width: 100%;
    background: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 6px;
    padding: 0.625rem 0.875rem;
    font-family: 'Inter', 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    color: #09090b;
    transition: border-color 0.2s ease;
}

.form-input::placeholder {
    color: #a1a1aa;
}

.form-input:focus {
    outline: none;
    border-color: #09090b;
    box-shadow: 0 0 0 1px #09090b;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #09090b;
    margin-bottom: 0.375rem;
}

/* --- Step Number Badge --- */
.step-badge {
    width: 3rem;
    height: 3rem;
    border-radius: 8px;
    background: #f4f4f5;
    border: 1px solid #e4e4e7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: #09090b;
}

/* --- Hero badge pill --- */
.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: #f4f4f5;
    border: 1px solid #e4e4e7;
    color: #09090b;
    font-size: 12px;
    font-weight: 500;
}

/* --- Metrics Pill --- */
.metric-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    background: #f4f4f5;
    border: 1px solid #e4e4e7;
    color: #09090b;
    font-size: 12px;
    font-weight: 500;
}

/* --- Category filter pills (FAQ) --- */
.filter-pill {
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    font-family: 'Inter', 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #e4e4e7;
    background: #ffffff;
    color: #71717a;
    transition: all 0.2s ease;
}

.filter-pill:hover {
    color: #09090b;
    background: #f4f4f5;
}

.filter-pill.active {
    background: #09090b;
    color: #ffffff;
    border-color: #09090b;
}

/* --- Service number label --- */
.service-number {
    font-size: 1.5rem;
    font-weight: 400;
    color: #a1a1aa;
    line-height: 1;
}

/* ============================================
   Metodología — Timeline / "ruta" que se dibuja con el scroll
   ============================================ */
/* Móvil: la ruta corre como riel a la izquierda; el contenido se
   indenta para no cruzarse con la línea. */
.connecting-line {
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 1.5rem;
    width: 3px;
    background: #ececef;            /* riel tenue de fondo */
    border-radius: 999px;
    z-index: 0;
}

.connecting-line-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(to bottom, #C9AB63, #b69752);
    border-radius: 999px;
    box-shadow: 0 0 12px rgba(201, 171, 99, 0.45);
}

/* punto luminoso en la punta de la ruta */
.connecting-line-progress::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -5px;
    width: 13px;
    height: 13px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: #C9AB63;
    box-shadow: 0 0 0 4px rgba(201, 171, 99, 0.18), 0 0 16px rgba(201, 171, 99, 0.7);
}

@media (max-width: 767px) {
    .steps-timeline > .grid {
        padding-left: 3.25rem;
    }
}

/* Desktop: el riel recto se reemplaza por la ruta curva (SVG). */
@media (min-width: 768px) {
    .connecting-line {
        display: none;
    }
}

/* Ruta curva serpenteante (solo desktop) */
.timeline-svg {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: visible;
}

@media (min-width: 768px) {
    .timeline-svg {
        display: block;
    }
}

.timeline-track {
    stroke: #ececef;
    stroke-width: 3;
    stroke-linecap: round;
}

.timeline-progress {
    stroke: url(#timelineGrad);
    stroke-width: 3;
    stroke-linecap: round;
    filter: drop-shadow(0 0 6px rgba(201, 171, 99, 0.5));
}

@media (prefers-reduced-motion: reduce) {
    .timeline-progress {
        stroke-dashoffset: 0 !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .connecting-line-progress {
        height: 100% !important;
    }
    .connecting-line-progress::after {
        display: none;
    }
}

/* ============================================
   Servicios — tarjetas 3D interactivas (efecto WOW)
   ============================================ */
.service-card {
    transition: transform 0.2s ease-out,
                box-shadow 0.4s ease,
                border-color 0.4s ease;
    will-change: transform;
}

/* Spotlight dorado que sigue el cursor */
.service-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(440px circle at var(--mx, 50%) var(--my, 50%),
                rgba(201, 171, 99, 0.16), transparent 45%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.service-card.is-hover::before {
    opacity: 1;
}

/* Brillo diagonal que barre al entrar (una sola pasada) */
.service-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 55%;
    height: 100%;
    background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%);
    transform: translateX(-160%) skewX(-15deg);
    transition: none;
    pointer-events: none;
    z-index: 2;
}

.service-card.is-hover::after {
    transform: translateX(280%) skewX(-15deg);
    transition: transform 0.85s ease;
}

.service-card.is-hover {
    box-shadow: 0 30px 60px -15px rgba(22, 39, 80, 0.28),
                0 0 0 1px rgba(201, 171, 99, 0.35);
    border-color: rgba(201, 171, 99, 0.45);
}

@media (prefers-reduced-motion: reduce) {
    .service-card::after {
        display: none;
    }
}

/* --- Platform card --- */
.platform-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e4e4e7;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.platform-card:hover {
    border-color: #d4d4d8;
}

/* Utility to override bg colors */
.bg-primary\/10 {
    background-color: #f4f4f5 !important;
}

.border-primary\/20, .border-primary\/30 {
    border-color: #e4e4e7 !important;
}

.text-primary {
    color: #09090b !important;
}

/* --- Typographic Overrides --- */
h1, h2, h3, h4, h5, h6,
.text-display-lg,
.text-headline-lg,
.text-headline-md {
    color: #162750 !important;
}

.footer-brand-logo {
    color: #162750 !important;
}
