:root {
    --font-display: "Cinzel", "Times New Roman", serif;
    --font-body: "Cormorant Garamond", "Georgia", serif;
    --text-light: #ecde95;
    --text-dark: #ffffff;
    --accent: #ecde95;
    --shade: rgba(0, 0, 0, 0.55);
    --header-height: 72px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(to bottom, rgba(1, 7, 18, 0.3), rgba(1, 7, 18, 0.15)),
    url("../../images/fonasmain.png") center/cover no-repeat fixed;
    color: var(--text-light);
    min-height: 100%;
}

.app {
    min-height: 90vh;
}

.screen {
    display: none;
}

.screen.is-active {
    display: flex;
}

.screen {
    width: 100%;
    min-height: var(--vh, 100vh);
    height: var(--vh, 100vh);
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 16px;
    color: var(--text-light);
    overflow: hidden;
}

.intro {
    justify-content: flex-start;
    padding: 48px 16px 32px;
    background: radial-gradient(circle at center, rgba(243, 208, 122, 0.0), rgba(0, 0, 0, 0.00)),
    url("../../images/main.png") center/cover no-repeat;
}

.intro-overlay {
    width: min(360px, 100%);
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    /*gap: 24px;*/
    margin: 0 auto;
    /*padding: 32px 24px 48px;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 24px;*/
}

.intro-copy {
    font-family: var(--font-display);
    font-size: 1.35rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.4;
    background-color: rgba(0, 0, 0, 0.4);
}

.cta {
    background: rgba(252, 236, 182, 0.85);
    color: var(--text-dark);
    border: none;
    padding: 12px 32px;
    font-size: 1rem;
    font-family: var(--font-display);
    letter-spacing: 0.2em;
    /*border-radius: 12px;*/
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta:focus-visible,
.menu-card:focus-visible,
.back-button:focus-visible {
    outline: 2px dashed #fff;
    outline-offset: 4px;
}

.cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.menu {
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 32px;
    padding-bottom: 24px;
}

.menu-grid {
    width: min(360px, 90vw);
    /*margin: 48px auto 24px;*/
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    /*border-radius: 22px;*/
    overflow: hidden;
    /*display: flex;*/
    flex-direction: column;
    /*backdrop-filter: blur(2px);
    background-color: rgba(0, 0, 0, 0.35);*/
}

.menu-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 120px;
}

.menu-row + .menu-row {
    border-top: 1px solid rgba(255, 255, 255, 0.85);
}

.menu-row.single {
    grid-template-columns: 1fr;
}

.menu-row:not(.single) .menu-card:first-child {
    border-right: 1px solid rgba(255, 255, 255, 0.85);
}

.menu-card {
    border: none;
    background: transparent;
    color: #fff;
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.23em;
    text-transform: uppercase;
    padding: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 110px;
}

.menu-card span {
    display: block;
    text-align: center;
    line-height: 1.6;
}

.menu-card:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.footer-note {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.8;
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
}

.footer-link {
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.menu .footer-note {
    margin-top: auto;
}

.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    /*background: url("../../images/head.png") bottom/cover no-repeat;*/
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 16px;
    color: var(--text-dark);
    z-index: 10;
}

.top-bar h1 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    letter-spacing: 0.1em;
    padding-right: 30px;
    text-transform: uppercase;
    margin: 0;
    flex: 1;
    text-align: center;
}

.back-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.0);
    cursor: pointer;
    position: relative;
}

.back-button::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    border-left: 3px solid #fff;
    border-bottom: 3px solid #fff;
    transform: translate(-30%, -50%) rotate(45deg);
}

.story,
.placeholder {
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    padding: calc(var(--header-height) + 12px) 0 0;
}

.screen.journey {
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
}

.about {
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    padding: calc(var(--header-height) + 16px) 0 32px;
}

.screen.comics {
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
}

