/* =========================================================
   ROOVE Hotsite – style.css
   Otimizado para tablet na vertical (768px+)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ---- Reset & Base ---- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --sand-bg:       #C8B49A;
    --sand-dark:     #A8957D;
    --btn-yellow:    #D4E840;
    --btn-hover:     #C2D830;
    --text-dark:     #1A1A1A;
    --text-mid:      #3D3530;
    --white:         #FFFFFF;
    --input-border:  rgba(0, 0, 0, 0.12);
    --input-shadow:  0 2px 8px rgba(0, 0, 0, 0.06);
    --radius-input:  50px;
    --radius-btn:    50px;
    --font:          'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
    height: 100%;
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ---- Page Wrapper ---- */
.page-wrapper {
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    background-color: var(--sand-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

/* ---- Hero Background ---- */
.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

/* ---- Content Layer ---- */
.content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 600px;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ---- Header / Logo ---- */
.site-header {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-top: clamp(4px, 0.8vw, 7px);
    padding-bottom: clamp(24px, 4vw, 40px);
}

.logo {
    width: clamp(140px, 38vw, 220px);
    height: auto;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.08));
}

/* Logo fallback (texto) se imagem não carregada */
.logo-text {
    font-size: clamp(42px, 12vw, 72px);
    font-weight: 900;
    color: var(--text-dark);
    letter-spacing: -2px;
    text-transform: lowercase;
    line-height: 1;
}

/* ---- Main / Headline ---- */
.site-main {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.headline {
    text-align: center;
    font-size: clamp(13px, 3.4vw, 18px);
    font-weight: 400;
    color: var(--text-dark);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.55;
    margin-bottom: clamp(24px, 5vw, 40px);
    padding: 0 4px;
}

.headline strong {
    font-weight: 800;
    font-size: 1.15em;
}

/* ---- Form ---- */
#lead-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-input {
    width: 100%;
    height: clamp(48px, 7vw, 58px);
    padding: 0 22px;
    border: 1.5px solid var(--input-border);
    border-radius: var(--radius-input);
    background: var(--white);
    font-family: var(--font);
    font-size: clamp(14px, 3.2vw, 16px);
    font-weight: 400;
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: var(--input-shadow);
    -webkit-appearance: none;
    appearance: none;
}

.form-input::placeholder {
    color: #9E8E7E;
    font-weight: 400;
}

.form-input:focus {
    border-color: rgba(0, 0, 0, 0.35);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
}

/* ---- Checkbox ---- */
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 2px;
}

.checkbox-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 1.5px solid rgba(0,0,0,0.3);
    border-radius: 4px;
    background: var(--white);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    position: relative;
    transition: background 0.15s, border-color 0.15s;
    box-shadow: var(--input-shadow);
}

.checkbox-row input[type="checkbox"]:checked {
    background: var(--text-dark);
    border-color: var(--text-dark);
}

.checkbox-row input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 7px;
    height: 11px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.checkbox-label {
    font-size: clamp(12px, 2.8vw, 14px);
    color: var(--text-mid);
    line-height: 1.4;
    cursor: pointer;
    user-select: none;
}

/* ---- CTA Button ---- */
.btn-participar {
    width: 100%;
    height: clamp(52px, 8vw, 64px);
    background: var(--btn-yellow);
    border: none;
    border-radius: var(--radius-btn);
    font-family: var(--font);
    font-size: clamp(14px, 3.2vw, 17px);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dark);
    cursor: pointer;
    margin-top: 6px;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(180, 200, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-participar:hover {
    background: var(--btn-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(180, 200, 0, 0.4);
}

.btn-participar:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(180, 200, 0, 0.25);
}

.btn-participar:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loading spinner no botão */
.btn-participar .spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(0,0,0,0.2);
    border-top-color: var(--text-dark);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

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

/* ---- Mensagem de erro/sucesso inline ---- */
.form-message {
    text-align: center;
    font-size: clamp(12px, 2.8vw, 14px);
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 12px;
    display: none;
    margin-top: 4px;
    animation: fadeIn 0.3s ease;
}

.form-message.error {
    background: rgba(220, 53, 69, 0.12);
    color: #8B0000;
    display: block;
}

.form-message.info {
    background: rgba(255, 193, 7, 0.15);
    color: #5a4800;
    display: block;
}

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

/* ---- Footer / Instagram ---- */
.site-footer {
    width: 100%;
    margin-top: auto;
    padding-top: clamp(32px, 6vw, 56px);
    padding-bottom: clamp(24px, 5vw, 40px);
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.instagram-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-bottom: clamp(24px, 5vw, 40px);
}

.instagram-title {
    font-size: clamp(13px, 3vw, 16px);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dark);
    text-align: center;
    line-height: 1.3;
}

.qrcode-img {
    width: clamp(130px, 30vw, 180px);
    height: auto;
    display: block;
    border-radius: 8px;
    /* Placeholder visual enquanto imagem não é carregada */
    background: #D5BAA1;
    min-height: clamp(130px, 30vw, 180px);
}

.instagram-handle {
    font-size: clamp(11px, 2.6vw, 14px);
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dark);
}

/* ---- Model Photo ---- */
.model-photo {
    position: relative;
    flex-shrink: 0;
    align-self: flex-end;
}

.model-img {
    width: clamp(150px, 38vw, 240px);
    height: auto;
    display: block;
    /* A imagem deve ser PNG com fundo transparente */
    object-fit: contain;
    object-position: bottom;
}

/* ---- Success Overlay ---- */
.success-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.4s ease;
    display: none;
}

.success-overlay.active {
    display: flex;
}

.success-card {
    background: var(--white);
    border-radius: 24px;
    padding: clamp(32px, 7vw, 56px) clamp(28px, 6vw, 48px);
    text-align: center;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 24px 64px rgba(0,0,0,0.2);
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.success-icon {
    font-size: 56px;
    margin-bottom: 16px;
    line-height: 1;
    display: block;
}

.success-card h2 {
    font-size: clamp(20px, 5vw, 26px);
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.success-card p {
    font-size: clamp(14px, 3.2vw, 16px);
    color: #555;
    line-height: 1.6;
    margin-bottom: 8px;
}

.success-card .highlight {
    color: #2D7D46;
    font-weight: 700;
}

.btn-close-success {
    display: inline-block;
    margin-top: 24px;
    padding: 14px 36px;
    background: var(--btn-yellow);
    border: none;
    border-radius: 50px;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dark);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.btn-close-success:hover {
    background: var(--btn-hover);
    transform: translateY(-1px);
}

/* ---- Tablet Vertical Refinements (768px) ---- */
@media (min-width: 768px) {
    .content {
        max-width: 680px;
        padding: 0 40px;
    }

    .form-input {
        height: 58px;
        font-size: 16px;
    }

    .btn-participar {
        height: 60px;
        font-size: 16px;
    }
}

/* ---- Mobile (< 480px) ---- */
@media (max-width: 480px) {
    .content {
        padding: 0 18px;
    }

    .site-footer {
        padding-top: 24px;
    }
}

/* ---- Entrada animada dos elementos ---- */
.animate-in {
    animation: enterUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.animate-in:nth-child(1) { animation-delay: 0.05s; }
.animate-in:nth-child(2) { animation-delay: 0.12s; }
.animate-in:nth-child(3) { animation-delay: 0.18s; }
.animate-in:nth-child(4) { animation-delay: 0.24s; }
.animate-in:nth-child(5) { animation-delay: 0.30s; }
.animate-in:nth-child(6) { animation-delay: 0.36s; }

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