/* ========================================
Works otaf HP Styles
======================================== */

/* ========================================
CSS Variables
======================================== */
:root {
    --primary-color: #5596B1;
    --secondary-color: #E4ECF0;
    --accent-color: #E68E30;
    --text-color: #333;
    --white: #ffffff;
    --font-serif: 'adobe-garamond-pro', 'EB Garamond', serif;
    --font-sans: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Noto Sans JP', 'Helvetica Neue', Arial, sans-serif;
    --font-serif-jp: 'Ryumin Web', 'EB Garamond', 'Times New Roman', serif;
}

/* ========================================
Base Styles
======================================== */
html {
    font-size: 62.5%;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 90%;
}

/* ========================================
Typography
======================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 1rem 0;
}

.section-title {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

/* ========================================
Navigation
======================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    overflow-x: hidden;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    width: 90%;
}

.nav-logo a {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 400;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-logo a:hover {
    color: var(--primary-color);
}

.nav-logo img{
    width: 100px;
}

.nav-container-menu {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: end;
    align-items: center;
    height: 70px;
    width: 90%;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
    z-index: 101;
    position: fixed;
}

.nav-item {
    margin: 0;
}

.nav-link {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* ========================================
Button Arrow Styles
======================================== */
.btn-arrow {
    color: var(--text-color);
    transition: color 0.3s ease;
}

.btn-arrow:hover {
    color: var(--primary-color);
}

/* ========================================
button Styles
======================================== */

/* ワークボタン */

.work-btn-container-wrapper {
    display: flex;
    justify-content: center;
    gap: 40px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.work-btn-container {
    margin: 10% 0;
    text-align: center;
}

.work-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    border: 2px solid var(--text-color);
    padding: 8px 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.work-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--text-color);
    z-index: 1;
    transition: left 0.4s cubic-bezier(0.4,0,0.2,1);
}

.work-prev-btn::before {
    left: auto;
    right: -100%;
    transition: right 0.4s cubic-bezier(0.4,0,0.2,1);
}

.work-btn span,
.work-btn svg {
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

.work-btn svg {
    color: var(--text-color);
}

.work-btn svg path {
    stroke: var(--text-color);
    fill: none;
    transition: stroke 0.3s, fill 0.3s;
}

/* nextボタンhover: 右→左 */
.work-next-btn:hover::before {
    left: 0;
}

/* prevボタンhover: 左→右 */
.work-prev-btn:hover::before {
    right: 0;
}

.work-btn:hover {
    color: var(--white);
    border-color: var(--text-color);
}

.work-btn:hover svg {
    color: var(--white);
}

.work-btn:hover svg path {
    stroke: var(--white);
    fill: none;
}

/* ========================================
works Hero Section
======================================== */
.works-hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
}

.works-hero-image {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 90%;
    z-index: 1;
}

.works-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.works-hero-overlay {
    position: absolute;
    top: -230px;
    left: -1px;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
}

.works-hero-text-box {
    background-color: var(--white);
    padding: 18px 36px;
    max-width: 620px;
    width: 42%;
}

.works-hero-title {
    font-family: var(--font-serif-jp);
    font-size: 3.6rem;
    font-weight: 400;
    color: var(--text-color);
    margin: 0;
    line-height: 1.3;
    display: inline-block;
    position: relative;
}

.works-hero-title br{
    display: none;
}

.works-hero-title::after{
    content: '';
    display: block;
    width: 30%;
    height: 1px;
    background-color: var(--text-color);
    position: absolute;
    top: -14px;
    left: 80px;  
}

.works-hero-subtitle {
    font-family: var(--font-sans);
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--text-color);
    margin: 0;
    letter-spacing: 0.1em;
    display: block;
}

.works-hero-side-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: #fff;
    font-family: var(--font-serif);
    font-size: 8.2rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: absolute;
    right: 5%;
    top: 40%;
    white-space: nowrap;
}

.project-summary-section::after{
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 6px;
    background-image: radial-gradient(circle, var(--primary-color) 30%, transparent 40%);
    background-size: 16px 6px;
    background-repeat: repeat-x;
}

/* ========================================
Project Summary Section
======================================== */
.project-summary-section {
    padding: 8% 0;
    margin-bottom: 8%;
    background-color: var(--white);
    position: relative;
}

