/* ==========================================================================
   Gonay Impresos — Sistema de diseño
   ========================================================================== */

:root {
    --red: #E63946;
    --red-dark: #B5232A;
    --blue: #1E2A5E;
    --blue-mid: #3A4A8C;
    --ink: #0F1115;
    --muted: #5A6175;
    --border: #E6E8EE;
    --surface: #F5F6F8;
    --paper: #FFFFFF;
    --accent: #F4D35E;

    --shadow-sm: 0 1px 2px rgba(15, 17, 21, .04);
    --shadow-md: 0 1px 2px rgba(15, 17, 21, .04), 0 8px 24px rgba(15, 17, 21, .06);
    --shadow-lg: 0 4px 8px rgba(15, 17, 21, .04), 0 24px 48px rgba(15, 17, 21, .10);

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --container: 1200px;
    --gutter: clamp(1rem, 3vw, 2rem);
    --section-y: clamp(4rem, 8vw, 6rem);

    --font-sans: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
    --transition: 200ms cubic-bezier(.4, 0, .2, 1);
}

/* Reset y base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

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

a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--red); }

h1, h2, h3, h4 {
    margin: 0 0 .5em;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--ink);
}

h1 { font-size: clamp(2.25rem, 4vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: 1.25rem; font-weight: 600; }

p { margin: 0 0 1em; color: var(--muted); }

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.eyebrow {
    display: inline-block;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: .75rem;
}

.lead { font-size: 1.125rem; color: var(--muted); max-width: 60ch; }

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--ink); color: #fff; padding: .75rem 1rem; z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Botones
   ========================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .8rem 1.4rem;
    font: inherit; font-weight: 600; font-size: .95rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--blue); padding: .5rem .25rem; }
.btn-ghost:hover { color: var(--red); }
.btn-sm { padding: .5rem .9rem; font-size: .875rem; }

/* Navbar
   ========================================================================== */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(255, 255, 255, 0);
    transition: background var(--transition), box-shadow var(--transition);
}
.nav.is-scrolled {
    background: var(--paper);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem var(--gutter);
    max-width: var(--container); margin-inline: auto;
}
.nav-brand img { height: 36px; width: auto; }
.nav-links {
    display: flex; gap: 2rem; align-items: center;
    list-style: none; margin: 0; padding: 0;
}
.nav-links a {
    color: var(--ink); font-weight: 500; font-size: .95rem;
    padding: .5rem 0; position: relative;
}
.nav-links a:hover { color: var(--red); }
.nav-cta { display: flex; align-items: center; gap: .75rem; }
.nav-toggle {
    display: none; background: none; border: 0; cursor: pointer;
    width: 40px; height: 40px; padding: 0; color: var(--ink);
}
.nav-toggle i { font-size: 1.5rem; }

@media (max-width: 860px) {
    .nav-links { display: none; }
    .nav-cta .btn:not(.nav-toggle) { display: none; }
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .nav.is-open .nav-links {
        display: flex; flex-direction: column; gap: 0;
        position: absolute; top: 100%; left: 0; right: 0;
        background: var(--paper); border-top: 1px solid var(--border);
        padding: 1rem var(--gutter);
    }
    .nav.is-open .nav-links a { padding: .85rem 0; border-bottom: 1px solid var(--border); width: 100%; }
}

/* Hero
   ========================================================================== */
.hero {
    padding: calc(var(--section-y) + 4rem) 0 var(--section-y);
    background: var(--paper);
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}
.hero h1 span { color: var(--red); }
.hero p.lead { font-size: 1.2rem; margin: 1.5rem 0 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.hero-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
    aspect-ratio: 4/3;
    box-shadow: var(--shadow-lg);
}
.hero-image img { width: 100%; height: 100%; object-fit: cover; }

/* Carrusel
   ========================================================================== */
.carousel { position: relative; width: 100%; height: 100%; }
.carousel-track { position: relative; width: 100%; height: 100%; }
.carousel-slide {
    position: absolute; inset: 0;
    display: block;
    opacity: 0;
    transition: opacity 800ms cubic-bezier(.4, 0, .2, 1);
    pointer-events: none;
}
.carousel-slide.is-active { opacity: 1; pointer-events: auto; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

.carousel-dots {
    position: absolute; left: 0; right: 0; bottom: 1rem;
    display: flex; gap: .5rem; justify-content: center; align-items: center;
    z-index: 2;
}
.carousel-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .55);
    border: 0; padding: 0; cursor: pointer;
    transition: all var(--transition);
}
.carousel-dot:hover { background: rgba(255, 255, 255, .85); }
.carousel-dot.is-active {
    background: #fff;
    width: 24px;
    border-radius: 999px;
}

@media (max-width: 860px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero { padding-top: calc(var(--section-y) + 3rem); }
}

/* Trust bar
   ========================================================================== */
.trust {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}
.trust-label {
    text-align: center; font-size: .8rem; font-weight: 600; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--muted); margin-bottom: 1.5rem;
}
/* Marquee infinito de logos
   ========================================================================== */
