/* =================================================================
 * Velit Modern — extensões de motion, micro-interactions e conteúdo
 * Carregado DEPOIS de velit-theme.css. Adiciona:
 *   - Easing premium token + cubic-bezier customizadas
 *   - Scroll-triggered fade-in (.velit-reveal + JS IntersectionObserver)
 *   - Ripple effect nos botões WhatsApp
 *   - Image zoom refinado com overlay
 *   - Custom cursor em imagens da galeria
 *   - Trust block (4 pilares de privacidade)
 *   - FAQ accordion (CSS-only via <details>)
 *   - Storytelling "Por que escolher" cards
 *   - Visual amenity legend (ícones inline)
 *   - Suite finder chips + filter states
 *   - Comparison tray + modal
 *   - Reservation summary modal
 * ================================================================= */

:root {
    /* Easing premium — curva característica de hospitality moderna */
    --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-decel: cubic-bezier(0, 0, 0.2, 1);
}

/* ============================================
 * 1. Scroll-triggered fade-in
 * GRACEFUL DEGRADATION: conteúdo é visível por padrão.
 * O JS adiciona .js-velit-modern no <body> e SÓ ENTÃO a animação fica armada.
 * Se JS falhar/atrasar, conteúdo aparece normalmente.
 * ============================================ */
body.js-velit-modern .velit-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s var(--ease-premium), transform 0.7s var(--ease-premium);
    will-change: opacity, transform;
}

body.js-velit-modern .velit-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays para cards em grid (até 6) */
body.js-velit-modern .velit-reveal[data-reveal-delay="1"] { transition-delay: 0.06s; }
body.js-velit-modern .velit-reveal[data-reveal-delay="2"] { transition-delay: 0.12s; }
body.js-velit-modern .velit-reveal[data-reveal-delay="3"] { transition-delay: 0.18s; }
body.js-velit-modern .velit-reveal[data-reveal-delay="4"] { transition-delay: 0.24s; }
body.js-velit-modern .velit-reveal[data-reveal-delay="5"] { transition-delay: 0.30s; }
body.js-velit-modern .velit-reveal[data-reveal-delay="6"] { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
    body.js-velit-modern .velit-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ============================================
 * 2. Ripple effect nos botões WhatsApp
 * IMPORTANTE: .velit-wa NÃO entra aqui — ele usa position:fixed
 * e qualquer override de position quebra o float-button no canto.
 * O border-radius:999px do .velit-wa já clipa qualquer overflow.
 * ============================================ */
.contato-wa-btn,
.velit-cta-banner .cta-wa-btn,
.velit-suite-lightbox-content .vsl-cta {
    position: relative;
    overflow: hidden;
}

.contato-wa-btn::after,
.velit-cta-banner .cta-wa-btn::after,
.velit-suite-lightbox-content .vsl-cta::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%),
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0) 60%);
    opacity: 0;
    transition: opacity 0.5s var(--ease-smooth);
    pointer-events: none;
}

.contato-wa-btn:active::after,
.velit-cta-banner .cta-wa-btn:active::after,
.velit-suite-lightbox-content .vsl-cta:active::after {
    opacity: 1;
    transition: opacity 0s;
}

/* ============================================
 * 3. Image zoom refinado (cards de suíte)
 * ============================================ */
.velit-cat-card .cat-card-image,
.velit-suite-card .sc-image {
    position: relative;
}

.velit-cat-card .cat-card-image::after,
.velit-suite-card .sc-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(10, 10, 10, 0) 50%,
        rgba(10, 10, 10, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.4s var(--ease-premium);
    pointer-events: none;
    z-index: 1;
}

.velit-cat-card:hover .cat-card-image::after,
.velit-suite-card:hover .sc-image::after {
    opacity: 1;
}

.velit-cat-card .cat-card-image img,
.velit-suite-card .sc-image img {
    transition: transform 0.8s var(--ease-premium) !important;
}

.velit-cat-card:hover .cat-card-image img,
.velit-suite-card:hover .sc-image img {
    transform: scale(1.06) !important;
}

/* ============================================
 * 4. Custom cursor em imagens da galeria lightbox
 * ============================================ */
.velit-suite-swiper .swiper-slide img {
    cursor: zoom-in;
    transition: filter 0.3s var(--ease-smooth);
}

.velit-suite-swiper .swiper-slide img:hover {
    filter: brightness(1.05);
}

