/* =========================
   FONTS
========================= */

@font-face {
    font-family: "Cormorant Garamond";
    src: url("fonts/CormorantGaramond-VariableFont_wght.ttf") format("truetype-variations");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Helvetica Neue";
    src: url("fonts/HelveticaNeueLight.otf") format("opentype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Drugs";
    src: url("fonts/drugs.regular.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "TBJ Milky";
    src: url("fonts/tbj-milky-mini-edition.extlt.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}


/* =========================
   BASE
========================= */

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: #f2efe9;
    color: #171a1c;
    font-family: "Helvetica Neue", sans-serif;
    font-size: 18px;
    line-height: 1.6;
}

.hidden {
    display: none !important;
}


/* =========================
   FIXED SITE HEADER
========================= */

.siteHeader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 160px;
    box-sizing: border-box;
    padding-top: 24px;
    padding-left: 24px;
    z-index: 1000;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.siteHeader.header-faded-out {
    opacity: 0;
}

.siteHeader a,
.siteHeader button {
    pointer-events: auto;
}


/* =========================
   TOP ROW
========================= */

.headerTopRow {
    display: flex;
    align-items: flex-end;
    gap: 3px;
}


/* =========================
   LOGO
   Height fixed at 60px; width follows the SVG's
   natural aspect ratio instead of being squeezed
   into a fixed square box.
========================= */

.headerLogo {
    display: block;
    height: 60px;
    width: auto;
    flex-shrink: 0;
}

.headerLogo img {
    height: 100%;
    width: auto;
    display: block;
}


/* =========================
   ASSESSMENTS LABEL
========================= */

.headerAssessment {
    color: #171a1c;
    font-family: "TBJ Milky", sans-serif;
    font-size: 48px;
    font-weight: 400;
    line-height: 1;
    text-transform: none;
    white-space: nowrap;
    transform: translateY(6px);
}


/* =========================
   NAVIGATION
========================= */

.headerNav {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.headerLink,
.journalToggle {
    color: #171a1c;
    font-family: "Drugs", "Helvetica Neue", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
}

/* ABOUT and JOURNAL are uppercase. */
.headerLink,
.journalToggle span:first-child {
    text-transform: uppercase;
}

/* Underline: #00312d, 2px thick, 1px below the text. */
.headerLink:hover,
.headerLink:focus-visible,
.journalToggle:hover,
.journalToggle:focus-visible {
    text-decoration-line: underline;
    text-decoration-color: #00312d;
    text-decoration-thickness: 2px;
    text-underline-offset: 1px;
}

.journalToggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
}


/* =========================
   JOURNAL ARROW
========================= */

.journalArrow {
    width: 0;
    height: 0;
    display: inline-block;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #171a1c;
    transform: translateY(1px) rotate(0deg);
    transition: transform 0.2s ease;
}

.journalDropdown:hover .journalArrow,
.journalDropdown:focus-within .journalArrow,
.journalDropdown.is-open .journalArrow {
    transform: translateY(1px) rotate(180deg);
}


/* =========================
   JOURNAL DROPDOWN
========================= */

.journalDropdown {
    position: relative;
}

.journalPanel {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    width: 342px;
    box-sizing: border-box;
    padding: 20px 30px;
    background: #00312d;
    border-radius: 3px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease;
}

.journalPanel a {
    position: relative;
    z-index: 1;
    display: block;
    color: #f2efe9;
    font-family: "Cormorant Garamond", serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}

.journalPanel a:hover,
.journalPanel a:focus-visible {
    text-decoration-line: underline;
    text-decoration-color: #f2efe9;
    text-decoration-thickness: 2px;
    text-underline-offset: 1px;
}

@media (hover: hover) and (pointer: fine) {
    .journalDropdown:hover .journalPanel,
    .journalDropdown:focus-within .journalPanel {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

.journalDropdown.is-open .journalPanel,
.journalDropdown:focus-within .journalPanel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


/* =========================
   TYPOGRAPHY
========================= */

h1 {
    font-family: "Cormorant Garamond", serif;
    font-size: 64px;
    font-weight: 400;
    margin-bottom: 40px;
}

h2 {
    font-family: "Cormorant Garamond", serif;
    font-size: 56px;
    font-weight: 400;
    margin-top: 80px;
    margin-bottom: 30px;
}

h4 {
    font-family: "Cormorant Garamond", serif;
    font-size: 40px;
    font-weight: 400;
    margin-top: 80px;
    margin-bottom: 30px;
}

h5 {
    font-family: "Cormorant Garamond", serif;
    font-size: 32px;
    font-weight: 400;
    margin-top: 80px;
    margin-bottom: 30px;
}

h6 {
    font-family: "Cormorant Garamond", serif;
    font-size: 24px;
    font-weight: 400;
    margin-top: 80px;
    margin-bottom: 30px;
}

p {
    max-width: 720px;
    margin: 0 auto 30px auto;
}


/* =========================
   DIMENSION TITLES
========================= */

.dimensionTitle {
    font-family: "Cormorant Garamond", serif;
    font-size: 32px;
    font-weight: 400;
    margin-top: 40px;
    margin-bottom: 15px;
}


/* =========================
   LAYOUT
========================= */

#startScreen {
    min-height: 100vh;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#detailsScreen {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
    text-align: center;
}

#quizScreen {
    max-width: 1300px;
    width: 100%;
    min-height: 100vh;
    margin: 0 auto;
    padding: 60px 20px 110px 20px;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
}


/* =========================
   START SCREEN
========================= */

#startScreen p {
    width: 100%;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

#startScreen button {
    margin-top: 20px;
}


/* =========================
   QUIZ PROGRESS BAR
   Question/answer group moved 60px higher.
   Progress bar moved 30px higher than its previous position.
========================= */

#questionArea {
    order: 1;
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-60px);
}

