/* ======================================================
   KOTO STUDIO — SISTEMA DE DISEÑO CINEMATOGRÁFICO & LUXURY
   Inspirado en Tempo y la Suite Cinematográfica Dinamo
   ====================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,700;1,9..40,400&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    --bg: #0e0d0b;
    --bg-card: #141310;
    --bg-card-hover: #1c1a16;
    --fg: #ebdcb9;
    --fg-muted: #a69a84;
    --accent: #d4af37;
    --accent-light: #f5ecd6;
    --border: rgba(235, 220, 185, 0.15);
    --border-hover: rgba(235, 220, 185, 0.4);
    --font-title: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg);
}

body {
    min-height: 100vh;
    background-color: var(--bg);
    color: var(--fg);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ======================================================
   HERO CINEMATOGRÁFICO (REGLAS EXACTAS DE TEMPO)
   ====================================================== */
.center-track {
    position: relative;
    width: 100%;
    min-height: 100svh;
    background-color: var(--bg);
    color: var(--fg);
}

.center-stage {
    position: relative;
    width: 100%;
    height: 100svh;
    min-height: 600px;
    overflow: hidden;
    isolation: isolate;
    background-color: var(--bg);
}

.center-art {
    position: absolute;
    inset: 0;
    top: 40px;
    bottom: 95px;
    z-index: 1;
    mask-image: linear-gradient(transparent, black 8%, black 88%, transparent);
    -webkit-mask-image: linear-gradient(transparent, black 8%, black 88%, transparent);
    pointer-events: none;
}

.center-art img,
.center-art video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
}

.center-art img {
    transition: opacity 0.6s ease;
    z-index: 1;
}

.center-art video {
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 2;
}

.has-film .center-art video {
    opacity: 1;
}

.has-film .center-art img {
    opacity: 0;
}

.center-shade {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(0deg, var(--bg) 0%, transparent 42%), 
                linear-gradient(180deg, var(--bg) 0%, rgba(14, 13, 11, 0.45) 25%, transparent 40%);
    pointer-events: none;
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.center-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 32px 4.5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 20;
    transition: opacity 0.5s ease;
}

.center-brand {
    font-family: var(--font-title);
    font-weight: 500;
    font-size: 30px;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--fg);
    text-decoration: none;
    user-select: none;
}

