
body {
    margin: 0;
    padding: 0;box-sizing: border-box;
    scroll-behavior: smooth;
    background-color: #ffe1cf;
}

header {
    background-color: #FFC800;
    padding-bottom: 25px;
    padding-top: 10px;
    margin-top: -10px;
    margin-left: -10px;
}


nav {
    text-align: left;
    text-align: top;
    background-color: #FFC800;
    margin-top: 10px;
    margin-left: 15px;
}

nav a {
    display: inline-block;
    margin-top: 10px;
    margin-left: 18px;
    padding:0;
    background-color: #ffffff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 22px;
    animation: fadeInDown 0.9s ease-in forwards;
    animation-delay: 0.4s;
}

nav a:hover {
    background-color: #FF2F00;
    /* margin-top: 3px; */
    position: relative;
    rotate: 13deg;
}

main {
    display: grid;
    grid-template-columns: repeat(1, 1fr);    
}

h1 {
    margin-left: 15px;
}

#bubble img {
    width: 20%;
    height: auto;
    margin-left: 20px;
}

#beaver img {
    width: 52%;
    height: auto;
    display: grid;
    justify-content: flex-end;
}

#intro {
    background-color: #f8dd7a;
    text-align: center;
    font-size: 30px;
}

#sections {
    text-align: center;
}

#sections a {
    padding: 60px;
    display: grid;
    gap: 20px;
    background-color: #FFC800;
    color: #000000;
    display: inline-block;
    border-radius: 4px;
    text-decoration: none;
    font-size: 30px;
}

#sections a:hover {
    background-color: #FF2F00;
    transition: cubic-bezier(0.075, 0.82, 0.165, 1);
}

/* #first img {
    width: 30%;
} */

#first, #second, #third h2 {
    background-color: #FFC800;
}


#first, #second, #third{
    text-align: center;
    size: 40px;
    /* height:400px; */
    border: 1px solid black;
    scroll-behavior: smooth;
    border-radius: 4px;
}

/* recheck this part */
/* .scene {
    width: 200px;
    height: 260px;
    perspective: 600px;
} */

#scene {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px,3fr));
    object-fit: cover;
    gap: 2px;
}

.history {
    padding-left: 20px;
    width: 200px;
    height: 300px;
    position: relative;
    transition: transform 1s;
    transform-style: preserve-3d;
}

.history__face {
    position: absolute;
    width: 100%;
    height: 100%;
    color: white;
    text-align: center;
    font-weight: bold;
    font-size: 20px;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.history__face--front { 
    background-color: #FFC800;
    border: 5px solid rgb(255, 255, 255) !important; 
    line-height: 260px;
}

.history__face--back {
   background-color: #f8dd7a;
    transform: rotateY(180deg);
    font-size: 20px;
    color: #000000;
    border: 5px solid rgb(0, 0, 0) !important;
}

.history.is-flipped {
    transform: rotateY(180deg);
}

.habitat {
    width: 200px;
    height: 300px;
    position: relative;
    transition: transform 1s;
    transform-style: preserve-3d;
}

.habitat__face {
    position: absolute;
    width: 100%;
    height: 100%;
    text-align: center;
    font-weight: bold;
    font-size: 20px;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.habitat__face--front { 
    background-color: #FFC800;
    border: 5px solid rgb(255, 255, 255) !important; 
    line-height: 260px;
    color: white;
    
}

.habitat__face--back {
   background-color: #f8dd7a;
    transform: rotateY(180deg);
    border: 5px solid rgb(0, 0, 0) !important;
    font-size: 20px;
    color: #000000;
}

.habitat.is-flipped {
    transform: rotateY(180deg);
}

.diet {
    width: 200px;
    height: 300px;
    position: relative;
    transition: transform 1s;
    transform-style: preserve-3d;
}

.diet__face {
    position: absolute;
    width: 100%;
    height: 100%;
    text-align: center;
    font-weight: bold;
    font-size: 20px;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.diet__face--front { 
    background-color: #FFC800;
    border: 5px solid rgb(255, 255, 255) !important; 
    line-height: 260px;
    color: white;
}

.diet__face--back {
    background-color: #f8dd7a;
    transform: rotateY(180deg);
    font-size: 20px;
    border: 5px solid rgb(0, 0, 0) !important;
    color: #000000;
}

.diet.is-flipped {
    transform: rotateY(180deg);
}


.appearance {
    width: 200px;
    height: 300px;
    position: relative;
    transition: transform 1s;
    transform-style: preserve-3d;
}

.appearance__face {
    position: absolute;
    width: 100%;
    height: 100%;
    text-align: center;
    font-weight: bold;
    font-size: 20px;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.appearance__face--front {
    background-color: #FFC800;
    border: 5px solid rgb(255, 255, 255) !important;
    color: white;
    line-height: 260px;
}

.appearance__face--back {
    background-color: #f8dd7a;
    transform: rotateY(180deg);
    color: #000000;
    border: 5px solid rgb(0, 0, 0) !important;
    font-size: 20px;
}

.appearance.is-flipped {
    transform: rotateY(180deg);
}

.role {
    width: 200px;
    height: 300px;
    position: relative;
    transition: transform 1s;
    transform-style: preserve-3d;
}

.role__face {
    position: absolute;
    width: 100%;
    height: 100%;
    text-align: center;
    font-weight: bold;
    font-size: 20px;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.role__face--front {
    background-color: #FFC800;
    border: 5px solid rgb(255, 255, 255) !important;
    line-height: 260px;
    color: white;
}

.role__face--back {
    background-color: #f8dd7a;
    transform: rotateY(180deg);
    font-size: 16px;
    border: 5px solid rgb(255, 255, 255) !important;
    color: #000000;
}

.role.is-flipped {
    transform: rotateY(180deg);
}

#gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 10px;
    position: relative;
}

#gallery img {
    width: 280px;
    height: auto;
    display: block;
    object-fit: contain;
    aspect-ratio: 3/4;
    transition: transform 0.5s;
}

#gallery img.paddler {
    object-position: 40% 76%;
}

#gallery figure {
    overflow: hidden;
    cursor: pointer;
}

#gallery figure:hover img {
    transform: scale(1.2);

}

#gallery figcaption {
    display: none;
}


dialog figcaption {
    display: block;
}

dialog {
    /* position: fixed; */
    /* top: 5vh; */
    max-width: 70vw;
    max-height: 70vh;
    /* margin: 0 auto */
}

dialog img {
    max-width: 25vw;
    height: auto;
}

#gallery figure {
    overflow: hidden;
    cursor: pointer;
}

#gallery figure:hover img {
    transform: scale(1.2);

}

h3, h4 {
    text-align: center;
    /* font-size: 30px; */
}

.carousel {
    display: flex;
    width: max(480px, 50vw);
    overflow-x: auto;
    margin-inline: auto;
    padding-top: 15px;
}

.carousel-slide {
    flex-shrink: 0;
    width: calc(100% / 3);
    aspect-ratio: .8;

    img {
        width: 100%;
    }

    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    scroll-snap-align: center;

    animation: slide;
    animation-timeline: view(inline);
}

@keyframes slide {

   
    45%,
    100% {
        transform: scale(0.5);
        border-radius: 20px;
        filter: blur(6px) brightness(.8);
    }

    
    50% {
        transform: scale(1);
        border-radius: 4px;
        filter: none;
    }

}


.tbd {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}


.tbd.active {
    opacity: 1;
    transform: translateY(0);
}

#top {
    text-align: center;
}

footer {
    text-align: center;
    padding-top: 60px;
    margin-bottom: 20px;
}




