:root {
    --whitish1: #ede8e2;
    --whitish2: #efe7df;
    --whitish3: #e8d9c9;
    --brown1: #e5cbb3;
    --brown2: #c7b09a;
    --brown3: #ad9985;
    --brown4: #847363;
    --brown5: #5e4f3f;
    --nav: rgba(147, 103, 72, 0.3);
    --nav-darker: rgba(147, 103, 72, 0.7);
    --paar-wand: #ECE3D8;

    --button-padding: 0.5rem 1.25rem;
    --transition-speed: 0.3s ease;
}

/* \forall */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: underline;
    color: black;
    transition: color 0.3s ease;
}

p a {
    border-radius: 0.5rem;
    padding: 0.2rem 0.4rem;
}

a:hover,
/* a:active, now hard coded in .js */
a:focus {
    color: white;
}

#caption {
    font-size: 5rem;
}

.maps-embed {
    border-radius: 2rem;
}

.darker {
    filter: brightness(50%);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background-color: var(--whitish2);
    font-size: 24px;
    font-family: "Neutraface 2 Text Light";
    text-align: center;
}

@media (max-width: 880px) {
    body {
        font-size: 18px;
    }
}

.lang-box {
    background-color: none;
    display: inline;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    margin-bottom: 5rem;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* reusable container */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style-position: inside;
}

.container-ghost {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    width: 60%;
    position: relative;
    left: 20%;
    list-style-position: inside;
}

@media (max-width: 880px) {
    .container-ghost {
        width: 80%;
        left: 10%;
    }
}

.menu-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 70%;
    left: 15%;
    position: relative;
}

/* Header styles */
.header {
    position: fixed;
    z-index: 99;
    top: 2rem;
    width: 70%;
    right: 15%;
    padding: 0.2rem 1rem;
    background-color: var(--nav);
    backdrop-filter: blur(0.3rem);
    border: 1px solid var(--whitish1);
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2), 5px 5px 20px rgba(255, 255, 255, 0.4) inset;
    border-radius: 5rem;
}

.navbar a {
    text-decoration: none;
    color: black;
    display: inline-block;
    padding: 1rem;
}

.hamburger {
    display: none;
    font-size: 2rem;
    padding: 1rem;
}

@media (max-width: 880px) {
    .header {
        transform: translateY(-90%);
        transition: transform 0.3s ease;
        width: 80%;
        left: 10%;
    }

    .navbar {
        flex-direction: column;
        transition: display 0.3s ease;
    }

    /* now hard coded .js */
    /* .header.active {
        transform: translateY(0);
    } */

    .navbar a {
        width: 100%;
        max-width: 200px;
        text-align: center;
        padding: 1rem 0;
    }

    .hamburger {
        display: block;
        color: black;
    }
}

img {
    height: 250px;
}

.error-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: opacity 1s ease;
}

.error-content {
    background-color: var(--nav-darker);
    backdrop-filter: blur(0.5rem);
    padding: 5rem;
    border-radius: 2rem;
    max-width: 75%;
    text-align: center;
    box-shadow: 0 4px 6px var(--brown5);
}

.paar-back-container {
    z-index: -9;
    position: relative;
    width: 100vw;
    height: 70vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.paar-back-container img {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    object-fit: cover;
}

/* Desktop: paar-h.jpeg */
@media (min-width: 881px) {
    #paar-back-v {
        display: none;
    }
}

/* Mobile: paar-v.jpeg */
@media (max-width: 880px) {
    #paar-back-h {
        display: none;
    }
}

@media (max-width: 880px) {
    .paar-back-container {
        height: 60vh;
    }

    .paar-back-container img {
        /* height: 80vh; */
    }
}

.container .deco {
    width: 50%;
    object-fit: contain;
    opacity: 0.5;
    height: 5rem;
}

section {
    margin: 3rem 0;
}

#story-sec,
#rsvp {
    width: 100%;
}

#story table {
    margin: 20px auto;
    border-collapse: collapse;
    width: 80%;
}

#story table th,
#story table td {
    padding: 8px;
    text-align: center;
}

#story table th {
    font-weight: bold;
}

#story,
.rsvp-form-container {
    text-align: center;
    width: 75vw;
    margin: 5rem 0rem;
    border-radius: 2rem;
    padding: 2rem 5rem;
    background-color: var(--nav);
    backdrop-filter: blur(4rem);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

h1 {
    margin-bottom: 2.5rem;
    font-size: 3rem;
}

h2 {
    font-size: 2.5rem;
}

h1, h2 {
    margin-top: 0.5rem;
}

@media (max-width: 880px) {
    #story,
    .rsvp-form-container {
        width: 90vw;
        padding: 1rem 2rem;
    }

    h1 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}

#story-sec h2 {
    margin-bottom: 2.5rem;
}

