:root {
    --ratio: 1.5;
    --s-5: calc(var(--s-4) / var(--ratio));
    --s-4: calc(var(--s-3) / var(--ratio));
    --s-3: calc(var(--s-2) / var(--ratio));
    --s-2: calc(var(--s-1) / var(--ratio));
    --s-1: calc(var(--s0) / var(--ratio));
    --s0: 1rem;
    --s1: calc(var(--s0) * var(--ratio));
    --s2: calc(var(--s1) * var(--ratio));
    --s3: calc(var(--s2) * var(--ratio));
    --s4: calc(var(--s3) * var(--ratio));
    --s5: calc(var(--s4) * var(--ratio));
    --s6: calc(var(--s5) * var(--ratio));
    --s7: calc(var(--s6) * var(--ratio));
    --s8: calc(var(--s7) * var(--ratio));

    --measure: 80ch;
    --nav-background-color: rgba(14, 14, 14, 0.95);
}

* {
    box-sizing: border-box;
}

img, svg {
    user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -moz-user-select: none;
}

html, body {
    height: 100%;
}

html,
body,
div,
header,
nav,
main,
footer {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
}

body {
    background-color: white;
    font-family: "Open Sans", sans-serif;
    display: grid;
    grid-gap: 0;
    min-width: 360px;
    overflow: auto;

    background-image: url("/assets/img/background/oliver-sjostrom-epRVcpr6yf8-unsplash.webp?8");
    background-attachment: fixed;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;

    grid-template-columns: 1fr;
    grid-template-rows: var(--s2) 1fr min-content;
    grid-template-areas:
        "head"
        "main"
        "foot";
}

a {
    text-decoration: none;
}

header {
    background-color: var(--nav-background-color);
    align-items: center;
    grid-area: head;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
}

header > * + * {
    margin-right: 0.5rem;
}

header > div.spacer {
    flex: 1 1;
}

header > div.menu {
    position: absolute;
    top: var(--s2);
    right: 0;
    background-color: var(--nav-background-color);
    margin: 0;
    padding: 0;
    z-index: 2;
    display: none;
}

#mobile-menu {
    display: none;
}

header > div.menu img.icon {
    height: 1rem;
}

header > div.menu > a div {
    margin: 0.5rem;
}

header a {
    color: white;
    font-weight: normal;
    text-transform: uppercase;
}

header:not(:first-child) {
    align-content: end;
}

header > a > img.logo {
    height: var(--s2);
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 1rem;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: white;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

nav {
    background-color: var(--nav-background-color);
    grid-area: navb;
    margin: 0;
    padding: 0;
    display: none;
}

nav a > img.logo {
    max-width: 100%;
    padding: 0.25rem;
}

main {
    grid-area: main;
    display: grid;
    grid-template-areas: "content";
    align-items: center;
    flex: 1 1;
    background-color: rgba(229, 229, 229, 0.5);
    margin: 0;
    padding: 0;
    overflow: auto;
}

footer {
    padding: 1rem;
    background-color: var(--nav-background-color);
    color: white;
    grid-area: foot;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

footer .social-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

footer .social-links a {
    display: flex;
    align-items: center;
}

footer .social-links img {
    height: 1.5rem;
    width: 1.5rem;
    transition: opacity 0.3s ease;
}

footer .social-links a:hover img {
    opacity: 0.8;
}

footer a {
    color: white;
}

.desktop {
    display: none;
}

.mobile {
    display: none;
}

@media (max-width: 60rem) {
    .hamburger {
        display: flex;
    }

    .mobile:not(.menu) {
        display: unset;
    }
}

@media (min-width: 60rem) {
    body {
        grid-template-columns: 4rem 22rem 21rem auto 4rem;
        grid-template-rows: var(--s3) 1fr min-content;
        grid-template-areas:
            "navb head head head head"
            "navb main main main main"
            "foot foot foot foot foot";
    }

    header {
        padding-left: 0.5rem;
    }

    nav {
        display: unset;
    }

    footer {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        grid-template-rows: auto;
        align-items: center;
        gap: 0;
        padding: 1rem;
    }

    footer > .desktop:first-child {
        text-align: start;
    }

    footer > .desktop:last-child {
        text-align: end;
    }

    .desktop {
        display: unset;
    }
}

/* Common Styles */
nav .logo {
    width: 4rem;
    height: 4rem;
}

header .logo {
    width: 2.25rem;
    height: 2.25rem;
}

header .text {
    height: 1rem;
    aspect-ratio: 197 / 16;
}

#mobile-menu .icon {
    width: 1rem;
    height: 1rem;
}

/* Page Specific Styles */

/* Index */
main .content-wrapper {
    grid-area: content;
    text-align: center;
    padding: 1rem;
    text-shadow: 0 0 10px white, 0 0 20px white;
}

main .content-wrapper a {
    color: black;
}

main .content-wrapper a img {
    height: 1.2rem;
    width: auto;
    vertical-align: middle;
}

main .content-wrapper img {
    max-width: clamp(15rem, 60vw, 30rem);
    width: 100%;
    height: auto;
}

/* Contact */
.contact-info {
    margin-top: 2rem;
    font-size: 1.2rem;
}

/* Flights & Hotels */
.waiting {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 1rem;
    text-shadow: 0 0 10px white, 0 0 20px white;
}

.waiting-animation {
    width: 100%;
    display: flex;
    justify-content: center;
}

.waiting-animation img {
    max-height: 20rem;
    max-width: 100%;
    height: auto;
    width: auto;
}

.waiting-text h2 {
    margin-top: 1rem;
}

/* Terms & Conditions */
main.terms-content {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.content-section {
    margin-bottom: 2rem;
    text-align: left;
}

main.terms-content h1 {
    text-align: center;
    margin-bottom: 2rem;
}

main.terms-content h2 {
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.5rem;
    margin-top: 1.5rem;
}

main.terms-content p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* 404 */
.error-page {
    text-align: center;
    padding: 5rem 2rem;
}
