﻿*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --blue-deep: #1a3a6e;
    --blue-mid: #2272b8;
    --blue-light: #5bb8f5;
    --blue-pale: #e8f5fe;
    --blue-wash: #f0faff;
    --accent: #f7c948;
    --white: #ffffff;
    --text-body: #3a5068;
    --success: #22a06b;
    --error: #e5484d;
    --transition: 0.26s cubic-bezier(.4,0,.2,1);
}

body {
    font-family: 'Nunito', sans-serif;
    background: var(--blue-wash);
    color: var(--text-body);
}

/* ═══════════════════════════════════════════════
       CONTACT SECTION
       ═══════════════════════════════════════════════ */
.contact {
    position: relative;
    padding: 100px 24px 120px;
    background: var(--blue-deep);
    overflow: hidden;
}

    /* Background water ripple rings */
    .contact::before {
        content: '';
        position: absolute;
        bottom: -120px;
        left: -120px;
        width: 500px;
        height: 500px;
        border-radius: 50%;
        border: 2px solid rgba(91,184,245,0.10);
        pointer-events: none;
        animation: ripple 8s ease-in-out infinite;
    }

    .contact::after {
        content: '';
        position: absolute;
        bottom: -180px;
        left: -180px;
        width: 700px;
        height: 700px;
        border-radius: 50%;
        border: 2px solid rgba(91,184,245,0.06);
        pointer-events: none;
        animation: ripple 8s ease-in-out infinite 1.5s;
    }

@keyframes ripple {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.6;
    }
}

/* Extra decorative circle top-right */
.contact-bubble {
    position: absolute;
    top: -80px;
    right: -80px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(91,184,245,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.contact-inner {
    max-width: 1080px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 72px;
    align-items: start;
}

/* ── Left column: info panel ── */
.contact-info {
    color: var(--white);
    padding-top: 8px;
}

.contact-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--blue-light);
    background: rgba(91,184,245,0.15);
    padding: 6px 16px;
    border-radius: 999px;
    margin-bottom: 20px;
}

.contact-title {
    font-size: clamp(1.9rem, 3.5vw, 2.6rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 18px;
    color: var(--white);
}

    .contact-title span {
        color: var(--blue-light);
    }

.contact-lead {
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.75;
    opacity: 0.8;
    margin-bottom: 40px;
}

/* Contact detail cards */
.contact-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(91,184,245,0.2);
    border-radius: 14px;
    padding: 16px 20px;
    text-decoration: none;
    transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

    .contact-detail:hover {
        background: rgba(255,255,255,0.12);
        border-color: rgba(91,184,245,0.4);
        transform: translateX(4px);
    }

.contact-detail-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(91,184,245,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background var(--transition);
}

.contact-detail:hover .contact-detail-icon {
    background: var(--blue-light);
}

.contact-detail-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--blue-light);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke var(--transition);
}

.contact-detail:hover .contact-detail-icon svg {
    stroke: var(--blue-deep);
}

.contact-detail-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-detail-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue-light);
    opacity: 0.8;
}

.contact-detail-value {
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--white);
}

/* Mascot tagline */
.contact-mascot-note {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(247,201,72,0.10);
    border: 1px solid rgba(247,201,72,0.25);
    border-radius: 14px;
    padding: 14px 18px;
}

    .contact-mascot-note span {
        font-size: 1.5rem;
        flex-shrink: 0;
    }

    .contact-mascot-note p {
        font-size: 0.85rem;
        font-weight: 700;
        color: var(--accent);
        line-height: 1.5;
        opacity: 0.9;
    }

/* ── Right column: form card ── */
.contact-form-card {
    background: var(--white);
    border-radius: 28px;
    padding: 44px 40px 40px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.25);
    border: 2px solid rgba(91,184,245,0.15);
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

    .contact-form-card.visible {
        opacity: 1;
        transform: translateY(0);
    }

.form-section-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--blue-mid);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--blue-pale);
    display: block;
}

/* Field grid */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

    .form-row.single {
        grid-template-columns: 1fr;
    }

    .form-row.three {
        grid-template-columns: 2fr 1fr 1fr;
    }

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .field label {
        font-size: 0.78rem;
        font-weight: 800;
        color: var(--blue-deep);
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

        .field label .required {
            color: var(--blue-light);
            margin-left: 2px;
        }

    .field input,
    .field select,
    .field textarea {
        font-family: inherit;
        font-size: 0.96rem;
        font-weight: 600;
        color: var(--blue-deep);
        background: var(--blue-wash);
        border: 2px solid var(--blue-pale);
        border-radius: 12px;
        padding: 12px 16px;
        outline: none;
        width: 100%;
        transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
        -webkit-appearance: none;
    }

        .field input::placeholder,
        .field textarea::placeholder {
            color: var(--text-body);
            opacity: 0.35;
            font-weight: 600;
        }

        .field input:focus,
        .field select:focus,
        .field textarea:focus {
            border-color: var(--blue-mid);
            box-shadow: 0 0 0 3px rgba(34,114,184,0.12);
            background: var(--white);
        }

        .field input.valid {
            border-color: var(--success);
        }

        .field input.error,
        .field textarea.error {
            border-color: var(--error);
        }

/* Character count for textarea */
.field-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 18px;
}

.field-error {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--error);
    display: none;
}

    .field-error.visible {
        display: block;
    }

.char-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-body);
    opacity: 0.4;
    margin-left: auto;
}

    .char-count.warn {
        color: var(--error);
        opacity: 0.8;
    }

/* Textarea */
.field textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.65;
}

/* Select arrow */
.field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232272b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