.marquee {
    overflow: hidden;
    width: 100%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.marquee-track {
    display: flex;
    align-items: center;
    gap: 4rem;
    width: max-content;
    animation: marquee 36s linear infinite;
}
@media (hover: hover) and (pointer: fine) {
    .marquee:hover .marquee-track { animation-play-state: paused; }
}

.trust-logo {
    height: 36px;
    width: auto;
    flex-shrink: 0;
    color: var(--muted);
    opacity: .55;
    filter: grayscale(1);
    transition: opacity var(--transition), filter var(--transition);
}
.trust-logo:hover { opacity: 1; filter: grayscale(0); color: var(--ink); }

@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(calc(-50% - 2rem)); } /* -50% del track + medio gap */
}

@media (prefers-reduced-motion: reduce) {
    .marquee-track { animation: none; }
}

@media (max-width: 768px) {
    .marquee-track { gap: 2.5rem; animation-duration: 28s; }
    .trust-logo { height: 30px; }
}

@media (max-width: 768px) { .trust-logos { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }

/* Sección genérica
   ========================================================================== */
.section { padding: var(--section-y) 0; }
.section-head { max-width: 720px; margin: 0 auto 3rem; text-align: center; }
.section-head .eyebrow { display: inline-block; }

/* Features
   ========================================================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}
.feature {
    padding: 2rem;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}
.feature:hover { border-color: var(--blue); transform: translateY(-2px); }
.feature i {
    font-size: 1.75rem; color: var(--red);
    display: inline-block; margin-bottom: 1rem;
}
.feature h3 { margin-bottom: .5rem; }
.feature p { font-size: .95rem; margin: 0; }

/* Capabilities — sección oscura
   ========================================================================== */
.capabilities {
    background: var(--ink);
    color: #fff;
    padding: var(--section-y) 0;
}
.capabilities .eyebrow { color: var(--accent); }
.capabilities h2, .capabilities h3 { color: #fff; }
.capabilities .lead { color: rgba(255, 255, 255, .7); }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}
.stat {
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, .12);
}
.stat-number {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1;
    color: #fff;
    letter-spacing: -0.02em;
    margin-bottom: .5rem;
}
.stat-label {
    font-size: .85rem; font-weight: 600; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--accent); margin-bottom: .75rem;
}
.stat-desc { color: rgba(255, 255, 255, .7); font-size: .95rem; margin: 0; }

/* Productos
   ========================================================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.product {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition);
    display: flex; flex-direction: column;
}
.product:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.product-img {
    aspect-ratio: 4/5;
    background: var(--surface);
    overflow: hidden;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 1.5rem; }
.product-body h3 { margin-bottom: .5rem; }
.product-body p { font-size: .9rem; margin: 0; }

/* Proceso — pasos editoriales
   ========================================================================== */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    counter-reset: step;
}
.step { position: relative; padding-top: 1rem; }
.step::before {
    counter-increment: step;
    content: "0" counter(step);
    display: block;
    font-size: 3rem; font-weight: 700; line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--red);
    margin-bottom: 1rem;
}
.step h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.step p { font-size: .9rem; margin: 0; }

/* Industrias
   ========================================================================== */
