/* =========================================
   VARIABLES & DESIGN SYSTEM
   ========================================= */
:root {
    /* Colors */
    --primary-blue: #0A84FF;
    --primary-dark: #005bb5;
    --pool-cyan: #30D158; /* Or maybe a lighter blue/cyan, let's use a nice aqua */
    --pool-aqua: #26C6DA;
    --accent-orange: #FF9F0A;
    --accent-hover: #E58E00;
    
    --text-main: #1C1C1E;
    --text-muted: #8E8E93;
    --bg-main: #F2F2F7;
    --bg-white: #FFFFFF;
    
    --border-color: #E5E5EA;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Shadows & Effects */
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 40px rgba(0,10,30,0.12);
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-blur: blur(12px);
    
    /* Layout */
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 999px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* =========================================
   RESET & BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Mobile native: tira o flash cinza em cada tap */
    -webkit-tap-highlight-color: transparent;
    /* Mobile native: evita font-boost automático em landscape */
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: var(--primary-blue);
    transition: var(--transition);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
    /* Mobile native: elimina 300ms tap delay no iOS */
    touch-action: manipulation;
    /* Mobile native: evita long-press selecionar texto do botão */
    user-select: none;
    -webkit-user-select: none;
}

/* Mesmo tratamento pra links clicáveis que ocupam área grande */
a, button, [role="button"] {
    touch-action: manipulation;
}

.btn-primary {
    background-color: var(--accent-orange);
    color: white;
    box-shadow: 0 4px 14px rgba(255, 159, 10, 0.4);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 159, 10, 0.5);
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

.btn-back {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    margin-bottom: 24px;
    transition: var(--transition);
}

.btn-back:hover {
    color: var(--primary-blue);
}

/* =========================================
   HEADER
   ========================================= */
.site-header {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
    gap: 16px;
}

/* Hamburger toggle — visible only on mobile */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    font-size: 1.75rem;
    color: var(--text-main);
    line-height: 1;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle .ph-x { display: none; }
.mobile-menu-toggle[aria-expanded="true"] .ph-list { display: none; }
.mobile-menu-toggle[aria-expanded="true"] .ph-x { display: inline-block; }

body.mobile-menu-open {
    overflow: hidden;
}

/* Nav CTA: texto completo por padrão, versão curta só aparece no mobile */
.nav-cta .nav-cta-short { display: none; }
.nav-cta .nav-cta-full  { display: inline; }
@media (max-width: 768px) {
    .nav-cta .nav-cta-full  { display: none; }
    .nav-cta .nav-cta-short { display: inline; }
}

/* Header actions: click-to-call + quote */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.nav-call {
    background: var(--bg-white);
    color: var(--primary-dark);
    border: 2px solid var(--primary-dark);
    padding: 10px 20px;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.nav-call i { font-size: 1.15rem; }

@media (hover: hover) and (pointer: fine) {
    .nav-call:hover {
        background: var(--primary-dark);
        color: #fff;
    }
}

.nav-call:active { transform: scale(0.97); }

@media (max-width: 768px) {
    .nav-actions { gap: 8px; margin-left: auto; }

    /* Round icon button; the number stays in the DOM for screen readers and the Ads call tag */
    .nav-call {
        width: 44px;
        height: 44px;
        padding: 0;
        border: none;
        border-radius: 50%;
        background: var(--primary-dark);
        color: #fff;
    }
    .nav-call i { font-size: 1.25rem; }
    .nav-call-number {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

/* Small phones: logo + call + quote + menu must fit in 320px */
@media (max-width: 480px) {
    .header-container { padding: 0 16px; gap: 8px; }
    .header-container .logo img { height: 56px; }
    .nav-actions { gap: 6px; }
    .nav-call { width: 40px; height: 40px; }
    .nav-actions .nav-cta { padding: 10px 12px; }
    .mobile-menu-toggle { padding: 4px; }
}

@keyframes cbp-nav-slide-down {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.logo img {
    height: 72px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    color: var(--text-main);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary-blue);
}

.nav-links .dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-links .dropdown > a {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
    min-width: 220px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
}

.nav-links .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    font-weight: 400;
}

.dropdown-menu a:hover {
    background: rgba(10, 132, 255, 0.05);
    color: var(--primary-blue);
    padding-left: 24px; /* little slide effect */
}

.blog-link {
    display: flex;
    align-items: center;
    gap: 4px;
}

.blog-link::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--pool-aqua);
    border-radius: 50%;
    margin-bottom: 8px;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    position: relative;
    padding: 160px 0 100px;
    /* svh = smallest viewport height, estável enquanto URL bar do mobile sobe/desce (sem CLS) */
    min-height: 85svh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1576013551627-0cc20b96c2a7?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80');
    background-size: cover;
    background-position: center;
    z-index: -2;
}

.hero-bg .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 20, 50, 0.9) 0%, rgba(0, 40, 90, 0.7) 50%, rgba(0, 40, 90, 0.2) 100%);
    z-index: -1;
}

.hero-content {
    display: flex;
    align-items: center;
}

.hero-text {
    max-width: 720px;
    color: white;
}

.hero-text .badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-text .badge i {
    color: #FFD60A;
}

.hero-text h1 {
    font-size: 3.25rem;
    color: white;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.hero-text h1 span {
    color: var(--pool-aqua);
}

.hero-text p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 28px;
    max-width: 620px;
}

/* ===== Hero AI Doctor (glass card sobre fundo escuro) ===== */
.hero-ai-doctor {
    margin-bottom: 24px;
}

.hero-ai-doctor .upload-dropzone {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px dashed rgba(255, 255, 255, 0.45);
    color: white;
    padding: 36px 20px;
    margin-bottom: 18px;
}

.hero-ai-doctor .upload-dropzone:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: white;
    transform: translateY(-2px);
}

.hero-ai-doctor .upload-dropzone i {
    color: white;
}

/* Picker mobile (câmera / galeria) — escondido no desktop */
.dropzone-mobile-picker { display: none; }

@media (max-width: 768px) {
    /* Esconde o texto "Drop a photo…" no mobile e mostra os 2 botões */
    .hero-ai-doctor .upload-dropzone { padding: 14px; cursor: default; }
    .hero-ai-doctor .upload-dropzone:hover { transform: none; background: rgba(255,255,255,0.08); }
    .dropzone-default { display: none; }
    .dropzone-mobile-picker {
        display: flex;
        gap: 10px;
    }
    .dropzone-btn {
        flex: 1;
        padding: 18px 10px;
        border-radius: 14px;
        border: 1px solid rgba(255, 255, 255, 0.35);
        background: rgba(255, 255, 255, 0.14);
        color: white;
        font-family: var(--font-heading);
        font-weight: 700;
        font-size: 0.95rem;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        transition: var(--transition);
    }
    .dropzone-btn i {
        font-size: 26px;
        color: white;
        line-height: 1;
    }
    .dropzone-btn:active {
        background: rgba(255, 255, 255, 0.28);
        border-color: white;
        transform: scale(0.97);
    }
}

.hero-ai-doctor .ai-result-box {
    margin-top: 20px;
    padding: 22px 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-left: 4px solid var(--accent-orange);
    border-radius: var(--radius-md);
    color: white;
}

.hero-ai-doctor .ai-result-box h4 {
    color: white;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
}

.hero-ai-doctor .ai-result-box h4 i {
    color: var(--pool-aqua);
    font-size: 1.3rem;
}

.hero-ai-doctor .ai-result-box p {
    color: white;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 16px;
    max-width: none;
}

.hero-ai-doctor .ai-result-box .btn {
    margin-top: 4px;
}

/* Inline lead form (gates the AI) */
.ai-lead-form {
    margin: 0 0 18px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-md);
    color: white;
    position: relative;
}

.ai-lead-pitch {
    margin: 0 0 12px;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    max-width: none;
}

.ai-lead-pitch i {
    color: var(--accent-orange);
    font-size: 1.15rem;
}

.ai-lead-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.ai-lead-grid input {
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
}

.ai-lead-grid input:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(255, 159, 10, 0.25);
    background: white;
}