.project-Summary {
    max-width: 980px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.project-description {
    font-family: var(--font-sans);
    font-size: 2rem;
    line-height: 1.8;
    color: var(--text-color);
    margin: 0 0 6% 0;
    text-align: left;
}

.work-description-bold {
    font-weight: 600;
    color: var(--primary-color);
}

/* ========================================
Quiz Styles
======================================== */

.quiz-container{
    background: #F1EAE2;
    margin: 8% auto 0;
    padding: 80px 0;
    min-height: 500px;
}

.alert-primary{
    background: var(--primary-color);
    color: var(--white);
    font-size: 1.8rem;
    padding: 16px;
    margin-bottom: 40px;
    text-align: center;
    font-family: var(--font-serif-jp);
}

.justify-content-centainer{
    display: grid;
    grid-template-columns:repeat(4, 1fr);
    gap: 10px;
}

.btn-primary{
    color: var(--text-color);
    background: var(--white);
    font-size: 1.4rem;
    padding: 10px 20px;
    border: 2px solid var(--text-color);
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
    z-index: 2;
}

.btn-primary:nth-child(n+1){
    margin-left: 10px;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    z-index: -1;
    transition: left 0.4s cubic-bezier(0.4,0,0.2,1);
}

.btn-primary:hover::before {
    left: 0;
}

.btn-primary:hover {
    color: var(--white);
    border-color: var(--text-color);
}


/* ========================================
Quiz End Styles
======================================== */
.quiz-end-container{
    padding: 80px 0;
    margin-bottom: 40px;
    text-align: center;
    color: var(--text-color);
}

.end-title{
    font-size: 2.4rem;
    margin-bottom: 20px;
    font-weight: 400;
}

.end-score{
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 20px;
}
.end-score-number{
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent-color);
}

.end-score-number{
    font-size: 2.4rem;
    font-weight: 600;
}

/* ========================================
Quiz Progress
======================================== */
.quiz-progress {
    text-align: center;
    margin-top: 60px;
}

.progress-text {
    font-size: 1.4rem;
    font-weight: 400;
    color: #606060;
    font-family: var(--font-sans);
}

#current-question {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1.6rem;
}

/* ========================================
Footer
======================================== */
.footer {
    background-color: #E4ECF0;
    color: var(--text-color);
    padding: 40px 0;
    text-align: center;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 20px;
}

.footer-link {
    color: var(--text-color);
    text-decoration: none;
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--primary-color);
}

.footer-text {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

.copy-mark {
    font-size: 1.8rem;
    position: relative;
    top: 3px;
}

/* ========================================
Responsive Design for Project Sections
======================================== */

@media (max-width: 1440px) {
    .works-hero-side-text{
        font-size: 7.2rem;
    }
}

@media (max-width: 1024px) {
    .work-btn {
        font-size: 1.6rem;
        padding: 16px 32px;
    }
    .justify-content-centainer{
        grid-template-columns:repeat(2, 1fr);
        gap: 20px;
    }

    .works-hero-title{
        font-size: 2.8rem;
    }

    .works-hero-image{
        top: 80px;
    }
    .works-hero-subtitle{
        font-size: 1.4rem;
    }

    .works-hero-side-text{
        font-size: 6.2rem;
        top: 45%;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        right: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 50%;
        height: calc(100vh - 70px);
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 10% 0;
        gap: 3rem;
        overflow-y: auto;
        z-index: 99;
    }

    .nav-menu.active {
        right: 0;
    }

    .hamburger {
        display: flex;
    }

    .work-btn {
        font-size: 1.4rem;
        padding: 14px 28px;
    }

    .works-hero {
        height: 80vh;
        min-height: 500px;
    }

    .works-hero-title::after{
        display: none;
    }

    .works-hero-overlay {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        top: 0;
    }
    
    .works-hero-text-box {
        padding: 20px 30px;
        max-width: 280px;
    }
    
    .works-hero-title {
        font-size: 2.2rem;
    }
    
    .works-hero-subtitle {
        font-size: 1.2rem;
    }
    
    .works-hero-side-text {
        font-size: 4rem;
        top: 25%;
    }

    .works-hero-image{
        top: 60px;
    }

    .project-summary-section {
        padding: 10% 0;
    }
    
    .project-description {
        font-size: 1.6rem;
        margin-bottom: 30px;
    }

    .alert-primary{
        font-size: 1.6rem;
        padding: 12px;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .nav-container{
        width: 100%;
    }
    .nav-logo a{
        font-size: 2.4rem;
    }
    .nav-logo img{
        width: 80px;
    }
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-menu {
        padding: 5% 0;
        gap: 2rem;
    }
    
    .nav-link {
        font-size: 1.6rem;
    }

    .work-btn {
        font-size: 1.2rem;
        padding: 10px 20px;
    }

    .work-btn-container{
        margin: 15% 0;
    }

    .works-hero-text-box {
        padding: 15px 10px;
        width: 45%;
    }
    
    .works-hero-title {
        font-size: 2.4rem;
    }
    
    .works-hero-side-text {
        font-size: 3.2rem;
    }

    .works-hero-image{
        top: 40px;
    }
    .project-description {
        font-size: 1.2rem;
    }

    .justify-content-centainer{
        grid-template-columns:repeat(1, 1fr);
    }

    .btn-primary{
        font-size: 1.2rem;
    }

    .footer-nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-link {
        font-size: 1.8rem;
    }
}

@media (max-width: 375px) {
    .work-btn-container-wrapper{
        flex-direction: column;
        gap: 30px;
        margin: 15% 0;
    }

    .work-btn-container{
        margin: 0;
    }

    .work-btn-container{
        width: 50%;
    }

    .work-btn{
        display: block;
    }

}