.industries {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.25rem;
}
.industry {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .9rem;
    padding: 2rem 1rem;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: .95rem; font-weight: 600; color: var(--ink);
    text-align: center;
    transition: all var(--transition);
}
.industry i {
    color: var(--blue);
    font-size: 2.25rem;
    line-height: 1;
    font-weight: 300;
    opacity: .85;
    transition: transform var(--transition), color var(--transition), opacity var(--transition);
}
.industry:hover {
    border-color: var(--blue);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.industry:hover i { transform: scale(1.08); color: var(--red); opacity: 1; }

@media (max-width: 992px) { .industries { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .industries { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
    .industry { padding: 1.5rem .75rem; }
    .industry i { font-size: 2.25rem; }
}

/* Contacto
   ========================================================================== */
.contact {
    background: var(--surface);
    padding: var(--section-y) 0;
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}
.contact-info h2 { margin-bottom: 1rem; }
.contact-info ul { list-style: none; margin: 2rem 0 0; padding: 0; }
.contact-info li {
    display: flex; gap: .75rem; align-items: flex-start;
    padding: .75rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--ink); font-size: .95rem;
}
.contact-info li i { color: var(--red); font-size: 1.2rem; flex-shrink: 0; margin-top: .15rem; }
.contact-info li span { color: var(--muted); display: block; font-size: .8rem; margin-bottom: .15rem; }

.form {
    background: var(--paper);
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-size: .85rem; font-weight: 600;
    color: var(--ink); margin-bottom: .35rem;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: .75rem .9rem;
    font: inherit; font-size: .95rem;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: 0;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(30, 42, 94, .12);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form .btn { width: 100%; padding: 1rem; font-size: 1rem; }
.form-honeypot { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }
.form-message {
    padding: 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem;
    font-size: .9rem; display: none;
}
.form-message.is-success { display: block; background: #E6F4EA; color: #1E5128; border: 1px solid #C8E6C9; }
.form-message.is-error { display: block; background: #FDECEA; color: #8A1F1F; border: 1px solid #F5C6CB; }

@media (max-width: 768px) {
    .contact-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
}

/* Mapa
   ========================================================================== */
.map {
    position: relative;
    width: 100%;
    height: clamp(320px, 45vw, 480px);
    background: var(--surface);
    overflow: hidden;
}
.map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    filter: grayscale(.15) contrast(1.02);
}
.map-cta {
    position: absolute;
    bottom: 1.25rem; right: 1.25rem;
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .75rem 1.1rem;
    background: var(--red);
    color: #fff;
    font-weight: 600; font-size: .9rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgba(15, 17, 21, .18);
    transition: all var(--transition);
    z-index: 2;
}
.map-cta:hover {
    background: var(--red-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(15, 17, 21, .22);
}
.map-cta i { font-size: 1.1rem; }

@media (max-width: 560px) {
    .map-cta { bottom: 1rem; right: 1rem; padding: .65rem .9rem; font-size: .85rem; }
}

/* Footer
   ========================================================================== */
.footer {
    background: var(--ink);
    color: rgba(255, 255, 255, .7);
    padding: 4rem 0 2rem;
    font-size: .9rem;
}
.footer a { color: rgba(255, 255, 255, .7); }
.footer a:hover { color: #fff; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}
.footer-brand img {
    height: 48px; width: auto;
    margin-bottom: 1.25rem;
    background: #fff;
    padding: .5rem .75rem;
    border-radius: 8px;
}
.footer-brand-name {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: .5rem;
}
.footer-brand p { color: rgba(255, 255, 255, .65); font-size: .9rem; line-height: 1.6; max-width: 32ch; }
.footer h4 {
    color: #fff;
    font-size: .85rem; font-weight: 600;
    letter-spacing: 0.06em; text-transform: uppercase;
    margin-bottom: 1rem;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer ul li { padding: .35rem 0; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding-top: 2rem;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
    font-size: .8rem; color: rgba(255, 255, 255, .5);
}
.footer-links {
    display: inline-flex; align-items: center; flex-wrap: wrap; gap: .6rem;
}
.footer-sep { color: rgba(255, 255, 255, .25); }
.footer-strong {
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: color var(--transition);
}
.footer-strong:hover { color: var(--red); text-decoration: none; }

@media (max-width: 860px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem 1.5rem; }
    .footer-brand { grid-column: 1 / -1; }
    .footer-brand p { max-width: 48ch; }
}

@media (max-width: 560px) {
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-brand p { max-width: none; }
    .footer-bottom { flex-direction: column; align-items: flex-start; text-align: left; }
}

/* Floating actions (WhatsApp + Back-to-top)
   ========================================================================== */
.float-stack {
    position: fixed;
    bottom: 1.5rem; right: 1.5rem;
    z-index: 90;
    display: flex; flex-direction: column-reverse;
    gap: .75rem;
    align-items: center;
}

.whatsapp-float, .back-to-top {
    width: 56px; height: 56px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 0; padding: 0; cursor: pointer;
    transform: translateY(20px) scale(.8);
    opacity: 0;
    transition: all 300ms cubic-bezier(.4, 0, .2, 1);
}
.whatsapp-float.is-visible,
.back-to-top.is-visible { transform: translateY(0) scale(1); opacity: 1; }

/* WhatsApp */
.whatsapp-float {
    position: relative;
    background: #25D366;
    color: #fff;
    box-shadow: 0 8px 24px rgba(37, 211, 102, .35);
    text-decoration: none;
}
.whatsapp-float:hover { background: #1ebe57; color: #fff; transform: scale(1.06); }
.whatsapp-float i { font-size: 1.75rem; }
.whatsapp-float::after {
    content: "";
    position: absolute; inset: -4px;
    border-radius: 50%;
    border: 2px solid #25D366;
    animation: ping 2s ease-out infinite;
    opacity: 0;
}
@keyframes ping {
    0% { transform: scale(1); opacity: .6; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* Back-to-top */
.back-to-top {
    background: var(--ink);
    color: #fff;
    box-shadow: 0 6px 18px rgba(15, 17, 21, .25);
}
.back-to-top:hover { background: var(--blue); transform: scale(1.06); }
.back-to-top i { font-size: 1.4rem; }

@media (max-width: 480px) {
    .float-stack { bottom: 1rem; right: 1rem; gap: .6rem; }
    .whatsapp-float, .back-to-top { width: 48px; height: 48px; }
    .whatsapp-float i { font-size: 1.5rem; }
    .back-to-top i { font-size: 1.2rem; }
}

/* Animaciones de entrada
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms cubic-bezier(.4, 0, .2, 1), transform 600ms cubic-bezier(.4, 0, .2, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}
