/*
    Josh's Custom CSS Reset
    https://www.joshwcomeau.com/css/custom-css-reset/
    */

    *, *::before, *::after {
        box-sizing: border-box;
        }

        * {
        margin: 0;
        font-family: 'Source Sans 3', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
        }

        body {
        line-height: 1.5;
        -webkit-font-smoothing: antialiased;
        }

        img, picture, video, canvas, svg {
        display: block;
        max-width: 100%;
        }

        input, button, textarea, select {
        font: inherit;
        }

        p, h1, h2, h3, h4, h5, h6 {
        overflow-wrap: break-word;
        }

        p {
        text-wrap: pretty;
        }
        h1, h2, h3, h4, h5, h6 {
        text-wrap: balance;
        }

        #root, #__next {
        isolation: isolate;
        }

/* main page */

* {
    /* (fallback) */
    --bg-color: #222;
    --text-color: #f2f2f2;
    --default-margin-value: clamp(0rem, 6vw, 10rem);
}

[data-theme="light"] {
    --primary-background-color: #e1e1e1;
    --secondary-background-color: #b3b3b3;
    --main-text-color: #333;
    --main-text-hover-color: grey;
    --main-title-line-color: yellow;
    --phase-permalink-color: #459cff;
    --resource-permalink-color: #BD7CEC;
    --link-arrow-color: rgb(125, 0, 85);
    --theme-button-color: #444;
    --text-link-color: #0069c2;
    --text-link-visited-color: #551a8b;
    --xiv-navtitle-color: rgb(125, 0, 0);
    --card-background-color: #e7e7e7;
    --golden-text-color: #cab212;
}

[data-theme="dark"] {
    --primary-background-color: #222;
    --secondary-background-color: #414141;
    --main-text-color: #f2f2f2;
    --main-text-hover-color: grey;
    --main-title-line-color: yellow;
    --phase-permalink-color: #459cff;
    --resource-permalink-color: #BD7CEC;
    --link-arrow-color: yellow;
    --theme-button-color: #e6e6e6;
    --text-link-color: #8cb4ff;
    --text-link-visited-color: #ffadff;
    --xiv-navtitle-color: rgb(221, 0, 0);
    --card-background-color: #272727;
    --golden-text-color: #e8d037;
}

/* scroll */
/* WebKit Browsers (Chrome, Safari, Edge, Opera) */
::-webkit-scrollbar {
    width: 10px;
  }
  
  ::-webkit-scrollbar-thumb {
    background: var(--main-text-hover-color);
    border-radius: 10px;
  }
  
  ::-webkit-scrollbar-thumb:hover {
    background: rgba(#222, 0.8);
  }
  
  ::-webkit-scrollbar-track {
    background: var(--primary-background-color);
  }
  
  /* Firefox */
  * {
    scrollbar-color: var(--main-text-hover-color) var(--primary-background-color);
  }
  
  /* Internet Explorer & Legacy Edge */
  body {
    scrollbar-face-color: var(--main-text-hover-color);
    scrollbar-track-color: var(--primary-background-color);
  }
  

html {
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--primary-background-color);
    color: var(--main-text-color);
}

/* nav bar */
.nav-bar-container {
    position: fixed;
    width: 100%;
    z-index: 800;
    border-bottom: var(--secondary-background-color) 1px solid;
    background-color: var(--primary-background-color);
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* border-bottom: var(--main-text-hover-color) 1px solid; */
    font-size: calc(1rem + 0.5vw);
    background-color: var(--primary-background-color);
    z-index: 700;
    max-width: 100rem;
    height: 4rem;
    margin-left: auto;
    margin-right: auto;
    /* padding: 0 var(--default-margin-value); */
}

.navbar-left,
.navbar-right {
    display: flex;
    align-items: center;
}

.navbar-right {
    gap: 1rem;
    font-size: 1.2rem;
}

/* extra spacing so the header doesn't go on top */
:target, h4[id] {
    scroll-margin-top: 4rem;
}

.nav-title {
    font-size: 1.5rem;
    font-family: 'Source Sans 3', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-weight: 300;
    text-decoration: none;
    transition: color 0.1s ease-in-out;
}

.red-text {
    color: var(--xiv-navtitle-color);
}

.nav-title:hover {
    color: var(--main-text-hover-color);
}

.nav-btn {
    text-decoration: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: text-decoration-color 0.2s ease-in-out;
}

.nav-btn:hover {
    text-decoration-color: var(--phase-permalink-color);
}

.theme-toggle {
    display: flex;
    align-items: center;
    border: none;
    color: var(--main-text-color);
    background-color: var(--primary-background-color);
    user-select: none;
    outline: none;
}

