/* =========================================================
   DENIM FINDER
   B. BASE / PAGE DESIGN CSS
   ========================================================= */


/* =========================================================
   01. RESET
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;

    min-height: 100%;
    background: #302f29;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    min-height: 100dvh;

    background: #9b997d;
    color: #302f29;

    font-family:
        "Yusei Magic",
        sans-serif;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;

    overflow-x: hidden;

    /* スマホでフッター下に背景が見えるのを防ぐ */
    overscroll-behavior-y: none;
}
button,
input,
textarea,
select {
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}


/* =========================================================
   02. COLOR VARIABLES
   ========================================================= */

:root {

    /* Page */
    --page-bg: #9b997d;
    --card-bg: #f8f7f3;
    --footer-bg: #302f29;

    /* Text */
    --text-main: #302f29;
    --text-white: #ffffff;

    /* Denim Blue */
    --blue: #45a8cf;
    --blue-dark: #187ba4;

    /* Speech Bubble */
    --bubble-bg: #f2f2dc;

    /* Shadow */
    --card-shadow:
        0 12px 28px rgba(40, 38, 30, 0.20);

    /* Radius */
    --card-radius: 40px;
    --button-radius: 34px;

    /* Layout */
    --content-width: 688px;
}


/* =========================================================
   03. PAGE WRAPPER
   ========================================================= */

#app {
    width: 100%;

    min-height: 100vh;
    min-height: 100dvh;

    display: flex;
    flex-direction: column;

    background: var(--page-bg);
}


/* =========================================================
   04. HEADER
   ========================================================= */

.site-header {

    width: 100%;

    padding-top: 58px;
    padding-bottom: 38px;

    display: flex;
    justify-content: center;
    align-items: center;
}

.site-logo {
    display: block;

    width: min(440px, 72vw);

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.site-logo:hover {
    opacity: 0.9;
}

.site-logo img {
    width: 100%;
    height: auto;
}


/* =========================================================
   05. MAIN
   ========================================================= */

.main-content {

    width: 100%;

    flex: 1;

    display: flex;
    justify-content: center;
    align-items: flex-start;

    padding: 0 20px 42px;
}


/* =========================================================
   06. SCREEN
   ========================================================= */

.screen {
    width: 100%;
    max-width: var(--content-width);
}

.screen[hidden] {
    display: none;
}


/* =========================================================
   07. MAIN CARD
   ========================================================= */

.main-card {

    position: relative;

    width: 100%;

    background: var(--card-bg);

    border-radius: var(--card-radius);

    box-shadow: var(--card-shadow);

    overflow: hidden;

    padding: 40px 64px 60px;
}


/* =========================================================
   08. START SCREEN
   ========================================================= */

.screen-start .main-card {

    min-height: 875px;

    display: flex;
    flex-direction: column;
    align-items: center;
}


/* ---------------------------------------------------------
   START COPY
--------------------------------------------------------- */

.start-copy {

    width: 100%;

    padding-top: 0;

    text-align: center;

    position: relative;
    z-index: 2;
}

.start-copy h1 {

    color: var(--text-main);

    font-size: clamp(24px, 4vw, 40px);

    font-weight: 600;
    line-height: 1.28;

}


/* ---------------------------------------------------------
   START CHARACTER
--------------------------------------------------------- */

.character-start {

    width: 100%;

    display: flex;
    justify-content: center;

    margin-top: 14px;

    position: relative;
    z-index: 1;
}

.character-start img {

    width: min(390px, 78%);

    height: auto;

    object-fit: contain;
}


/* ---------------------------------------------------------
   START ACTION
--------------------------------------------------------- */

.start-action {

    width: 100%;

    display: flex;
    justify-content: center;

    margin-top: 12px;
}


/* =========================================================
   09. COMMON PRIMARY BUTTON
   ========================================================= */

.primary-button {

    width: 100%;
    max-width: 500px;

    min-height: 106px;

    padding: 18px 30px;

    border-radius: var(--button-radius);

    background: var(--blue);

    color: var(--text-white);


    font-size: clamp(28px, 4vw, 42px);

    font-weight: 500;

    line-height: 1.25;

    box-shadow:
        0 9px 0 var(--blue-dark);

    transition:
        transform 0.12s ease,
        box-shadow 0.12s ease,
        background 0.2s ease;
}

.primary-button:hover {

    background: #4bb0d7;

    transform: translateY(-1px);

    box-shadow:
        0 10px 0 var(--blue-dark);
}

.primary-button:active {

    transform: translateY(7px);

    box-shadow:
        0 2px 0 var(--blue-dark);
}


/* =========================================================
   10. QUESTION SCREEN
   ========================================================= */

.screen-diagnosis .main-card {

    min-height: 875px;

    padding-top: 30px;
}




/* =========================================================
   14. FOOTER
   ========================================================= */

.site-footer {
    width: 100%;
    min-height: 94px;

    margin-top: auto;

    background: var(--footer-bg);

    display: flex;
    justify-content: center;
    align-items: center;

    flex-shrink: 0;
}

.site-footer p {

    color: #ffffff;

    font-family:
        "Arial Black",
        "Helvetica Neue",
        sans-serif;

    font-size: 19px;

    font-weight: 900;

    letter-spacing: -0.03em;
}


/* =========================================================
   15. TABLET
   ========================================================= */

@media (max-width: 700px) {

    :root {
        --card-radius: 34px;
        --button-radius: 28px;
    }

    .site-header {

        padding-top: 42px;
        padding-bottom: 28px;
    }

    .site-logo {
        width: min(400px, 78vw);
    }

    .main-content {

        padding:
            0
            14px
            32px;
    }

    .main-card {

        padding:
            34px
            34px
            48px;
    }

    .screen-start .main-card,
    .screen-diagnosis .main-card {

        min-height: auto;
    }

    .start-copy h1 {
        font-size: clamp(29px, 7vw, 42px);
    }

    .character-start img {
        width: min(350px, 85%);
    }

    .primary-button {

        min-height: 94px;

        font-size:
            clamp(26px, 7vw, 36px);
    }


    .site-footer {
        min-height: 82px;
    }

}


/* =========================================================
   16. SMARTPHONE
   ========================================================= */

@media (max-width: 480px) {

    .site-header {

        padding-top: 30px;
        padding-bottom: 22px;
    }

    .site-logo {
        width: 82vw;
    }

    .main-content {
        padding:
            0
            9px
            24px;
    }

    .main-card {

        padding:
            27px
            20px
            36px;

        border-radius: 29px;
    }

    .start-copy h1 {

        font-size:
            clamp(25px, 6.4vw, 33px);

        line-height: 1.3;
    }

    .character-start {

        margin-top: 10px;
    }

    .character-start img {

        width: 88%;
    }

    .start-action {

        margin-top: 8px;
    }

    .primary-button {

        min-height: 82px;

        padding:
            14px
            20px;

        border-radius: 24px;

        font-size:
            clamp(24px, 7vw, 31px);

        box-shadow:
            0 7px 0 var(--blue-dark);
    }

    .primary-button:active {

        transform: translateY(5px);

        box-shadow:
            0 2px 0 var(--blue-dark);
    }

    .site-footer {

        min-height: 72px;
    }

    .site-footer p {
        font-size: 16px;
    }

}


/* =========================================================
   17. ACCESSIBILITY
   ========================================================= */

button:focus-visible,
a:focus-visible {

    outline: 4px solid rgba(69, 168, 207, 0.45);

    outline-offset: 4px;
}


/* =========================================================
   18. REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {

        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}