/* ============================================================
   QUALITÁ MUEBLES — Landing Page
   Fábrica de muebles en general, a medida.
   ============================================================ */

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

:root {
    /* Marca */
    --accent: #A5870A; /* dorado — color de marca */
    --accent-dark: #8a730a; /* hover / bordes fuertes */
    --accent-soft: #AD8A34; /* tinte claro para fondos/insignias */

    /* Neutros (paleta del cliente) */
    --bg: #ffffff;
    --surface: #DADADA; /* fondo alterno de secciones */
    --line: #575756; /* bordes y divisores */

    --ink: #1c1a16; /* texto principal */
    --muted: #6f6c68; /* texto secundario, con contraste AA sobre blanco */
    --ink-soft: #4a4740; /* texto secundario con contraste AA sobre --surface */

    --dark: #17140f; /* fondo oscuro (footer) */
    --dark-line: rgba(255, 255, 255, .12);
    --dark-muted: rgba(255, 255, 255, .62);
    --white: #ffffff;

    --font: 'Manrope', system-ui, -apple-system, sans-serif;

    --radius: 12px;
    --radius-lg: 22px;
    --shadow: 0 4px 24px rgba(28, 26, 22, .08);
    --shadow-lg: 0 20px 48px rgba(28, 26, 22, .16);
    --transition: .25s ease;

    --header-h: 84px;
    --section-pad: 100px 0;
    --container: 1180px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    font-size: 16px;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    overflow-x: hidden;
}

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

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

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

section[id] {
    scroll-margin-top: var(--header-h);
}

/* ---------- Utilities ---------- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent-dark);
    margin-bottom: 16px;
}

.eyebrow::before {
    content: '';
    display: block;
    width: 28px;
    height: 2px;
    background: var(--accent);
}

.section-title {
    font-size: clamp(1.9rem, 3.6vw, 2.6rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--ink);
    letter-spacing: -.01em;
}

.section-sub {
    margin-top: 16px;
    font-size: 1.02rem;
    color: var(--muted);
    max-width: 560px;
}

.section-header {
    margin-bottom: 48px;
}

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

.section-header.center .section-sub {
    margin: 16px auto 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: var(--radius);
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: .01em;
    transition: var(--transition);
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(165, 137, 11, .32);
}

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

.btn-outline:hover {
    background: var(--ink);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-ghost {
    border-color: rgba(255, 255, 255, .4);
    color: var(--white);
}

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

/* ---------- Reveal on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .6s ease, transform .6s ease;
}

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

/* ---------- Header / Nav ---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-h);
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.site-header.is-scrolled {
    background: rgba(255, 255, 255, .97);
    border-bottom-color: var(--line);
    box-shadow: 0 2px 20px rgba(28, 26, 22, .06);
}

/* backdrop-filter crea un containing block para descendientes position:fixed,
   lo que atraparía el menú mobile a pantalla completa dentro de la caja del
   header (var(--header-h)) en vez de cubrir todo el viewport. */