.material-icons-outlined {
    font-size: 1.2rem;
    color: var(--theme-button-color);
    border-radius: 50%;
}

.material-icons-outlined:hover {
    cursor: pointer;
    font-size: 1.4rem;
    color: var(--main-text-hover-color);
    border-radius: 50%;
}

.navbar-link {
    font-size: 1rem;
}

a {
    text-decoration: none;
    color: var(--main-text-color);
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

li {
    list-style: none;
}
/* page banner */

.main-menu {
    width: 100%;
    position: relative;
    background-image: url("/assets/banner/thearchive.png");
    background-size: cover;
    background-position: center;
    height: 20rem;
}

.main-banner {
    border-bottom: 2px solid rgb(253, 231, 88);
}

.main-banner-text {
    position: absolute;
    bottom: 0;
    background-color: rgba(13, 13, 13, 0.8);
    color: #fff;
    width: 100%;
    padding-left: 1rem;
}

.main-title {
    width: 100%;
    margin-bottom: 0;
    font-weight: 300;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
/* page wrapper */
.page-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
}

.container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    max-width: 140rem;
    margin-left: auto;
    margin-right: auto;
}

/* main content */
.main-content {
    display: flex;
    flex-direction: column;
    padding-top: 7rem;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    color: var(--main-text-color);
    font-size: calc(1rem + 0.2vw);
    margin-right: 2%;
    margin-left: 2%;
    /* max-width: 55rem; */
    width: 66rem;
}

