/**
 * OneSpot S.A. - Hoja de Estilos Principal
 * Paleta oficial OneSpot (#090a1e, #141c4b, #4f44e9, #4643ef, #ff5d75, #9091a2)
 * Desarrollo y Arquitectura Estática: Imagen y Sistemas
 */

:root {
    --os-bg-deep: #090a1e;
    --os-bg-navy: #141c4b;
    --os-indigo: #4643ef;
    --os-purple: #4f44e9;
    --os-coral: #ff5d75;
    --os-coral-hover: #ff425f;
    --os-text: #9091a2;
    --os-text-light: #c8c9d6;
    --os-white: #ffffff;
    --os-border: rgba(255, 255, 255, 0.1);
    --os-border-accent: rgba(255, 93, 117, 0.35);
    --os-radius-sm: 5px;
    --os-radius-md: 10px;
    --os-radius-lg: 14px;
    --os-shadow: 0 20px 45px rgba(4, 5, 18, 0.45);
    --os-transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --os-font-body: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --os-font-heading: 'Hammersmith One', 'Roboto', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    padding: 0;
    font-family: var(--os-font-body);
    color: var(--os-text);
    background-color: var(--os-bg-deep);
    background-image: linear-gradient(to right bottom, var(--os-bg-navy) 0%, var(--os-bg-deep) 45%);
    background-attachment: fixed;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    font-family: var(--os-font-heading);
    color: var(--os-white);
    margin-top: 0;
    line-height: 1.25;
}

a {
    color: var(--os-coral);
    text-decoration: none;
    transition: var(--os-transition);
}

a:hover {
    color: var(--os-white);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* =========================================================
   1. Navegación Superior (#site-nav)
   ========================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(9, 10, 30, 0.84);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid var(--os-border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 1.5rem;
}

.site-logo {
    display: inline-flex;
    align-items: center;
}

.site-logo img {
    height: 44px;
    width: auto;
    transition: transform 0.25s ease;
}

.site-logo:hover img {
    transform: scale(1.03);
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.main-nav a {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--os-text-light);
    border-radius: var(--os-radius-sm);
}

.main-nav a:hover,
.main-nav li.active a {
    color: var(--os-white);
    background: rgba(255, 93, 117, 0.16);
}

.main-nav li.active a {
    box-shadow: inset 0 -2px 0 var(--os-coral);
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--os-border);
    color: var(--os-white);
    border-radius: var(--os-radius-sm);
    padding: 0.45rem 0.65rem;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

/* =========================================================
   2. Hero / Slideshow con Particles.js
   ========================================================= */
.hero-section {
    position: relative;
    min-height: 430px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: url('../images/home/rosario_home-compressor.jpg') no-repeat center center / cover;
    padding: 5.5rem 1.5rem;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(20, 28, 75, 0.86) 0%, rgba(9, 10, 30, 0.9) 100%);
    z-index: 1;
}

#particles-js {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 780px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.6rem, 6vw, 4.4rem);
    letter-spacing: 0.03em;
    text-transform: lowercase;
    color: var(--os-white);
    margin-bottom: 1rem;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.hero-tagline {
    font-size: clamp(1.1rem, 2.2vw, 1.45rem);
    font-weight: 300;
    color: var(--os-text-light);
    margin: 0 auto;
}

/* Hero compacto para páginas internas */
.hero-compact {
    min-height: 240px;
    padding: 3.75rem 1.5rem;
}

.hero-compact .hero-title {
    text-transform: none;
    font-size: clamp(2.1rem, 4.5vw, 3.2rem);
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--os-coral);
    font-weight: 500;
    margin-bottom: 0.4rem;
}

/* =========================================================
   3. Tarjetas de Servicios (5 columnas)
   ========================================================= */
.services-section {
    padding: 3.25rem 0 2.5rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.15rem;
}

.service-card {
    position: relative;
    display: block;
    border-radius: var(--os-radius-md);
    overflow: hidden;
    background: var(--os-bg-navy);
    border: 1px solid var(--os-border);
    box-shadow: var(--os-shadow);
    aspect-ratio: 2 / 3;
    transition: var(--os-transition);
}

.service-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(9, 10, 30, 0.08) 25%, rgba(9, 10, 30, 0.92) 95%);
    z-index: 1;
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: var(--os-border-accent);
}

.service-card:hover img {
    transform: scale(1.06);
}

.service-badge {
    position: absolute;
    top: 0.9rem;
    left: 0.9rem;
    z-index: 2;
    background: var(--os-coral);
    color: var(--os-white);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
}

.service-card-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 1.25rem 1.1rem;
}

.service-card-title {
    font-family: var(--os-font-heading);
    font-size: 1.08rem;
    color: var(--os-white);
    margin: 0 0 0.35rem;
}

.service-card-desc {
    font-size: 0.84rem;
    line-height: 1.45;
    color: var(--os-text-light);
    margin: 0;
}

/* =========================================================
   4. Bloque Cita / Propuesta de Valor (#g-above)
   ========================================================= */
.promo-section {
    padding: 1.5rem 0 2.75rem;
}

.promo-box {
    background: var(--os-purple);
    color: var(--os-white);
    border-radius: var(--os-radius-md);
    padding: 2.75rem 2.5rem;
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 2.25rem;
    align-items: center;
    box-shadow: var(--os-shadow);
}

.promo-headline {
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    line-height: 1.38;
    color: var(--os-white);
    margin: 0;
}

.promo-quote {
    border-left: 3px solid var(--os-coral);
    padding-left: 1.35rem;
}

.promo-quote-text {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.92);
    margin: 0 0 1rem;
}