/* ============================================
 * 5. Trust block — 4 pilares de privacidade
 * ============================================ */
.velit-trust-section {
    background: var(--velit-bg-dark);
    color: var(--velit-text-on-dark);
    padding: var(--space-8) 0;
    border-top: 1px solid var(--velit-border-dark);
    border-bottom: 1px solid var(--velit-border-dark);
}

.velit-trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-5);
}

.velit-trust-pillar {
    text-align: center;
    padding: var(--space-6) var(--space-4);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--velit-border-dark);
    border-radius: 4px;
    transition: border-color 0.3s var(--ease-smooth), background 0.3s var(--ease-smooth), transform 0.3s var(--ease-premium);
    position: relative;
}

.velit-trust-pillar:hover {
    border-color: var(--velit-gold);
    background: rgba(212, 175, 55, 0.04);
    transform: translateY(-4px);
}

.velit-trust-pillar .pillar-icon {
    width: 36px;
    height: 36px;
    display: block;
    margin: 0 auto var(--space-4);
    color: var(--velit-gold);
    stroke: currentColor;
    stroke-width: 1.6;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    padding: 18px;
    box-sizing: content-box;
    border: 1px solid var(--velit-gold);
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.06);
}

.velit-trust-pillar h3 {
    font-family: var(--velit-font-display);
    font-weight: 500;
    font-size: 1.35rem;
    color: #ffffff;
    margin: 0 0 var(--space-3);
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.velit-trust-pillar p {
    font-family: var(--velit-font-body);
    font-weight: 400;
    font-size: 0.92rem;
    color: var(--velit-text-on-dark);
    margin: 0;
    line-height: 1.65;
    opacity: 0.85;
}

@media (max-width: 991px) {
    .velit-trust-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .velit-trust-grid { grid-template-columns: 1fr; gap: var(--space-3); }
    .velit-trust-section { padding: var(--space-7) 0; }
}

/* ============================================
 * 6. FAQ section — accordion CSS-only via <details>
 * ============================================ */
.velit-faq-section {
    background: var(--velit-bg-light);
    padding: var(--space-9) 0;
}

.velit-faq-section .section-header {
    text-align: center;
    margin-bottom: var(--space-7);
}

.velit-faq-section .section-header h2 {
    font-family: var(--velit-font-display);
    font-weight: 400;
    color: var(--velit-text-on-light);
    font-size: clamp(1.9rem, 3.2vw, 2.6rem);
    margin: var(--space-2) 0;
}

.velit-faq-section .section-header .sobre-eyebrow {
    color: var(--velit-gold);
}

.velit-faq-list {
    max-width: 800px;
    margin: 0 auto;
    list-style: none;
    padding: 0;
}

.velit-faq-item {
    border-bottom: 1px solid var(--velit-border-light);
    margin: 0;
}

.velit-faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: var(--space-5) 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    font-family: var(--velit-font-display);
    font-weight: 400;
    font-size: 1.2rem;
    color: var(--velit-text-on-light);
    transition: color 0.3s var(--ease-smooth);
}

.velit-faq-item summary::-webkit-details-marker { display: none; }
.velit-faq-item summary::marker { content: ''; }

.velit-faq-item summary::after {
    content: '';
    width: 12px;
    height: 12px;
    border-right: 2px solid var(--velit-gold);
    border-bottom: 2px solid var(--velit-gold);
    transform: rotate(45deg);
    margin-bottom: 6px;
    transition: transform 0.3s var(--ease-smooth);
    flex-shrink: 0;
}

.velit-faq-item[open] summary {
    color: var(--velit-gold);
}

.velit-faq-item[open] summary::after {
    transform: rotate(-135deg);
    margin-bottom: -6px;
}

.velit-faq-item .faq-answer {
    padding: 0 0 var(--space-5);
    font-family: var(--velit-font-body);
    font-weight: 400;
    color: var(--velit-text-on-light-2);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 90%;
}

@media (max-width: 576px) {
    .velit-faq-section { padding: var(--space-7) 0; }
    .velit-faq-item summary { font-size: 1.05rem; padding: var(--space-4) 0; }
    .velit-faq-item .faq-answer { max-width: 100%; }
}

/* ============================================
 * 7. Storytelling "Por que escolher"
 * ============================================ */
.velit-story-section {
    background: var(--velit-bg-light);
    padding: 0 0 var(--space-9);
}

.velit-story-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
    margin-top: var(--space-7);
}

