#splashScreen {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    z-index: 9999;
    overflow: hidden;
    background: #000;
    opacity: 1;
    transition: .5s ease;
}

#splashScreen.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#splashScreen video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: introZoom 20s linear infinite alternate;
}

.intro-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient( rgba(0, 0, 0, .45), rgba(0, 0, 0, .75));
}

.intro-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.intro-logo img {
    width: 90px;
    margin-bottom: 20px;
}

.intro-logo h1 {
    font-size: 3rem;
}

.intro-logo p {
    margin-top: 15px;
}

#skipIntro {
    position: fixed;
    top: 35px;
    right: 35px;
    opacity: 1;
    pointer-events: auto;
    z-index: 10005;
    padding: 14px 30px;
    border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(0, 0, 0, .85);
    backdrop-filter: blur(14px);
    color: white;
    border-radius: 999px;
    transition: .25s ease;
    font-size: .95rem;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#skipIntro:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, .16);
}

#skipIntro.show {
    opacity: 1;
    pointer-events: auto;
}


/* ==================================================
   ROOT VARIABLES
================================================== */

:root {
    --page-bg: #f5f5f5;
    --text-color: #222;
    --heading-color: #111;
    --accent-color: #ffffff;
    --secondary-color: #dddddd;
    --nav-bg: rgba(255, 255, 255, 0.92);
    --nav-text: #111;
    --panel-bg: rgba(255, 255, 255, 0.88);
    --shadow-color: rgba(0, 0, 0, 0.25);
    --transition: 0.35s ease;
}


/* ==================================================
   DARK MODE VARIABLES
================================================== */

body.dark-mode {
    --page-bg: #111111;
    --text-color: #eeeeee;
    --heading-color: #ffffff;
    --accent-color: #222222;
    --secondary-color: #444444;
    --nav-bg: rgba(15, 15, 15, 0.94);
    --nav-text: #ffffff;
    --panel-bg: rgba(20, 20, 20, 0.90);
    --shadow-color: rgba(0, 0, 0, 0.65);
}


/* ==================================================
   RESET
================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: "VT323", monospace;
    color: var(--text-color);
    background-color: var(--page-bg);
    background-image: url("files/bg1.png");
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    background-repeat: no-repeat;
    transition: background-image var(--transition), background-color var(--transition), color var(--transition);
}

body.dark-mode {
    background-image: url("files/framecontact.png");
}


/* ==================================================
   HEADINGS
================================================== */

h1,
h2,
h3,
button,
.nav-links a {
    font-family: "Press Start 2P", cursive;
}

h1 {
    font-size: clamp(1.4rem, 3vw, 2.5rem);
}

h2 {
    font-size: clamp(0.8rem, 2vw, 1.2rem);
}

p {
    font-size: 1.35rem;
    line-height: 1.4;
}


/* ==================================================
   NAVIGATION
================================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 75px;
    padding: 10px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: background var(--transition);
}


/* LOGO */

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo img {
    width: 65px;
    height: 55px;
    object-fit: contain;
    transition: transform var(--transition);
}

.nav-logo:hover img {
    transform: scale(1.08);
}


/* NAV LINKS */

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-left: auto;
}

.nav-links a {
    color: var(--nav-text);
    text-decoration: none;
    font-size: 0.7rem;
    transition: transform var(--transition), opacity var(--transition);
}

.nav-links a:hover {
    transform: translateY(-3px) scale(1.05);
    opacity: 0.7;
}


/* ==================================================
   MENU
================================================== */

.menu-wrapper {
    position: relative;
}

.menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    background: transparent;
    color: var(--nav-text);
    cursor: pointer;
    font-size: 0.65rem;
}

.menu-button img {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

.menu-panel {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 230px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--panel-bg);
    border: 8px solid transparent;
    border-image: url("images/menu-border.png") 8 stretch;
    box-shadow: 0 10px 30px var(--shadow-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

.menu-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-option {
    width: 100%;
    min-height: 55px;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 0.55rem;
    text-align: left;
    transition: transform var(--transition), opacity var(--transition);
}

.menu-option:hover {
    transform: translateX(5px);
    opacity: 0.7;
}

.menu-option img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}


/* ==================================================
   GENERAL SECTION
================================================== */

.page-section {
    min-height: 100vh;
    padding: 120px 6% 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.page-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient( rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.08));
    pointer-events: none;
}