.comics-shell {
    width: 100%;
    height: calc(var(--vh, 100vh) - var(--header-height));
    padding: calc(var(--header-height) + 8px) 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comics-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comics-card {
    border: 1px solid rgb(255, 255, 255);
    border-radius: 0;
    background: rgba(0, 0, 0, 0.15);
    color: #fff;
    font-family: var(--font-display);
    height: 50px;
    width: 100%;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.photo-toggle {
    display: flex;
    gap: 8px;
    /*padding: calc(var(--header-height) + 8px) 16px 4px;*/
}

.photo-toggle-btn {
    flex: 1;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-family: var(--font-display);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.photo-toggle-btn.is-active {
    border-color: var(--accent);
    background: rgba(243, 208, 122, 0.2);
    color: var(--text-dark);
}

.comics-card:hover {
    background: rgba(255, 255, 255, 0.12);
}

.pdf-viewer {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.pdf-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

.pdf-hint {
    position: absolute;
    inset: auto 12px 12px 12px;
    margin: 0;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.45);
    padding: 8px;
    border-radius: 12px;
}

.journey-shell {
    width: 100%;
    height: calc(var(--vh, 100vh) - var(--header-height));
    padding: calc(var(--header-height) + 8px) 12px 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pdf-container {
    width: 100%;
    height: 100%;
    background: rgba(3, 10, 24, 0.6);
    border-radius: 18px 18px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.viewer-container--flush {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
    background: transparent;
}

.pdf-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
}

.rules-shell {
    width: 100%;
    height: calc(var(--vh, 100vh) - var(--header-height));
    padding: calc(var(--header-height) + 8px) 12px 12px;
}

.rules-frame {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.25);
}

.story-shell {
    width: 100%;
    height: calc(90vh - var(--header-height));
    display: flex;
    flex-direction: column;
    padding: 40px 0px;
}

.media-carousel {
    flex: 1;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    border-radius: 24px 24px 0 0;
    position: relative;
}

.carousel-item {
    scroll-snap-align: start;
    min-height: 100%;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
}

.carousel-item video {
    width: 100%;
    height: auto;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: #000;
    object-fit: cover;
    max-height: 320px;
}

.panorama-hint {
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
}

.carousel-nav {
    position: sticky;
    left: 50%;
    transform: translateX(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    margin: 12px auto;
    cursor: pointer;
}

.carousel-nav.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.carousel-nav::before {
    content: "";
    width: 14px;
    height: 14px;
    border-left: 2px solid rgba(255, 255, 255, 0.9);
    border-bottom: 2px solid rgba(255, 255, 255, 0.9);
    transform: rotate(45deg);
    display: block;
}

.carousel-nav.up {
    top: 12px;
}

.carousel-nav.up::before {
    transform: rotate(135deg);
}

.carousel-nav.down {
    bottom: 12px;
}

.carousel-nav.down::before {
    transform: rotate(315deg);
}

.panorama-open {
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: transparent;
    color: var(--text-light);
    padding: 10px 16px;
    font-family: var(--font-display);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
}

.placeholder-body {
    margin: auto;
    padding: 24px;
    text-align: center;
    font-size: 1rem;
    line-height: 1.5;
}

.about-shell {
    width: min(460px, 92vw);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 16px;
    max-height: calc(100vh - var(--header-height) - 32px);
    overflow-y: auto;
}

.about-section {
    background: rgba(0, 0, 0, 0.0);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 20px;
    text-align: left;
}

.about-section h2 {
    margin: 0 0 12px;
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.about-section--light {
    background: rgba(255, 255, 255, 0.05);
}

.about-section--accent {
    background: rgba(6, 16, 35, 0.00);
}

.about-section--highlight {
    background: rgba(243, 208, 122, 0.15);
}

.about-logo-card {
    margin-top: 16px;
    border-radius: 18px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-logo-card img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: contain;
}

.about-logos {
    gap: 12px;
    flex-wrap: wrap;
}

.about-logos .about-logo-card {
    flex: 1 1 calc(50% - 12px);
}

.about-logo-card--highlight {
    background: rgba(0, 0, 0, 0.2);
}

.panorama-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.96);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.panorama-overlay.is-active {
    display: flex;
}

.panorama-shell {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
}

.panorama-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
    z-index: 3;
}

.panorama-close::before,
.panorama-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    background: #fff;
}

.panorama-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.panorama-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.panorama-status {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-light);
    text-align: center;
}

#vrScene {
    width: 100%;
    height: 100%;
}

.noscript-warning {
    background: #5c0a0a;
    color: #fff;
    padding: 12px;
    text-align: center;
    font-size: 0.9rem;
}

@media (min-width: 480px) {
    .intro-overlay {
        width: min(420px, 100%);
        min-height: calc(100vh - 120px);
        padding: 40px 32px 56px;
    }

    .menu-grid {
        width: min(420px, 88vw);
    }

    .menu-row {
        min-height: 140px;
    }

    .menu-card {
        font-size: 1.05rem;
    }

    .carousel-item {
        padding: 32px;
    }

    .about-shell {
        width: min(520px, 85vw);
    }

    .comics-shell {
        padding: calc(var(--header-height) + 16px) 32px 24px;
    }
}

@media (min-width: 768px) {
    body {
        font-size: 1.05rem;
    }

    .menu-grid {
        width: min(480px, 80vw);
    }

    .menu-row {
        min-height: 150px;
    }

    .carousel-item video {
        max-width: 420px;
        margin: 0 auto;
    }

    .about-shell {
        width: min(560px, 70vw);
    }
}

@media (max-height: 740px) {
    .intro {
        padding: 32px 12px 24px;
    }

    .intro-overlay {
        min-height: auto;
        gap: 12px;
    }

    .intro-copy {
        font-size: 1.15rem;
        letter-spacing: 0.06em;
    }

    .cta {
        padding: 10px 24px;
        letter-spacing: 0.12em;
    }

    .menu {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .menu-row {
        min-height: 100px;
    }

    .menu-card {
        font-size: 0.9rem;
        padding: 10px;
    }

    .top-bar {
        height: 60px;
    }

    :root {
        --header-height: 60px;
    }

    .story-shell226 {
        height: calc(100vh - var(--header-height));
        padding-bottom: 8px;
    }

    .carousel-item {
        padding: 16px;
    }

    .carousel-item video {
        min-height: 260px;
    }

    .about-shell {
        max-height: calc(100vh - var(--header-height) - 16px);
    }
}

