@font-face {
    font-family: 'Romans Story';
    src: url('../Fuentes/Romans-Story.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --midnight: #1B2C5D;
    --midnight-dark: #0d1330;
    --blue: #426AB3;
    --gold: #B39940;
    --gold-light: #CEBE84;
    --cream: #FFEFC6;
    --white: #FFFFFF;
    --off-white: #FFF8E8;
    --text: #1B2C5D;
    --muted: #5a6480;
    --header-h: 84px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
}

body {
    font-family: 'Montserrat', Georgia, sans-serif;
    color: var(--text);
    background: var(--off-white);
    line-height: 1.7;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: 0.3s ease; }
ul, ol { list-style: none; }

.container {
    width: min(1120px, calc(100% - 2.5rem));
    margin: 0 auto;
}

h1, h2, h3 {
    font-family: 'Romans Story', 'Cinzel', Georgia, serif;
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 1.15;
}

.italic-accent {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: var(--gold);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header-left { text-align: left; }

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--midnight);
    margin-bottom: 0.75rem;
}

.divider {
    width: 72px;
    height: 2px;
    background: var(--gold);
    margin: 0 auto;
}

.section-header-left .divider { margin: 0; }

.section-desc {
    margin-top: 1.1rem;
    color: var(--muted);
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

.btn-luxury {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.95rem 1.8rem;
    border: 1px solid var(--gold);
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    font-family: 'Montserrat', sans-serif;
    background: transparent;
    cursor: pointer;
}

.btn-luxury-fill {
    background: var(--gold);
    color: var(--midnight);
}

.btn-luxury-fill:hover {
    background: var(--white);
    border-color: var(--white);
    color: var(--midnight);
}

.btn-luxury:not(.btn-luxury-fill):hover {
    background: rgba(179, 153, 64, 0.12);
}

/* Header */
header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    background: rgba(13, 19, 48, 0.72);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(179, 153, 64, 0.18);
    transition: background 0.3s ease, padding 0.3s ease;
}

header.scrolled {
    background: rgba(13, 19, 48, 0.94);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-h);
    gap: 1rem;
}

.logo-img {
    width: 210px;
    height: auto;
    filter: brightness(0) invert(1);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.35rem;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-links a:hover { color: var(--gold-light); }

.nav-cta {
    border: 1px solid var(--gold);
    padding: 0.55rem 0.9rem;
    color: var(--gold) !important;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--cream);
    margin-left: auto;
}

/* Reveal on scroll */
[data-reveal] {
    opacity: 0;
    transform: translateY(32px);
    transition:
        opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

[data-reveal="left"] { transform: translateX(36px); }
[data-reveal="right"] { transform: translateX(-36px); }
[data-reveal="zoom"] { transform: scale(0.94); }

[data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Hero */
.hero {
    position: relative;
    min-height: 100vh;
    display: grid;
    align-items: center;
    background:
        linear-gradient(135deg, rgba(13, 19, 48, 0.92) 0%, rgba(27, 44, 93, 0.78) 45%, rgba(13, 19, 48, 0.88) 100%),
        url('../images/Casa_Calpini.jpg') center / cover no-repeat;
    color: var(--white);
    padding: calc(var(--header-h) + 2rem) 0 4rem;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(179, 153, 64, 0.18), transparent 35%),
        linear-gradient(180deg, transparent 55%, rgba(13, 19, 48, 0.55) 100%);
    pointer-events: none;
    animation: heroOverlayPulse 8s ease-in-out infinite alternate;
}

.hero-intro-logo {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    pointer-events: none;
    animation: hero-logo-out 4.8s ease-in-out forwards;
}

.hero-intro-logo-img {
    max-height: 260px;
    width: auto;
    object-fit: contain;
    animation: hero-logo-in 4.4s ease-out forwards;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
}

.hero-eyebrow {
    color: var(--gold-light);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.78rem;
    margin-bottom: 1rem;
    opacity: 0;
    animation: hero-fade-in 0.75s ease-out 3.2s forwards;
}

.hero-title {
    color: var(--white);
    font-size: clamp(2.8rem, 7vw, 5rem);
    margin-bottom: 1.25rem;
}

.hero-line {
    display: block;
    opacity: 0;
    animation: hero-fade-rise 0.85s ease-out forwards;
}

.hero-line-1 { animation-delay: 3.5s; }
.hero-line-2 { animation-delay: 4.15s; }

.hero-line-accent {
    color: var(--gold-light);
}

.hero-line-accent sup {
    font-size: 0.35em;
    vertical-align: super;
}

.hero-desc {
    font-size: 1.05rem;
    max-width: 34rem;
    color: rgba(255, 255, 255, 0.86);
    margin-bottom: 2rem;
    opacity: 0;
    animation: hero-fade-rise 0.85s ease-out 4.85s forwards;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    opacity: 0;
    animation: hero-fade-rise 0.85s ease-out 5.4s forwards;
}

@keyframes hero-logo-in {
    0% { opacity: 0; transform: scale(0.82); }
    18% { opacity: 1; transform: scale(1); }
    70% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.05); }
}