/* left sidebar */
.sidebar {
    position: sticky;
    top: 0;
    left: 0;
    padding-top: 7rem;
    font-size: calc(1rem + 0.2vw);
    height: 100vh;
    width: 20rem;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar h4 {
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.1rem;
}

.sidebar .header-container h2 {
    font-size: 1rem;
}

.shortcut-section {
    display: flex;
    flex-direction: column;
}

.shortcut-section h2 {
    font-size: 1rem;
}

.shortcut-section h2:hover {
    cursor: pointer;
}

.shortcut-section .section-links.expandable.open {
    margin-bottom: 1rem;
}

.shortcut-section li a{
    font-size: 1rem;
}

.shortcut-section li a:hover {
    color: var(--main-text-hover-color);
    border-color: var(--main-text-hover-color);
}
/* right sidebar */
.table-of-contents {
    position: sticky;
    top: 0;
    /* right: 0; */
    padding-top: 7rem;
    font-size: calc(1rem + 0.2vw);
    height: 100vh;
    width: 12.5rem;
}

.table-of-contents h4 {
    font-weight: 400;
    letter-spacing: 0.2rem;
}

.tb-content {
    display: flex;
    flex-direction: column;
    font-size: 1rem;
}

.table-of-contents > .tb-content > a {
    margin-right: 1rem;
    padding: 0.4rem;
    padding-left: 1rem;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    border-left: 2px solid var(--main-text-hover-color);
}

.fight:hover {
    font-weight: 700;
    background-color: rgba(69, 156, 255, 0.4);
}

.resource:hover {
    font-weight: 700;
    background-color: rgba(189, 124, 236, 0.4);
}

.doc-span {
    font-family: 'Playfair Display', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    border-bottom: 2px solid var(--golden-text-color);
}

.sections {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

ul {
    padding-left: 1rem;
}

.section-links {
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.main-content .section-links {
    margin-bottom: 2rem;
}

.section-links.expandable {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.section-links.no-animation {
    transition: none;
}

.section-header {
    font-size: calc(1rem + 0.2vw);
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.section-header h3 {
    font-weight: normal;
    font-size: calc(1rem + 0.1vw);
}

.section-content {
    padding-top: 1rem;
    padding-bottom: 1rem;
    line-height: 1.8;
}

.section-content ul {
    margin-left: 1rem;
}

.session-content li:hover {
    text-decoration-color: var(--main-text-hover-color);
}

.section-content a:hover {
    color: var(--main-text-hover-color);
    border-bottom: 1px solid var(--main-text-hover-color);
}

.section-permalink {
    font-weight: 700;
    color: var(--phase-permalink-color);
}

.section-permalink:hover {
    color: var(--main-text-hover-color);
}

.resources {
    color: var(--resource-permalink-color);
}

.title-link {
    display: inline-block;
    margin-top: 2rem;
    font-weight: 700;
}

.title-link h4:hover,
.title-link h3:hover,
.title-link h2:hover {
    font-weight: 700;
    text-decoration: underline;
}

.link-arrow {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: var(--link-arrow-color);
    border-bottom: 1px solid var(--primary-background-color); /* lol */
    text-decoration: none;
}

/* fight pages */
.fight-sections {
    line-height: 1.8;
}

.fight-banner {
    position: relative;
    width: 100%;
    height: 20rem;
    background-position: center;
    background-size: cover;
    overflow: hidden;
    margin-bottom: 2rem;
    filter: saturate(150%);
}

/* Fade-out effect on edges */
.fight-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;

    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0) 20%,
        var(--primary-background-color) 90%
    );
}

.strat-link {
    color: var(--text-link-color);
    font-weight: 500;
}

.strat-link:visited {
    color: var(--text-link-visited-color);
}

.strat-link:hover {
    text-decoration: underline;
}

.fight-title {
    font-weight: 300;
}

.fight-title-description {
    font-weight: 300;
}

.phase-title {
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.8rem;
}

.mech-title {
    margin-top: 3rem;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    font-weight: 400;
}

.extra-info-title {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.2rem;
}

.tiny-text {
    font-size: 1rem;
    font-style: italic;
}

.li-title {
    font-size: 1.4rem;
    font-weight: 500;
}

.compact-text {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

li.compact-text {
    margin-bottom: 0;
}

.compact-text-link {
    font-size: 1.1rem;
}

.prepull-spots,
li.prepull-spots {
    font-size: 1rem;
    font-family: monospace;
}

/* about page */
.greetings-title {
    margin-bottom: 2rem;
}

.greetings-beginning-title,
.greetings-disclaimer-title,
.greetings-feedback-title {
    margin-bottom: 1rem;
}

.greetings-disclaimer,
.greetings-feedback,
.greetings-goodbye {
    margin-top: 2rem;
}

.credits-section {
    margin-top: 2rem;
}

/* general settings */
h1 {
    font-size: calc(2rem + 0.5vw);
    margin-bottom: 2rem;
    font-weight: 300;
}

h2,
h3,
h4,
h5 {
    margin-bottom: 1rem;
}

/* dropdown settings */
.sections {
    border-top: 1px solid var(--main-text-hover-color);
}

.main-content .sections {
    border-top: none;
}

.header-container {
    margin-bottom: 0.5rem;
    display: flex;
    cursor: pointer;
    align-items: center;
    user-select: none;
}

.dropdown-menu h2 {
    font-size: 1.3rem;
    margin-bottom: 0;
    padding: 0.4rem 0;
}

.simple-menu h2{
    font-size: 1.1rem;
    font-weight: 400;
    padding: 0;
}

.h2-section-header {
    user-select: none;
    font-weight: 300;
    font-size: 1.5rem;
}

.contents-navbar {
    display: flex;
    justify-content: space-around;
}

.contents-navbar a {
    text-align: center;
    padding: 1rem;
    width: 100%;
    display: block;
    text-decoration: underline;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--main-text-color);
    background-color: var(--secondary-background-color);
    transition: 0.2s ease;
}

.contents-navbar a:hover {
    transform: scale(1.1);
}

.text-link {
    font-weight: 500;
    color: var(--text-link-color);
}

.text-link:visited {
    color: var(--text-link-visited-color);
}

.text-link:hover {
    text-decoration: underline;
}

.sections.fights-menu {
    border: none;
    padding: 0;
}

.fights-page-menu {
    border: none;
}

.fights-page-menu.section-links {
    border-right: 1px solid var(--main-text-hover-color);
}

.dropdown-arrow {
    font-size: 0.6rem;
    margin-right: 0.5rem;
}

.tiny-arrow {
    font-size: 1.5rem;
    font-weight: 700;
}

.dropdown-arrow i {
    transition: transform 0.1s ease;
}

.rotated {
    transform: rotate(180deg);
}

.back-link {
    font-weight: 400;
}

.back-link:hover {
    color: var(--main-text-hover-color)
}

.back-arrow {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--link-arrow-color);
}

.bottom-nav-links {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
}

.expandable {
    transition: max-height 0.2s ease-out;
}

/* front page specific */

.front-page {
    padding-top: 10rem;
    display: flex;
    flex-direction: row;
    gap: 4rem;
}

.welcome {
    max-width: 40ch;
}

.duty-card,
.glossary-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    background-color: black;
    height: 30rem;
    width: 30rem;
    border-radius: 0.5rem;
}

