/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variáveis de cores */
:root {
    --primary-color: #F5EEE4;
    --secondary-color: #D7A146;
    --text-dark: #333333;
    --text-light: #666666;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
}

/* Prevenir scroll horizontal e bugs de zoom */
html {
    overflow-x: hidden;
    width: 100%;
    -webkit-text-size-adjust: 100%;
}

/* Estilos gerais */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--primary-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Sticky header wrapper */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--white);
}

/* Navbar */
.navbar {
    background-color: var(--white);
    box-shadow: 0 2px 10px var(--shadow);
    padding: 1rem 0;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    height: 50px;
    width: auto;
}

/* Banner promocional */
.promo-banner {
    width: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    color: var(--white);
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(245, 197, 66, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
}

.promo-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(245, 197, 66, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.promo-banner__track {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.promo-banner__inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* Esconde o segundo bloco por padrão (desktop) */
.promo-banner__inner[aria-hidden="true"] {
    display: none;
}

.promo-banner__label {
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #F5C542;
    font-size: 0.8rem;
    text-shadow: 0 0 10px rgba(245, 197, 66, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
}

.promo-banner__message {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.promo-banner__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #F5C542 0%, #E8B733 100%);
    color: #111111;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(245, 197, 66, 0.3);
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
    z-index: 10;
}

.promo-banner__cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.promo-banner__cta:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 16px rgba(245, 197, 66, 0.4);
    background: linear-gradient(135deg, #FFD452 0%, #F5C542 100%);
}

.promo-banner__cta:hover::before {
    width: 300px;
    height: 300px;
}

.promo-banner__cta:active {
    transform: translateY(-50%) scale(0.98);
}

/* Main content */
main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem;
    padding-top: 2rem;
    min-height: calc(100vh - 66px - 50px);
}

/* Landing page container */
.landing-container {
    text-align: center;
    max-width: 600px;
    width: 100%;
    background-color: var(--white);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: 0 10px 30px var(--shadow);
}

/* Imagem do livro */
.book-image {
    max-width: 300px;
    width: 100%;
    height: auto;
    margin-bottom: 2rem;
    border-radius: 10px;
}

/* Título e descrição */
.landing-title {
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.3;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.landing-subtitle {
    font-size: 1rem;
    color: #444;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    max-width: 500px;
    letter-spacing: 0.3px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

/* Formulário */
.form-container {
    margin-top: 2rem;
}

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

/* Espaçamento especial para o último campo antes do botão */
.form-group:last-of-type {
    margin-bottom: 2.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--white);
}

.form-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(215, 161, 70, 0.1);
}

.form-input::placeholder {
    color: #aaa;
}

/* Botão de submit */
.submit-btn {
    width: 100%;
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(215, 161, 70, 0.3);
}

.submit-btn:hover {
    background-color: #c49639;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(215, 161, 70, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Estado de sucesso do botão */
.submit-btn.success {
    background-color: #28a745 !important;
    cursor: default;
    transform: none !important;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.submit-btn.success:hover {
    background-color: #28a745 !important;
    transform: none !important;
}

/* Micro-copy */
.micro-copy {
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.75rem;
    text-align: center;
    line-height: 1.4;
    font-style: italic;
}

/* Lista de benefícios */
.benefits-list {
    text-align: left;
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.benefit-item {
    font-size: 0.95rem;
    color: #444;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 0.25rem;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    transition: none;
}

.benefit-item:last-child {
    margin-bottom: 0;
}

.benefit-item:hover {
    background: none;
    transform: none;
    box-shadow: none;
}

/* Estilo para os ícones de check nos benefícios */
.benefit-item::before {
    content: "✓";
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-right: 0.5rem;
    font-weight: bold;
}

/* Selos de confiança */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.trust-badge {
    font-size: 0.75rem;
    color: #666;
    background-color: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    border: 1px solid #e9ecef;
}

/* Disclaimer sobre e-mail */
.email-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 1rem 0;
    padding: 1rem;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    border-left: 4px solid #f39c12;
}

.disclaimer-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.disclaimer-content {
    font-size: 0.85rem;
    color: #856404;
    line-height: 1.4;
}

.disclaimer-content strong {
    color: #6c5ce7;
    font-weight: 600;
}

/* Mensagem de sucesso */
.success-message {
    display: none;
    background-color: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    border: 1px solid #c3e6cb;
}

.success-message.show {
    display: block;
}

/* Footer */
.footer {
    background-color: var(--text-dark);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.footer-links {
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--white);
    text-decoration: none;
    font-size: 0.85rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-separator {
    color: var(--white);
    opacity: 0.6;
    font-size: 0.8rem;
}

/* Responsividade */

/* Tablets - Portrait e Landscape (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Melhorias gerais para tablets */
    .navbar-container {
        padding: 0 1.5rem;
    }
    
    .logo {
        height: 45px;
    }
    
    main {
        padding: 2rem 1.5rem;
    }
    
    .landing-container {
        max-width: 650px;
        padding: 2.25rem 2rem;
    }
    
    .landing-title {
        font-size: 1.75rem;
    }
    
    .landing-subtitle {
        font-size: 1rem;
    }
    
    .book-image {
        max-width: 280px;
    }
    
    .form-row {
        flex-direction: row;
        gap: 1rem;
    }
    
    .form-group {
        flex: 1;
    }
    
    .submit-btn {
        padding: 1rem 2.5rem;
        font-size: 1rem;
    }
}

/* Mobile e Tablets (até 1024px) - Banner Promo com Marquee */
@media (max-width: 1024px) {
    .navbar-container {
        padding: 0 1rem;
    }
    
    .promo-banner {
        padding: 0.55rem 0;
        overflow: hidden;
        position: relative;
    }
    
    /* Degradê para transição suave do texto para o botão */
    .promo-banner::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 120px;
        height: 100%;
        background: linear-gradient(90deg, 
            transparent 0%, 
            rgba(26, 26, 26, 0.3) 30%,
            rgba(26, 26, 26, 0.7) 60%,
            #1a1a1a 100%
        );
        pointer-events: none;
        z-index: 5;
    }
    
    .promo-banner__track {
        display: flex;
        animation: marquee-seamless 25s linear infinite;
        width: max-content;
        max-width: none;
        padding: 0;
        padding-right: 140px;
        margin: 0;
        justify-content: flex-start;
    }
    
    /* Ajustes específicos para tablets dentro do marquee */
    @media (min-width: 769px) {
        .promo-banner__track {
            animation: marquee-seamless 28s linear infinite;
            padding-right: 160px;
        }
        
        .promo-banner::after {
            width: 140px;
        }
        
        .promo-banner__inner {
            padding: 0 2.5rem;
            font-size: 0.85rem;
        }
        
        .promo-banner__label {
            font-size: 0.8rem;
        }
        
        .promo-banner__message {
            font-size: 0.85rem;
        }
        
        .promo-banner__cta {
            right: 1rem;
            font-size: 0.75rem;
            padding: 0.45rem 0.9rem;
            gap: 0.4rem;
        }
        
        .promo-banner__cta:hover {
            transform: translateY(-50%) scale(1.05);
        }
    }
    
    .promo-banner__track:hover {
        animation-play-state: paused;
    }
    
    .promo-banner__inner {
        display: flex !important;
        align-items: center;
        padding: 0 2rem;
        font-size: 0.8rem;
        gap: 1.5rem;
        flex-shrink: 0;
    }
    
    .promo-banner__label {
        font-size: 0.75rem;
        white-space: nowrap;
    }
    
    .promo-banner__message {
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .promo-banner__cta {
        display: flex !important;
        align-items: center;
        gap: 0.35rem;
        position: absolute;
        right: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        font-size: 0.7rem;
        font-weight: 600;
        padding: 0.4rem 0.75rem;
        background: rgba(245, 197, 66, 0.95);
        color: #111111;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 20px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        z-index: 10;
        pointer-events: all;
        transition: all 0.3s ease;
        letter-spacing: 0.3px;
        animation: subtle-pulse 3s ease-in-out infinite;
    }
    
    .promo-banner__cta:hover {
        background: rgba(255, 212, 82, 1);
        transform: translateY(-50%) scale(1.03);
        box-shadow: 0 4px 12px rgba(245, 197, 66, 0.4);
        animation: none;
    }
    
    .promo-banner__cta:active {
        transform: translateY(-50%) scale(0.98);
    }
    
    @keyframes subtle-pulse {
        0%, 100% {
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        }
        50% {
            box-shadow: 0 2px 12px rgba(245, 197, 66, 0.35);
        }
    }
    
    @keyframes marquee-seamless {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-50%);
        }
    }
    
    main {
        padding: 1rem;
    }
    
    .landing-container {
        padding: 2rem 1.5rem;
        margin: 0 auto;
    }
    
    .landing-title {
        font-size: 1.4rem;
        max-width: 100%;
    }
    
    .landing-subtitle {
        font-size: 0.9rem;
        max-width: 100%;
    }
    
    .book-image {
        max-width: 250px;
    }
    
    .micro-copy {
        font-size: 0.75rem;
        margin-top: 0.5rem;
    }
    
    .benefits-list {
        margin-bottom: 1.5rem;
        max-width: 100%;
    }
    
    .benefit-item {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
        line-height: 1.5;
    }
    
    .benefit-item::before {
        font-size: 0.75rem;
        margin-right: 0.3rem;
    }
    
    .trust-badges {
        gap: 0.3rem;
    }
    
    .trust-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .email-disclaimer {
        margin: 0.75rem 0;
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .disclaimer-content {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .promo-banner {
        padding: 0.5rem 0;
    }
    
    .promo-banner__track {
        animation: marquee-seamless 20s linear infinite;
        padding-right: 130px;
    }
    
    .promo-banner__inner {
        font-size: 0.75rem;
        gap: 1.2rem;
        padding: 0 1.5rem;
    }
    
    .promo-banner__label {
        font-size: 0.7rem;
    }
    
    .promo-banner__message {
        font-size: 0.75rem;
    }
    
    .promo-banner__cta {
        padding: 0.35rem 0.65rem;
        font-size: 0.65rem;
        right: 0.5rem;
    }
    
    .landing-container {
        padding: 1.5rem 1rem;
    }
    
    .landing-title {
        font-size: 1.25rem;
        line-height: 1.4;
    }
    
    .landing-subtitle {
        font-size: 0.85rem;
        line-height: 1.6;
    }
    
    .book-image {
        max-width: 200px;
    }
    
    .micro-copy {
        font-size: 0.7rem;
        margin-top: 0.5rem;
    }
    
    .benefits-list {
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }
    
    .benefits-row {
        gap: 0.5rem;
        flex-direction: column;
        align-items: center;
    }
    
    .benefit-item {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
        white-space: normal;
        text-align: center;
    }
    
    .trust-badges {
        gap: 0.3rem;
    }
    
    .trust-badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.3rem;
    }
    
    .email-disclaimer {
        margin: 0.5rem 0;
        padding: 0.6rem;
        gap: 0.4rem;
    }
    
    .disclaimer-content {
        font-size: 0.75rem;
        line-height: 1.3;
    }
    
    .disclaimer-icon {
        font-size: 1rem;
    }
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.landing-container {
    animation: fadeInUp 0.6s ease-out;
}

/* Melhorar acessibilidade */
.form-input:focus,
.submit-btn:focus {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Estados de loading */
.submit-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.submit-btn.loading::after {
    content: "...";
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0%, 33% { content: "."; }
    34%, 66% { content: ".."; }
    67%, 100% { content: "..."; }
}

/* Validação de campos e indicadores de erro */
.form-group {
    position: relative;
}

.error-indicator {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #dc3545;
    font-weight: bold;
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.form-input.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-input.error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

.form-input.valid {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.form-input.valid:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

.error-indicator.show {
    opacity: 1;
}

/* Mensagens de erro */
.error-message {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: none;
    animation: fadeIn 0.3s ease;
}

.error-message.show {
    display: block;
}

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

/* Melhorar acessibilidade para campos com erro */
.form-input.error:focus {
    outline: 3px solid #dc3545;
    outline-offset: 2px;
}

/* Estilo para campos obrigatórios */
.form-label.required::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}

/* Garantir que elementos de mídia não ultrapassem a viewport */
img, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
}

/* Prevenir que elementos inline-flex causem overflow em mobile */
@media (max-width: 480px) {
    div[style*="inline-flex"] {
        max-width: calc(100vw - 2rem);
        flex-wrap: wrap;
    }
    /* Exceção: bloco do aviso de e-mail deve manter uma linha com ícone + texto */
    div[style*="inline-flex"][style*="linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%)"][style*="border-radius: 12px"][style*="box-shadow: 0 2px 8px"] {
        flex-wrap: nowrap !important;
        align-items: center;
    }
}