.promo-author {
    font-family: var(--os-font-heading);
    font-size: 1.05rem;
    color: var(--os-white);
}

.promo-role {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.78);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* =========================================================
   5. Grilla de Plataformas / Logos
   ========================================================= */
.platforms-section {
    padding: 1.5rem 0 2.75rem;
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: center;
}

.platform-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    border-radius: var(--os-radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--os-transition);
}

.platform-item img {
    max-height: 58px;
    width: auto;
    filter: grayscale(100%) brightness(1.15);
    opacity: 0.72;
    transition: var(--os-transition);
}

.platform-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--os-border);
}

.platform-item:hover img {
    filter: grayscale(0%) brightness(1);
    opacity: 1;
}

/* =========================================================
   6. Showcase Panorámico Rosario
   ========================================================= */
.showcase-section {
    padding: 0.5rem 0 0;
}

.showcase-frame {
    border-radius: var(--os-radius-md) var(--os-radius-md) 0 0;
    overflow: hidden;
    max-height: 440px;
    border: 1px solid var(--os-border);
    border-bottom: none;
}

.showcase-frame img {
    width: 100%;
    height: 440px;
    object-fit: cover;
    object-position: center;
}

/* =========================================================
   7. Flipping Cards (2x2)
   ========================================================= */
.flip-section {
    padding-bottom: 3rem;
}

.flip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    background: var(--os-purple);
    padding: 2.5rem;
    border-radius: 0 0 var(--os-radius-md) var(--os-radius-md);
    box-shadow: var(--os-shadow);
}

.flip-card {
    perspective: 1100px;
    min-height: 270px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 270px;
    transform-style: preserve-3d;
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.flip-card.is-flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--os-radius-md);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(9, 10, 30, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--os-white);
}

.flip-face-back {
    transform: rotateY(180deg);
    background: var(--os-bg-navy);
    border-color: var(--os-border-accent);
}

.flip-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 93, 117, 0.18);
    color: var(--os-coral);
    margin-bottom: 0.9rem;
}

.flip-title {
    font-family: var(--os-font-heading);
    font-size: 1.35rem;
    color: var(--os-white);
    margin: 0 0 0.65rem;
}

.flip-desc {
    font-size: 0.96rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
    margin: 0 0 1.25rem;
}

.flip-action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--os-coral);
}

/* =========================================================
   8. Página de Contacto y Formulario
   ========================================================= */
.contact-section {
    padding: 3.25rem 0 4rem;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 2rem;
    align-items: start;
}

.contact-info-card,
.contact-form-card {
    background: rgba(20, 28, 75, 0.55);
    border: 1px solid var(--os-border);
    border-radius: var(--os-radius-md);
    padding: 2rem;
    box-shadow: var(--os-shadow);
}

.contact-info-card h2,
.contact-form-card h2 {
    font-size: 1.45rem;
    margin-bottom: 1rem;
}

.contact-detail-list {
    list-style: none;
    margin: 1.25rem 0 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.contact-detail-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    color: var(--os-text-light);
    font-size: 0.95rem;
}

.contact-detail-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(79, 68, 233, 0.25);
    color: var(--os-coral);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.form-note {
    font-size: 0.86rem;
    color: var(--os-text);
    margin-bottom: 1.25rem;
}

.required-star {
    color: var(--os-coral);
}

.form-group {
    margin-bottom: 1.15rem;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--os-text-light);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.78rem 0.95rem;
    font-family: var(--os-font-body);
    font-size: 0.96rem;
    color: var(--os-white);
    background: rgba(9, 10, 30, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--os-radius-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--os-coral);
    box-shadow: 0 0 0 3px rgba(255, 93, 117, 0.2);
}

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

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--os-text-light);
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--os-coral);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--os-coral);
    color: var(--os-white);
    font-family: var(--os-font-body);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.85rem 2rem;
    border: none;
    border-radius: var(--os-radius-sm);
    cursor: pointer;
    transition: var(--os-transition);
}

.btn-primary:hover:not(:disabled) {
    background: var(--os-coral-hover);
    transform: translateY(-2px);
}

.btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.contact-alert {
    display: none;
    margin-bottom: 1.25rem;
    padding: 0.95rem 1.1rem;
    border-radius: var(--os-radius-sm);
    font-size: 0.94rem;
    font-weight: 500;
}

.contact-alert.is-success {
    display: block;
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #a7f3d0;
}

.contact-alert.is-error {
    display: block;
    background: rgba(255, 93, 117, 0.16);
    border: 1px solid rgba(255, 93, 117, 0.5);
    color: #fecdd3;
}

/* =========================================================
   9. Footer
   ========================================================= */
.site-footer {
    border-top: 1px solid var(--os-border);
    padding: 2rem 1.5rem;
    text-align: center;
    font-size: 0.88rem;
    color: rgba(144, 145, 162, 0.72);
}

.site-footer a {
    color: rgba(200, 201, 214, 0.85);
}

.site-footer a:hover {
    color: var(--os-coral);
}

/* =========================================================
   10. Responsive & Accesibilidad
   ========================================================= */
@media (max-width: 1120px) {
    .services-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .platforms-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .promo-box {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem;
    }
    .flip-grid {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .nav-toggle {
        display: inline-flex;
    }
    .main-nav {
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        background: rgba(9, 10, 30, 0.98);
        border-bottom: 1px solid var(--os-border);
        padding: 1rem 1.5rem;
        display: none;
    }
    .main-nav.is-open {
        display: block;
    }
    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
    }
    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .platforms-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .showcase-frame img {
        height: 260px;
    }
}

@media (max-width: 460px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