.duty-card:hover,
.glossary-card:hover {
    transform: scale(1.02);
    transition: 0.3s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.card-title {
    border-top: 2px solid #e8d037;
    border-bottom: 2px solid #e8d037;
    text-align: center;
    font-family: 'Playfair Display', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    padding: 1rem;
    width: 100%;
    font-size: calc(1.5rem + 0.5vw);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    text-decoration: underline;
    backdrop-filter: blur(10px);
    background-color: rgba(13, 13, 13, 0.9);
    color: #e8d037;
}

.duty-card {
    filter: saturate(150%);
    background-image: url("../assets/card/titania.webp");
    background-size: cover;
    background-position: center;
}

.glossary-card {
    filter: saturate(150%);
    background-image: url("../assets/card/Athena.avif");
    background-size: cover;
    background-position: center;
}

.introduction {
    display: flex;
    flex-direction: column;
    max-width: 40rem;
}

.introduction-content p {
    font-size: 1.2rem;
}

/* duty page specific */

.quick-access {
    display: flex;
    flex-direction: column;
}

.qa-links {
    display: flex;
    padding: 0 0.5rem;
    background-color: var(--secondary-background-color);
    flex-wrap: wrap;
    justify-content: space-evenly;
    margin-top: 1rem;
    font-weight: 500;
    font-size: 1rem;
}

.qa-links a {
    padding: 0.5rem;
    text-decoration: underline;
}

.qa-links a:hover {
    color: var(--main-text-hover-color);
    text-decoration-color: var(--main-text-hover-color);
}

/* hamburger menu specific */
.hamburger-container {
    position: relative;
    display: inline-block;
}

.hamburger {
    font-size: 1.2rem;
    cursor: pointer;
    user-select: none;
    font-weight: 300;
}

.hb-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s ease;
    opacity: 0;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--primary-background-color);
    flex-direction: column;
    min-width: 23rem;
    z-index: 100;
    padding: 1rem;
    padding-top: 5rem;
    border-radius: 0 0 1rem 1rem;
    overflow-y: auto;
    border-color: var(--secondary-background-color);
    scrollbar-width: none;       /* Firefox */
    -ms-overflow-style: none;    /* IE/Edge */
    display: block;
}

.hb-dropdown::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.hb-dropdown.active {
    max-height: 1000px; /* large enough to show content */
    opacity: 1;
    pointer-events: auto; /* re-enable interaction */
}

.h2-section-header.small-h2sh {
    font-size: 1rem;
}

.title-link + .section-links h3.mech-title:first-of-type {
    margin-top: 1rem;
}

.title-link + h3.mech-title:first-of-type {
    margin-top: 1rem;
}

/* footer */
footer {
    margin-top: auto;
    background-color: rgb(35, 36, 39);
    color: white;
    width: 100%;
    font-size: 0.7rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    padding: 14px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    height: 20rem;
    max-width: 100rem;
    margin-left: auto;
    margin-right: auto;
}

.se-credits-container {
    margin-left: clamp(0rem, 5vw, 10rem);
}

.author-credits-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.github-icon {
    margin-right: clamp(0rem, 5vw, 10rem);
    margin-left: 0.8rem;
    color: white;
    text-decoration: none;
    font-size: 25px;
}

.github-icon:hover {
    color: rgb(129, 129, 129);
}

/* media */

@media (max-width: 1600px) {
    .container,
    .nav-bar,
    .front-page {
        width: 80rem;
    }

    .duty-card,
    .glossary-card {
        width: 25rem;
        height: 25rem;
    }
}

@media (max-width: 1400px) {
    .container,
    .main-content,
    .nav-bar,
    .front-page {
        width: 65rem;
    }

    .duty-card,
    .glossary-card {
        width: 20rem;
        height: 20rem;
    }
}

@media (max-width: 1200px) {
    .sidebar,
    .table-of-contents {
        display: none;
    }

    .container,
    .main-content,
    .nav-bar,
    .front-page {
        margin: 0;
        padding-left: 1rem;
        width: 60rem;
    }
    .nav-title {
        padding-left: 1rem;
    }

    .introduction {
        padding-left: 1rem;
    }
}

@media (max-width: 1180px) {
    .front-page {
        padding-top: 2rem;
        flex-direction: column;
    }

    .duty-card,
    .glossary-card {
        width: 100%;
    }

    .container,
    .main-content,
    .nav-bar,
    .front-page {
        margin: 0;
        padding-left: 1rem;
        width: 45rem;
    }
}

@media (max-width: 820px) {
    html {
        font-size: 90%;
    }

    .container,
    .main-content,
    .nav-bar,
    .front-page,
    .ra {
        width: 100%;
        padding-right: 1rem;
    }

    .nav-bar {
        width: 100%;
        padding-right: 2rem;
    }

    .duty-card,
    .glossary-card {
        height: 13rem;
        width: 21rem;
    }

    .fight-banner {
        height: 10rem;
    }

}