/* Section spacer */
.form-section-gap {
    margin-top: 28px;
}

/* Submit area */
.form-submit-area {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.btn-submit {
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    color: var(--blue-deep);
    background: var(--accent);
    border: none;
    border-radius: 14px;
    padding: 16px 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 18px rgba(247,201,72,0.4);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), opacity var(--transition);
}

    .btn-submit:hover:not(:disabled) {
        background: #ffd84a;
        transform: translateY(-2px);
        box-shadow: 0 8px 28px rgba(247,201,72,0.55);
    }

    .btn-submit:disabled {
        opacity: 0.55;
        cursor: not-allowed;
        transform: none;
    }

    .btn-submit svg {
        width: 18px;
        height: 18px;
        stroke: currentColor;
        fill: none;
        stroke-width: 2.5;
        stroke-linecap: round;
        stroke-linejoin: round;
        flex-shrink: 0;
        transition: transform var(--transition);
    }

    .btn-submit:hover:not(:disabled) svg {
        transform: translateX(3px);
    }

    /* Spinner inside button */
    .btn-submit .spinner {
        width: 18px;
        height: 18px;
        border: 2.5px solid rgba(26,58,110,0.2);
        border-top-color: var(--blue-deep);
        border-radius: 50%;
        animation: spin 0.7s linear infinite;
        display: none;
        flex-shrink: 0;
    }

    .btn-submit.loading .spinner {
        display: block;
    }

/* Progress hint shown while button is disabled */
.form-progress-hint {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-body);
    opacity: 0.5;
    text-align: center;
    line-height: 1.5;
    transition: opacity 0.3s ease;
}

/* Hide the hint once the button is enabled */
.btn-submit:not(:disabled) ~ .form-progress-hint {
    display: none;
}

/* Subtle pulse on the button when it first becomes enabled */
@keyframes btnUnlock {
    0% {
        box-shadow: 0 0 0 0 rgba(247,201,72,0.6);
    }

    50% {
        box-shadow: 0 0 0 12px rgba(247,201,72,0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(247,201,72,0);
    }
}

.btn-submit.unlocked {
    animation: btnUnlock 0.55s ease-out both;
}

.btn-submit.loading .btn-arrow {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.form-privacy {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-body);
    opacity: 0.55;
    text-align: center;
    line-height: 1.5;
}

/* ── Consent checkbox group ── */
.consent-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 4px 0 8px;
    padding: 20px;
    background: var(--blue-wash);
    border: 2px solid var(--blue-pale);
    border-radius: 14px;
}

.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 6px 0;
}

/* Hide native checkbox */
.consent-checkbox-wrap {
    position: relative;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 1px;
}

    .consent-checkbox-wrap input[type="checkbox"] {
        position: absolute;
        opacity: 0;
        width: 100%;
        height: 100%;
        margin: 0;
        cursor: pointer;
        z-index: 1;
    }

/* Custom styled box */
.consent-custom-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 2px solid var(--blue-pale);
    border-radius: 6px;
    background: var(--white);
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
    pointer-events: none;
}

    .consent-custom-box svg {
        width: 12px;
        height: 12px;
        stroke: var(--white);
        opacity: 0;
        transform: scale(0.6);
        transition: opacity var(--transition), transform var(--transition);
    }

/* Checked state */
.consent-checkbox-wrap input:checked ~ .consent-custom-box {
    background: var(--blue-mid);
    border-color: var(--blue-mid);
}

    .consent-checkbox-wrap input:checked ~ .consent-custom-box svg {
        opacity: 1;
        transform: scale(1);
    }

/* Focus ring for accessibility */
.consent-checkbox-wrap input:focus-visible ~ .consent-custom-box {
    box-shadow: 0 0 0 3px rgba(34,114,184,0.25);
    border-color: var(--blue-mid);
}

/* Error state */
.consent-checkbox-wrap input.error ~ .consent-custom-box {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(229,72,77,0.15);
}

.consent-label:hover .consent-custom-box {
    border-color: var(--blue-light);
}

.consent-text {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-body);
    line-height: 1.6;
    opacity: 0.88;
}

.consent-link {
    color: var(--blue-mid);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--transition);
}

    .consent-link:hover {
        color: var(--blue-deep);
    }

.consent-error {
    margin-left: 34px; /* aligns under consent text */
    margin-top: -2px;
    margin-bottom: 6px;
}

/* ── Success state ── */
.contact-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 40px;
    gap: 16px;
}

    .contact-success.visible {
        display: flex;
    }

.success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4f5e9, #a8ecd1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    animation: successPop 0.5s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes successPop {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-icon svg {
    width: 36px;
    height: 36px;
    stroke: var(--success);
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.success-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--blue-deep);
}

.success-message {
    font-size: 0.97rem;
    font-weight: 600;
    color: var(--text-body);
    opacity: 0.82;
    line-height: 1.65;
    max-width: 340px;
}

.success-cta {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--blue-deep);
    background: var(--accent);
    border: none;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(247,201,72,0.4);
    transition: transform var(--transition), box-shadow var(--transition);
}

    .success-cta:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(247,201,72,0.55);
    }

    .success-cta svg {
        width: 16px;
        height: 16px;
        stroke: currentColor;
        fill: none;
        stroke-width: 2.5;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

/* ── Responsive ── */
@media (max-width: 860px) {
    .contact-inner {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .contact-info {
        padding-top: 0;
    }
}

@media (max-width: 580px) {
    .contact {
        padding: 72px 16px 88px;
    }

    .contact-form-card {
        padding: 28px 20px 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

        .form-row.three {
            grid-template-columns: 1fr;
        }
}