/* Focused refinements for the hero, contact form, CTA states and responsive spacing. */

/* Hero positioning message */
.hero-positioning {
    width: min(720px, calc(100% - 2rem));
    margin: 2.6rem auto 0;
    text-align: center;
    animation: positioningIn .9s cubic-bezier(.2, .7, .2, 1) .15s both;
}

.hero-positioning-label {
    margin: 0 0 1rem;
    color: #c1d8fb;
    font-family: 'Manrope', 'Open Sans', sans-serif;
    font-size: clamp(1rem, 1.7vw, 1.32rem);
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: .13em;
    text-transform: uppercase;
    text-shadow: 0 2px 14px rgba(16, 40, 98, .22);
}

.hero-positioning-title {
    margin: 0;
    color: #fff;
    font-family: 'Manrope', 'Open Sans', sans-serif;
    font-size: clamp(.9rem, 1.35vw, 1.08rem);
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: .005em;
    text-shadow: 0 8px 30px rgba(25, 48, 106, .25);
}

.hero-positioning-title em {
    color: #203d7c;
    font-style: normal;
    font-weight: 800;
}

@keyframes positioningIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Landing CTA */
#home #startbutton {
    width: auto;
    min-width: 190px;
    height: 52px;
    margin-top: 2.5rem !important;
    padding: .3rem .65rem .3rem 1.35rem !important;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 2rem !important;
    background: #162f70;
    box-shadow: 0 12px 34px rgba(10, 30, 85, .2);
    color: #fff;
    font-family: 'Open Sans', 'Poppins', sans-serif;
    font-size: .9em !important;
    font-weight: 600 !important;
    letter-spacing: .06em;
    transition: transform .25s ease, background-color .25s ease, box-shadow .25s ease;
}

#home #startbutton b {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, .14);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
}

#home #startbutton:hover {
    background: #0e2765;
    box-shadow: 0 16px 40px rgba(10, 30, 85, .28);
    transform: translateY(-2px);
}

/* Contact section: retains the shared h2/h3 system used by the other sections. */
#contact {
    margin: 0;
    padding: 3em 0 0;
    color: #1c223a;
    background-color: #fff;
    background-image: url("img/aboutbg.png") !important;
    background-position: center;
    background-repeat: repeat;
    background-size: cover;
}

#contact::before {
    display: none;
}

#contact > section {
    width: 100%;
    max-width: 1350px;
}

#contact > section > h2 {
    max-width: none;
    margin: 0;
    padding: 1em;
    color: #2c3746;
    font-family: inherit;
    font-size: 3em;
    font-weight: 500;
    line-height: 1em;
    letter-spacing: normal;
    text-align: center;
}

#contact > section > h3 {
    max-width: none;
    margin: 0 0 1em;
    padding: 0;
    color: inherit;
    font-family: 'Open', sans-serif;
    font-size: 1.8em;
    font-weight: 100;
    line-height: 1.25em;
    letter-spacing: normal;
    text-align: center;
}

#contact-columns {
    width: 100%;
    margin: 1.5rem 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    box-shadow: none;
}

#contact-form {
    box-sizing: border-box;
    width: min(620px, calc(100% - 2rem));
    height: auto;
    margin: 20px auto;
    padding: 1em;
    border: 0;
    border-radius: .5em;
    background: transparent;
    box-shadow: none;
    font-family: 'Open Sans', sans-serif;
    text-align: left;
}

#mform {
    display: block;
}

#mform .field {
    min-width: 0;
    margin-bottom: .7rem;
}

#mform label {
    margin: 1em 0 .3em;
    color: #26365f;
    font-family: 'Open Sans', sans-serif;
    font-size: .82em;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: .035em;
    text-transform: none;
}

#mform input,
#mform textarea {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    border: 1px solid #b9c7dd !important;
    border-radius: .35em;
    background: rgba(255, 255, 255, .88);
    color: #17264d;
    font-family: 'Open Sans', sans-serif;
    font-size: .8em;
    line-height: 1.5;
    box-shadow: 0 4px 16px rgba(40, 69, 122, .035);
    transition: border-color .25s ease, background-color .25s ease, box-shadow .25s ease;
}

#mform input {
    height: 48px;
    padding: 0 .85rem;
}

#mform textarea {
    height: 145px;
    padding: .7rem .85rem;
    resize: vertical;
}

#mform input::placeholder,
#mform textarea::placeholder {
    color: #a6b2c5 !important;
    font-size: .9em;
}

#mform input:focus,
#mform textarea:focus {
    outline: none;
    border-color: #5268a8 !important;
    border-width: 1px !important;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(66, 79, 148, .09);
}