.ai-lead-grid input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ai-lead-note {
    display: block;
    margin-top: 10px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Result footer (replaces the old "Get a Pool Rescue" CTA) */
.ai-result-footer {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.ai-result-confirm {
    margin: 0 0 4px !important;
    font-size: 0.95rem !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-result-confirm i {
    color: #30D158;
    font-size: 1.2rem;
}

.ai-result-urgent {
    margin: 0 !important;
    font-size: 0.9rem !important;
    opacity: 0.9;
}

.ai-result-urgent a {
    color: var(--pool-aqua);
    font-weight: 700;
    border-bottom: 1px dashed rgba(38, 198, 218, 0.6);
}

.ai-result-urgent a:hover {
    color: white;
    border-bottom-color: white;
}

#ai-result-greeting {
    color: var(--pool-aqua);
}

@media (max-width: 560px) {
    .ai-lead-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   AI CHAT MODAL (Typeform-style fullscreen)
   ========================================== */
.ai-chat-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, #001f3f 0%, #003a5d 45%, #006a7a 100%);
    overflow: hidden;
}

.ai-chat-modal.show {
    display: flex;
    animation: ai-chat-fade-in 0.35s ease;
}

@keyframes ai-chat-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ai-chat-bg { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }

.ai-chat-bubbles {
    position: absolute; inset: 0;
    list-style: none; margin: 0; padding: 0;
}

.ai-chat-bubbles li {
    position: absolute;
    bottom: -120px;
    border-radius: 50%;
    background: rgba(48, 209, 218, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: ai-chat-rise 20s linear infinite;
    backdrop-filter: blur(2px);
}

.ai-chat-bubbles li:nth-child(1) { left: 8%;  width: 38px;  height: 38px;  animation-delay: 0s;   animation-duration: 17s; }
.ai-chat-bubbles li:nth-child(2) { left: 22%; width: 72px;  height: 72px;  animation-delay: 3s;   animation-duration: 23s; }
.ai-chat-bubbles li:nth-child(3) { left: 38%; width: 26px;  height: 26px;  animation-delay: 6s;   animation-duration: 15s; }
.ai-chat-bubbles li:nth-child(4) { left: 50%; width: 60px;  height: 60px;  animation-delay: 1s;   animation-duration: 21s; }
.ai-chat-bubbles li:nth-child(5) { left: 66%; width: 90px;  height: 90px;  animation-delay: 5s;   animation-duration: 26s; }
.ai-chat-bubbles li:nth-child(6) { left: 78%; width: 32px;  height: 32px;  animation-delay: 9s;   animation-duration: 18s; }
.ai-chat-bubbles li:nth-child(7) { left: 88%; width: 52px;  height: 52px;  animation-delay: 2s;   animation-duration: 19s; }
.ai-chat-bubbles li:nth-child(8) { left: 96%; width: 28px;  height: 28px;  animation-delay: 7s;   animation-duration: 22s; }

@keyframes ai-chat-rise {
    0%   { bottom: -120px; transform: translateX(0) scale(1); opacity: 0; }
    10%  { opacity: 0.8; }
    90%  { opacity: 0.8; }
    100% { bottom: 110%; transform: translateX(-40px) scale(1.3); opacity: 0; }
}

.ai-chat-close {
    position: absolute;
    top: 22px; right: 22px;
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    display: flex; align-items: center; justify-content: center;
}

.ai-chat-close:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: rotate(90deg);
}

.ai-chat-progress {
    position: absolute;
    top: 32px; left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.ai-chat-progress .dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transition: var(--transition);
}

.ai-chat-progress .dot.done   { background: var(--pool-aqua); }
.ai-chat-progress .dot.active { background: white; transform: scale(1.4); box-shadow: 0 0 12px rgba(255,255,255,0.6); }

.ai-chat-stage {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 680px;
    color: white;
}

.ai-chat-step { display: none; }

.ai-chat-step.active {
    display: block;
    animation: ai-chat-slide-in 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes ai-chat-slide-in {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ai-msg {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.ai-avatar {
    flex-shrink: 0;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pool-aqua), var(--primary-blue));
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 1.4rem;
    box-shadow: 0 6px 20px rgba(38, 198, 218, 0.5);
}

.ai-bubble {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 18px 22px;
    border-radius: 20px 20px 20px 4px;
    font-size: 1.1rem;
    line-height: 1.55;
    max-width: 520px;
    color: white;
}

.ai-bubble p { margin: 0; color: white; max-width: none; font-size: inherit; line-height: inherit; }

.ai-bubble.typing {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 22px 24px;
}

.ai-bubble.typing span {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    animation: ai-typing-dots 1.4s infinite;
}

.ai-bubble.typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-bubble.typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes ai-typing-dots {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30%           { transform: translateY(-8px); opacity: 1; }
}

.ai-chat-input-row {
    display: flex;
    gap: 12px;
    margin-left: 62px;
}

.ai-chat-input-row input {
    flex: 1;
    padding: 15px 18px;
    font-size: 1.05rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-main);
    border-radius: 12px;
    font-family: var(--font-body);
    transition: var(--transition);
}

.ai-chat-input-row input:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 4px rgba(255, 159, 10, 0.3);
    background: white;
}

.ai-chat-input-row input.shake {
    animation: ai-shake 0.4s ease;
    border-color: #ff6b6b;
}

@keyframes ai-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.ai-chat-next {
    padding: 14px 22px;
    background: var(--accent-orange);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ai-chat-next:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(255, 159, 10, 0.4);
}

.ai-chat-photo-preview {
    position: relative;
    margin: 4px 0 0 62px;
    max-width: 320px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.ai-chat-photo-preview img { width: 100%; display: block; }

.ai-chat-scanner {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 4px;
    background: #00e676;
    box-shadow: 0 0 15px #00e676, 0 0 30px #00e676;
    animation: scan 2s linear infinite;
}

.ai-bubble.result {
    border-left: 4px solid var(--accent-orange);
    font-size: 1.05rem;
}

.ai-bubble.result p#chat-result-text {
    min-height: 1.5em;
    margin-bottom: 0;
}

.ai-chat-cta {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.95rem;
}

.ai-chat-cta p {
    margin: 0 0 6px;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: none;
}

.ai-chat-cta p i { color: #30D158; font-size: 1.2rem; }

.ai-chat-cta p.urgent { opacity: 0.9; }

.ai-chat-cta a {
    color: var(--pool-aqua);
    font-weight: 700;
    border-bottom: 1px dashed rgba(38, 198, 218, 0.6);
}

.ai-chat-cta a:hover { color: white; border-bottom-color: white; }

/* Dragzone hover state already exists for hero, but add a clearer style */
.upload-dropzone.dragging {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: white !important;
}

@media (max-width: 640px) {
    .ai-chat-modal { padding: 16px; }
    .ai-chat-progress { top: 80px; gap: 8px; }
    .ai-chat-close { top: 16px; right: 16px; width: 40px; height: 40px; }
    .ai-bubble { font-size: 1rem; padding: 14px 18px; }
    .ai-chat-input-row { flex-direction: column; margin-left: 0; }
    .ai-msg { margin-bottom: 16px; }
    .ai-chat-photo-preview { margin-left: 0; max-width: 100%; }
    .ai-chat-next { width: 100%; justify-content: center; }
    .ai-avatar { width: 40px; height: 40px; font-size: 1.2rem; }
}

.hero-secondary {
    margin: 8px 0 24px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}

.hero-secondary a {
    color: var(--pool-aqua);
    font-weight: 600;
    border-bottom: 1px dashed rgba(38, 198, 218, 0.6);
    padding-bottom: 1px;
}

.hero-secondary a:hover {
    color: white;
    border-bottom-color: white;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
}

.trust-indicators {
    display: flex;
    gap: 24px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.trust-indicators span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.trust-indicators i {
    color: var(--pool-aqua);
    font-size: 1.2rem;
}

/* =========================================
   PAIN AGITATION SECTION
   ========================================= */
.pain-points {
    padding: 100px 0;
    background: var(--bg-white);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 64px;
}

.grid {
    display: grid;
    gap: 32px;
}

.pain-grid {
    grid-template-columns: repeat(3, 1fr);
}

.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

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

.icon-wrapper {
    width: 64px;
    height: 64px;
    background: rgba(10, 132, 255, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.icon-wrapper i {
    font-size: 32px;
    color: var(--primary-blue);
}

.pain-card {
    overflow: hidden;
}

/* Photo bleeds to the card edges (cancels the .card padding) */
.pain-media {
    margin: -40px -32px 28px;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--bg-main);
}

.pain-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 600ms cubic-bezier(0.23, 1, 0.32, 1);
}

@media (hover: hover) and (pointer: fine) {
    .pain-card:hover .pain-media img { transform: scale(1.03); }
}

@media (prefers-reduced-motion: reduce) {
    .pain-media img { transition: none; }
    .pain-card:hover .pain-media img { transform: none; }
}

.pain-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.pain-card p {
    color: var(--text-muted);
}

/* =========================================
   QUIZ SECTION (THE CORE CONVERSION ENGINE)
   ========================================= */
.quiz-section {
    padding: 100px 0;
    /* Deep Pool Water Static Background */
    background: linear-gradient(to bottom right, #0052D4, #4364F7);
    position: relative;
    overflow: hidden;
}

.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    /* Glassmorphism Effect - High legibility but still blurry */
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    padding: 60px;
    position: relative;
    overflow: hidden;
    min-height: 450px;
}

.quiz-step {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.quiz-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.quiz-step h2 {
    font-size: 2rem;
    margin-bottom: 12px;
    color: var(--primary-dark);
}

.quiz-step .subtitle {
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.quiz-option {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.quiz-option i {
    font-size: 40px;
    color: var(--primary-blue);
    transition: var(--transition);
}

.quiz-option span {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text-main);
}

.quiz-option small {
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.quiz-option:hover {
    border-color: var(--primary-blue);
    background: rgba(10, 132, 255, 0.02);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.quiz-option:hover i {
    transform: scale(1.1);
}

/* Loading Step */
.loading-step {
    text-align: center;
    padding: 40px 0;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(10, 132, 255, 0.1);
    border-left-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 32px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner-small {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(10, 132, 255, 0.1);
    border-left-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Form Step */
.form-step {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 24px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-main);
}

.form-group input {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-main);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: var(--bg-white);
    box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.1);
}

.privacy-note {
    text-align: center;
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Success Step */
.success-step {
    text-align: center;
    padding: 40px 0;
}

.success-icon {
    font-size: 80px;
    color: var(--pool-cyan);
    margin-bottom: 24px;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

/* =========================================
   SERVICES SECTION
   ========================================= */
.services {
    padding: 100px 0;
    background: var(--bg-white);
}

.services-intro {
    max-width: 720px;
    margin: 0 auto 72px;
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Legacy quick-grid (kept in case it is reused elsewhere) */
.services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}
.service-item { display: flex; gap: 20px; }
.check-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: var(--pool-cyan);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
}
.service-item h4 { font-size: 1.25rem; margin-bottom: 8px; }
.service-item p { color: var(--text-muted); }

/* ===== Service detail blocks (zig-zag layout) ===== */
.service-detail-stack {
    display: flex;
    flex-direction: column;
    gap: 96px;
}

.service-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 56px;
}

.service-detail--alt .service-detail-media { order: 2; }
.service-detail--alt .service-detail-body  { order: 1; }

.service-detail-media {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    box-shadow:
        0 24px 48px -16px rgba(0, 31, 63, 0.28),
        0 0 0 1px rgba(0, 31, 63, 0.04);
    background: linear-gradient(135deg, #cfeaf5 0%, #e7f5fa 100%);
}

.service-detail-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 600ms cubic-bezier(0.23, 1, 0.32, 1);
}

@media (hover: hover) and (pointer: fine) {
    .service-detail:hover .service-detail-media img { transform: scale(1.03); }
}

.service-detail-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--pool-deep, #001f3f);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(0, 31, 63, 0.12);
}

.service-detail-tag i { color: var(--accent-orange, #FF9F0A); font-size: 0.9rem; }

.service-detail-body { min-width: 0; }

.service-detail-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pool-cyan, #0097B2);
    margin-bottom: 10px;
}

.service-detail-body h3 {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    line-height: 1.15;
    color: var(--pool-deep, #001f3f);
    margin: 0 0 16px;
}

.service-detail-lead {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0 0 20px;
    max-width: 56ch;
}

.service-detail-list {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    display: grid;
    gap: 10px;
}

.service-detail-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-dark, #0a2540);
    font-size: 0.98rem;
    line-height: 1.45;
}

.service-detail-list li i {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--pool-cyan, #0097B2);
    color: #fff;
    border-radius: 50%;
    font-size: 0.75rem;
    margin-top: 2px;
}

.service-detail-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.service-detail-cta i { font-size: 1.1rem; }

@media (max-width: 900px) {
    .service-detail-stack { gap: 72px; }
    .service-detail {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .service-detail--alt .service-detail-media { order: 0; }
    .service-detail--alt .service-detail-body  { order: 0; }
    .service-detail-cta { width: 100%; justify-content: center; }
    .services-intro { margin-bottom: 56px; font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    .service-detail:hover .service-detail-media img { transform: none; }
    .service-detail-media img { transition: none; }
}

/* =========================================
   REVIEWS SECTION
   ========================================= */
.reviews {
    padding: 100px 0;
    background: var(--bg-main);
}

.review-grid {
    grid-template-columns: repeat(2, 1fr);
}

.review-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stars {
    color: #FFD60A;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.review-card p {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 24px;
    color: var(--text-main);
}

.author strong {
    display: block;
    font-family: var(--font-heading);
}

.author span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
    background: var(--primary-dark);
    color: white;
    padding: 80px 0 24px;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand .logo {
    color: white;
    margin-bottom: 20px;
}

.footer-brand .logo img {
    height: 56px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    max-width: 300px;
}

.footer-links h4, .footer-contact h4 {
    color: white;
    margin-bottom: 24px;
    font-size: 1.2rem;
}

.footer-links a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
}

.footer-links a:hover {
    color: white;
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-contact i {
    color: var(--pool-aqua);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 992px) {
    .hero-text h1 { font-size: 3rem; }
    .pain-grid { grid-template-columns: repeat(2, 1fr); }
    .quiz-container { padding: 40px; }
}

@media (max-width: 768px) {
    /* Hamburger substitui o menu inline em telas pequenas */
    .mobile-menu-toggle { display: inline-flex; }

    /* Compacta a CTA no header pra caber ao lado do logo + hamburger */
    .nav-cta {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    /* Menu vira drawer que desliza a partir do topo (abaixo do header) */
    .header-container .nav-links {
        display: none;
        position: fixed;
        top: 90px;
        left: 0;
        right: 0;
        /* dvh = dynamic viewport height, drawer acompanha quando URL bar colapsa */
        max-height: calc(100dvh - 90px);
        overflow-y: auto;
        background: white;
        padding: 20px 24px 40px;
        flex-direction: column;
        gap: 0;
        z-index: 999;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
        border-top: 1px solid var(--border-color);
    }

    .header-container .nav-links.mobile-open {
        display: flex;
        animation: cbp-nav-slide-down 0.28s ease;
    }

    .nav-links > a,
    .nav-links > .dropdown > a {
        color: var(--text-main);
        padding: 16px 4px;
        font-size: 1.05rem;
        border-bottom: 1px solid var(--border-color);
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    /* Dropdown vira acordeão simples (sempre aberto) no mobile */
    .nav-links .dropdown-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        padding: 4px 0 8px 16px !important;
        background: transparent !important;
        border: none !important;
        display: flex;
        flex-direction: column;
    }
    .nav-links .dropdown-menu a {
        padding: 10px 4px;
        font-size: 0.95rem;
        color: var(--text-muted);
        border-bottom: 1px dashed var(--border-color);
    }
    .nav-links .dropdown-menu a:last-child { border-bottom: none; }

    .hero { padding: 120px 0 80px; text-align: center; }
    .hero-bg .overlay { background: rgba(0, 20, 50, 0.75); }
    .hero-text { margin: 0 auto; }
    .hero-actions { align-items: center; }
    .trust-indicators { flex-wrap: wrap; justify-content: center; gap: 16px; }
    .hero-ai-doctor .upload-dropzone { padding: 28px 16px; }
    .hero-ai-doctor .ai-result-box { padding: 18px 18px; }

    .pain-grid, .services-grid, .review-grid { grid-template-columns: 1fr; }

    .footer-top { grid-template-columns: 1fr; gap: 40px; }
    .quiz-container { padding: 32px 24px; }
}

@media (max-width: 480px) {
    .hero-text h1 { font-size: 2.5rem; }
    .quiz-step h2 { font-size: 1.5rem; }
    .options-grid { grid-template-columns: 1fr; }
}

/* =========================================
   GAMIFICATION (SPIN TO WIN)
   ========================================= */
.gamification-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--accent-orange);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 159, 10, 0.5);
    z-index: 99;
    transition: transform 0.3s ease;
}
.gamification-btn:hover {
    transform: scale(1.05);
}
.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0; left: 0;
    border-radius: 50px;
    border: 2px solid var(--accent-orange);
    animation: pulse 2s infinite;
    pointer-events: none;
}
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.3); opacity: 0; }
}

.wheel-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s;
}
.wheel-modal.show {
    visibility: visible;
    opacity: 1;
}
.wheel-modal-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 20, 50, 0.8);
    backdrop-filter: blur(5px);
}
.wheel-modal-content {
    position: relative;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 400px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.wheel-modal.show .wheel-modal-content {
    transform: scale(1);
}
.wheel-close {
    position: absolute;
    top: 15px; right: 15px;
    background: none; border: none;
    font-size: 24px; color: var(--text-muted);
    cursor: pointer;
}
.wheel-step {
    display: none;
}
.wheel-step.active {
    display: block;
    animation: fadeIn 0.4s ease forwards;
}

.wheel-form input {
    width: 100%;
    padding: 14px;
    margin-bottom: 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
}
.wheel-form input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.wheel-container {
    position: relative;
    width: 280px; height: 280px;
    margin: 30px auto;
}

/* Disclaimers (legal) — new customer welcome offer */
.wheel-disclaimer {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 14px 0 18px;
    text-align: center;
    padding: 0 4px;
}

.wheel-terms {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 18px 0;
    padding: 14px 16px;
    background: var(--bg-main);
    border-radius: var(--radius-md);
    text-align: left;
}

.wheel-terms strong {
    color: var(--text-main);
    display: block;
    margin-bottom: 4px;
}

.wheel-done {
    display: block;
    margin: 12px auto 0;
    padding: 10px 16px;
    background: none;
    border: none;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
    text-decoration: underline;
    cursor: pointer;
}

/* Desktop: roleta maior, modal mais largo */
@media (min-width: 768px) {
    .wheel-modal-content {
        max-width: 520px;
        padding: 48px 44px;
    }
    .wheel-container {
        width: 360px;
        height: 360px;
        margin: 36px auto;
    }
    .slice-text {
        font-size: 16px;
        transform-origin: 50% 165px;
    }
    .wheel-pointer {
        font-size: 48px;
        top: -24px;
    }
    .wheel-disclaimer {
        font-size: 0.85rem;
    }
    .wheel-terms {
        font-size: 0.78rem;
    }
}
.wheel-pointer {
    position: absolute;
    top: -20px; left: 50%;
    transform: translateX(-50%);
    font-size: 40px;
    color: var(--text-main);
    z-index: 10;
    filter: drop-shadow(0 4px 4px rgba(0,0,0,0.2));
}
.wheel {
    width: 100%; height: 100%;
    border-radius: 50%;
    border: 8px solid white;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    background: conic-gradient(
        #FF9F0A 0deg 60deg,
        #30D158 60deg 120deg,
        #0A84FF 120deg 180deg,
        #FF375F 180deg 240deg,
        #BF5AF2 240deg 300deg,
        #32ADE6 300deg 360deg
    );
    transition: transform 4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}
.wheel-inner {
    position: absolute;
    width: 100%; height: 100%;
    border-radius: 50%;
}
.slice-text {
    position: absolute;
    top: 15px;
    left: 50%;
    transform-origin: 50% 125px;
    color: white;
    font-weight: 800;
    font-size: 14px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    text-align: center;
    width: 80px;
    margin-left: -40px;
}
.s1 { transform: rotate(30deg); }
.s2 { transform: rotate(90deg); }
.s3 { transform: rotate(150deg); }
.s4 { transform: rotate(210deg); }
.s5 { transform: rotate(270deg); }
.s6 { transform: rotate(330deg); }

.wheel-success-icon {
    font-size: 60px;
    color: var(--accent-orange);
    margin-bottom: 20px;
}
.prize-won {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-blue);
    margin: 15px 0 25px;
    padding: 15px;
    background: rgba(10, 132, 255, 0.1);
    border-radius: var(--radius-md);
}

