/* 
 * Pérola Design System - 2026 Luxury Tech
 * Theme: Geometric Sanctuary
 * Palette: Cream, Brown, Dark Grey
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    /* Palette - Mapped to Themes */
    --color-cream: #efe7dc;
    --color-brown: var(--primary-color, #855a27);
    --color-brown-dark: var(--accent-color, #5a3d1a);
    --color-grey: var(--text-color, #545456);
    --color-grey-light: #f5f5f5;

    /* Functional */
    --bg-panel: var(--form-bg, rgba(239, 231, 220, 0.95));
    --text-primary: var(--text-color, #545456);
    --text-accent: var(--primary-color, #855a27);

    /* Layout */
    --panel-width: 500px;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background-color: var(--background-color, #000);
    /* Use var or fallback */
    height: 100vh;
    overflow: hidden;
    transition: background-color 0.3s, color 0.3s;
}

/* --- Layout Architecture --- */
.luxury-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: flex-end;
}

/* Background Slider */
.background-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.slide.active {
    opacity: 1;
    animation: kenBurns 20s infinite alternate;
}

.slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 50%, rgba(239, 231, 220, 0.5) 100%);
}

@keyframes kenBurns {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

/* Content Panel - The Portal */
.content-panel {
    position: relative;
    z-index: 2;
    width: var(--panel-width);
    height: 100%;
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 3rem 4rem 2rem;
    padding-top: max(3rem, env(safe-area-inset-top));
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.3);
    opacity: 0;
    animation: panelSlideIn 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.5s forwards;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

@keyframes panelSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* --- Typography --- */
.brand-header {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-img {
    height: 120px;
    width: auto;
    margin-bottom: 1.5rem;
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 400;
    line-height: 1.1;
    color: var(--color-brown);
    margin-bottom: 1rem;
}

h1 span {
    display: block;
    font-size: 1.2rem;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

p.subtitle {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-grey);
    margin-bottom: 3rem;
    border-left: 2px solid var(--color-brown);
    padding-left: 1.5rem;
}

/* --- Form Design --- */
.form-group {
    margin-bottom: 2.5rem;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-brown);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(84, 84, 86, 0.3);
    padding: 0.5rem 0;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-family: 'Playfair Display', serif;
    transition: all 0.4s ease;
    border-radius: 0;
}

.form-group textarea {
    resize: vertical;
    min-height: 40px;
    line-height: 1.5;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-bottom-color: var(--color-brown);
}

.btn-luxury {
    width: 100%;
    background: var(--color-brown);
    color: #fff;
    border: none;
    padding: 1.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 2rem;
    padding-right: 2rem;
}

.btn-luxury:hover {
    background: var(--color-brown-dark);
    padding-right: 3rem;
}

.btn-arrow {
    font-size: 1.2rem;
    transition: transform 0.4s ease;
}

.btn-luxury:hover .btn-arrow {
    transform: translateX(5px);
}

/* --- Utilities --- */
.badge {
    background: var(--color-brown);
    color: #fff !important;
    /* High contrast white text */
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 50px;
    /* Pill style */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(133, 90, 39, 0.25);
    margin-bottom: 2rem;
    border: none;
    text-transform: none;
    /* Keep natural reading */
}

.badge::before {
    content: '\2022';
    /* Bullet separator or icon-like dot */
    font-size: 1.2rem;
    line-height: 1;
}

.safe-badge {
    margin-top: 2rem;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    display: block;
    font-size: 0.7rem;
    color: var(--text-primary);
    opacity: 0.7;
    text-align: center;
    width: 100%;
    flex-shrink: 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    body {
        background-color: var(--background-color, #545456);
        overflow: auto;
    }

    .luxury-wrapper {
        flex-direction: column;
        min-height: 100vh;
        height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1rem;
    }

    .background-slider {
        display: none;
    }

    .content-panel {
        position: relative;
        width: 100%;
        max-width: 500px;
        height: auto;
        min-height: auto;
        margin: 0;
        padding: 2.5rem 2rem;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        animation: none;
        opacity: 1;
    }

    h1 {
        font-size: 2rem;
    }

    h1 span {
        font-size: 0.9rem;
    }

    .logo-img {
        height: 80px;
    }

    .form-group {
        margin-bottom: 1.5rem;
    }

    p.subtitle {
        margin-bottom: 2rem;
    }
}

/* ============================================
   LOGO WATERMARK — FBI Shield Style
   ============================================ */
.content-panel {
    overflow: hidden;
}

.logo-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.watermark-img {
    width: 320px;
    height: auto;
    opacity: 0.06;
    filter: grayscale(100%);
    transform: rotate(-5deg);
}

/* Ensure all form content sits above the watermark */
.brand-header,
.form-context,
form#leadCaptureForm,
.safe-badge {
    position: relative;
    z-index: 1;
}

/* ============================================
   LGPD CONSENT CHECKBOX
   ============================================ */
.lgpd-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: rgba(133, 90, 39, 0.04);
    border-left: 2px solid var(--color-brown);
    border-radius: 0 4px 4px 0;
}

.lgpd-checkbox-wrapper {
    position: relative;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.lgpd-checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 2;
}

.lgpd-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 1.5px solid rgba(84, 84, 86, 0.4);
    border-radius: 3px;
    background: transparent;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lgpd-checkbox-wrapper input[type="checkbox"]:checked~.lgpd-checkmark {
    background: var(--color-brown);
    border-color: var(--color-brown);
}

.lgpd-checkmark::after {
    content: '';
    display: none;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
    margin-top: -2px;
}

.lgpd-checkbox-wrapper input[type="checkbox"]:checked~.lgpd-checkmark::after {
    display: block;
}

.lgpd-label {
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--color-grey);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

.tos-link {
    color: var(--color-brown);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.tos-link:hover {
    color: var(--color-brown-dark);
}

.lgpd-error {
    font-size: 0.75rem;
    color: #c0392b;
    margin-bottom: 1rem;
    padding: 0.5rem 0.75rem;
    background: rgba(192, 57, 43, 0.07);
    border-left: 2px solid #c0392b;
    border-radius: 0 3px 3px 0;
    animation: shake 0.3s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

/* ============================================
   TERMS OF USE MODAL
   ============================================ */
.tos-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tos-modal.is-open {
    visibility: visible;
    opacity: 1;
}

.tos-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.tos-card {
    position: relative;
    z-index: 1;
    /* Fundo sólido branco garante contraste máximo independente do tema */
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 540px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(133, 90, 39, 0.15);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
}

.tos-modal.is-open .tos-card {
    transform: translateY(0) scale(1);
}

.tos-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 34px;
    height: 34px;
    border: 1.5px solid rgba(84, 84, 86, 0.35);
    background: #ffffff;
    border-radius: 50%;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    color: #2c2c2e;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.tos-close:hover {
    background: #f0f0f0;
    border-color: rgba(84, 84, 86, 0.5);
    transform: rotate(90deg);
}

.tos-header {
    padding: 1.75rem 2rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(133, 90, 39, 0.12);
    background: linear-gradient(135deg, rgba(133, 90, 39, 0.07) 0%, rgba(133, 90, 39, 0.01) 100%);
}

.tos-shield-icon {
    width: 52px;
    height: 52px;
    background: var(--color-brown);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(133, 90, 39, 0.35);
}

.tos-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-brown);
    margin: 0 0 0.1rem;
    line-height: 1.2;
}

.tos-meta {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-grey);
    opacity: 0.7;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

.tos-body {
    padding: 1.5rem 2rem;
    overflow-y: auto;
    flex: 1;
    scroll-behavior: smooth;
}

.tos-body h3 {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-brown);
    font-weight: 600;
    margin: 1.25rem 0 0.4rem;
}

.tos-body h3:first-child {
    margin-top: 0;
}

.tos-body p {
    font-size: 0.875rem;
    line-height: 1.7;
    /* Cor sólida escura para alto contraste — independente do tema */
    color: #3a3a3a;
    font-family: 'Inter', sans-serif;
    margin: 0;
    border-left: none;
    padding-left: 0;
}

.tos-footer {
    padding: 1.25rem 2rem;
    border-top: 1px solid rgba(133, 90, 39, 0.12);
    background: #f9f7f4;
}

.btn-tos-accept {
    width: 100%;
    background: var(--color-brown);
    color: #fff;
    border: none;
    padding: 0.9rem 2rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s ease, transform 0.15s ease;
}

.btn-tos-accept:hover {
    background: var(--color-brown-dark);
}

.btn-tos-accept:active {
    transform: scale(0.98);
}

@media (max-width: 768px) {
    .watermark-img {
        width: 220px;
    }

    .tos-body {
        padding: 1.25rem 1.5rem;
    }

    .tos-header {
        padding: 1.25rem 1.5rem 1rem;
    }

    .tos-footer {
        padding: 1rem 1.5rem;
    }
}