.velit-story-card {
    background: var(--velit-bg-light-2);
    border: 1px solid var(--velit-border-light);
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.4s var(--ease-premium), box-shadow 0.4s var(--ease-premium);
}

.velit-story-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--velit-shadow-md);
}

.velit-story-card .story-icon {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--velit-bg-light-3), var(--velit-bg-light-2));
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--velit-border-light);
}

.velit-story-card .story-icon svg {
    width: 60px;
    height: 60px;
    color: var(--velit-gold);
    stroke: currentColor;
    stroke-width: 1.2;
    fill: none;
}

.velit-story-card .story-body {
    padding: var(--space-5) var(--space-5) var(--space-6);
}

.velit-story-card h3 {
    font-family: var(--velit-font-display);
    font-weight: 400;
    font-size: 1.5rem;
    color: var(--velit-text-on-light);
    margin: 0 0 var(--space-3);
    line-height: 1.2;
}

.velit-story-card p {
    font-family: var(--velit-font-body);
    font-weight: 400;
    font-size: 0.96rem;
    color: var(--velit-text-on-light-2);
    margin: 0;
    line-height: 1.7;
}

@media (max-width: 991px) {
    .velit-story-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .velit-story-grid { grid-template-columns: 1fr; }
    .velit-story-section { padding: 0 0 var(--space-7); }
}

/* ============================================
 * 8. Visual amenity legend (chips com ícones)
 * ============================================ */
.velit-amenity-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--velit-border-dark);
}

.velit-amenity-legend .legend-item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--velit-border-dark);
    border-radius: 999px;
    font-family: var(--velit-font-label);
    font-weight: 400;
    letter-spacing: var(--ls-default);
    text-transform: uppercase;
    font-size: 0.7rem;
    color: var(--velit-text-on-dark);
}

.velit-amenity-legend .legend-item svg {
    width: 14px;
    height: 14px;
    color: var(--velit-gold);
    stroke: currentColor;
    stroke-width: 1.6;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* ============================================
 * 9. Suite finder — chips de filtro
 * ============================================ */
.velit-finder {
    background: var(--velit-bg-light-2);
    border: 1px solid var(--velit-border-light);
    border-radius: 4px;
    padding: var(--space-5);
    margin-bottom: var(--space-6);
}

.velit-finder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
    gap: var(--space-3);
}

.velit-finder-header h3 {
    font-family: var(--velit-font-display);
    font-weight: 400;
    font-size: 1.4rem;
    color: var(--velit-text-on-light);
    margin: 0;
}

.velit-finder-count {
    font-family: var(--velit-font-label);
    font-weight: 400;
    letter-spacing: var(--ls-default);
    text-transform: uppercase;
    font-size: var(--label-sm);
    color: var(--velit-text-on-light-2);
}

.velit-finder-count strong {
    color: var(--velit-gold);
    font-weight: 500;
}

.velit-finder-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.velit-finder-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--velit-bg-light);
    border: 1px solid var(--velit-border-light);
    border-radius: 999px;
    font-family: var(--velit-font-label);
    font-weight: 400;
    letter-spacing: var(--ls-default);
    text-transform: uppercase;
    font-size: var(--label-sm);
    color: var(--velit-text-on-light);
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
}

.velit-finder-chip:hover {
    border-color: var(--velit-gold);
}

.velit-finder-chip[aria-pressed="true"] {
    background: var(--velit-gold);
    border-color: var(--velit-gold);
    color: var(--velit-bg-dark);
}

.velit-finder-clear {
    background: transparent;
    border: 0;
    color: var(--velit-text-on-light-2);
    font-family: var(--velit-font-label);
    font-weight: 400;
    letter-spacing: var(--ls-default);
    text-transform: uppercase;
    font-size: var(--label-xs);
    cursor: pointer;
    padding: var(--space-2);
    margin-left: var(--space-2);
    opacity: 0;
    transition: opacity 0.3s var(--ease-smooth), color 0.25s;
}

.velit-finder[data-has-filters="true"] .velit-finder-clear {
    opacity: 1;
}

.velit-finder-clear:hover {
    color: var(--velit-gold);
}

/* Cards filtrados — hidden gradualmente */
.velit-cat-card[data-filter-hidden="true"],
.velit-suite-card[data-filter-hidden="true"] {
    opacity: 0.25;
    pointer-events: none;
    transition: opacity 0.4s var(--ease-smooth);
}