.page-section>* {
    position: relative;
    z-index: 1;
}


/* ==================================================
   HOME
================================================== */

.home-section {
    gap: 45px;
}

.home-section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.home-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -3;
}

.home-overlay {
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
}

.home-content {
    position: relative;
    z-index: 2;
}


/* TITLE CARD */

.level-title {
    position: relative;
    width: min(900px, 100%);
    min-height: 250px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* Mario frame */
    background-image: url("images/title-frame.png");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.title-video {
    position: absolute;
    /* Video stays inside the Mario frame */
    top: 15%;
    left: 6%;
    width: 88%;
    height: 72%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

.title-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    z-index: -1;
}

.title-content {
    width: 80%;
    padding: 30px;
}

.level-label {
    display: block;
    margin-bottom: 20px;
    font-family: "Press Start 2P", cursive;
    font-size: 0.65rem;
}

.title-content h1 {
    margin-bottom: 20px;
}

.title-content p {
    max-width: 700px;
    margin: auto;
}


/* ==================================================
   MEMBER GRID
================================================== */

.member-grid {
    width: min(1100px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}


/* MEMBER CARD */

.member-card {
    position: relative;
    display: block;
    padding: 15px;
    text-decoration: none;
    color: var(--text-color);
    background: var(--panel-bg);
    border: 10px solid transparent;
    border-image: url("images/member-border.png") 10 stretch;
    box-shadow: 0 8px 20px var(--shadow-color);
    transition: transform var(--transition), filter var(--transition);
}

.member-card:hover {
    transform: translateY(-8px) scale(1.03);
    filter: drop-shadow( 0 8px 12px var(--shadow-color));
}


/* MEMBER IMAGE */

.member-image-frame {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 8px solid transparent;
    border-image: url("images/photo-frame.png") 8 stretch;
}

.member-image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition);
}

.member-card:hover .member-image-frame img {
    transform: scale(1.05);
}


/* MEMBER INFO */

.member-info {
    padding: 18px 5px 5px;
    text-align: center;
}

.member-info h2 {
    margin-bottom: 10px;
    font-size: 0.7rem;
    line-height: 1.5;
}

.member-info p {
    font-size: 1.2rem;
}


/* ==================================================
   SECTION HEADING
================================================== */

.section-heading {
    text-align: center;
    margin-bottom: 45px;
}

.section-heading span {
    display: block;
    margin-bottom: 20px;
    font-family: "Press Start 2P", cursive;
    font-size: 0.65rem;
}

.section-heading h1 {
    line-height: 1.6;
}


/* ==================================================
   ABOUT
================================================== */

.about-section {
    gap: 20px;
}

.about-grid {
    width: min(1150px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.about-card {
    min-width: 0;
}

.about-frame {
    position: relative;
    min-height: 350px;
    padding: 50px 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--panel-bg);
    border: 12px solid transparent;
    border-image: url("images/about-border.png") 12 stretch;
    box-shadow: 0 8px 20px var(--shadow-color);
    transition: transform var(--transition);
}

.about-frame:hover {
    transform: translateY(-8px);
}

.about-frame>img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    z-index: 0;
    pointer-events: none;
}

.about-content {
    position: relative;
    z-index: 1;
}

.about-content h2 {
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.about-content p {
    font-size: 1.3rem;
}

.motto-text {
    font-style: italic;
}


/* ==================================================
   CONTACT
================================================== */

.contact-section {
    gap: 20px;
}

.contact-panel {
    width: min(800px, 100%);
    margin: 0 auto;
}

.contact-frame {
    position: relative;
    padding: 70px 80px;
    background: var(--panel-bg);
    border: 12px solid transparent;
    border-image: url("images/contact-border.png") 12 stretch;
    box-shadow: 0 10px 30px var(--shadow-color);
}

.panel-background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    pointer-events: none;
    z-index: 0;
}