button,
#rsvp-nav {
    background-color: var(--nav-darker);
    padding: var(--button-padding);
    border-radius: 0.75rem;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
}

button:hover,
#rsvp-nav:hover {
    background-color: var(--brown5);
    transform: scale(1.25);
}

.rsvp-form input,
.rsvp-form textarea {
    border-radius: 1rem;
    padding: 0.5rem;
}

.errortext {
    color: red;
}

#location img {
    width: 100%;
    margin: 1rem 0;
}

.curtain {
    z-index: 990;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;;
}

.curtain-overlay {
    color: var(--brown1);
    z-index: 999;
    text-align: center;
    font-size: 5rem;
    font-family: "Coneria Script Demo";
    opacity: 0;
    transition: opacity 1s ease;
}

.curtain-overlay.hide {
    animation: overlay-reinraus 2s ease;
}

@keyframes overlay-reinraus {
    0% {
        opacity: 0;
    }

    75% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.curtain-left,
.curtain-right {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background-color: black;
    transform: translateX(0);
}

.curtain-left {
    left: 0;
    animation: slide-left 1.5s cubic-bezier(0.77, 0, 0.175, 1);
    animation-delay: 3s;
}

.curtain-right {
    right: 0;
    animation: slide-right 1.5s cubic-bezier(0.77, 0, 0.175, 1);
    animation-delay: 3s;
}

@keyframes slide-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

@keyframes slide-right {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(100%);
    }
}

#location {
    width: 90%;
    left: 5%;
}

.carousel-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 1) 90%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 1) 90%, rgba(0, 0, 0, 0) 100%);
}

.carousel {
    display: flex;
    animation: scroll-carousel 40s linear infinite;
}

.carousel img {
    width: 300px;
    object-fit: cover;
    border-radius: 1rem;
    border: 0.5rem solid transparent;
}

@media (max-width: 880px) {
    .carousel img {
        height: 125px;
        border: 0.2rem solid transparent;
    }
}

@keyframes scroll-carousel {
    0% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(0);
    }
}

.card-wrapper {
    display: flex;
    flex-direction: row;
    gap: 5rem;
    justify-content: center;
    align-items: center;
    z-index: 2;
    margin-top: 2rem;
}

@media (max-width: 880px) {
    .card-wrapper {
        flex-direction: column;
    }
}

.card-container {
    height: 30vw;
    width: 20vw;
    max-height: 300px;
    max-width: 200px;
    background-color: var(--brown2);
    perspective: 800px;
    border-radius: 2.5rem;
}

#qr-card-container {
    height: 30vw;
    width: 30vw;
    max-width: 300px;
}

@media (max-width: 880px) {
    #qr-card-container {
        height: 50vw;
        width: 50vw;
    }
}

.card {
    height: 100%;
    width: 100%;
    position: relative;
    transition: transform 1500ms;
    transform-style: preserve-3d;
    border-radius: 2.5rem;
    overflow: hidden;
    transform: rotateZ(-10deg);
}

.card-container:hover > .card {
    cursor: pointer;
    transform: rotateY(180deg)
     rotateZ(-10deg);
}

#menu .card-container:hover>.card {
    transform: rotateY(180deg) scale(2)
     rotateZ(-10deg);
}

@media (max-width: 880px) {
    .card-container {
        height: 75vw;
        width: 50vw;
    }

    #menu .card-container:hover>.card {
        transform: rotateY(180deg) scale(1.5) rotateZ(-10deg);
    }
}

.front,
.back {
    height: 100%;
    width: 100%;
    box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.2);
    position: absolute;
    /* backface-visibility: hidden; */
}

.front img,
.back img {
    height: 100%;
    object-fit: contain;
}

.back {
    transform: rotateY(180deg)
     /* rotateZ(180deg); */
}

.back img {
    opacity: 0;
}

.back:hover img {
    animation: popin 1s forwards;
}

/* workaround insteaf of backface-visibility */
@keyframes popin {
    49% {
        opacity: 0;
    } 50% {
        opacity: 1;
    } 100% {
        opacity: 1;
    }
}

.footer {
    color: var(--brown5);
}

label.disabled {
    color: rgba(0, 0, 0, 0.2);
    cursor: not-allowed;
}