<template>

    <div class="app">
        <NuxtPage class="app__main" />
        <AppFooter class="app__footer" />
    </div>

</template>

<script setup>

    // --------------------------------------------------
    // DATA
    // --------------------------------------------------

    const pageTitleChunk = useRoute().meta.pageTitleChunk;

    // --------------------------------------------------
    // HEAD
    // --------------------------------------------------

    useAppHead(pageTitleChunk);
    
</script>

<style lang="scss">

    // --------------------------------------------------
    // MODULES
    // --------------------------------------------------

    @use 'minireset.css';
    @use '~/assets/styles/fonts';
    @use '~/assets/styles/variables';
    @use '~/assets/styles/animations';

    // --------------------------------------------------
    // FONTS AND COLORS
    // --------------------------------------------------

    body {
        font-family: var(--text-font-family);
        font-size: var(--text-font-size);
        font-weight: var(--regular-font-weight);
        line-height: var(--text-line-height);
        color: white;
        background-color: var(--eerie-black);
    }

    h1 {
        font-family: var(--title-font-family);
        font-size: var(--h1-font-size);
        font-weight: var(--medium-font-weight);
        line-height: var(--h1-line-height);
    }

    h2 {
        font-family: var(--title-font-family);
        font-size: var(--h2-font-size);
        line-height: var(--h2-line-height);
        margin: 0 0 4rem 0;
    }

    h3 {
        font-family: var(--text-font-family);
        font-size: var(--h3-font-size);
        line-height: var(--h3-line-height);
        margin: 2rem 0 1rem 0;
    }

    strong {
        font-weight: var(--bold-font-weight);
    }

    em {
        font-style: italic;
    }

    // --------------------------------------------------
    // LINK STYLE
    // --------------------------------------------------

    a {
        color: white;
        text-decoration: underline var(--emerald);
        border-radius: 2px;
        transition: color 200ms ease-in-out;

        &:hover,
        &:focus,
        &:active {
            color: var(--emerald);
        }

        &:focus-visible {
            outline: 1px dashed var(--emerald);
            outline-offset: 2px;
            animation: expand-outline 200ms ease-in-out;
        }
    }

    // --------------------------------------------------
    // LAYOUT
    // --------------------------------------------------

    .app {
        min-height: 100vh;
        display: grid;
        grid:
            'app-main' 1fr
            'app-footer' auto
            / 1fr;
        place-items: center;
    
        &__main {
            grid-area: app-main;
        }

        &__footer {
            grid-area: app-footer;
        }
    }


</style>