/* =========================================
   INTERACTIVITY & MICRO-ANIMATIONS
   ========================================= */
.reveal {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.reveal.slide-up {
    transform: translateY(40px);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   DIAGNOSTIC TOOL
   ========================================= */
.diagnostic-tool {
    padding: 80px 0;
    background: var(--bg-white);
}
.water-drops-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.drop-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}
.drop-card:hover {
    transform: translateY(-5px);
}
.drop {
    width: 80px;
    height: 80px;
    border-radius: 50% 50% 50% 5px;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.drop i {
    transform: rotate(45deg);
    font-size: 2rem;
    color: white;
}
.green-drop { background: linear-gradient(135deg, #4caf50, #1b5e20); }
.cloudy-drop { background: linear-gradient(135deg, #e0e0e0, #9e9e9e); }
.yellow-drop { background: linear-gradient(135deg, #ffeb3b, #f57f17); }

.drop-card.active .drop {
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    transform: rotate(-45deg) scale(1.1);
}
.diagnosis-result {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 30px;
    background: var(--bg-main);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* =========================================
   BEFORE & AFTER SLIDER
   ========================================= */
.before-after-section {
    padding: 80px 0;
    background: var(--bg-main);
}
.ba-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    /* Same ratio as the photos, so the % water polygons stay on the pool at any width */
    aspect-ratio: 3 / 2;
    /* Horizontal drags move the slider; vertical swipes still scroll the page */
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    cursor: col-resize;
}
.ba-image-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ba-image-before-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}
.ba-image-before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Photos must never receive the press, or the browser starts a native image drag */
.ba-container img {
    pointer-events: none;
    -webkit-user-drag: none;
}

/* "Before": only the water turns murky green; reflections and texture stay from the photo */
.ba-image-water,
.ba-water-tint {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    clip-path: var(--pool-clip);
    pointer-events: none;
}
.ba-image-water {
    object-fit: cover;
    filter: sepia(1) hue-rotate(40deg) saturate(1.5) brightness(0.76) contrast(0.9);
}
.ba-water-tint {
    background: rgba(70, 95, 25, 0.3);
    mix-blend-mode: multiply;
}

.ba-caption {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 12px 0 0;
}
.ba-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 40px;
    height: 100%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 10;
}
.ba-handle-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: white;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}
.ba-handle-button {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background: var(--primary-blue);
    border: 3px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-md);
}

/* =========================================
   ROI CALCULATOR
   ========================================= */
.roi-calculator {
    padding: 80px 0;
    background: var(--bg-white);
}
.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
.calc-inputs {
    display: flex;
    flex-direction: column;
    gap: 25px;
}
.calc-group label {
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}
.calc-group input[type="range"] {
    width: 100%;
    accent-color: var(--primary-blue);
}
.calc-result-card {
    background: var(--bg-main);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}
.calc-result-card h3 {
    margin-bottom: 20px;
}
.result-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1.1rem;
}
.result-divider {
    height: 1px;
    background: var(--border-color);
    margin: 20px 0;
}
.result-total {
    display: flex;
    justify-content: space-between;
    font-weight: 800;
    font-size: 1.4rem;
    font-family: var(--font-heading);
}
.highlight-red {
    color: #ff3b30;
}
@media (max-width: 768px) {
    .calc-grid {
        grid-template-columns: 1fr;
    }
}

.ba-label {
    position: absolute;
    top: 20px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    border-radius: var(--radius-md);
    letter-spacing: 1px;
    z-index: 5;
    pointer-events: none;
    backdrop-filter: blur(4px);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.ba-label-before {
    left: 20px;
}
.ba-label-after {
    right: 20px;
}
@media (max-width: 480px) {
    .ba-label { top: 12px; padding: 5px 10px; font-size: 0.8rem; }
    .ba-label-before { left: 12px; }
    .ba-label-after { right: 12px; }
}

/* =========================================
   ANIMATED WAVES & INTERACTIVE BUBBLES
   ========================================= */
.wave-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 3;
}
.waves {
    position: relative;
    width: 100%;
    height: 100px;
    margin-bottom: -7px; /* Fix for safari gap */
    min-height: 100px;
    max-height: 150px;
}
.parallax > use {
    animation: move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite;
}
.parallax > use:nth-child(1) { animation-delay: -2s; animation-duration: 7s; }
.parallax > use:nth-child(2) { animation-delay: -3s; animation-duration: 10s; }
.parallax > use:nth-child(3) { animation-delay: -4s; animation-duration: 13s; }
.parallax > use:nth-child(4) { animation-delay: -5s; animation-duration: 20s; }
@keyframes move-forever {
    0% { transform: translate3d(-90px,0,0); }
    100% { transform: translate3d(85px,0,0); }
}

/* Interactive Bubbles */
.interactive-bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
    transform: translate(-50%, -50%);
    animation: floatUp 3s ease-in forwards;
}
@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -150px) scale(1.5);
    }
}

