/* ========================================
   RF Serviços de Transportes
   Custom Styles & Design System
   ======================================== */

/* --- Base Reset --- */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #0b1326;
    color: #dae2fd;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Manrope', sans-serif;
    margin: 0;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea { font: inherit; }

/* --- Skip Navigation (a11y) --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 10000;
    padding: 0.75rem 1.5rem;
    background: #abc9ef;
    color: #07101f;
    font-weight: 600;
    border-radius: 0 0 0.5rem 0.5rem;
    transition: top 0.3s;
}
.skip-link:focus { top: 0; }

/* --- Focus Styles (a11y) --- */
*:focus-visible {
    outline: 2px solid #abc9ef;
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Scroll Progress Bar --- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #abc9ef, #ff6b35);
    z-index: 9999;
    transition: width 0.1s linear;
    will-change: width;
}

/* --- Icon System --- */
.icon {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}
.icon-sm { width: 1rem; height: 1rem; }
.icon-lg { width: 2rem; height: 2rem; }
.icon-xl { width: 2.5rem; height: 2.5rem; }
.icon-fill { fill: currentColor; stroke: none; }

/* --- Glass & Shadow Utilities --- */
.ghost-border { border: 1px solid rgba(255, 255, 255, 0.05); }
.ambient-shadow { box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3), 0 10px 20px rgba(0, 0, 0, 0.2); }
.glass-panel {
    background: linear-gradient(145deg, rgba(23, 31, 51, 0.7), rgba(13, 22, 40, 0.8));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active { opacity: 1; transform: translateY(0); }

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.active { opacity: 1; transform: translateX(0); }

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right.active { opacity: 1; transform: translateX(0); }

.reveal-scale {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.active { opacity: 1; transform: scale(1); }

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* --- Hero Car Container --- */
.hero-car-container {
    position: relative;
    overflow: hidden;
    border-radius: 2rem;
    background: linear-gradient(135deg, rgba(171,201,239,0.05) 0%, rgba(5,42,72,0.15) 100%);
    box-shadow: 0 0 60px rgba(171,201,239,0.15), 0 25px 50px rgba(11,19,38,0.5),
                inset 0 0 60px rgba(171,201,239,0.03);
}
.hero-car-container img {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-car-container:hover img {
    transform: scale(1.03);
}
.hero-car-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(171,201,239,0.08) 0%, transparent 50%, rgba(255,107,53,0.06) 100%);
    pointer-events: none;
    z-index: 2;
    border-radius: 2rem;
}
.hero-car-container::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, rgba(171,201,239,0.4), rgba(255,107,53,0.28), rgba(171,201,239,0.4));
    border-radius: 2.2rem;
    z-index: -1;
    opacity: 0.5;
    filter: blur(15px);
}

/* --- Keyframe Animations --- */
@keyframes rfGlow {
    0%, 100% { box-shadow: 0 0 60px rgba(171,201,239,0.15), 0 25px 50px rgba(11,19,38,0.5); }
    50% { box-shadow: 0 0 70px rgba(171,201,239,0.2), 0 25px 55px rgba(11,19,38,0.55); }
}
.rf-glow { animation: rfGlow 10s ease-in-out infinite; }

@keyframes waPulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
.wa-pulse { animation: waPulse 4s ease-in-out infinite; }

@keyframes floatGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(171,201,239,0.1), 0 20px 40px rgba(11,19,38,0.4); }
    50% { box-shadow: 0 0 30px rgba(171,201,239,0.2), 0 25px 50px rgba(11,19,38,0.5); }
}
.float-glow { animation: floatGlow 4s ease-in-out infinite; }

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
.shimmer-text {
    background-size: 200% auto;
    animation: shimmer 6s linear infinite;
}

/* --- Logo Glow --- */
.logo-glow {
    filter: drop-shadow(0 0 10px rgba(171,201,239,0.5)) drop-shadow(0 0 20px rgba(255,107,53,0.35));
    transition: all 0.3s ease;
}
.logo-glow:hover {
    filter: drop-shadow(0 0 15px rgba(171,201,239,0.7)) drop-shadow(0 0 30px rgba(255,107,53,0.55));
    transform: scale(1.05);
}

/* --- RF Card --- */
.rf-card {
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    background: linear-gradient(145deg, rgba(27, 37, 58, 0.6), rgba(17, 24, 39, 0.8));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.rf-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4), 0 15px 30px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.05);
    border-color: rgba(171,201,239,0.15);
}

/* --- RF Button --- */
.rf-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.rf-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}
.rf-btn:hover::before { left: 100%; }
.rf-btn:hover {
    box-shadow: 0 0 40px rgba(171,201,239,0.4), 0 15px 40px rgba(11,19,38,0.5);
}

/* --- Mobile Menu --- */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu.open { transform: translateX(0); }

.mobile-overlay {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* --- Hamburger --- */
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #abc9ef;
    margin: 5px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: translateX(-10px); }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* --- Navbar Scrolled State --- */
#navbar {
    transition: background-color 0.3s, backdrop-filter 0.3s, box-shadow 0.3s;
}
#navbar.scrolled {
    background-color: rgba(11, 19, 38, 0.85) !important;
    backdrop-filter: blur(40px);
    box-shadow: 0px 20px 40px rgba(11, 19, 38, 0.4);
}

/* --- Step Connector (Como Funciona) --- */
.step-connector {
    position: relative;
}
.step-connector::after {
    content: '';
    position: absolute;
    top: 2rem;
    right: -50%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, rgba(171,201,239,0.3), rgba(171,201,239,0.05));
    pointer-events: none;
}
.step-connector:last-child::after { display: none; }

