:root {
    --light: #d3d3d0;
    --light-alt: #babab6;
    --dark: #141434;
    --dark-alt: #222259;
}

@font-face {
    font-family: 'Stella Wilson';
    src: url('./stella-wilson.ttf') format('truetype');
    font-display: block;
}

@font-face {
    font-family: 'Josefin Sans';
    src: url('./josefin-sans.ttf') format('truetype');
    font-display: block;
}

body {
    font-family: 'Josefin Sans', 'Helvetica Neue', 'Segoe UI', sans-serif;
    font-variant: small-caps;
    margin: 0;
    padding: 0;
    background-color: var(--dark);
    color: var(--light);
}

/**********************************************************
   Animated background
**********************************************************/
body {
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    background: linear-gradient(45deg, #0a0a1a, #1a1a3a, #0f0f2f, #050515);
    background-size: 400% 400%;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { background-position: 0% 50%; }
    25% { background-position: 100% 0%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.clouds {
    position: absolute;
    width: 150%;
    height: 100%;
    background: 
        radial-gradient(ellipse 800px 300px at 20% 30%, rgba(60, 60, 90, 0.6) 0%, transparent 50%),
        radial-gradient(ellipse 600px 200px at 80% 70%, rgba(50, 50, 80, 0.7) 0%, transparent 50%),
        radial-gradient(ellipse 1000px 400px at 50% 80%, rgba(55, 55, 85, 0.5) 0%, transparent 50%),
        radial-gradient(ellipse 700px 250px at 90% 20%, rgba(65, 65, 95, 0.6) 0%, transparent 50%);
    animation: driftClouds 40s linear infinite;
}

@keyframes driftClouds {
    0% { transform: translateX(-10%); }
    100% { transform: translateX(10%); }
}

.crescent-moon {
    position: absolute;
    top: 15%;
    right: 20%;
    width: 100px;
    height: 100px;
    animation: moonGlow 8s ease-in-out infinite;
}

@keyframes moonGlow {
    0%, 100% { 
        filter: drop-shadow(0 0 30px rgba(248, 248, 255, 0.5));
    }
    50% { 
        filter: drop-shadow(0 0 50px rgba(248, 248, 255, 0.7));
    }
}

.star {
    position: absolute;
    color: #fff;
    animation: starBurst 3s ease-in-out infinite;
    transition: transform 0.3s ease-out;
}

.star::before {
    content: '✦';
    font-size: 20px;
    text-shadow: 
        0 0 10px currentColor,
        0 0 20px currentColor,
        0 0 30px currentColor;
}

.star:nth-child(even)::before {
    content: '✧';
}

@keyframes starBurst {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        opacity: 0.6;
    }
    50% { 
        transform: scale(1.3) rotate(180deg);
        opacity: 0.9;
    }
}

.star:nth-child(2) { animation-delay: -0.5s; color: #e6e6fa; }
.star:nth-child(3) { animation-delay: -1s; color: #fff8dc; }
.star:nth-child(4) { animation-delay: -1.5s; color: #f0f8ff; }
.star:nth-child(5) { animation-delay: -2s; color: #fffaf0; }
.star:nth-child(6) { animation-delay: -2.5s; color: #e6e6fa; }
.star:nth-child(7) { animation-delay: -0.8s; color: #fff; }
.star:nth-child(8) { animation-delay: -1.3s; color: #f5f5dc; }
.star:nth-child(9) { animation-delay: -1.8s; color: #ffffff; }
.star:nth-child(10) { animation-delay: -0.3s; color: #faf0e6; }
.star:nth-child(11) { animation-delay: -2.3s; color: #e6e6fa; }
.star:nth-child(12) { animation-delay: -0.7s; color: #f8f8ff; }
.star:nth-child(13) { animation-delay: -1.7s; color: #fff0f5; }
.star:nth-child(14) { animation-delay: -2.1s; color: #f0ffff; }
.star:nth-child(15) { animation-delay: -0.9s; color: #fffacd; }
.star:nth-child(16) { animation-delay: -1.4s; color: #e0e6ff; }

#content {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: 10;
    padding: 2rem;
    color: var(--light);
    overflow: auto;
}

/**********************************************************
   Generic
**********************************************************/

h2, h3, h4, h5, h6 {
    font-weight: bold;
}

h1 {
    font-family: 'Stella Wilson', cursive;
    font-size: 10em;
    line-height: 0.8;
    font-variant: normal;
    font-weight: 200;
    text-align: center;
    margin: 8vh 0 3vh 0;
}

a {
    text-shadow: 0 0 0 transparent;
    transition: text-shadow 3s ease;
    color: var(--light-alt);
}

a:hover {
    text-shadow: 0 0 10px color-mix(in srgb, var(--light) 40%, transparent);
}

/**********************************************************
   Header & Footer
**********************************************************/

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--light-alt);
}

header * {
    align-items: center;
}

header svg, header nav {
    display: flex;
    margin: 0;
    padding: 0;
    font-size: 1.5em;
}

header svg {
    margin: 0.2em 0.5em;
    color: var(--light-alt);
}

header nav {
    font-size: 1em;
    color: inherit;
    text-transform: uppercase;
    margin: 0.8em;
}

header nav a {
    display: inline-block;
    margin: 0 1em;
    color: inherit;
    text-decoration: none;
}

header nav a.rsvp {
    background-color: var(--light);
    color: var(--dark);
    padding: 0.7em 0.5em 0.5em 0.5em;
}

footer {
    margin: 8px;
    padding: 0;
    font-size: 0.8em;
    position: fixed;
    bottom: 0;
    right: 2vw;
}

footer p {
    margin: 0;
    padding: 0;
}

footer a {
    color: inherit;
}

.text {
    text-align: center;
    font-size: 1.4em;
}

.wide {
    margin: 0 auto;
}

#menu, #menu-close {
    cursor: pointer;
}

/**********************************************************
   Home
**********************************************************/

.page-home {
    margin: 20vh 0 0 0;
}

.page-home .subtitle {
    margin: 8vh 0 0 0;
    font-size: 2em;
}

.page-home .subtitle .joined {
    white-space: nowrap;
}

/**********************************************************
   Venue
**********************************************************/

.venue-map {
    width: 90%;
    margin: 5vh auto 0 auto;
}

.venue-map iframe {
    width: 100%;
    height: 450px;
}

.event-info {
    font-size: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 5vh 0 0 0;
}

.event-info svg {
    margin: 0 0.5em;
}

/**********************************************************
   Agenda
**********************************************************/

.page-agenda .break {
    font-family: 'Stella Wilson', cursive;
    font-size: 20em;
    line-height: 0.4;
    transform: translateY(0.35em);
}

/**********************************************************
   Mobile
**********************************************************/

@media (max-width: 800px) {
    #moon {
        display: none;
    }
}

@media (max-width: 600px) {
    nav .narrow {
        display: block !important;
    }

    nav .wide {
        display: none;
    }

    h1 {
        font-size: 6em !important;
    }

    .page-home .subtitle {
        font-size: 1.2em !important;
        margin-bottom: 5vh !important;
    }

    nav.open .wide {
        display: flex;
        flex-direction: column;
        background: var(--dark);
        position: fixed;
        top: 0em;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10;
        padding: 1em;
    }

    nav.open .wide #menu-close {
        align-self: flex-end;
        margin-bottom: 2em;
    }

    nav.open .wide a {
        display: block;
        margin: 5vh 0 0 0;
        text-align: center;
        font-size: 1.8em;
    }
}

nav .narrow {
    display: none;
}