/* --- Base & Typography --- */
:root {
    /* NOTE: Customize colors here */
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --text-color: #212529;
    --muted-color: #6c757d;
    --border-color: #e5e7eb;
    --background-color: #fff;
    --error-color: #dc3545;
    --success-color: #28a745;
    --focus-ring-color: #6aa9ff;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
    color: var(--text-color);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.subhead {
    font-size: 1.1rem;
    color: var(--muted-color);
    margin: 0 0 2rem;
}

/* --- Layout --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 1rem;
}

.split-layout {
    display: flex;
    background-color: var(--background-color);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.image-pane {
    flex: 1;
    display: none; /* Hidden by default, shown on larger screens */
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.form-pane {
    flex: 1;
    padding: clamp(2rem, 5vw, 4rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 520px;
    margin: auto;
}

@media (min-width: 900px) {
    .image-pane {
        display: block;
    }
}

/* --- Form Elements --- */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

input, select, textarea {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--focus-ring-color);
    outline-offset: 2px;
    border-color: var(--primary-color);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.textarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 0.25rem;
}

.char-counter {
    font-size: 0.875rem;
    color: var(--muted-color);
}

/* --- Button --- */
button[type="submit"] {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    background-color: var(--primary-color);
    border: none;
    border-radius: 999px; /* Pill shape */
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    display: flex;
    justify-content: center;
    align-items: center;
}

button[type="submit"]:hover {
    background-color: var(--primary-hover);
}

button[type="submit"]:active {
    transform: scale(0.98);
}

button[type="submit"]:disabled {
    background-color: #a0c7ff;
    cursor: not-allowed;
}

.button-text { display: block; }
.spinner { display: none; }

button[type="submit"]:disabled .button-text { display: none; }
button[type="submit"]:disabled .spinner {
    display: block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* --- Utility & State --- */
.gdpr-notice {
    font-size: 0.875rem;
    color: var(--muted-color);
    text-align: center;
    margin-top: 1.5rem;
}

.honeypot-field {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
}

.error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 1em;
}

.error-banner {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid #f5c6cb;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
    border-color: var(--error-color);
}

/* --- Success Panel --- */
.success-panel {
    text-align: center;
}

.success-icon {
    width: 60px;
    height: 60px;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.success-panel h2 {
    font-size: 1.75rem;
    margin: 0 0 0.5rem;
}

.success-panel p {
    color: var(--muted-color);
    margin-bottom: 2rem;
}

.home-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.home-link:hover {
    text-decoration: underline;
}