.progressContainer {
    order: 2;
    width: 100%;
    height: 6px;
    flex-shrink: 0;
    background: #e4ddc7;
    margin-top: 0;
    margin-bottom: -90px;
    transform: translateY(-30px);
}

#progressBar {
    height: 100%;
    width: 0%;
    background: #441f11;
    transition: width 0.3s ease;
}


/* =========================
   QUESTIONS
========================= */

.question {
    width: 100%;
    text-align: center;
}

.question h2 {
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.answersWrapper {
    position: relative;
    width: 100%;
    height: 60px;
    margin-top: 100px;
}

.answers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.answerOption {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #00312d;
    color: #f2efe9;
    border: none;
    padding: 20px 40px;
    border-radius: 3px;
    font-family: "Drugs", "Helvetica Neue", sans-serif;
    font-size: 16px;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}

.answerOption:nth-child(1) {
    left: 15%;
}

.answerOption:nth-child(2) {
    left: 32.5%;
}

.answerOption:nth-child(3) {
    left: 50%;
}

.answerOption:nth-child(4) {
    left: 67.5%;
}

.answerOption:nth-child(5) {
    left: 85%;
}

.answerOption:hover {
    background: #b1cac7;
    color: #171a1c;
}


/* =========================
   SCALE LABELS
========================= */

.scaleLabels {
    position: relative;
    height: 30px;
    margin-top: 20px;
    font-size: 18px;
    color: #171a1c;
    opacity: 1;
}

.scaleLabels span {
    position: absolute;
    transform: translateX(-50%);
    white-space: nowrap;
}

.scaleLabels span:nth-child(1) {
    left: 15%;
}

.scaleLabels span:nth-child(2) {
    left: 50%;
}

.scaleLabels span:nth-child(3) {
    left: 85%;
}


/* =========================
   DETAILS SCREEN
========================= */

#detailsScreen h2 {
    margin-bottom: 50px;
}

#detailsScreen input {
    margin-bottom: 32px;
}

#detailsScreen input:last-of-type {
    margin-bottom: 32px;
}


/* =========================
   INPUTS
========================= */

input {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 20px auto;
    padding: 14px;
    font-family: "Helvetica Neue", sans-serif;
    font-size: 18px;
    color: #171a1c;
    border: 1px solid #b1cac7;
    border-radius: 3px;
    background: #b1cac7;
    text-align: center;
}