/* =========================================
   DEEP WATER IMMERSION FOOTER
   ========================================= */
.site-footer {
    background: #0B192C !important; /* Deep Navy Blue */
    color: #f1f5f9 !important;
    border-top: none;
    position: relative;
}

.site-footer p, .site-footer a {
    color: rgba(255, 255, 255, 0.75) !important;
}

.site-footer a:hover {
    color: #1cb5e0 !important;
}

/* Make sure the footer logo stands out if it's dark by default */
.site-footer .footer-logo img {
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

/* =========================================
   QUIZ BACKGROUND BUBBLES
   ========================================= */
.bg-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    margin: 0;
    padding: 0;
}
.bg-bubbles li {
    position: absolute;
    list-style: none;
    display: block;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.15);
    bottom: -160px;
    animation: riseUp 25s infinite;
    transition-timing-function: linear;
    border-radius: 50%;
}
.bg-bubbles li:nth-child(1) { left: 10%; }
.bg-bubbles li:nth-child(2) { left: 20%; width: 80px; height: 80px; animation-delay: 2s; animation-duration: 17s; }
.bg-bubbles li:nth-child(3) { left: 25%; animation-delay: 4s; }
.bg-bubbles li:nth-child(4) { left: 40%; width: 60px; height: 60px; animation-duration: 22s; background-color: rgba(255, 255, 255, 0.25); }
.bg-bubbles li:nth-child(5) { left: 70%; }
.bg-bubbles li:nth-child(6) { left: 80%; width: 120px; height: 120px; animation-delay: 3s; background-color: rgba(255, 255, 255, 0.2); }
.bg-bubbles li:nth-child(7) { left: 32%; width: 160px; height: 160px; animation-delay: 7s; }
.bg-bubbles li:nth-child(8) { left: 55%; width: 20px; height: 20px; animation-delay: 15s; animation-duration: 40s; }
.bg-bubbles li:nth-child(9) { left: 25%; width: 10px; height: 10px; animation-delay: 2s; animation-duration: 40s; background-color: rgba(255, 255, 255, 0.3); }
.bg-bubbles li:nth-child(10) { left: 90%; width: 160px; height: 160px; animation-delay: 11s; }