.site-header:has(.main-nav.is-open) {
    backdrop-filter: none;
    transition: none;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo .img-logo {
    height: 42px;
    width: 42px;
    object-fit: cover;
}

.nav-logo .img-text {
    object-fit: cover;
    height: 100%;
    width: 6rem;
}

.nav-logo-text {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -.01em;
}

.nav-logo-text em {
    color: var(--accent-dark);
    font-style: normal;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-nav a {
    font-size: .9rem;
    font-weight: 600;
    color: var(--ink);
    transition: var(--transition);
}

.main-nav a:hover {
    color: var(--ink);
}

.main-nav .nav-cta {
    padding: 11px 22px;
}

.menu-toggle {
    position: relative;
    z-index: 1000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
    padding: calc(var(--header-h) + 56px) 0 88px;
    background: var(--bg);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr .9fr;
    gap: 64px;
    align-items: center;
}

.hero-copy h1 {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero-tagline {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-dark);
    margin-bottom: 18px;
}

.hero-desc {
    font-size: 1.02rem;
    color: var(--muted);
    max-width: 500px;
    margin-bottom: 36px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-visual {
    position: relative;
    aspect-ratio: 4/5;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-badge {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(23, 20, 15, .82);
    color: var(--white);
    padding: 12px 18px;
    border-radius: var(--radius);
    font-size: .82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(6px);
}

/* ---------- Sobre nosotros ---------- */
#nosotros {
    padding: var(--section-pad);
}

.about-grid {
    display: grid;
    grid-template-columns: .85fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-visual {
    overflow: hidden;
    aspect-ratio: 4/3;
    border: 1px solid var(--accent);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.about-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-text .section-sub {
    max-width: 100%;
    margin-top: 20px;
}

.about-text .section-sub + .section-sub {
    margin-top: 14px;
}

/* ---------- Productos ---------- */
#productos {
    padding: var(--section-pad);
    background: var(--surface);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 30px 24px;
    /*transition: var(--transition);*/
}

.product-card:hover {
    border-color: var(--accent);
    /*transform: translateY(-6px);*/
    box-shadow: var(--shadow-lg);
}

.product-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 18px;
}

.product-card h3 {
    font-size: 1.02rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.product-card p {
    font-size: .88rem;
    color: var(--muted);
    line-height: 1.6;
}

/* ---------- Beneficios ---------- */
#beneficios {
    padding: var(--section-pad);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.benefit-card {
    text-align: center;
    padding: 40px 28px;
    background: var(--surface);
    border-radius: var(--radius-lg);
}

.benefit-card img {
    width: 3rem;
    margin: 0 auto 1rem;
}

.benefit-check {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.benefit-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
}

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

/* ---------- Galería ---------- */
#galeria {
    padding: var(--section-pad);
    background: var(--surface);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.gallery-thumb {
    position: relative;
    aspect-ratio: 1/1;
    border-radius: 10px;
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--line);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

.gallery-thumb:hover img {
    transform: scale(1.08);
}

.gallery-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(23, 20, 15, 0);
    transition: var(--transition);
}

.gallery-thumb:hover::after {
    background: rgba(23, 20, 15, .12);
}

/* ---------- Lightbox ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s;
}

.lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.lightbox__backdrop {
    position: absolute;
    inset: 0;
    background-color: #000;
    background-size: cover;
    background-position: center;
    filter: blur(36px) brightness(.4);
    transform: scale(1.15);
}

.lightbox__figure {
    position: relative;
    z-index: 1;
    max-width: min(1000px, 92vw);
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.lightbox__figure img {
    max-width: 100%;
    max-height: 74vh;
    width: auto;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    object-fit: contain;
}

.lightbox__figure figcaption {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--white);
    font-size: .95rem;
    font-weight: 600;
}

.lightbox__count {
    color: rgba(255, 255, 255, .65);
    font-weight: 500;
    font-size: .85rem;
}

.lightbox__close, .lightbox__nav {
    position: absolute;
    z-index: 2;
    background-color: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .25);
    color: var(--white);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.lightbox__close:hover, .lightbox__nav:hover {
    background-color: var(--accent);
    color: var(--ink);
}

.lightbox__close {
    top: 24px;
    right: 24px;
}

.lightbox__nav--prev {
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__nav--next {
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__nav--prev:hover, .lightbox__nav--next:hover {
    transform: translateY(-50%) scale(1.08);
}

/* ---------- CTA final ---------- */
#cta {
    padding: 96px 0;
    background: var(--accent);
    text-align: center;
}

.cta-content .eyebrow {
    color: var(--ink);
}

.cta-content .eyebrow::before {
    background: var(--ink);
}

.cta-content .section-title {
    color: var(--ink);
    max-width: 680px;
    margin: 0 auto 16px;
}

.cta-content p {
    color: var(--ink);
    max-width: 520px;
    margin: 0 auto 36px;
    font-size: 1.02rem;
    font-weight: 500;
}

.cta-actions {
    display: flex;
    justify-content: center;
}

/* Sobre fondo dorado, un botón dorado quedaría invisible: se invierte a
   fondo oscuro + texto claro para que el CTA siga siendo el elemento
   con más contraste de la sección. */
#cta .btn-primary {
    background: var(--ink);
    color: var(--white);
}

#cta .btn-primary:hover {
    background: #2a2620;
    box-shadow: 0 10px 24px rgba(28, 26, 22, .35);
}

