/* =============================================================
   MantizIS — Components
   Header, navegación, botones, cards, footer
   ============================================================= */

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

.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--duration-fast) var(--ease),
                background var(--duration-fast) var(--ease);
}

.site-header.is-scrolled {
    border-bottom-color: var(--line);
    background: rgba(255, 255, 255, 0.95);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-6);
    height: 76px;
    padding-inline: var(--container-padding);
    max-width: var(--container-max);
    margin-inline: auto;
}

.site-logo img {
    height: 32px;
    width: auto;
}

.primary-nav ul {
    display: flex;
    align-items: center;
    gap: var(--sp-6);
}

.primary-nav a {
    font-size: var(--fs-small);
    font-weight: var(--fw-medium);
    color: var(--ink-soft);
    transition: color var(--duration-fast) var(--ease);
    position: relative;
}

.primary-nav a:hover {
    color: var(--brand-deep);
}

.primary-nav .nav-cta {
    background: var(--ink);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-weight: var(--fw-semibold);
}

.primary-nav .nav-cta:hover {
    background: var(--brand-deep);
    color: white;
}

/* Toggle móvil */
.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    z-index: var(--z-modal);
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    transition: all var(--duration-fast) var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 960px) {
    .nav-toggle {
        display: flex;
    }
    .primary-nav {
        position: fixed;
        inset: 76px 0 0 0;
        z-index: calc(var(--z-modal) - 1);
        min-height: calc(100dvh - 76px);
        background: rgba(255, 255, 255, 0.98);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
        box-shadow: var(--shadow-md);
        padding: var(--sp-6);
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform var(--duration-medium) var(--ease);
    }
    .primary-nav.is-open {
        transform: translateX(0);
    }
    .primary-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: var(--sp-4);
    }
    .primary-nav a {
        font-size: var(--fs-headline);
        padding: var(--sp-3) 0;
        border-bottom: 1px solid var(--line);
        display: block;
    }
    .primary-nav .nav-cta {
        text-align: center;
        margin-top: var(--sp-4);
        padding: var(--sp-4) var(--sp-5);
        font-size: var(--fs-body);
    }
}

/* ============= BOTONES ============= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: 14px 28px;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: var(--fs-body);
    font-weight: var(--fw-semibold);
    line-height: 1;
    letter-spacing: -0.01em;
    transition: all var(--duration-fast) var(--ease);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

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

.btn--primary:hover {
    background: var(--brand-deep);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn--brand:hover {
    background: var(--brand-deep);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn--ghost {
    background: transparent;
    color: var(--ink);
    border: 1.5px solid var(--ink);
}

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

.btn--outline-light {
    background: transparent;
    color: white;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
}

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

.btn--lg {
    padding: 18px 36px;
    font-size: var(--fs-body-lg);
}

.btn .arrow {
    transition: transform var(--duration-fast) var(--ease);
}

.btn:hover .arrow {
    transform: translateX(4px);
}

/* ============= LINK CON FLECHA ============= */

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    font-weight: var(--fw-semibold);
    color: var(--brand-deep);
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: all var(--duration-fast) var(--ease);
}

.link-arrow:hover {
    border-bottom-color: var(--brand-deep);
    gap: var(--sp-3);
}

.link-arrow .arrow {
    transition: transform var(--duration-fast) var(--ease);
}

.link-arrow:hover .arrow {
    transform: translateX(3px);
}

/* ============= CARDS ============= */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: var(--sp-6);
    transition: all var(--duration-medium) var(--ease);
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    height: 100%;
}

.card:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card h3 {
    font-size: var(--fs-headline);
    font-weight: var(--fw-semibold);
}

.card p {
    color: var(--ink-mute);
    line-height: var(--lh-relaxed);
}

/* Card numerada (proceso) */
.card-numbered {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: var(--sp-6);
    position: relative;
    height: 100%;
}

.card-numbered__number {
    font-family: var(--font-mono);
    font-size: var(--fs-small);
    font-weight: var(--fw-bold);
    color: var(--brand);
    letter-spacing: var(--ls-wide);
    margin-bottom: var(--sp-3);
}

.card-numbered h3 {
    font-size: var(--fs-headline);
    font-weight: var(--fw-semibold);
    margin-bottom: var(--sp-2);
}

.card-numbered p {
    color: var(--ink-mute);
    line-height: var(--lh-relaxed);
}

/* Product card */
.product-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all var(--duration-medium) var(--ease);
    height: 100%;
}

.product-card:hover {
    border-color: var(--brand);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.product-card__image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--surface-stone);
    position: relative;
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-slow) var(--ease);
}

.product-card:hover .product-card__image img {
    transform: scale(1.04);
}

.product-card__body {
    padding: var(--sp-5);
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    flex: 1;
}

.product-card__tag {
    font-family: var(--font-mono);
    font-size: var(--fs-micro);
    font-weight: var(--fw-medium);
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
    color: var(--brand);
}

.product-card h3 {
    font-size: 1.375rem;
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
}

.product-card p {
    color: var(--ink-mute);
    font-size: var(--fs-small);
    line-height: var(--lh-relaxed);
    flex: 1;
}

.product-card__cta {
    margin-top: var(--sp-3);
}

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

.site-footer {
    background: var(--surface-darker);
    color: rgba(255, 255, 255, 0.75);
    padding-block: var(--sp-9) var(--sp-6);
    margin-top: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: var(--sp-7);
    padding-bottom: var(--sp-8);
    border-bottom: 1px solid var(--line-dark);
}

@media (max-width: 880px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
}

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

.footer-logo {
    height: 36px;
    width: auto;
    filter: brightness(1.2);
    margin-bottom: var(--sp-3);
}

.footer-tag {
    font-size: var(--fs-small);
    color: rgba(255, 255, 255, 0.6);
    line-height: var(--lh-relaxed);
    max-width: 32ch;
}

.footer-col h4 {
    font-size: var(--fs-small);
    font-weight: var(--fw-semibold);
    color: white;
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
    margin-bottom: var(--sp-4);
    font-family: var(--font-mono);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

.footer-col a {
    color: rgba(255, 255, 255, 0.65);
    font-size: var(--fs-small);
    transition: color var(--duration-fast) var(--ease);
}

.footer-col a:hover {
    color: var(--brand-bright);
}

.footer-bottom {
    padding-top: var(--sp-5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-3);
    font-size: var(--fs-micro);
    color: rgba(255, 255, 255, 0.4);
}

.footer-legal {
    display: flex;
    gap: var(--sp-5);
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.5);
}

.footer-legal a:hover {
    color: var(--brand-bright);
}