@keyframes riseUp {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-1200px) scale(1.5); }
}

/* =========================================
   THUMBNAIL GALLERY FOR SLIDER
   ========================================= */
.ba-thumbnails {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.ba-thumb {
    width: 80px;
    height: 60px;
    border: 3px solid transparent;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
    opacity: 0.5;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}
.ba-thumb:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}
.ba-thumb.active {
    border-color: var(--primary-blue);
    opacity: 1;
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}
.ba-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none; /* Prevents dragging issues */
}

/* =========================================
   AI POOL DOCTOR UPLOAD ZONE
   ========================================= */
.ai-upload-container {
    max-width: 600px;
    margin: 0 auto;
}

.upload-dropzone {
    border: 2px dashed var(--primary-blue);
    background: rgba(10, 132, 255, 0.02);
    border-radius: var(--radius-lg);
    padding: 60px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 24px;
}

.upload-dropzone:hover {
    background: rgba(10, 132, 255, 0.05);
    transform: translateY(-2px);
    border-color: var(--primary-dark);
}

.scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #00e676;
    box-shadow: 0 0 15px #00e676, 0 0 30px #00e676;
    animation: scan 2s linear infinite;
    z-index: 2;
}

@keyframes scan {
    0% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* =========================================
   SERVICE AREAS
   ========================================= */
.service-areas {
    padding: 80px 0;
    background: var(--bg-white);
    text-align: center;
}

.service-areas .section-subtitle {
    max-width: 580px;
    margin: -40px auto 48px;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.5;
}

.areas-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 920px;
    margin: 0 auto;
}

.area-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    transition: background 160ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)),
                border-color 160ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)),
                transform 160ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}

.area-pill i {
    color: var(--pool-aqua);
    font-size: 1rem;
}

@media (hover: hover) and (pointer: fine) {
    .area-pill:hover {
        background: white;
        border-color: var(--pool-aqua);
        transform: translateY(-1px);
    }
}

@media (max-width: 768px) {
    .service-areas { padding: 60px 0; }
    .service-areas .section-subtitle {
        margin: -24px 16px 32px;
        font-size: 0.95rem;
    }
    .areas-grid { gap: 8px; padding: 0 16px; }
    .area-pill {
        padding: 8px 14px;
        font-size: 0.9rem;
    }
}

/* =========================================
   ABOUT SECTION
   ========================================= */
.about-section {
    padding: 80px 0;
    background: var(--bg-main);
}

.about-grid {
    max-width: 820px;
    margin: 0 auto;
}

.about-title {
    text-align: left;
    margin-bottom: 24px;
    font-size: 2.25rem;
}

.about-lead {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--text-main);
    margin-bottom: 20px;
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.65;
    margin-bottom: 20px;
}

.about-badges {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 36px;
}

.about-badge {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 20px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.about-badge i {
    font-size: 1.75rem;
    color: var(--pool-aqua);
    flex-shrink: 0;
    line-height: 1;
}

.about-badge strong {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 4px;
}

.about-badge span {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
}

@media (max-width: 768px) {
    .about-section { padding: 60px 0; }
    .about-title { font-size: 1.75rem; text-align: center; }
    .about-lead { font-size: 1.1rem; }
    .about-badges {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 28px;
    }
}

/* =========================================
   FAQ SECTION
   ========================================= */
.faq-section {
    padding: 80px 0;
    background: var(--bg-white);
}

.faq-subtitle {
    margin-top: -40px !important;
    margin-bottom: 48px !important;
    text-align: center;
}

.faq-list {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    background: var(--bg-main);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    overflow: hidden;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.faq-item[open] {
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
    background: white;
}

.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-main);
    transition: color 160ms ease;
}

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

.faq-item summary:hover { color: var(--primary-blue); }

.faq-chevron {
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: transform 240ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)),
                color 160ms ease;
    flex-shrink: 0;
}

.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
    color: var(--primary-blue);
}

.faq-answer {
    padding: 0 24px 20px;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

.faq-answer p { margin: 0; }

.faq-answer a {
    color: var(--primary-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (max-width: 768px) {
    .faq-section { padding: 60px 0; }
    .faq-item summary {
        padding: 16px 18px;
        font-size: 0.98rem;
    }
    .faq-answer {
        padding: 0 18px 18px;
        font-size: 0.95rem;
    }
}

/* =========================================
   CBP FLOW MODAL (base compartilhada: quiz + assistant)
   Herda a aesthetic do AI Chat Modal mas é container próprio
   ========================================= */
.cbp-flow-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, #001f3f 0%, #003a5d 45%, #006a7a 100%);
    overflow: hidden;
}

.cbp-flow-modal.show {
    display: flex;
    animation: cbp-flow-fade-in 0.35s ease;
}

@keyframes cbp-flow-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.cbp-flow-bg { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }

.cbp-flow-bubbles {
    position: absolute; inset: 0;
    list-style: none; margin: 0; padding: 0;
}

.cbp-flow-bubbles li {
    position: absolute;
    bottom: -120px;
    border-radius: 50%;
    background: rgba(48, 209, 218, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: cbp-flow-rise 20s linear infinite;
    backdrop-filter: blur(2px);
}

.cbp-flow-bubbles li:nth-child(1) { left: 8%;  width: 38px;  height: 38px;  animation-delay: 0s;   animation-duration: 17s; }
.cbp-flow-bubbles li:nth-child(2) { left: 22%; width: 72px;  height: 72px;  animation-delay: 3s;   animation-duration: 23s; }
.cbp-flow-bubbles li:nth-child(3) { left: 38%; width: 26px;  height: 26px;  animation-delay: 6s;   animation-duration: 15s; }
.cbp-flow-bubbles li:nth-child(4) { left: 50%; width: 60px;  height: 60px;  animation-delay: 1s;   animation-duration: 21s; }
.cbp-flow-bubbles li:nth-child(5) { left: 66%; width: 90px;  height: 90px;  animation-delay: 5s;   animation-duration: 26s; }
.cbp-flow-bubbles li:nth-child(6) { left: 78%; width: 32px;  height: 32px;  animation-delay: 9s;   animation-duration: 18s; }
.cbp-flow-bubbles li:nth-child(7) { left: 88%; width: 52px;  height: 52px;  animation-delay: 2s;   animation-duration: 19s; }
.cbp-flow-bubbles li:nth-child(8) { left: 96%; width: 28px;  height: 28px;  animation-delay: 7s;   animation-duration: 22s; }

@keyframes cbp-flow-rise {
    0%   { bottom: -120px; transform: translateX(0) scale(1); opacity: 0; }
    10%  { opacity: 0.8; }
    90%  { opacity: 0.8; }
    100% { bottom: 110%; transform: translateX(-40px) scale(1.3); opacity: 0; }
}

/* Close button */
.cbp-flow-close {
    position: absolute;
    top: 22px; right: 22px;
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(10px);
    transition: background 160ms cubic-bezier(0.23, 1, 0.32, 1),
                transform 240ms cubic-bezier(0.23, 1, 0.32, 1);
    display: flex; align-items: center; justify-content: center;
}

.cbp-flow-close:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: rotate(90deg);
}

/* Progress dots */
.cbp-flow-progress {
    position: absolute;
    top: 32px; left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.cbp-flow-progress .dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transition: background 160ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.cbp-flow-progress .dot.done   { background: var(--pool-aqua); }
.cbp-flow-progress .dot.active { background: white; transform: scale(1.4); box-shadow: 0 0 12px rgba(255,255,255,0.6); }

/* Stage + step transitions */
.cbp-flow-stage {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 680px;
    color: white;
    max-height: calc(100dvh - 120px);
    overflow-y: auto;
    padding: 0 4px;
}

.cbp-flow-step { display: none; }

.cbp-flow-step.active {
    display: block;
    animation: cbp-flow-slide-in 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes cbp-flow-slide-in {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Headings dentro do stage */
.cbp-flow-question {
    color: white;
    font-size: 1.8rem;
    line-height: 1.25;
    margin: 0 0 24px;
    letter-spacing: -0.01em;
}

.cbp-flow-sub {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    margin: -16px 0 24px;
    max-width: none;
}

/* Back button */
.cbp-flow-back {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    font-family: var(--font-body);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    margin-bottom: 20px;
    padding: 4px 0;
    transition: color 160ms ease;
}

.cbp-flow-back:hover { color: white; }

/* Options grid (quiz) */
.cbp-flow-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.cbp-flow-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    color: white;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-body);
    transition: background 160ms cubic-bezier(0.23, 1, 0.32, 1),
                border-color 160ms cubic-bezier(0.23, 1, 0.32, 1),
                transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.cbp-flow-option:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: var(--pool-aqua);
    transform: translateY(-2px);
}

.cbp-flow-option:active { transform: scale(0.98); }

.cbp-flow-option i {
    font-size: 1.75rem;
    color: var(--pool-aqua);
    flex-shrink: 0;
}

.cbp-flow-option .opt-title {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 2px;
}

.cbp-flow-option .opt-sub {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Form (quiz step 4 - batched) */
.cbp-flow-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
}

.cbp-flow-form input[type="text"],
.cbp-flow-form input[type="email"],
.cbp-flow-form input[type="tel"] {
    width: 100%;
    padding: 15px 18px;
    font-size: 1.05rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-main);
    border-radius: 12px;
    font-family: var(--font-body);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.cbp-flow-form input:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 4px rgba(255, 159, 10, 0.3);
    background: white;
}

.cbp-flow-form input.shake {
    animation: cbp-flow-shake 0.4s ease;
    border-color: #ff6b6b;
}

@keyframes cbp-flow-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.cbp-flow-submit, .cbp-flow-next {
    padding: 15px 24px;
    background: var(--accent-orange);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background 160ms cubic-bezier(0.23, 1, 0.32, 1),
                transform 160ms cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 160ms cubic-bezier(0.23, 1, 0.32, 1);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cbp-flow-submit:hover, .cbp-flow-next:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(255, 159, 10, 0.4);
}

.cbp-flow-submit:active, .cbp-flow-next:active {
    transform: scale(0.98);
}

.cbp-flow-submit {
    margin-top: 4px;
}

.cbp-flow-privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.82rem;
    margin-top: 8px;
}

/* Loading / typing (quiz step 5, assistant step 4) */
.cbp-flow-loading {
    text-align: center;
    padding: 40px 20px;
}

.cbp-flow-loading p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin-top: 20px;
    max-width: none;
}