/* --- Step Number --- */
.step-number {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    color: #07101f;
    background: linear-gradient(135deg, #abc9ef, #6f91c4);
    box-shadow: 0 0 25px rgba(171,201,239,0.3);
    margin: 0 auto 1.25rem;
    position: relative;
    z-index: 2;
}

/* --- Testimonial Card --- */
.testimonial-card {
    position: relative;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    background: linear-gradient(145deg, rgba(27, 37, 58, 0.5), rgba(17, 24, 39, 0.7));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.3), 0 10px 20px rgba(0,0,0,0.2);
}
.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 4rem;
    font-family: 'Manrope', sans-serif;
    color: rgba(171, 201, 239, 0.1);
    line-height: 1;
    pointer-events: none;
}

/* --- FAQ Accordion --- */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 1.5rem;
}
.faq-content.open {
    max-height: 200px;
    padding: 0 1.5rem 1.5rem;
}

/* --- WhatsApp Preset Modal --- */
.wa-modal-open {
    overflow: hidden;
}

.wa-intent-modal[hidden] {
    display: none;
}

.wa-intent-modal {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.wa-intent-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 10, 20, 0.76);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.wa-intent-panel {
    position: relative;
    width: min(100%, 34rem);
    max-height: min(88vh, 48rem);
    overflow-y: auto;
    border-radius: 1.75rem;
    border: 1px solid rgba(171, 201, 239, 0.18);
    background:
        radial-gradient(circle at 15% 0%, rgba(171, 201, 239, 0.18), transparent 34%),
        linear-gradient(145deg, rgba(19, 27, 46, 0.98), rgba(8, 15, 29, 0.98));
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), 0 0 45px rgba(171, 201, 239, 0.12);
    padding: 1.5rem;
    animation: waPanelIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes waPanelIn {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.wa-intent-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    color: #dae2fd;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1;
    transition: transform 0.25s ease, background 0.25s ease;
}

.wa-intent-close:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: rotate(90deg);
}

.wa-intent-kicker {
    display: inline-flex;
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    color: #25d366;
    background: rgba(37, 211, 102, 0.1);
    border: 1px solid rgba(37, 211, 102, 0.18);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.wa-intent-panel h2 {
    max-width: 26rem;
    margin: 0 2.5rem 0.6rem 0;
    font-family: 'Manrope', sans-serif;
    font-size: clamp(1.55rem, 4vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    color: #f8fbff;
}

.wa-intent-copy {
    max-width: 28rem;
    margin-bottom: 1.25rem;
    color: #c3c6ce;
    font-size: 0.95rem;
    line-height: 1.6;
}

.wa-intent-options {
    display: grid;
    gap: 0.75rem;
}

.wa-intent-options button {
    width: 100%;
    border-radius: 1rem;
    border: 1px solid rgba(171, 201, 239, 0.12);
    background: rgba(255, 255, 255, 0.045);
    padding: 1rem;
    text-align: left;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.wa-intent-options button:hover,
.wa-intent-options button:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(37, 211, 102, 0.45);
    background: rgba(37, 211, 102, 0.09);
    outline: none;
}

.wa-intent-options strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #f8fbff;
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
}

.wa-intent-options span {
    display: block;
    color: #aeb8c8;
    font-size: 0.86rem;
    line-height: 1.45;
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    body {
        padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
    }
    .hero-car-container {
        border-radius: 1.5rem;
    }
    .mobile-menu {
        width: min(88vw, 22rem);
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    }
    .rf-glow { animation: none; }
    .reveal, .reveal-left, .reveal-right, .reveal-scale {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .rf-btn::before { display: none; }
    .logo-glow:hover { transform: none; }
    .step-connector::after { display: none; }
    .wa-intent-modal {
        align-items: end;
        padding: 0.75rem;
    }
    .wa-intent-panel {
        width: 100%;
        border-radius: 1.5rem 1.5rem 1rem 1rem;
        padding: 1.25rem;
    }
}

@media (max-width: 640px) {
    .hero-car-container {
        margin: 0 -0.5rem;
    }
}

#bookingForm input[type="date"],
#bookingForm input[type="time"] {
    color-scheme: dark;
    padding-right: 3rem;
}

#bookingForm .picker-input-wrap {
    position: relative;
    display: block;
    cursor: pointer;
}

#bookingForm .picker-input-wrap input {
    cursor: pointer;
}

#bookingForm .picker-input-wrap::after {
    content: "";
    position: absolute;
    right: 0.55rem;
    top: 50%;
    width: 2.5rem;
    height: 2.5rem;
    transform: translateY(-50%);
    border-radius: 0.75rem;
    background: #0b1326;
    pointer-events: none;
    z-index: 2;
}

#bookingForm .picker-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    width: 1.45rem;
    height: 1.45rem;
    transform: translateY(-50%);
    border: 0;
    padding: 0;
    background-color: transparent;
    pointer-events: auto;
    cursor: pointer;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    filter: drop-shadow(0 0 5px rgba(171, 201, 239, 0.7));
    opacity: 1;
    z-index: 5;
}

#bookingForm .picker-icon-calendar {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2.5'/%3E%3Cpath d='M8 2v4M16 2v4M3 10h18M7 14h2M11 14h2M15 14h2M7 18h2M11 18h2M15 18h2'/%3E%3C/svg%3E");
}

#bookingForm .picker-icon-clock {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l4 2'/%3E%3C/svg%3E");
}

#bookingForm input[type="date"]::-webkit-calendar-picker-indicator,
#bookingForm input[type="time"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    cursor: pointer;
}
