:root {
    --primary: #1e3a5f;
    --primary-dark: #152a45;
    --accent: #c9a227;
    --bg: #f4f7fb;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, #eef3f9 0%, var(--bg) 100%);
    color: var(--text);
}

.site-header {
    background: #5a6268;
    color: #fff;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.site-header .container {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
}

.site-brand {
    display: block;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.35;
    font-size: clamp(0.78rem, 2.8vw, 1rem);
}

.page-container {
    flex: 1;
    width: 100%;
    max-width: 960px;
    padding-top: 1.25rem;
    padding-bottom: 3rem;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
}

.form-banner {
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    background: #111;
    line-height: 0;
}

.form-banner__image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: cover;
    object-position: center;
}

.form-intro {
    text-align: center;
    color: var(--muted);
    margin: 0 0 1.5rem;
    line-height: 1.5;
    font-size: clamp(0.95rem, 2.5vw, 1.05rem);
}

.inscricao-form,
.result-card {
    background: var(--card);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(30, 58, 95, 0.08);
}

.form-section + .form-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.form-section h2 {
    color: var(--primary);
    font-size: 1.15rem;
    margin-bottom: 1rem;
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.35rem;
}

.inscricao-form .form-control,
.inscricao-form .form-select {
    text-transform: uppercase;
}

.form-control,
.form-select {
    width: 100%;
    border-radius: 10px;
    border-color: #d1d5db;
    padding: 0.65rem 0.85rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 95, 0.15);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-actions {
    margin-top: 2rem;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    border-radius: 999px;
    padding: 0.75rem 2rem;
    min-width: 240px;
    min-height: 48px;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.alert {
    border-radius: 12px;
    line-height: 1.5;
}

.result-card--espera {
    background: linear-gradient(135deg, #fff8e6 0%, #fff3cd 100%);
    border: 2px solid #e0a800;
    border-left-width: 6px;
    color: #664d03;
    padding: 1.75rem;
}

.espera-badge {
    display: inline-block;
    background: #e0a800;
    color: #1f2937;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}

.espera-titulo {
    color: #7a5900;
    font-size: clamp(1.35rem, 4vw, 1.75rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
    line-height: 1.25;
}

.espera-saudacao {
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.espera-destaque {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid #f0c040;
    border-radius: 12px;
    padding: 1rem 1.1rem;
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.55;
    margin-bottom: 1rem;
}

.espera-complemento {
    font-size: 0.98rem;
    color: #856404;
}

.alert-espera {
    background: linear-gradient(135deg, #fff8e6 0%, #fff3cd 100%);
    border: 2px solid #e0a800;
    border-left-width: 6px;
    color: #664d03;
    font-weight: 600;
}

.site-footer {
    margin-top: auto;
    padding: 1.5rem 0;
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
    text-align: center;
    color: var(--muted);
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
}

.site-footer .container {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
}

.site-footer p {
    margin: 0;
    line-height: 1.45;
}

@media (max-width: 575.98px) {
    .site-header {
        padding: 0.85rem 0;
        text-align: center;
    }

    .page-container {
        padding-top: 0.75rem;
        padding-bottom: 2rem;
    }

    .form-banner {
        border-radius: 12px;
        margin-bottom: 0.85rem;
    }

    .form-banner__image {
        max-height: 180px;
        object-position: center 45%;
    }

    .form-intro {
        margin-bottom: 1.1rem;
    }

    .inscricao-form,
    .result-card {
        padding: 1.1rem;
        border-radius: 12px;
        margin-bottom: 1rem;
    }

    .form-section h2 {
        font-size: 1.05rem;
    }

    .form-control,
    .form-select {
        font-size: 16px;
        min-height: 48px;
    }

    .btn-primary {
        width: 100%;
        min-width: 0;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .form-banner__image {
        max-height: 220px;
    }

    .inscricao-form,
    .result-card {
        padding: 1.25rem;
    }

    .btn-primary {
        width: 100%;
        min-width: 0;
    }
}

@media (min-width: 768px) {
    .form-banner__image {
        max-height: 280px;
    }
}
