/* =========================================================
   Andrea Hoyos Fotografía — Estilos de marca
   Paleta (no modificar): navy #001429 · accent #ff9800
   charcoal #1a1c1d · background-light #f9f8f6
   action-blue #0A0C12 · onyx #353839
   ========================================================= */

:root {
    --navy: #001429;
    --accent: #ff9800;
    --charcoal: #1a1c1d;
    --bg-light: #f9f8f6;
    --action-blue: #0A0C12;
    --onyx: #353839;
}

* {
    box-sizing: border-box;
}

body {
    cursor: auto;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--accent);
    color: #ffffff;
}

/* =========================================================
   Botones universales
   ========================================================= */
.btn-onyx {
    background-color: #353839;
    color: #ffffff;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-onyx:hover {
    background-color: #ff9800;
    box-shadow: 0 10px 30px -10px rgba(255, 152, 0, 0.5);
    transform: translateY(-2px);
    opacity: 0.95;
    border-color: #ff9800;
}

/* =========================================================
   Overlays / atmósfera
   ========================================================= */
.hero-overlay-subtle {
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 152, 0, 0.07), transparent 55%),
        radial-gradient(circle at 85% 85%, rgba(0, 20, 41, 0.10), transparent 60%);
    pointer-events: none;
}

.parallax-bg {
    animation: kenburns 26s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes kenburns {
    0%   { transform: scale(1) translate3d(0,0,0); }
    100% { transform: scale(1.08) translate3d(-1%, -1%, 0); }
}

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

/* =========================================================
   Marco de lujo (luxury-border)
   Doble filete: borde exterior (dado por utilidades Tailwind)
   + hairline dorado interior
   ========================================================= */
.luxury-border {
    position: relative;
}

.luxury-border::before {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(255, 152, 0, 0.22);
    pointer-events: none;
    z-index: 1;
}

/* =========================================================
   Servicios — Acordeón de detalles de paquete
   ========================================================= */
.package-toggle {
    background: transparent;
    cursor: pointer;
    transition: color 0.3s ease;
}

.package-toggle:hover {
    color: var(--accent);
}

.package-toggle-icon {
    width: 22px;
    height: 22px;
    border-radius: 9999px;
    border: 1px solid rgba(0, 20, 41, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
    transition: transform 0.35s ease, background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.package-toggle:hover .package-toggle-icon {
    border-color: var(--accent);
    color: var(--accent);
}

.package-toggle.is-open .package-toggle-icon {
    transform: rotate(135deg);
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

.package-details {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s ease;
}

.package-details.is-open {
    grid-template-rows: 1fr;
}

.package-details-inner {
    overflow: hidden;
}

/* =========================================================
   Portafolio — Libro editorial realista
   ========================================================= */
.realistic-book-shadow {
    transform: perspective(2000px) rotateX(0.6deg);
    box-shadow:
        0 90px 100px -40px rgba(0, 20, 41, 0.55),
        0 40px 50px -25px rgba(0, 20, 41, 0.45),
        0 8px 24px rgba(0, 20, 41, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.04);
    transition: transform 0.6s ease;
}

.realistic-book-shadow::after {
    content: '';
    position: absolute;
    left: 6%;
    right: 6%;
    bottom: -34px;
    height: 40px;
    background: radial-gradient(ellipse at center, rgba(0, 20, 41, 0.35) 0%, rgba(0, 20, 41, 0) 72%);
    z-index: -1;
    pointer-events: none;
}

/* Canto de páginas apiladas (izquierda y derecha del libro) */
.page-thickness {
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.16) 0px,
            rgba(255, 255, 255, 0.16) 1px,
            rgba(0, 0, 0, 0.08) 1px,
            rgba(0, 0, 0, 0.08) 3px
        );
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.4);
}

/* Pliegue central del lomo — profundidad de encuadernación */
.book-spine-depth {
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.45) 0%,
        rgba(0, 0, 0, 0.12) 30%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(0, 0, 0, 0.12) 70%,
        rgba(0, 0, 0, 0.45) 100%
    );
    filter: blur(1px);
}

/* Degradado de legibilidad tipo cine sobre imagen */
.cinema-gradient {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.88) 0%,
        rgba(0, 0, 0, 0.35) 40%,
        rgba(0, 0, 0, 0) 68%
    );
}

/* Pestañas superiores estilo separador de libro real */
.trapezoid-tab {
    clip-path: polygon(14% 0, 86% 0, 100% 100%, 0% 100%);
    background: rgba(0, 20, 41, 0.06);
    color: var(--navy);
}

.top-tab-inactive {
    background: rgba(0, 20, 41, 0.06);
    color: var(--navy);
}

.top-tab-active {
    background: var(--action-blue);
    color: #ffffff;
    box-shadow: 0 -10px 20px -8px rgba(0, 0, 0, 0.35);
}

.vertical-text-up {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

/* =========================================================
   Footer — logo en positivo blanco sobre navy
   ========================================================= */
.footer-logo {
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

/* =========================================================
   Contacto — utilidades puntuales
   ========================================================= */
.contact-info-icon {
    width: 44px;
    height: 44px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 152, 0, 0.35);
    color: var(--accent);
    flex-shrink: 0;
}

.input-luxury {
    background: transparent;
    border-bottom: 1px solid rgba(0, 20, 41, 0.2);
}

.input-luxury:focus {
    outline: none;
    border-color: var(--accent);
}

/* =========================================================
   Portafolio — Galería tipo mosaico
   ========================================================= */
.gallery-tab {
    background: transparent;
    color: var(--navy);
    border: 1px solid rgba(0, 20, 41, 0.15);
}

.gallery-tab.is-active {
    background: var(--navy);
    color: #ffffff;
    border-color: var(--navy);
}

.gallery-tab:not(.is-active):hover {
    border-color: var(--accent);
    color: var(--accent);
}

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

@media (min-width: 640px) {
    .instagram-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
}

.gallery-item {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: 0;
    overflow: hidden;
    cursor: pointer;
    background: var(--navy);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: grayscale(15%);
    transition: transform 0.5s ease, filter 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.gallery-item::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 45%;
    background: linear-gradient(to top, rgba(0, 20, 41, 0.65), rgba(0, 20, 41, 0));
    pointer-events: none;
}

.gallery-item-tag {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 2;
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #ffffff;
    padding: 4px 2px;
    font-weight: 700;
}

.gallery-item.is-hidden {
    display: none;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 20, 41, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 5vh 5vw;
}

.lightbox.is-open {
    display: flex;
}

.lightbox img,
.lightbox video {
    max-width: 100%;
    max-height: 90vh;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.lightbox img[hidden],
.lightbox video[hidden] {
    display: none;
}

.lightbox-close {
    position: absolute;
    top: 28px;
    right: 32px;
    width: 46px;
    height: 46px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    background: transparent;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    background: rgba(0, 20, 41, 0.4);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-nav:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.lightbox-prev {
    left: 16px;
}

.lightbox-next {
    right: 16px;
}

@media (max-width: 640px) {
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    .lightbox-prev { left: 6px; }
    .lightbox-next { right: 6px; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 768px) {
    .realistic-book-shadow {
        transform: none;
    }
}
