* { box-sizing: border-box; }
html { height: 100%; }
body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    font-family: 'Gilroy', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #333;
    background: #fff;
    overflow-x: hidden;
}
main { flex: 1; }

header {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0.75em 1em;
    gap: 1em;
    background: var(--main-soft);
}
header a{
    color: var(--main-over-color);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.25em;
    text-decoration: none;
    font-size: 1.1em;
    white-space: nowrap;
    color: #333;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1em;
    margin-left: auto;
    flex-wrap: wrap;
}
.nav-links form { margin: 0; }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    margin-left: auto;
    width: 2em;
    height: 2em;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.nav-toggle span {
    display: block;
    height: 2px;
    background: #333;
    border-radius: 2px;
    transition: all 0.2s;
}

@media (max-width: 640px) {
    .nav-toggle { display: flex; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #fff6f6;
        z-index: 100;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
    .nav-links.open { display: flex; }

    .nav-links a,
    .nav-links form,
    .nav-links button[type=submit] {
        display: block;
        width: 100%;
        padding: 0.75em 1em;
        border: none;
        border-top: 1px solid rgba(0,0,0,0.06);
        background: none;
        text-align: left;
        cursor: pointer;
        font-size: 1em;
    }
    .nav-links form { padding: 0; }
    .nav-links form button[type=submit] { border-top: none; }
}

footer {
    padding: 5em 2em;
    color: var(--main-over-color);
    background: var(--main-color);
}
footer a{
    color: var(--main-over-color);
}

a { color: var(--main-color); transition: all .2s; }

a.btn-round,
button.btn-round {
    display: inline-block;
    padding: 10px 15px;
    color: #fff;
    background: var(--main-color);
    text-decoration: none;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s;
}
a.btn-round:hover,
button.btn-round:hover { background: var(--main-color); }

.fullH { min-height: 100vh; }
.maxW {
    width: 100%;
    max-width: 1280px;
    padding: 20px 10px;
    margin: 0 auto;
}

/* Carousel */
.carousel {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}
.carousel .slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: translateX(-100%);
    transition: transform 0.7s ease-in-out;
}
.carousel .slide.active {
    transform: translateX(0);
}
.carousel .slide.exited {
    transform: translateX(100%);
}
.carousel .front {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}
.carousel .front h1 {
    font-size: 4em;
    color: #fff;
    mix-blend-mode: difference;
}


.page { position: relative; }
.page h1 {
    font-size: 5em;
    font-family: 'Gilroy', sans-serif;
    font-weight: 500;
    font-style: normal;
    letter-spacing: 1px;
    margin: 0;
    text-align: center;
}
.page h2 {
    font-size: 1.6em;
    font-weight: 700;
    margin: 0 0 0.25em;
    text-align: center;
}
.cursive{
    font-family: "Birthstone", cursive;
    font-style: normal;                    
    letter-spacing: 1px;
}
.page .narrow {
    max-width: 760px;
    margin: 0 auto;
    text-align: justify;
}
.center { text-align: center; }


/* Candidate grid */
.candidates {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
}
.candidate {
    position: relative;
    display: block;
    text-decoration: none;
    width: 100%;
    background: #f9f9f9;
    box-shadow: 0 0 5px 0 rgba(0,0,0,.1);
    border-radius: 2px;
    transform-style: preserve-3d;
    will-change: transform;
    transition: all 0.1s ease-in-out;
}
.candidate .content {
    position: relative;
    width: 100%;
    padding-top: 122%;
    z-index: 1;
    transition: all 0.2s ease-in-out;
}
.candidate .img {
    position: absolute;
    top: 5.25%;
    left: 5.5%;
    width: 89%;
    height: 75%;
    background-color: #eee;
    background-size: cover;
    background-position: center center;
    border-radius: 3px;
    z-index: 3;
    transition: all 0.2s ease-in-out;
}
.candidate .name {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    font-family: 'Gilroy', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 2.3em;
    text-align: center;
    padding: 10px;
    color: #333;
}
.candidate .votes { margin: 0 5px; }
.candidate .votes img { max-height: 1em; vertical-align: middle; }
.candidates .candidate:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(3deg) scale(1.03);
    box-shadow: 3px 3px 10px 0 rgba(0,0,0,.2);
}

/* Vote form */
.campForm {
    display: grid;
    grid-template-rows: 1fr;
    transition: all .2s;
}
.campForm > div { overflow: hidden; }
.campForm input {
    display: block;
    width: 100%;
    padding: 8px;
    border: none;
    background: #f6f6f6;
    border-bottom: solid 2px #ccc;
    border-radius: 2px;
    transition: border .3s;
    outline: 0 none;
    margin: 5px 0;
}
.campForm select {
    display: inline-block;
    width: 100%;
    height: 31px;
    padding: 0 10px;
    margin: 0 0 10px;
    border-radius: 2px;
    border: none;
    outline: none;
    cursor: pointer;
    background: #f6f6f6;
    border-bottom: solid 2px #ccc;
}
.campForm input:hover,
.campForm select:hover { border-bottom-color: #9d7460; }
.campForm label.error {
    display: block;
    color: #800;
    text-shadow: 1px 1px 0 #fff;
    width: 80%;
    padding: 2px 5px;
    text-align: left;
    background: rgba(80,0,0,.1);
    border-radius: 0 0 2px 2px;
    margin: 0 auto;
}
.campForm button { margin: 10px 0; }

.loading .campForm { opacity: 0.5; pointer-events: none; filter: blur(2px); }
.sent .campForm    { pointer-events: none; grid-template-rows: 0fr; }

/* Thank you */
.voted {
    display: grid;
    grid-template-rows: 0fr;
    transition: all .2s;
}
.voted > div { overflow: hidden; }
.sent .voted { grid-template-rows: 1fr; }