.cbp-flow-typing {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
}

.cbp-flow-typing span {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    animation: cbp-flow-typing-dots 1.4s infinite;
}

.cbp-flow-typing span:nth-child(2) { animation-delay: 0.2s; }
.cbp-flow-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes cbp-flow-typing-dots {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30%           { transform: translateY(-8px); opacity: 1; }
}

/* Success state */
.cbp-flow-success {
    text-align: center;
    padding: 20px;
}

.cbp-flow-success-icon {
    font-size: 72px;
    color: #30D158;
    margin-bottom: 20px;
    animation: cbp-flow-success-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cbp-flow-success-pop {
    from { transform: scale(0.6); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.cbp-flow-success h2 {
    color: white;
    font-size: 1.75rem;
    margin-bottom: 12px;
}

.cbp-flow-success p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: none;
}

.cbp-flow-done {
    padding: 12px 32px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.cbp-flow-done:hover { background: rgba(255, 255, 255, 0.22); }

/* ===== Message + Avatar + Bubble (Assistant / Blue) ===== */
.cbp-flow-msg {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.cbp-flow-avatar {
    flex-shrink: 0;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pool-aqua), var(--primary-blue));
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 1.4rem;
    box-shadow: 0 6px 20px rgba(38, 198, 218, 0.5);
}

/* Blue variation: aqua -> purple gradient to match ASSISTANT label color */
.cbp-flow-avatar-blue {
    background: linear-gradient(135deg, var(--pool-aqua), #BF5AF2);
    box-shadow: 0 6px 20px rgba(191, 90, 242, 0.4);
}

.cbp-flow-bubble {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 18px 22px;
    border-radius: 20px 20px 20px 4px;
    font-size: 1.05rem;
    line-height: 1.55;
    max-width: 520px;
    color: white;
}

.cbp-flow-bubble p {
    margin: 0 0 10px;
    color: white;
    max-width: none;
    font-size: inherit;
    line-height: inherit;
}

.cbp-flow-bubble p:last-child { margin-bottom: 0; }

.cbp-flow-bubble strong {
    color: white;
    font-weight: 700;
}

.cbp-flow-persona-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--pool-aqua) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px !important;
}

.cbp-flow-bubble.typing {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 22px 24px;
}

.cbp-flow-bubble.typing span {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    animation: cbp-flow-typing-dots 1.4s infinite;
}

.cbp-flow-bubble.typing span:nth-child(2) { animation-delay: 0.2s; }
.cbp-flow-bubble.typing span:nth-child(3) { animation-delay: 0.4s; }

.cbp-flow-bubble.result {
    border-left: 4px solid var(--accent-orange);
}

/* Input row (assistant: input + inline button) */
.cbp-flow-input-row {
    display: flex;
    gap: 12px;
    margin-left: 62px;
}

.cbp-flow-input-row input {
    flex: 1;
    padding: 15px 18px;
    font-size: 1.05rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-main);
    border-radius: 12px;
    font-family: var(--font-body);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.cbp-flow-input-row input:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 4px rgba(255, 159, 10, 0.3);
    background: white;
}

.cbp-flow-input-row input.shake {
    animation: cbp-flow-shake 0.4s ease;
    border-color: #ff6b6b;
}

/* CTA row inside success bubble (Assistant) */
.cbp-flow-cta-row {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.95rem;
}

.cbp-flow-cta-row p {
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cbp-flow-cta-row p i { color: #30D158; font-size: 1.2rem; }

.cbp-flow-cta-row p.urgent { opacity: 0.9; }

.cbp-flow-cta-row a {
    color: var(--pool-aqua);
    font-weight: 700;
    border-bottom: 1px dashed rgba(38, 198, 218, 0.6);
}

.cbp-flow-cta-row a:hover { color: white; border-bottom-color: white; }

/* Done button inside success bubble */
.cbp-flow-bubble .cbp-flow-done {
    margin-top: 16px;
}

/* Mobile */
@media (max-width: 640px) {
    .cbp-flow-modal { padding: 16px; }
    .cbp-flow-progress { top: 80px; gap: 8px; }
    .cbp-flow-close { top: 16px; right: 16px; width: 40px; height: 40px; }
    .cbp-flow-stage { max-height: calc(100dvh - 140px); }
    .cbp-flow-question { font-size: 1.4rem; }
    .cbp-flow-option { padding: 14px 16px; gap: 12px; }
    .cbp-flow-option i { font-size: 1.5rem; }
    .cbp-flow-option .opt-title { font-size: 0.98rem; }
    .cbp-flow-option .opt-sub { font-size: 0.8rem; }
    .cbp-flow-bubble { font-size: 1rem; padding: 14px 18px; }
    .cbp-flow-input-row { flex-direction: column; margin-left: 0; }
    .cbp-flow-next, .cbp-flow-submit { width: 100%; justify-content: center; }
    .cbp-flow-msg { margin-bottom: 16px; }
    .cbp-flow-avatar { width: 40px; height: 40px; font-size: 1.2rem; }
    .cbp-flow-success-icon { font-size: 56px; }
    .cbp-flow-success h2 { font-size: 1.4rem; }
}

/* ===== Hero secondary — 2 options stacked ===== */
.hero-secondary-row {
    display: flex;
    gap: 6px;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.hero-secondary-row:last-child { margin-bottom: 0; }

.hero-secondary-row span {
    color: rgba(255, 255, 255, 0.75);
}

/* Reduced motion: respeita quem tem motion sickness */
@media (prefers-reduced-motion: reduce) {
    .cbp-flow-bubbles li { animation: none; }
    .cbp-flow-step.active,
    .cbp-flow-success-icon,
    .cbp-flow-typing span,
    .cbp-flow-bubble.typing span,
    .cbp-flow-form input.shake,
    .cbp-flow-input-row input.shake { animation: none !important; }
    .cbp-flow-modal.show { animation: none; }
    .cbp-flow-close:hover,
    .cbp-flow-option:hover,
    .cbp-flow-submit:hover,
    .cbp-flow-next:hover { transform: none; }
}

/* =========================================
   CBP CAMERA MODAL (inline camera via getUserMedia)
   Design: WhatsApp Web / iOS Camera inspired
   ========================================= */
.cbp-camera-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: none;
    background: #000;
    overflow: hidden;
}

.cbp-camera-modal.show {
    display: block;
    animation: cbp-camera-fade-in 0.25s ease;
}

@keyframes cbp-camera-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Live video fills viewport */
.cbp-camera-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

/* Preview after capture */
.cbp-camera-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
    z-index: 2;
}

/* Hidden canvas for frame capture */
.cbp-camera-canvas {
    display: none;
}

/* Top bar: close + switch camera */
.cbp-camera-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 16px calc(16px + env(safe-area-inset-top));
    padding-top: calc(16px + env(safe-area-inset-top));
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), transparent);
    pointer-events: none;
}