.center-explore {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 17px;
    line-height: 1.2;
    color: var(--fg);
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 18px;
    border-radius: 9999px;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.center-explore:hover {
    opacity: 0.8;
}

.center-title {
    position: absolute;
    top: 90px;
    left: 4%;
    right: 4%;
    margin: 0;
    text-align: center;
    font-family: var(--font-title);
    font-weight: 500;
    font-size: clamp(48px, 5.4vw, 90px);
    line-height: 0.94;
    letter-spacing: -0.045em;
    color: var(--fg);
    text-wrap: balance;
    z-index: 4;
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.center-title .title-break {
    display: none;
}

.center-bottom {
    position: absolute;
    bottom: 37px;
    left: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    z-index: 4;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.center-bottom p {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(21px, 1.8vw, 26px);
    line-height: 1.25;
    color: var(--fg);
    text-align: center;
    margin: 0;
    max-width: 520px;
}

/* Botón Champán de 62px con texto centrado, sin flechas */
.center-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 62px;
    min-height: 60px;
    max-height: 66px;
    padding: 0 42px;
    border-radius: 9999px;
    border: none;
    background-color: var(--fg);
    color: var(--bg);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 18px;
    letter-spacing: -0.025em;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                background-color 0.2s ease,
                color 0.2s ease;
    text-decoration: none;
}

@media (hover: hover) {
    .center-cta:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 30px rgba(235, 220, 185, 0.3);
        background-color: #f7eed8;
    }
}

.center-cta:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Botón Flotante Volver al Inicio */
.center-return {
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    min-height: 58px;
    max-height: 64px;
    padding: 0 34px;
    border-radius: 9999px;
    border: 1px solid rgba(235, 220, 185, 0.4);
    background: rgba(14, 13, 11, 0.88);
    color: var(--fg);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 16px;
    letter-spacing: -0.02em;
    text-align: center;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    z-index: 25;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.25s ease, background-color 0.2s ease, border-color 0.2s ease;
    pointer-events: none;
}

@media (hover: hover) {
    .center-return:hover {
        background: rgba(14, 13, 11, 0.98);
        border-color: var(--fg);
        transform: translateX(-50%) translateY(-2px);
    }
}

/* Modo Inmersivo */
.immersive .center-title,
.immersive .center-bottom {
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
}

.immersive .center-shade {
    opacity: 0;
}

.immersive .center-return {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* Foco Accesible */
.center-cta:focus-visible,
.center-return:focus-visible,
.center-explore:focus-visible,
.center-brand:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 4px;
}

/* Responsive Mobile (<= 700px) */
@media (max-width: 700px) {
    .center-stage {
        min-height: 660px;
        height: 100svh;
    }
    
    .center-header {
        padding: 24px 20px;
    }
    
    .center-brand {
        font-size: 26px;
    }
    
    .center-explore {
        font-size: 15px;
        padding: 8px 12px;
    }
    
    .center-title {
        top: 94px;
        font-size: clamp(38px, 10vw, 64px);
        line-height: 0.96;
        left: 16px;
        right: 16px;
    }
    
    .center-title .title-break {
        display: block;
    }
    
    .center-koto .center-art {
        top: 140px;
        bottom: 200px;
        left: -45%;
        right: -45%;
    }
    
    .center-koto .center-art img,
    .center-koto .center-art video {
        object-fit: contain;
        object-position: 50% 50%;
    }
    
    .center-bottom {
        bottom: 30px;
        left: 20px;
        right: 20px;
        gap: 16px;
    }
    
    .center-bottom p {
        font-size: 20px;
        max-width: 320px;
    }
    
    .center-cta {
        height: 60px;
        min-height: 60px;
        font-size: 17px;
        padding: 0 32px;
        width: 100%;
        max-width: 320px;
    }
    
    .center-return {
        bottom: 30px;
        height: 58px;
        min-height: 58px;
        font-size: 15px;
        padding: 0 28px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .center-art video {
        display: none !important;
    }
    
    .center-art img {
        opacity: 1 !important;
        transition: none !important;
    }
    
    .center-title,
    .center-bottom,
    .center-shade,
    .center-cta,
    .center-return {
        transition: none !important;
        transform: none !important;
    }
}

/* ======================================================
   NAVEGACIÓN GLOBAL CORPORATIVA
   ====================================================== */
.global-navbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(14, 13, 11, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-b: 1px solid var(--border);
    transition: all 0.3s ease;
}

.nav-link {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 15px;
    color: var(--fg-muted);
    transition: color 0.2s ease;
    text-decoration: none;
    position: relative;
    padding: 6px 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--fg);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--fg);
    border-radius: 2px;
}

/* Botones genéricos de interfaz */
.btn-pill-champagne {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    padding: 0 32px;
    border-radius: 9999px;
    background: var(--fg);
    color: var(--bg);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 15px;
    letter-spacing: -0.01em;
    text-decoration: none;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
}

.btn-pill-champagne:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(235, 220, 185, 0.2);
}

.btn-pill-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    padding: 0 30px;
    border-radius: 9999px;
    background: transparent;
    border: 1px solid var(--border-hover);
    color: var(--fg);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
}

.btn-pill-outline:hover {
    border-color: var(--fg);
    background: rgba(235, 220, 185, 0.05);
    transform: translateY(-2px);
}

/* Tarjetas de Producto / Colección */
.card-koto {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.card-koto:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

/* Inputs de formulario */
.input-koto {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 18px;
    color: var(--fg);
    font-family: var(--font-body);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.input-koto:focus {
    border-color: var(--fg);
    background: rgba(255, 255, 255, 0.06);
}

/* Drawer del Carrito */
.cart-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    max-width: 440px;
    background: #11100e;
    border-left: 1px solid var(--border);
    z-index: 60;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
}

.cart-drawer.active {
    transform: translateX(0);
}

.cart-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 55;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-backdrop.active {
    opacity: 1;
    visibility: visible;
}
