/* ==========================================================================
   TOKENS
   ========================================================================== */

:root {
    --bg: #FAFAF8;
    --bg-alt: #F1F0EC;
    --ink: #17181C;
    --muted: #6B6B66;
    --line: #E4E3DD;
    --accent: #10254c;
    /* azul del hero — marca, estructura */
    --accent-2: #f96b12;
    /* naranja del hero — estado activo / "estás aquí" */
    --white: #FFFFFF;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'IBM Plex Sans', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    --container: 1120px;
    --radius: 6px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img,
video {
    max-width: 100%;
    display: block;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.01em;
}

a {
    color: inherit;
    text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}


/* ==========================================================================
   UTILIDADES
   ========================================================================== */

.section-inner,
.header-inner,
.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.tag {
    font-family: var(--font-mono);
    font-size: 12.5px;
    letter-spacing: 0.06em;
    color: var(--accent-2);
    margin: 0 0 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--ink);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--accent);
}

.btn-outline {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}

.btn-outline:hover {
    border-color: var(--ink);
}

.btn-lg {
    padding: 15px 32px;
    font-size: 16px;
    margin-top: 28px;
}

.btn-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
}

.btn-icon svg {
    width: 100%;
    height: 100%;
}


/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 250, 248, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--accent);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.brand-logo {
    height: 72px;
    width: 190px;
    align-self: flex-start;
}

.nav-desktop {
    display: none;
    gap: 32px;
}

.nav-desktop a {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--accent);
    position: relative;
    padding: 4px 0;
    transition: color .15s ease;
}

.nav-desktop a:hover {
    color: var(--accent-2);
}

.nav-desktop a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: var(--accent-2);
    transition: width .2s ease;
}

.nav-desktop a:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}


/* Selector cliente/admin */

.mode-switch {
    display: none;
    border: 1px solid var(--accent);
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
}

.mode-btn {
    border: none;
    background: transparent;
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 0.03em;
    padding: 6px 14px;
    border-radius: 999px;
    color: var(--accent);
    cursor: pointer;
}

.mode-btn.is-active {
    background: var(--accent-2);
    color: var(--white);
}

.mode-switch--mobile {
    display: flex;
    margin-top: 20px;
    width: fit-content;
}


/* Botón hamburguesa */

.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle span {
    display: block;
    height: 1.5px;
    background: var(--accent);
    transition: transform .25s ease, opacity .25s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}


/* Menú móvil */

.nav-mobile {
    max-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0 24px;
    border-top: 1px solid transparent;
    transition: max-height .3s ease, padding .3s ease;
}

.nav-mobile.is-open {
    max-height: 420px;
    padding: 20px 24px 28px;
    border-top-color: var(--accent);
}

.nav-mobile a {
    padding: 12px 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--accent);
    border-bottom: 1px solid var(--line);
    transition: color .15s ease;
}

.nav-mobile a:hover,
.nav-mobile a:active {
    color: var(--accent-2);
}

@media (min-width: 900px) {
    .nav-desktop {
        display: flex;
    }
    .mode-switch {
        display: flex;
    }
    .menu-toggle {
        display: none;
    }
    .nav-mobile {
        display: none;
    }
}


/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
    position: relative;
    padding: 96px 24px 80px;
    overflow: hidden;
}

.hero-inner {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin: 0 0 24px;
}

.eyebrow-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-2);
}

.hero-title {
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    line-height: 1.08;
    margin-bottom: 20px;
    color: var(--accent);
}

.hero-subtitle {
    color: var(--accent);
}

strong {
    color: var(--accent-2);
}

.btni {
    font-size: 17px;
    background-color: var(--accent-2);
}

.hero-grid {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    opacity: 0.5;
    z-index: 1;
    pointer-events: none;
}

.hero-cell {
    border-right: 1px solid var(--line);
}

.hero-cell:last-child {
    border-right: none;
}

@media (min-width: 700px) {
    .hero {
        padding: 140px 24px 110px;
    }
}


/* ==========================================================================
   SECCIONES
   ========================================================================== */

.section {
    padding: 88px 0;
    border-bottom: 1px solid var(--line);
}

.section--alt {
    background: var(--bg-alt);
}

.section-title {
    font-size: clamp(1.7rem, 3.4vw, 2.3rem);
    line-height: 1.2;
    max-width: 720px;
    margin-bottom: 16px;
}

.section-text {
    color: var(--muted);
    max-width: 560px;
    font-size: 16px;
    margin-bottom: 44px;
}


/* ==========================================================================
   CARRUSEL
   ========================================================================== */

.carousel {
    position: relative;
}