input:hover {
    background: #b1cac7;
    border: 1px solid #b1cac7;
}

input::placeholder {
    color: #171a1c;
    opacity: 0.7;
}


/* =========================
   BUTTONS
========================= */

button {
    background: #00312d;
    color: #f2efe9;
    border: none;
    padding: 20px 40px;
    cursor: pointer;
    border-radius: 3px;
    font-family: "Drugs", "Helvetica Neue", sans-serif;
    font-size: 16px;
}

button:hover {
    background: #b1cac7;
    color: #171a1c;
}


/* =========================
   LOADING SCREEN
========================= */

#loadingScreen {
    min-height: 100vh;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#loadingScreen p {
    width: 100%;
    max-width: none;
    margin: 0 0 50px 0;
    text-align: center;
    color: #171a1c;
    font-family: "Helvetica Neue", sans-serif;
}

.loadingBarContainer {
    width: min(900px, 100%);
    height: 6px;
    margin: 0 auto;
    background: #e4ddc7;
    overflow: hidden;
}

.loadingBar {
    width: 0%;
    height: 100%;
    background: #441f11;
    animation: load 5s linear forwards;
}

@keyframes load {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}


/* =========================
   RESULTS
========================= */

#resultsScreen {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    text-align: center;
}

#chart {
    margin-top: 40px;
}


/* =========================
   SPLIT LAYOUT
========================= */

.splitRow {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    margin-top: 40px;
    text-align: center;
}

.splitCol {
    flex: 1;
    min-width: 0;
}

.splitCol h2 {
    margin-top: 0;
}

.splitCol p {
    margin-left: auto;
    margin-right: auto;
}

.modelImage {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}


/* =========================
   RADAR CHART
========================= */

#radarChart {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    display: block;
}


/* =========================
   DISCLAIMER
========================= */

.disclaimer {
    margin-top: 80px;
    font-size: 14px;
    opacity: 0.7;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

#detailsScreen .disclaimer {
    margin-top: 20px;
    margin-bottom: 20px;
}


/* =========================
   CONSENT CHECKBOX
========================= */

.consentLabel {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    max-width: 720px;
    margin: 0 auto 32px auto;
    font-size: 14px;
    opacity: 0.7;
    text-align: center;
    cursor: pointer;
}

.consentLabel input[type="checkbox"] {
    display: inline-block;
    width: auto;
    max-width: none;
    margin: 3px 0 0 0;
    padding: 0;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #00312d;
}


/* =========================
   MOBILE RESPONSIVENESS
========================= */

@media (max-width: 700px) {
    body {
        font-size: 16px;
    }

    h2 {
        font-size: 42px;
    }

    #startScreen,
    #detailsScreen,
    #quizScreen,
    #resultsScreen {
        padding-left: 16px;
        padding-right: 16px;
    }

    #startScreen {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    #quizScreen {
        padding-top: 40px;
        padding-bottom: 70px;
    }

    #questionArea {
        transform: translateY(-60px);
    }

    .progressContainer {
        margin-bottom: -50px;
        transform: translateY(-30px);
    }

    .question h2 {
        height: 220px;
        font-size: 40px;
    }

    .answerOption {
        padding: 16px 22px;
        font-size: 14px;
    }

    .scaleLabels {
        font-size: 13px;
    }

    #loadingScreen {
        padding: 20px 16px;
    }

    #loadingScreen p {
        margin-bottom: 40px;
    }

    .siteHeader {
        height: 150px;
        padding-top: 16px;
        padding-left: 16px;
    }

    .headerTopRow {
        gap: 3px;
    }

    .headerLogo {
        height: 44px;
        width: auto;
    }

    .headerAssessment {
        font-size: 30px;
    }

    .headerNav {
        margin-top: 20px;
        gap: 20px;
    }

    .headerLink,
    .journalToggle {
        font-size: 14px;
    }

    .journalPanel {
        width: min(342px, calc(100vw - 32px));
        padding: 18px 22px;
    }
}