.cbp-camera-close,
.cbp-camera-switch {
    pointer-events: auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 160ms cubic-bezier(0.23, 1, 0.32, 1),
                transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.cbp-camera-close:hover,
.cbp-camera-switch:hover {
    background: rgba(0, 0, 0, 0.75);
}

.cbp-camera-close:active,
.cbp-camera-switch:active {
    transform: scale(0.92);
}

/* Bottom bar: shutter or review actions */
.cbp-camera-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 24px calc(32px + env(safe-area-inset-bottom));
    z-index: 10;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.cbp-camera-hint {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    font-family: var(--font-body);
}

/* Floating warning banner for low-quality camera auto-selection */
.cbp-camera-warn-banner {
    position: absolute;
    top: calc(80px + env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    z-index: 11;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    max-width: calc(100% - 32px);
    background: linear-gradient(135deg, #FF9F0A 0%, #FF6B35 100%);
    color: #fff;
    border-radius: 14px;
    box-shadow:
        0 8px 24px rgba(255, 107, 53, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.18) inset;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    font-family: var(--font-body);
    pointer-events: none;
    animation: cbp-warn-slide-in 0.4s cubic-bezier(0.23, 1, 0.32, 1),
               cbp-warn-breathe 2.4s ease-in-out 0.5s infinite;
}

.cbp-camera-warn-banner > i:first-child {
    font-size: 1.4rem;
    flex-shrink: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.cbp-camera-warn-banner > div {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}

.cbp-camera-warn-banner strong {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.cbp-camera-warn-banner span {
    font-size: 0.8rem;
    opacity: 0.95;
}

.cbp-camera-warn-arrow {
    font-size: 1.2rem;
    flex-shrink: 0;
    animation: cbp-warn-arrow-bounce 1.2s ease-in-out infinite;
}

@keyframes cbp-warn-slide-in {
    from { opacity: 0; transform: translate(-50%, -14px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes cbp-warn-breathe {
    0%, 100% { box-shadow: 0 8px 24px rgba(255, 107, 53, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.18) inset; }
    50%      { box-shadow: 0 10px 32px rgba(255, 107, 53, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.28) inset; }
}

@keyframes cbp-warn-arrow-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}

/* Pulse ring on switch button to point to the fix */
.cbp-camera-switch.cbp-pulse-attention {
    box-shadow: 0 0 0 0 rgba(255, 159, 10, 0.6);
    animation: cbp-switch-pulse 1.6s cubic-bezier(0.23, 1, 0.32, 1) infinite;
}

@keyframes cbp-switch-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 159, 10, 0.7); }
    70%  { box-shadow: 0 0 0 14px rgba(255, 159, 10, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 159, 10, 0); }
}

/* Shutter button (big, white ring with inner circle) */
.cbp-camera-shutter {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    border: 4px solid white;
    background: transparent;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 120ms cubic-bezier(0.23, 1, 0.32, 1),
                border-color 120ms ease;
    -webkit-tap-highlight-color: transparent;
}

.cbp-camera-shutter-inner {
    display: block;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: white;
    transition: transform 120ms cubic-bezier(0.23, 1, 0.32, 1),
                background 120ms ease;
}

.cbp-camera-shutter:hover .cbp-camera-shutter-inner {
    transform: scale(0.95);
}

.cbp-camera-shutter:active .cbp-camera-shutter-inner {
    transform: scale(0.85);
    background: #e0e0e0;
}

.cbp-camera-shutter.capturing {
    animation: cbp-camera-flash 0.3s ease;
}

@keyframes cbp-camera-flash {
    0%   { background: transparent; }
    30%  { background: white; }
    100% { background: transparent; }
}

/* Review bottom (after capture): Retake | Use */
.cbp-camera-review {
    flex-direction: row;
    justify-content: space-between;
    gap: 12px;
}

.cbp-camera-action {
    flex: 1;
    padding: 16px 20px;
    border-radius: var(--radius-full);
    border: none;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 120ms cubic-bezier(0.23, 1, 0.32, 1),
                background 120ms ease;
    -webkit-tap-highlight-color: transparent;
}

.cbp-camera-retake {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cbp-camera-retake:hover {
    background: rgba(255, 255, 255, 0.25);
}

.cbp-camera-use {
    background: var(--accent-orange);
    color: white;
}

.cbp-camera-use:hover {
    background: var(--accent-hover);
}

.cbp-camera-action:active {
    transform: scale(0.97);
}

/* Permission / error state overlay */
.cbp-camera-state {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, #001f3f 0%, #003a5d 45%, #006a7a 100%);
}

.cbp-camera-state-card {
    max-width: 400px;
    text-align: center;
    color: white;
    padding: 32px 24px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-lg);
}

.cbp-camera-state-card i {
    font-size: 56px;
    color: var(--pool-aqua);
    margin-bottom: 16px;
    display: inline-block;
}

.cbp-camera-state-card h3 {
    color: white;
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.cbp-camera-state-card p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 20px;
    max-width: none;
}

.cbp-camera-state-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cbp-camera-state-btn {
    padding: 14px 20px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 160ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.cbp-camera-state-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.cbp-camera-state-btn:active {
    transform: scale(0.98);
}

.cbp-camera-state-btn-primary {
    background: var(--accent-orange);
    border-color: var(--accent-orange);
}

.cbp-camera-state-btn-primary:hover {
    background: var(--accent-hover);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .cbp-camera-modal.show,
    .cbp-camera-shutter.capturing,
    .cbp-camera-warn-banner,
    .cbp-camera-warn-arrow,
    .cbp-camera-switch.cbp-pulse-attention { animation: none; }
    .cbp-camera-switch.cbp-pulse-attention { box-shadow: 0 0 0 3px rgba(255, 159, 10, 0.6); }
    .cbp-camera-close:hover,
    .cbp-camera-switch:hover,
    .cbp-camera-shutter:hover .cbp-camera-shutter-inner,
    .cbp-camera-shutter:active .cbp-camera-shutter-inner,
    .cbp-camera-action:active { transform: none; }
}

/* Landscape adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .cbp-camera-bottom { padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); }
    .cbp-camera-hint { font-size: 0.85rem; }
    .cbp-camera-shutter { width: 64px; height: 64px; }
    .cbp-camera-shutter-inner { width: 50px; height: 50px; }
}

/* =========================================
   DIVER POOL SERVICE (underwater section)
   Animations use transform/opacity only and run only while the
   section is on screen (.is-live, set by script.js).
   ========================================= */
.diver-section {
    --diver-aqua: #7FE3F0;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 120px 0;
    color: #fff;
    background: linear-gradient(180deg, #0B4F86 0%, #06325F 35%, #021F43 70%, #011630 100%);
    view-timeline-name: --diver-dive;
}

/* Bright band at the top, like the water surface seen from below */
.diver-section::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 140px;
    background: linear-gradient(180deg, rgba(127, 227, 240, 0.25), rgba(127, 227, 240, 0));
    pointer-events: none;
}

.diver-fx {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.diver-ray {
    position: absolute;
    top: -10%;
    height: 120%;
    background: linear-gradient(180deg, rgba(170, 235, 255, 0.28), rgba(170, 235, 255, 0) 70%);
    transform-origin: top center;
    transform: rotate(var(--r));
    opacity: 0.35;
    animation: diver-ray 9s ease-in-out infinite alternate;
}
.diver-ray.r1 { --r: 14deg; left: 10%; width: 16%; }
.diver-ray.r2 { --r: 7deg;  left: 42%; width: 10%; animation-duration: 11s; animation-delay: -4s; }
.diver-ray.r3 { --r: 18deg; left: 70%; width: 20%; animation-duration: 13s; animation-delay: -7s; }

@keyframes diver-ray {
    from { opacity: 0.2;  transform: rotate(var(--r)) translateX(-20px); }
    to   { opacity: 0.55; transform: rotate(var(--r)) translateX(30px); }
}

/* Caustics: two drifting light nets that overlap into a shimmer */
.diver-caustics {
    position: absolute;
    inset: -15%;
    opacity: 0.5;
    mix-blend-mode: screen;
}
.diver-caustics.c1 {
    background: radial-gradient(ellipse at center, rgba(140, 225, 255, 0.16) 0 16%, transparent 46%) 0 0 / 220px 160px;
    animation: diver-drift-a 16s ease-in-out infinite alternate;
}
.diver-caustics.c2 {
    background: radial-gradient(ellipse at center, rgba(140, 225, 255, 0.12) 0 14%, transparent 44%) 60px 40px / 300px 210px;
    animation: diver-drift-b 21s ease-in-out infinite alternate;
}
@keyframes diver-drift-a { to { transform: translate(-70px, -30px); } }
@keyframes diver-drift-b { to { transform: translate(60px, 45px); } }

.diver-bubble {
    position: absolute;
    bottom: -20px;
    left: var(--x);
    width: var(--s);
    height: var(--s);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.08) 60%);
    opacity: 0;
    animation: diver-bubble var(--d) linear var(--w) infinite;
}
@keyframes diver-bubble {
    0%   { transform: translate(0, 0);        opacity: 0; }
    10%  { opacity: 0.85; }
    50%  { transform: translate(14px, -450px); }
    90%  { opacity: 0.6; }
    100% { transform: translate(-8px, -920px); opacity: 0; }
}

.diver-section:not(.is-live) .diver-fx > * { animation-play-state: paused; }

/* Depth gauge (wide screens only, so it never covers content) */
.diver-gauge {
    display: none;
    position: absolute;
    left: 32px;
    top: 140px;
    bottom: 140px;
    z-index: 1;
    width: 56px;
    border-left: 2px solid rgba(255, 255, 255, 0.25);
    flex-direction: column;
    justify-content: space-between;
}
.diver-gauge-mark {
    position: relative;
    padding-left: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1;
}
.diver-gauge-mark::before {
    content: "";
    position: absolute;
    left: -2px;
    top: 50%;
    width: 8px;
    height: 2px;
    background: rgba(255, 255, 255, 0.35);
}
.diver-gauge-diver {
    position: absolute;
    left: -16px;
    top: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #26C6DA;
    color: #011B49;
    font-size: 1rem;
    box-shadow: 0 0 0 6px rgba(38, 198, 218, 0.18), 0 6px 18px rgba(0, 0, 0, 0.35);
}
@media (min-width: 1360px) {
    .diver-gauge { display: flex; }
}
@supports (animation-timeline: view()) {
    .diver-gauge-diver {
        animation: diver-sink linear both;
        animation-timeline: --diver-dive;
        animation-range: cover 20% cover 80%;
    }
}
@keyframes diver-sink {
    from { top: 0; }
    to   { top: calc(100% - 30px); }
}

/* Content */
.diver-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 64px;
    align-items: center;
}

.diver-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: rgba(38, 198, 218, 0.12);
    border: 1px solid rgba(38, 198, 218, 0.35);
    color: var(--diver-aqua);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.diver-copy h2 {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 4.6vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: #fff;
    margin: 20px 0;
}
.diver-copy h2 span { color: var(--diver-aqua); }

.diver-lead {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 52ch;
    margin: 0 0 28px;
}

.diver-services {
    list-style: none;
    padding: 0;
    margin: 0 0 36px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 24px;
}
.diver-services li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    color: #fff;
}
.diver-services i {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
    color: var(--diver-aqua);
    font-size: 1rem;
}

.diver-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
}
.diver-call {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: rgba(255, 255, 255, 0.4);
}

/* Drain vs. dive comparison */
.diver-compare {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-lg);
    padding: 32px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.diver-compare h3 {
    color: #fff;
    font-size: 1.4rem;
    margin: 0 0 20px;
}
.diver-compare-head,
.diver-row {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
}
.diver-compare-head {
    padding-bottom: 12px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.diver-compare-head .col-drain { color: #FFA8A0; }
.diver-compare-head .col-dive  { color: var(--diver-aqua); }
.diver-compare-rows { margin: 0; }
.diver-row {
    padding: 14px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    align-items: start;
}
.diver-row dt {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #fff;
}
.diver-row dt i { color: var(--diver-aqua); }
.diver-row dd { margin: 0; font-size: 0.92rem; line-height: 1.45; }
.diver-row dd.col-drain { color: rgba(255, 255, 255, 0.62); }
.diver-row dd.col-dive  { color: #CFF7FC; font-weight: 600; }

@media (max-width: 900px) {
    .diver-section { padding: 88px 0; }
    .diver-grid { grid-template-columns: 1fr; gap: 48px; }
    .diver-compare { padding: 24px; }
    .diver-compare-head { grid-template-columns: 1fr 1fr; }
    .diver-compare-head > span:first-child { display: none; }
    .diver-row { grid-template-columns: 1fr 1fr; gap: 6px 16px; }
    .diver-row dt { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
    .diver-services { grid-template-columns: 1fr; }
    .diver-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .diver-fx > * { animation: none !important; }
    .diver-bubble { display: none; }
    .diver-gauge-diver { animation: none !important; }
}

/* Diver photo: edges dissolve into the section; the camera drifts,
   light ripples on the floor and fresh bubbles rise from the regulator */
.diver-photo {
    position: relative;
    aspect-ratio: 1;
    width: 100%;
    max-width: 540px;
    margin-left: auto;
    overflow: hidden;
    -webkit-mask-image: radial-gradient(closest-side, #000 58%, transparent 100%);
    mask-image: radial-gradient(closest-side, #000 58%, transparent 100%);
}
.diver-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.05);
    animation: diver-cam 12s ease-in-out infinite alternate;
}
@keyframes diver-cam {
    from { transform: scale(1.05) translate(-8px, 5px) rotate(-0.5deg); }
    to   { transform: scale(1.08) translate(8px, -6px) rotate(0.5deg); }
}
.diver-photo-caustics {
    position: absolute;
    inset: -10%;
    background: radial-gradient(ellipse at center, rgba(190, 240, 255, 0.35) 0 14%, transparent 44%) 0 0 / 120px 80px;
    mix-blend-mode: screen;
    opacity: 0.45;
    -webkit-mask-image: linear-gradient(to bottom, transparent 50%, #000 80%);
    mask-image: linear-gradient(to bottom, transparent 50%, #000 80%);
    animation: diver-photo-ripple 7s ease-in-out infinite alternate;
}
@keyframes diver-photo-ripple { to { transform: translate(-40px, 12px); } }
.diver-photo-bubble {
    position: absolute;
    left: 41%;
    top: 45%;
    width: var(--s);
    height: var(--s);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.15) 60%);
    opacity: 0;
    animation: diver-photo-bubble var(--d) ease-in var(--w) infinite;
}
@keyframes diver-photo-bubble {
    0%   { transform: translate(0, 0);              opacity: 0; }
    12%  { opacity: 0.95; }
    80%  { opacity: 0.7; }
    100% { transform: translate(var(--dx), -250px); opacity: 0; }
}
.diver-section:not(.is-live) .diver-photo img,
.diver-section:not(.is-live) .diver-photo-caustics,
.diver-section:not(.is-live) .diver-photo-bubble { animation-play-state: paused; }

/* Comparison moves under the copy + photo row */
.diver-compare { grid-column: 1 / -1; }

@media (min-width: 901px) {
    .diver-compare-head { display: none; }
    .diver-compare-rows {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
    }
    .diver-row {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 20px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.04);
    }
    .diver-row dt { font-size: 1.05rem; }
    .diver-row dd::before {
        display: block;
        margin-bottom: 2px;
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }
    .diver-row dd.col-drain::before { content: "Draining it"; color: #FFA8A0; }
    .diver-row dd.col-dive::before  { content: "Our divers";  color: var(--diver-aqua); }
}

@media (max-width: 900px) {
    .diver-photo { max-width: 420px; margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .diver-photo img,
    .diver-photo-caustics { animation: none !important; }
    .diver-photo-bubble { display: none; }
}
