@font-face {
    font-family:Sketch;
    src: url("../assets/fonts/Sketch.woff") format("woff");
}

@font-face {
    font-family:LGWE;
    src: url("../assets/fonts/LGWE.woff") format("woff");
}

html{
    scroll-behavior:smooth;
}

body {
    background-color:rgb(42, 55, 47);
    margin: 0;
}

.mainbody {
    width: 100%;
    flex: 3;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    background: rgb(30, 37, 33);
    min-height: 160vh;
}

.titleheader {
    background-image: linear-gradient(to bottom, rgba(50, 160, 93, 1), rgba(185, 252, 109, 0));
    border: 8px solid rgb(50,160,93);
    border-radius: 0 0 45px 45px;
}

.layout {
    display: flex;
    justify-content:center;
    align-items: flex-start;
    width: 100%;
}

/* --- Sibebar Images --- */

.side {
    flex: 1;
    z-index: 9;
}

img{
    user-select:none;
    -webkit-user-drag:none;
}

.side img {
    display: block;
    width: 100%;
    height: auto;
}

/* --- Content Boxes --- */

.content-area {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.content-box {
    font-family: Sketch;
    width: 85%;
    color:rgb(224, 243, 203);
    background: rgba(28, 32, 28, 1);
    border: 8px solid rgb(50, 160, 93);
    border-radius: 25px 25px 50px 50px;
    padding: 16px;
    box-sizing: border-box;
}

/* --- Carousel Navigation Bar --- */

.carousel-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px auto 0;
    padding: 10px 20px;
    width: 85%;
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgb(30, 37, 33);
}

.nav-arrow {
    background: transparent;
    border: none;
    color: rgb(185, 252, 109);
    font-size: 1.6rem;
    line-height: 1;
    padding: 4px 10px;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
}

.nav-arrow:hover,
.nav-arrow:focus-visible {
    color: rgb(224, 243, 203);
    transform: scale(1.15);
}

.nav-titles {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 10px 24px;
}

.nav-title {
    font-family: LGWE;
    background: transparent;
    border: none;
    color: rgba(224, 243, 203, 0.5);
    font-size: 1rem;
    padding: 6px 4px;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-title:hover,
.nav-title:focus-visible {
    color: rgba(224, 243, 203, 0.8);
}

.nav-title.active {
    color: rgb(185, 252, 109);
    font-weight: bold;
    transform: scale(1.1);
}

/* --- Carousel Thingies --- */

.carousel-stage {
    position: relative;
    width: 50%;
    min-height: 160px;
    perspective: 1600px;
    perspective-origin: 50% 50%;
}

.carousel-ring {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.9s cubic-bezier(0.65, 0, 0.35, 1);
}

.carousel-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100%;
    backface-visibility: hidden;
    opacity: 0.2;
    filter: blur(3px) brightness(0.55);
    pointer-events: none;
    transition: opacity 0.9s ease, filter 0.9s ease;
}

.carousel-panel.active {
    opacity: 1;
    filter: none;
    pointer-events: auto;
}

/* --- Companions panel: button links --- */

.companion-button {
    display: inline-block;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.companion-button img {
    display: block;
}

.companion-button:hover,
.companion-button:focus-visible {
    transform: scale(1.06);
    filter: brightness(1.15) drop-shadow(0 0 10px rgba(185, 252, 109, 0.6));
}

/* --- Atabook Junk (it's really jank with how the carousel boxes work) --- */

.carousel-panel[data-index="0"] {
    --embed-height: 600px;
    height: var(--embed-height);
}

.carousel-panel[data-index="0"] p {
    margin: 0;
    height: 100%;
}

.carousel-panel[data-index="0"] iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* --- Passcode Junk --- */

.passcode-form {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.passcode-input {
    flex: 1;
    min-width: 160px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 2px solid rgb(50, 160, 93);
    background: rgba(224, 243, 203, 0.08);
    color: rgb(224, 243, 203);
    font-size: 1rem;
    box-sizing: border-box;
}

.passcode-input:focus {
    outline: none;
    border-color: rgb(185, 252, 109);
}

.passcode-submit {
    padding: 8px 18px;
    border-radius: 12px;
    border: 2px solid rgb(50, 160, 93);
    background: rgb(50, 160, 93);
    color: rgb(20, 26, 22);
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.passcode-submit:hover,
.passcode-submit:focus-visible {
    background: rgb(185, 252, 109);
    transform: scale(1.05);
}

.passcode-message {
    margin-top: 10px;
    min-height: 1.2em;
    font-size: 0.9rem;
}

.passcode-message.valid {
    color: rgb(185, 252, 109);
}

.passcode-message.invalid {
    color: rgb(255, 140, 140);
}

/* --- Passcode reveal overlay --- */

.passcode-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 12, 10, 0.85);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 50;
    padding: 5vh 5vw;
    box-sizing: border-box;
    cursor: pointer;
}

.passcode-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.passcode-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    transform: translateY(30px) scale(0.85);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease;
    cursor: default;
}

.passcode-overlay.visible img {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* --- Gallery Unlock Shenanigans --- */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    width: 100%;
    margin-top: 12px;
    align-items: center;
    justify-items: center;
}

.gallery-item {
    width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: contain;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.gallery-item:hover,
.gallery-item:focus-visible {
    transform: scale(1.03);
}

/* --- Accessibility helpers --- */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    .carousel-ring,
    .carousel-panel,
    .nav-arrow,
    .nav-title,
    .companion-button,
    .gallery-item,
    .passcode-overlay,
    .passcode-overlay img,
    .passcode-submit {
        transition-duration: 0.01ms !important;
    }
}