#mform input.error,
#mform textarea.error {
    border-color: #d75b68 !important;
    background: #fffafa;
}

/* Contact CTA: typography and proportions match Discover Oxion. */
#mform #submit {
    width: auto;
    min-width: 190px;
    height: 52px;
    margin: 1.5em auto 0 !important;
    padding: .3rem .65rem .3rem 1.35rem !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 2rem !important;
    background: #162f70;
    box-shadow: 0 12px 34px rgba(10, 30, 85, .2);
    color: #fff;
    font-family: 'Open Sans', 'Poppins', sans-serif;
    font-size: .9em !important;
    font-weight: 600 !important;
    line-height: normal;
    letter-spacing: .06em;
    text-align: left;
    transition: transform .25s ease, background-color .25s ease, box-shadow .25s ease;
}

#mform #submit::after {
    content: "";
    width: 34px;
    height: 34px;
    display: grid;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, .14);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 2-7 20-4-9-9-4Z'/%3E%3Cpath d='M22 2 11 13'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
}

#mform #submit:hover {
    background: #0e2765;
    box-shadow: 0 16px 40px rgba(10, 30, 85, .28);
    transform: translateY(-2px);
}

/* Contact submit feedback states. */
#mform #submit:disabled {
    cursor: wait;
}

#mform #submit:disabled:hover {
    background: #162f70;
    box-shadow: 0 12px 34px rgba(10, 30, 85, .2);
    transform: none;
}

#mform #submit.is-sending::after {
    box-sizing: border-box;
    border: 2px solid rgba(255, 255, 255, .28);
    border-top-color: #fff;
    background: transparent;
    animation: submitSpinner .8s linear infinite;
}

#mform #submit.is-success::after {
    background-color: rgba(255, 255, 255, .14);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E");
}

#mform #submit.is-error::after {
    background-color: rgba(255, 255, 255, .14);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v6M12 17h.01'/%3E%3C/svg%3E");
}

#dialogo.is-complete .lds-ring,
#dialogo.is-error .lds-ring {
    display: none;
}

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

/* Send-status dialog: compact, readable and consistent across Safari and other browsers. */
#dialogo {
    box-sizing: border-box;
    width: min(340px, calc(100vw - 2rem));
    min-height: 168px;
    margin: auto;
    padding: 1.65rem 1.5rem 1.5rem;
    overflow: visible;
    border: 0 !important;
    border-radius: 18px;
    outline: 0;
    background: rgba(248, 251, 255, .98);
    color: #18305f;
    box-shadow: 0 24px 70px rgba(8, 24, 64, .24);
    opacity: 1;
    scale: 1;
    -webkit-appearance: none;
    appearance: none;
    text-align: center;
    transition: none;
}

#dialogo[open] {
    opacity: 1;
    scale: 1;
    animation: statusDialogIn .34s cubic-bezier(.2, .75, .25, 1) both;
}

#dialogo::backdrop {
    background: rgba(8, 24, 64, .3);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    animation: statusBackdropIn .25s ease-out both;
}

#dialogo #msg {
    max-width: 27ch;
    min-height: 2.9em;
    margin: 0 auto;
    display: grid;
    place-items: center;
    color: #18305f;
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: .01em;
    overflow-wrap: anywhere;
}

#dialogo .lds-ring {
    position: relative;
    width: 46px;
    height: 46px;
    margin: 0 auto 1rem;
}

#dialogo .lds-ring div {
    display: none;
}

#dialogo .lds-ring div:first-child {
    box-sizing: border-box;
    width: 46px;
    height: 46px;
    display: block;
    border: 3px solid rgba(40, 73, 141, .18);
    border-top-color: #28498d;
    border-radius: 50%;
    animation: statusRing .8s linear infinite;
}

#dialogo.is-complete::before,
#dialogo.is-error::before {
    content: "";
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    display: block;
    border-radius: 50%;
    background-position: center;
    background-repeat: no-repeat;
    animation: statusIconIn .35s cubic-bezier(.2, .8, .25, 1.15) both;
}

#dialogo.is-complete::before {
    background-color: rgba(35, 107, 123, .11);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23236b7b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E");
}

#dialogo.is-error::before {
    background-color: rgba(151, 65, 87, .1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23974157' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v6M12 17h.01'/%3E%3C/svg%3E");
}

#dialogo.is-complete #msg {
    color: #236b7b;
}

#dialogo.is-error #msg {
    color: #81364a;
}