.carousel-viewport {
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    position: relative;
    clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}

.carousel-track {
    display: flex;
    transition: transform .4s ease;
}

.carousel-slide {
    flex: 0 0 100%;
    background: var(--white);
}

.carousel-slide img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/10;
    object-fit: cover;
}

.carousel-slide.testimonial {
    padding: 56px 48px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.testimonial-quote {
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2.4vw, 1.5rem);
    font-weight: 500;
    margin: 0 0 20px;
}

.testimonial-name {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted);
    margin: 0;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, border-color .15s ease;
}

.carousel-arrow:hover {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

.carousel-arrow--prev {
    left: -20px;
}

.carousel-arrow--next {
    right: -20px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.carousel-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: none;
    background: var(--line);
    cursor: pointer;
    padding: 0;
    transition: background .15s ease, transform .15s ease;
}

.carousel-dot.is-active {
    background: var(--accent-2);
    transform: scale(1.25);
}

@media (max-width: 640px) {
    .carousel-arrow {
        width: 34px;
        height: 34px;
    }
    .carousel-arrow--prev {
        left: 6px;
    }
    .carousel-arrow--next {
        right: 6px;
    }
    .carousel-slide.testimonial {
        padding: 40px 28px;
    }
}


/* ==========================================================================
   DEMO
   ========================================================================== */

.demo-media {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    margin-bottom: 8px;
    background: var(--ink);
}

.demo-media video {
    width: 100%;
}


/* ==========================================================================
   INFORMACIÓN
   ========================================================================== */

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.info-card {
    background: var(--bg);
    padding: 32px;
}

.info-card-code {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
    margin: 0 0 12px;
}

.info-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.info-card p {
    color: var(--muted);
    font-size: 14.5px;
    margin: 0;
}

@media (min-width: 700px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ==========================================================================
   CONTACTO
   ========================================================================== */

.contact-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}


/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
    padding: 40px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-logo {
    height: 200px;
    width: 500px;
    align-self: flex-start;
}

.btn2 {
    background-color: #007bff;
}

.section-title {
    color: #10254c;
}


/* Asegura que la pista del carrusel use flexbox para poner los slides en fila */

.carousel-track {
    display: flex;
    transition: transform 0.3s ease-in-out;
    /* Suaviza el movimiento */
}


/* Cada slide debe ocupar el 100% del ancho del contenedor visible y no achicarse */

.carousel-slide {
    min-width: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    /* Espaciado entre el video y el botón */
}


/* ==========================================================================
   DEMO - CORRECCIÓN DE VIDEO RESPONSIVO (PC Y MÓVIL)
   ========================================================================== */

.demo-media {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    margin-bottom: 8px;
    background: #000000;
    /* Asegura un fondo neutro en la carga */
    width: 100%;
    max-width: 800px;
    /* Evita que el video sea gigante en PC */
    margin-left: auto;
    /* Centra el contenedor del video */
    margin-right: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.demo-media video {
    width: 100%;
    height: auto;
    max-height: 700px;
    /* Altura máxima perfecta para pantallas de laptop/escritorio */
    object-fit: cover;
    /* ¡CLAVE! Elimina las franjas negras recortando sutilmente los bordes */
    display: block;
}


/* Ajuste específico para el carrusel de demos */

.carousel-slide {
    min-width: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centra el contenido en el slide */
    gap: 1rem;
}


/* Opcional: reducir margen de los botones debajo del video para mejor armonía */

.slide-footer .btn {
    margin-top: 10px !important;
}


/* Estilo opcional para centrar el botón debajo del video */

.slide-footer {
    text-align: center;
    width: 100%;
}

.lg {
    border-radius: 50%;
    width: 200px;
    height: 200px;
    object-fit: cover;
    margin-bottom: 20px;
    align-self: center;
    justify-self: center;
}


/* ==========================================================================
   SECCIÓN DIVIDIDA (texto a un lado, video/imagen al otro)
   En móvil queda uno debajo del otro; en desktop, lado a lado.
   ========================================================================== */

.split-grid {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 40px;
}

.split-text .section-title,
.split-text .section-text {
    max-width: none;
}

.split-text .section-text {
    margin-bottom: 0;
}

.split-media {
    width: 100%;
}

@media (min-width: 900px) {
    .split-grid {
        grid-template-columns: 1fr 1fr;
        gap: 64px;
    }
    .split-grid.split-reverse .split-text {
        order: 2;
    }
    .split-grid.split-reverse .split-media {
        order: 1;
    }
}


/* ==========================================================================
   REVEAL AL HACER SCROLL
   ========================================================================== */

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

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