:root {
    --color-primary: #4a8e47;
    --color-primary-dark: #3a7238;
    --color-secondary: #86c227;
    --color-tertiary: #e52126;
    --color-dark: #22331f;
    --color-text: #2c3a2a;
    --font-main: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: var(--font-main);
    color: var(--color-text);
    background: #fff;
}

/* Topbar */
.topbar {
    background: var(--color-dark);
    color: #fff;
    font-size: 0.85rem;
}

.topbar-tagline {
    color: #d9ecd6;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-btn {
    display: block;
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    line-height: 0;
    opacity: 0.6;
    transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.lang-flag {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.lang-btn:hover {
    opacity: 0.85;
    transform: scale(1.06);
}

.lang-btn.active {
    opacity: 1;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 2px rgba(134, 194, 39, 0.25);
}

/* Hero */
.hero {
    position: relative;
    min-height: calc(100vh - 40px);
    display: flex;
    align-items: center;
    padding: 3rem 0;
    background: var(--color-dark) url('../newhero.jpeg') center center / cover no-repeat;
    isolation: isolate;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(135deg, rgba(15, 26, 12, 0.82) 0%, rgba(20, 34, 16, 0.72) 45%, rgba(15, 26, 12, 0.85) 100%);
}

.hero-logo {
    max-width: 220px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
}

.hero-title {
    font-weight: 800;
    font-size: clamp(1.9rem, 3.2vw, 2.75rem);
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 1rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.hero-subtitle {
    font-size: 1.05rem;
    color: #eaf3e6;
    max-width: 520px;
    margin-bottom: 1.75rem;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.hero-perks li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
    font-weight: 500;
    color: #f3f8f1;
}

.perk-dot {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-secondary);
    box-shadow: 0 0 0 4px rgba(134, 194, 39, 0.28);
}

/* Form card — glassmorphism */
.form-card {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    padding: 2rem;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 480px;
    margin: 0 auto;
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.form-title {
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.2rem;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.form-subtitle {
    color: #e4ede1;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.form-card .form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #f4f8f2;
}

.form-card .form-control {
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-text);
}

.form-card .form-control::placeholder {
    color: #8a9687;
}

.form-card .form-control:focus {
    background: #ffffff;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 0.2rem rgba(134, 194, 39, 0.28);
}

.form-card .form-control.is-invalid {
    border-color: var(--color-tertiary);
}

.form-card .form-control.is-invalid ~ .invalid-feedback,
.form-card .form-control.is-invalid + .invalid-feedback {
    display: block;
}

.invalid-feedback {
    color: var(--color-tertiary);
}

.btn-submit {
    background: var(--color-secondary);
    border: none;
    color: #1f2c1c;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 1.02rem;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn-submit:hover:not(:disabled) {
    background: var(--color-primary);
    color: #fff;
}

.btn-submit:active:not(:disabled) {
    transform: scale(0.99);
}

.btn-submit:disabled {
    opacity: 0.75;
}

.form-disclaimer {
    font-size: 0.75rem;
    color: #dfe9db;
    margin-top: 1rem;
    margin-bottom: 0;
    text-align: center;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .form-card {
        background: rgba(20, 34, 16, 0.82);
    }
}

#formAlert {
    font-size: 0.9rem;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
}

/* Responsive tweaks */
@media (max-width: 991.98px) {
    .hero {
        min-height: auto;
        padding: 2.5rem 0;
        text-align: center;
    }

    .hero-left {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-perks {
        display: inline-block;
        text-align: left;
    }

    .form-card {
        margin-top: 1rem;
    }
}

@media (max-width: 575.98px) {
    .form-card {
        padding: 1.5rem;
        border-radius: 14px;
    }

    .topbar .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