@keyframes statusDialogIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes statusBackdropIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes statusIconIn {
    from {
        opacity: 0;
        transform: scale(.78);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Cookie policy: safe viewport sizing and readable scrolling on every device. */
#dialogocookies {
    box-sizing: border-box;
    width: min(860px, calc(100vw - 3rem));
    height: auto;
    max-height: min(80vh, 760px);
    max-height: min(80svh, 760px);
    margin: auto;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    overflow-x: hidden;
    overflow-y: auto;
    border: 0;
    border-radius: 16px;
}

#msg-cookies {
    max-width: 72ch;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.65;
}

#dialogocookies h3 {
    font-size: clamp(2rem, 4vw, 2.5em);
}

#dialogocookies h2 {
    font-size: clamp(1.35rem, 3vw, 2em);
}

/* iPad and tablet widths, including portrait and landscape. */
@media (min-width: 681px) and (max-width: 1185px) {
    .hero-positioning {
        width: min(680px, calc(100% - 3rem));
        margin-top: clamp(2rem, 4svh, 2.6rem);
    }

    #contact-form {
        width: min(620px, calc(100% - 3rem));
    }

    #dialogocookies {
        width: min(820px, calc(100vw - 3rem));
        max-height: 82vh;
        max-height: 82svh;
    }
}

/* Phones and narrow windows. */
@media (max-width: 680px) {
    .hero-positioning {
        width: min(520px, calc(100% - 1.25rem));
        margin-top: 1.4rem;
    }

    .hero-positioning-label {
        margin-bottom: .65rem;
        font-size: clamp(1.12rem, 5.2vw, 1.28rem);
        line-height: 1.35;
        letter-spacing: .06em;
    }

    .hero-positioning-title {
        font-size: clamp(1.08rem, 4.8vw, 1.2rem);
        line-height: 1.45;
    }

    #home #startbutton {
        min-width: 180px;
        margin-top: 1.5rem !important;
    }

    #contact {
        padding-top: 2.5em;
    }

    #contact > section > h2 {
        padding: .8em .5em;
    }

    #contact > section > h3 {
        margin-bottom: .75em;
        padding: 0 .75rem;
    }

    #contact-columns {
        margin-top: .75rem;
    }

    #contact-form {
        width: calc(100% - 1.25rem);
        margin: 12px auto 18px;
        padding: .75em;
    }

    #mform .field {
        margin-bottom: .55rem;
    }

    #mform label {
        margin-top: .8em;
    }

    #mform #submit {
        margin-top: 1.25em !important;
    }

    #foot {
        padding: 32px 14px;
    }

    #foot .footer-links {
        margin: 0 auto 18px;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 12px 20px;
    }

    #foot .footer-links li {
        margin: 0;
        font-size: .8rem;
    }

    #foot .footer-logo img {
        margin: 16px 0;
    }

    #foot #socialmedia {
        gap: 10px;
        margin: .75em 0;
    }

    #foot #socialmedia .circleicon {
        margin: .45em;
    }

    #dialogocookies {
        width: calc(100vw - 1rem);
        max-height: calc(100vh - 1rem);
        max-height: calc(100svh - 1rem);
        padding: 1.15rem;
        border-radius: 12px;
    }

    #msg-cookies {
        font-size: .9rem;
        line-height: 1.58;
    }

    #dialogocookies h3 {
        font-size: 1.8rem;
    }

    #dialogocookies h2 {
        padding-top: .8em;
        font-size: 1.25rem;
    }

    #dialogocookies .btncenter {
        margin-top: 1.5em !important;
    }

    #dialogo {
        width: min(310px, calc(100vw - 1.25rem));
        min-height: 150px;
        padding: 1.35rem 1.1rem 1.25rem;
        border-radius: 15px;
    }

    #dialogo #msg {
        max-width: 25ch;
        font-size: .9rem;
        line-height: 1.42;
    }

    #dialogo .lds-ring,
    #dialogo .lds-ring div:first-child {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 380px) {
    .hero-positioning {
        margin-top: 1.15rem;
    }

    .hero-positioning-label {
        font-size: 1.08rem;
        letter-spacing: .05em;
    }

    .hero-positioning-title {
        font-size: 1.05rem;
    }

    #home #startbutton,
    #mform #submit,
    #dialogocookies .btncenter {
        min-width: 176px;
    }

    #foot .footer-links {
        gap: 10px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-positioning {
        animation: none;
    }

    #home #startbutton,
    #mform #submit,
    #mform #submit::after {
        transition: none;
    }

    #dialogo[open],
    #dialogo::backdrop,
    #dialogo .lds-ring div:first-child,
    #dialogo.is-complete::before,
    #dialogo.is-error::before {
        animation: none;
    }
}