@keyframes hero-logo-out {
    0%, 55% { opacity: 1; visibility: visible; }
    78%, 100% { opacity: 0; visibility: hidden; }
}

@keyframes hero-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes hero-fade-rise {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes heroOverlayPulse {
    from { opacity: 0.85; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-intro-logo,
    .hero-intro-logo-img,
    .hero-eyebrow,
    .hero-line,
    .hero-desc,
    .hero-actions,
    .hero-overlay {
        animation: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }

    .hero-intro-logo { display: none; }
}

/* Problema */
.problema {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--off-white) 0%, #fff 100%);
}

.problema-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

.problema-copy p {
    color: var(--muted);
    margin-bottom: 1rem;
    max-width: 34rem;
}

.problema-stats {
    display: grid;
    gap: 1rem;
}

.stat-card {
    background: var(--midnight);
    color: var(--white);
    padding: 1.4rem 1.5rem;
    border-left: 3px solid var(--gold);
}

.stat-number {
    display: block;
    font-family: 'Romans Story', 'Cinzel', serif;
    font-size: 2.2rem;
    color: var(--gold-light);
}

.stat-label {
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.85;
}

/* Servicios */
.servicios {
    padding: 6rem 0;
    background: var(--midnight);
    color: var(--white);
}

.servicios .section-header h2,
.trayectoria .section-header h2,
.marcas .section-header h2,
.sucursales .section-header h2 {
    color: var(--white);
}

.servicios .section-desc,
.marcas .section-desc {
    color: rgba(255, 255, 255, 0.72);
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.servicio-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(179, 153, 64, 0.22);
    padding: 1.6rem 1.3rem;
    min-height: 180px;
    transition: transform 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}

.servicio-card:hover {
    transform: translateY(-8px);
    border-color: rgba(179, 153, 64, 0.55);
    background: rgba(255, 255, 255, 0.07);
}

.servicio-card i {
    color: var(--gold);
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

.servicio-card h3 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 0.55rem;
}

.servicio-card p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.92rem;
}

.servicio-card--wide {
    grid-column: span 4;
}

/* Trayectoria */
.trayectoria {
    padding: 5.5rem 0;
    background:
        linear-gradient(180deg, rgba(13, 19, 48, 0.92), rgba(27, 44, 93, 0.95)),
        url('../images/Casa_Calpini.jpg') center / cover;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.timeline li {
    text-align: center;
    padding: 1.5rem 1rem;
    border-top: 2px solid var(--gold);
    background: rgba(255, 255, 255, 0.04);
}

.timeline-year {
    display: block;
    font-family: 'Romans Story', 'Cinzel', serif;
    font-size: 2rem;
    color: var(--gold-light);
    margin-bottom: 0.4rem;
}

.timeline-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.92rem;
}

/* Tecnología */
.tecnologia {
    padding: 6rem 0;
    background: #fff;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}

.tech-card {
    padding: 2rem 1.5rem;
    background: var(--off-white);
    border-bottom: 3px solid var(--gold);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.tech-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 36px rgba(13, 19, 48, 0.1);
}

.tech-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.7rem;
    color: var(--midnight);
}

.tech-card p { color: var(--muted); }

/* Beneficios */
.beneficios {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--off-white), #fff);
}

.beneficios-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.beneficio-card {
    background: var(--white);
    border: 1px solid rgba(27, 44, 93, 0.08);
    padding: 1.6rem 1.35rem;
    box-shadow: 0 10px 30px rgba(13, 19, 48, 0.05);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.beneficio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(13, 19, 48, 0.12);
}

.beneficio-tag {
    display: inline-block;
    color: var(--gold);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.beneficio-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.55rem;
}

.beneficio-card p { color: var(--muted); font-size: 0.92rem; }

.beneficio-card--featured {
    background: var(--midnight);
    color: var(--white);
}

.beneficio-card--featured h3 {
    color: var(--gold-light);
    font-size: 2.4rem;
}

.beneficio-card--featured p { color: rgba(255, 255, 255, 0.75); }

.beneficio-card--wide {
    grid-column: span 4;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 1.5rem;
    align-items: center;
    background: linear-gradient(120deg, var(--midnight), #2a4178);
    color: var(--white);
}

.beneficio-card--wide .beneficio-tag {
    grid-row: span 2;
    font-size: 1.4rem;
    color: var(--gold-light);
}

.beneficio-card--wide h3 { color: var(--white); }
.beneficio-card--wide p { color: rgba(255, 255, 255, 0.75); }

/* Marcas / Empresas */
.marcas {
    padding: 6rem 0;
    background: var(--midnight-dark);
}

.marcas-grid,
.empresas-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}