@media (max-width: 576px) {
    .velit-finder { padding: var(--space-4); }
    .velit-finder-header h3 { font-size: 1.2rem; }
}

/* ============================================
 * 10. Comparison tool — REMOVIDO na vistoria.
 * Kill-switch: caso o navegador tenha cache do JS antigo,
 * qualquer .velit-compare-* injetado no DOM fica invisível.
 * ============================================ */
[class*="velit-compare-"] {
    display: none !important;
}

/* ============================================
 * 11. Reservation summary modal
 * ============================================ */
.velit-reservation-modal {
    position: fixed;
    inset: 0;
    background: rgba(8, 8, 8, 0.95);
    backdrop-filter: blur(10px);
    z-index: 99998;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.velit-reservation-modal.is-open {
    display: flex;
}

.velit-reservation-inner {
    max-width: 520px;
    width: 100%;
    background: var(--velit-bg-dark);
    border: 1px solid var(--velit-border-dark);
    border-radius: 4px;
    padding: var(--space-7);
    position: relative;
    color: var(--velit-text-on-dark);
    box-shadow: var(--velit-shadow-xl);
}

.velit-reservation-close {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    background: transparent;
    border: 0;
    color: var(--velit-text-on-dark-2);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
    transition: color 0.25s, background-color 0.25s;
}

.velit-reservation-close:hover {
    color: var(--velit-gold);
    background: rgba(255, 255, 255, 0.05);
}

.velit-reservation-inner h3 {
    font-family: var(--velit-font-display);
    font-weight: 400;
    font-size: 1.6rem;
    color: var(--velit-text-on-dark);
    margin: 0 0 var(--space-5);
}

.velit-reservation-suite {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--velit-bg-dark-2);
    border-radius: 4px;
    margin-bottom: var(--space-5);
}

.velit-reservation-suite img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 2px;
}

.velit-reservation-suite .info h4 {
    font-family: var(--velit-font-display);
    font-weight: 400;
    font-size: 1.1rem;
    color: var(--velit-gold);
    margin: 0;
}

.velit-reservation-suite .info p {
    font-family: var(--velit-font-label);
    font-weight: 400;
    letter-spacing: var(--ls-default);
    text-transform: uppercase;
    font-size: var(--label-xs);
    color: var(--velit-text-on-dark-2);
    margin: var(--space-1) 0 0;
}

.velit-reservation-fields {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.velit-reservation-field label {
    display: block;
    font-family: var(--velit-font-label);
    font-weight: 400;
    letter-spacing: var(--ls-default);
    text-transform: uppercase;
    font-size: var(--label-xs);
    color: var(--velit-text-on-dark-2);
    margin-bottom: var(--space-2);
}

.velit-reservation-field select,
.velit-reservation-field input {
    width: 100%;
    background: var(--velit-bg-dark-2);
    border: 1px solid var(--velit-border-dark);
    border-radius: 2px;
    padding: var(--space-3);
    color: var(--velit-text-on-dark);
    font-family: var(--velit-font-body);
    font-size: 1rem;
    color-scheme: dark;
}

.velit-reservation-field select:focus,
.velit-reservation-field input:focus {
    outline: none;
    border-color: var(--velit-gold);
}

.velit-reservation-submit {
    width: 100%;
    background: var(--velit-wa-bg);
    border: 0;
    color: #fff;
    padding: var(--space-4);
    font-family: var(--velit-font-label);
    font-weight: 500;
    letter-spacing: var(--ls-default);
    text-transform: uppercase;
    font-size: var(--label-md);
    cursor: pointer;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    transition: background-color 0.25s, transform 0.25s;
}

.velit-reservation-submit:hover {
    background: var(--velit-wa-bg-hover);
    transform: translateY(-2px);
}

.velit-reservation-submit svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

@media (max-width: 576px) {
    .velit-reservation-inner { padding: var(--space-5); }
}

/* ============================================
 * 12. Light leak animado no hero (subtle glow)
 * ============================================ */
.velit-hero-immersive::after {
    content: '';
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(ellipse at 30% 30%,
        rgba(201, 168, 76, 0.06) 0%,
        rgba(201, 168, 76, 0) 50%);
    pointer-events: none;
    z-index: 2;
    animation: velit-glow 12s ease-in-out infinite;
}

@keyframes velit-glow {
    0%, 100% { transform: translate(0, 0); opacity: 0.7; }
    50% { transform: translate(5%, -3%); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .velit-hero-immersive::after { animation: none; }
}