/* ---------- Contacto ---------- */
#contacto {
    padding: var(--section-pad);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 64px;
    align-items: start;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 32px;
}

.contact-detail {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.contact-detail .icon {
    width: 44px;
    height: 44px;
    /*background: var(--surface);*/
    /*border-radius: 12px;*/
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contact-detail strong {
    display: block;
    font-size: .88rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.contact-detail span, .contact-detail a {
    font-size: .88rem;
    color: var(--muted);
}

.contact-detail a:hover {
    color: var(--accent-dark);
}

.contact-map {
    margin-top: 28px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 420px;
    box-shadow: var(--shadow);
}

.contact-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 420px;
    border: 0;
}

.contact-form {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 44px 40px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group label {
    font-size: .82rem;
    font-weight: 700;
}

.form-group input, .form-group textarea {
    padding: 14px 16px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: .92rem;
    color: var(--ink);
    background: var(--white);
    transition: border-color var(--transition);
    outline: none;
    width: 100%;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-submit {
    width: 100%;
    justify-content: center;
    padding: 16px;
    font-size: 1rem;
}

.form-note {
    font-size: .78rem;
    color: var(--muted);
    margin-top: 14px;
    text-align: center;
}

/* ---------- Footer ---------- */
footer {
    background: var(--surface);
    color: var(--ink);
    padding: 64px 0 28px;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.3fr .8fr 1fr;
    gap: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--line);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-brand img {
    height: 100%;
    width: 120px;
    object-fit: cover;
}

.footer-brand span {
    font-size: 1.08rem;
    font-weight: 800;
}

.footer-col p {
    font-size: .88rem;
    color: var(--ink-soft);
    line-height: 1.75;
    max-width: 300px;
}

.footer-col h4 {
    font-size: .85rem;
    font-weight: 700;
    margin-bottom: 18px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--accent-dark);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col ul li a, .footer-col ul li span {
    font-size: .87rem;
    color: var(--ink-soft);
    transition: color var(--transition);
}

.footer-col ul li a:hover {
    color: var(--accent-dark);
}

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

.footer-bottom p {
    font-size: .82rem;
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-bottom img {
    height: 17px;
    width: auto;
    display: inline;
}

/* ---------- WhatsApp Float ---------- */
.wa-float {
    position: fixed;
    bottom: 48px;
    right: 28px;
    z-index: 900;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(37, 211, 102, .4);
    transition: var(--transition);
}

.wa-float:hover {
    transform: scale(1.1);
}

.wa-float svg {
    width: 28px;
    height: 28px;
    fill: white;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .hero-grid, .about-grid, .contact-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-visual {
        order: -1;
        max-width: 420px;
        margin: 0 auto;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --section-pad: 64px 0;
    }

    .main-nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .main-nav.is-open {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        position: fixed;
        inset: 0;
        top: var(--header-h);
        background: var(--white);
        padding: 40px 32px;
        gap: 24px;
        z-index: 999;
        overflow-y: auto;
    }

    .main-nav.is-open a {
        font-size: 1.15rem;
    }

    .main-nav.is-open .nav-cta {
        margin-top: 8px;
        width: 100%;
        justify-content: center;
    }

    .hero {
        padding: calc(var(--header-h) + 32px) 0 64px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .contact-form {
        padding: 32px 24px;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-col p {
        max-width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .wa-float {
        width: 52px;
        height: 52px;
        bottom: max(20px, env(safe-area-inset-bottom) + 12px);
        right: 20px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .lightbox__nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .lightbox__close {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        top: 16px;
        right: 16px;
    }

    .lightbox__nav--prev {
        left: 8px;
    }

    .lightbox__nav--next {
        right: 8px;
    }
}