.contact-content {
    position: relative;
    z-index: 1;
}

.contact-content h2 {
    margin-bottom: 35px;
    text-align: center;
    line-height: 1.6;
}


/* FORM */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.form-group label {
    font-family: "Press Start 2P", cursive;
    font-size: 0.55rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    font-family: "VT323", monospace;
    font-size: 1.3rem;
    color: var(--text-color);
    background: var(--panel-bg);
    border: 4px solid transparent;
    border-image: url("images/input-border.png") 4 stretch;
    outline: none;
    transition: box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    box-shadow: 0 0 0 3px var(--shadow-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 130px;
}


/* ==================================================
   START BUTTON
================================================== */

.start-button {
    position: relative;
    width: 190px;
    height: 70px;
    margin: 15px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.65rem;
    color: var(--text-color);
    transition: transform var(--transition), filter var(--transition);
}

.start-button img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    z-index: 0;
}

.start-button span {
    position: relative;
    z-index: 1;
}

.start-button:hover {
    transform: scale(1.08) translateY(-3px);
    filter: drop-shadow( 0 5px 8px var(--shadow-color));
}

.start-button:active {
    transform: scale(0.96);
}


/* ==================================================
   SUCCESS MESSAGE
================================================== */

.success-message {
    display: none;
    margin-top: 25px;
    padding: 20px;
    text-align: center;
    font-family: "Press Start 2P", cursive;
    font-size: 0.6rem;
    line-height: 1.8;
    border: 8px solid transparent;
    background: var(--panel-bg);
}

.success-message.show {
    display: block;
    animation: successAnimation 0.5s ease;
}

@keyframes successAnimation {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ==================================================
   FOOTER
================================================== */

.footer {
    padding: 30px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 10px;
    text-align: center;
    background: var(--nav-bg);
    color: var(--nav-text);
}

.footer p {
    font-size: 1rem;
}


/* ==================================================
   TABLET
================================================== */

@media (max-width: 900px) {
    .member-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .about-grid {
        grid-template-columns: 1fr;
    }
    .about-frame {
        min-height: 300px;
    }
}


/* ==================================================
   MOBILE
================================================== */

@media (max-width: 650px) {
    .navbar {
        padding: 8px 4%;
        min-height: 65px;
    }
    .nav-logo img {
        width: 50px;
        height: 45px;
    }
    .nav-links {
        gap: 12px;
    }
    .nav-links a {
        font-size: 0.45rem;
    }
    .menu-button {
        font-size: 0.45rem;
    }
    .menu-button img {
        width: 20px;
        height: 20px;
    }
    .menu-panel {
        width: 210px;
    }
    .page-section {
        padding: 100px 5% 60px;
    }
    .member-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .level-title {
        min-height: 280px;
    }
    .title-content {
        padding: 25px 15px;
    }
    .title-content h1 {
        font-size: 1rem;
    }
    .title-content p {
        font-size: 1.15rem;
    }
    .contact-frame {
        padding: 50px 25px;
    }
    .contact-content h2 {
        font-size: 0.7rem;
    }
    .about-frame {
        padding: 45px 25px;
    }
}


/* ==================================================
   VERY SMALL MOBILE
================================================== */

@media (max-width: 400px) {
    .nav-links {
        display: none;
    }
    .navbar {
        justify-content: space-between;
    }
    .member-info h2 {
        font-size: 0.6rem;
    }
    .section-heading h1 {
        font-size: 1rem;
    }
}


/* ==================================================
   cursor
================================================== */

body {
    cursor: url("images/mario-hat-cursor.png") 16 16, auto;
}

#scroll-character {
    position: fixed;
    left: 0;
    bottom: 25px;
    width: 100px;
    z-index: 999;
    pointer-events: none;
    transform: translateX(0);
    transition: transform 0.1s linear;
}

.scroll-character img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: auto;
    display: block;
}

.scroll-character-forward {
    opacity: 1;
}

.scroll-character-reverse {
    opacity: 0;
    transform: scaleX(-1);
}


/* ==================================================
   scrolling character image
================================================== */