.marca-item,
.empresa-item {
    display: grid;
    place-items: center;
    min-height: 96px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.35s ease, background 0.35s ease;
}

.marca-item:hover,
.empresa-item:hover {
    transform: translateY(-6px) scale(1.03);
    background: rgba(255, 255, 255, 0.08);
}

.marca-item img,
.empresa-item img {
    max-height: 48px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.empresas {
    padding: 5rem 0;
    background: #fff;
}

.empresas .section-header h2 { color: var(--midnight); }

.empresas .empresa-item {
    background: var(--off-white);
    border-color: rgba(27, 44, 93, 0.06);
}

.empresas .empresa-item img {
    filter: none;
    opacity: 1;
}

/* Sucursales */
.sucursales {
    padding: 6rem 0;
    background: var(--midnight);
}

.sucursales-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.sucursal-card {
    padding: 1.6rem 1.3rem;
    border: 1px solid rgba(179, 153, 64, 0.25);
    background: rgba(255, 255, 255, 0.03);
    min-height: 210px;
    transition: transform 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}

.sucursal-card:hover {
    transform: translateY(-8px);
    border-color: rgba(179, 153, 64, 0.6);
    background: rgba(255, 255, 255, 0.07);
}

.sucursal-card h3 {
    color: var(--gold-light);
    font-size: 1.25rem;
    margin-bottom: 0.7rem;
}

.sucursal-card p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.sucursal-card a {
    color: var(--cream);
    font-size: 0.92rem;
}

.sucursal-card a:hover { color: var(--gold-light); }

/* Contacto */
.contacto {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--off-white), #fff);
}

.contacto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.contacto-lead {
    color: var(--muted);
    margin-bottom: 1.8rem;
    max-width: 30rem;
}

.contacto-person h3 {
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
}

.contacto-person > p {
    color: var(--muted);
    margin-bottom: 1rem;
}

.contacto-person li { margin-bottom: 0.55rem; }

.contacto-person a {
    color: var(--midnight);
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.contacto-person a:hover { color: var(--gold); }

.contacto-form {
    background: var(--midnight);
    color: var(--white);
    padding: 2rem 1.6rem;
    display: grid;
    gap: 0.95rem;
}

.contacto-form h3 {
    color: var(--gold-light);
    font-size: 1.5rem;
    margin-bottom: 0.4rem;
}

.contacto-form label {
    display: grid;
    gap: 0.35rem;
}

.contacto-form span {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.contacto-form input,
.contacto-form textarea {
    width: 100%;
    border: 1px solid rgba(179, 153, 64, 0.35);
    background: rgba(255, 255, 255, 0.04);
    color: var(--white);
    padding: 0.8rem 0.9rem;
    font: inherit;
}

.contacto-form textarea {
    min-height: 110px;
    resize: vertical;
}

.contacto-form input:focus,
.contacto-form textarea:focus {
    outline: none;
    border-color: var(--gold);
}

.contacto-form .btn-luxury {
    width: 100%;
    margin-top: 0.4rem;
}

.form-note {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
}

/* Footer */
footer {
    background: var(--midnight-dark);
    color: rgba(255, 255, 255, 0.75);
    padding: 2.5rem 0;
    text-align: center;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 0.9rem;
}

.footer-logo img {
    filter: brightness(0) invert(1);
    margin: 0 auto;
}

.copyright {
    margin-top: 0.8rem;
    font-size: 0.82rem;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 992px) {
    .problema-grid,
    .contacto-grid,
    .tech-grid,
    .timeline,
    .sucursales-grid {
        grid-template-columns: 1fr 1fr;
    }

    .servicios-grid,
    .beneficios-grid {
        grid-template-columns: 1fr 1fr;
    }

    .servicio-card--wide,
    .beneficio-card--wide {
        grid-column: span 2;
    }

    .marcas-grid,
    .empresas-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .beneficio-card--wide {
        grid-template-columns: 1fr;
    }
}

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

    .nav-links {
        position: fixed;
        inset: var(--header-h) 0 auto;
        background: rgba(13, 19, 48, 0.97);
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        transition: 0.3s ease;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .problema-grid,
    .contacto-grid,
    .tech-grid,
    .timeline,
    .sucursales-grid,
    .servicios-grid,
    .beneficios-grid,
    .marcas-grid,
    .empresas-grid {
        grid-template-columns: 1fr;
    }

    .servicio-card--wide,
    .beneficio-card--wide {
        grid-column: span 1;
    }

    .hero-actions { flex-direction: column; align-items: stretch; }
    .btn-luxury { width: 100%; }
}
