@charset "UTF-8";

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #FFFFFF;
    color: #111111;
    font-family: "Noto Sans JP", sans-serif;
    line-height: 2.0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    letter-spacing: 0.05em;
    background-image:
        linear-gradient(to right, rgba(160, 120, 80, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(160, 120, 80, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: #E60012;
}


.section-title {
    font-family: 'Syncopate', sans-serif;
    text-align: center;
    color: #111111;
    margin-bottom: 80px;
    font-weight: 700;
    letter-spacing: 0.1em;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 1px;
    height: 40px;
    background-color: #E60012;
    margin: 20px auto 0;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }
}

.priority-section {
    padding: 120px 20px;
    background-color: #FFFFFF;
    text-align: center;
}

@media (max-width: 768px) {
    .priority-section {
        padding: 80px 20px;
    }
}

.matrix-intro {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    padding: 100px 20px 40px 20px;
    position: relative;
}

.hero-section {
    background-color: #163B65;
    padding-bottom: 60px;
    padding-top: 20px;
    width: 100%;
}

.hero-section__inner {
    max-width: 1170px;
    margin: 0 auto;
}

.matrix-intro-title {
    font-family: "Noto Sans JP", sans-serif;
    font-size: 1.8rem;
    color: #FFFFFF;
    font-weight: 700;
    margin-bottom: 30px;
    letter-spacing: 0.1em;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .matrix-intro-title {
        font-size: 24px;
    }
}

.matrix-intro-text {
    font-family: "Noto Sans JP", sans-serif;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 2.2;
    margin: 0 auto;
    max-width: 800px;
    text-align: center;
}

@media (max-width: 1199px) {
    .matrix-intro-text {
        text-align: left;
        font-size: 14px;
        line-height: 1.6;
    }
}

.matrix-zoom-container {
    width: 960px;
    height: 698px;
    max-width: 100%;
    margin: 80px auto;
    position: relative;
    background-color: #FFFFFF;
    background-image:
        linear-gradient(#EEEEEE 1px, transparent 1px),
        linear-gradient(90deg, #EEEEEE 1px, transparent 1px);
    background-size: 20% 20%;
    background-position: 0 0;
    border: 1px solid #111111;
    box-sizing: border-box;
    z-index: 1;
}

.side-navigation {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1000;
    font-family: 'Syncopate', sans-serif;
    background-color: #dbdbdb;
    width: 62px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: none;
    box-sizing: border-box;
}

@media (max-width: 1199px) {
    .side-navigation {
        display: none;
    }
}

.side-navigation ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0;
    margin: 0;
}

.side-navigation .nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 20px 10px;
    background-color: #ffffff;
    color: #111111;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    line-height: 1.2;
    border-radius: 0 8px 8px 0;
}

.side-navigation .nav-item.nav-lh:hover {
    background-color: #441F28;
    color: #ffffff;
}

.side-navigation .nav-item.nav-lf:hover {
    background-color: #4D1E6B;
    color: #ffffff;
}

.side-navigation .nav-item.nav-sf:hover {
    background-color: #163B65;
    color: #ffffff;
}

.side-navigation .nav-item.nav-sh:hover {
    background-color: #6B4D1D;
    color: #ffffff;
}

/* Active state for simple × FUNCTION page */
.side-navigation .nav-item.active {
    background-color: #163B65;
    color: #ffffff;
}

.matrix-label {
    position: absolute;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 14px;
    color: #FFFFFF;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    white-space: nowrap;
    z-index: initial;
}

.matrix-label.label-simple {
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
}

.matrix-label.label-function {
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
}

.matrix-label.label-zero {
    top: -30px;
    right: -30px;
    font-size: 24px;
    color: #FFFFFF;
}

@media (max-width: 768px) {
    .matrix-label.label-simple {
        right: -30px;
    }

    .matrix-label.label-function {
        top: -30px;
    }
}

.matrix-tag {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    transform: translate(-50%, -50%);
}

.matrix-tag img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    z-index: 10;
}

.matrix-tag:hover img {
    transform: scale(1.1) rotate(2deg);
    filter: grayscale(0) opacity(1);
}

.matrix-tag.tag-1 {
    /* (3, 1) -> left: 100 - 60 = 40%, top: 20% */
    top: 20%;
    left: 40%;
}

.matrix-tag.tag-2 {
    /* (1, 2) -> left: 100 - 20 = 80%, top: 40% */
    top: 40%;
    left: 80%;
}

.matrix-tag.tag-3 {
    /* (4, 4) -> left: 100 - 80 = 20%, top: 80% */
    top: 80%;
    left: 20%;
}

.matrix-tag.tag-4 {
    /* (2, 2) -> left: 100 - 40 = 60%, top: 40% */
    top: 40%;
    left: 60%;
}

.matrix-tag.tag-5 {
    /* (3, 2) -> left: 100 - 60 = 40%, top: 40% */
    top: 40%;
    left: 40%;
}

.matrix-tag.tag-6 {
    /* (1, 4) -> left: 100 - 0 = 0%, top: 80% */
    top: 80%;
    left: 0%;
}

.matrix-tag.tag-7 {
    /* (3, 3) -> left: 100 - 60 = 40%, top: 60% */
    top: 60%;
    left: 40%;
}

.matrix-tag.tag-8 {
    /* (4, 2) -> left: 100 - 80 = 20%, top: 40% */
    top: 40%;
    left: 20%;
}

.matrix-tag.tag-9 {
    /* (3, 4) -> left: 100 - 60 = 40%, top: 80% */
    top: 80%;
    left: 40%;
}

.matrix-tag.tag-10 {
    /* (1, 3) -> left: 100 - 20 = 80%, top: 60% */
    top: 60%;
    left: 80%;
}

.matrix-tag.tag-11 {
    /* (1, 4) -> left: 100 - 20 = 80%, top: 80% */
    top: 80%;
    left: 80%;
}

.matrix-tag.tag-12 {
    /* (2, 4) -> left: 100 - 40 = 60%, top: 80% */
    top: 80%;
    left: 60%;
}

@media (max-width: 768px) {
    .matrix-zoom-container {
        width: calc(100% - 60px);
        height: auto;
        aspect-ratio: 1 / 1;
        margin-top: 40px;
        margin-bottom: 50px;
    }

    .matrix-tag img {
        width: 60px;
        height: 60px;
    }
}

/* SP Matrix Buttons */
.sp-matrix-buttons {
    display: none;
    flex-direction: column;
    gap: 15px;
    max-width: 335px;
    margin: 0 auto 20px;
    position: relative;
    z-index: 5;
}

@media (max-width: 1199px) {
    .sp-matrix-buttons {
        display: flex;
    }

    .sp-matrix-buttons .c-btn--secondary {
        background-color: #f9f9f9;
        border-color: #555;
        color: #555;
        font-size: 13px;
        padding: 14px 10px;
        letter-spacing: -0.02em;
    }
}



/* Housing List */
.housing-list {
    padding: 120px 20px;
    background-color: #ffffff;
    background-image:
        linear-gradient(to right, rgba(160, 120, 80, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(160, 120, 80, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    width: 100%;
}

.housing-list__inner {
    max-width: 1200px;
    margin: 0 auto;
}

.housing-list__inner h2 {
    text-align: center;
}

@media (max-width: 768px) {
    .housing-list {
        padding: 60px 20px;
    }
}

.housing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid #EEEEEE;
    border-left: 1px solid #EEEEEE;
    margin-bottom: 80px;
}

.housing-card {
    background: #ffffff;
    cursor: pointer;
    position: relative;
    transition: all 0.4s ease;
    padding: 30px;
    opacity: 0;
    border-right: 1px solid #EEEEEE;
    border-bottom: 1px solid #EEEEEE;
}

.housing-card.visible {
    animation: cardFadeIn 1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.housing-card:hover {
    background-color: #F8F8F8;
}

.housing-card:hover .card-image {
    transform: scale(1.05);
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-image-wrapper {
    overflow: hidden;
    aspect-ratio: 16 / 9;
    margin-bottom: 20px;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    filter: grayscale(0.2);
}

.card-content {
    padding: 15px;
    background: #fff;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.card-title {
    font-family: "Noto Sans JP", sans-serif;
    color: #111111;
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.4;
}

.card-content .c-btn--text {
    align-self: center;
    margin-top: auto;
    padding-bottom: 5px;
}

.card-content .c-btn--text::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
}

.card-content .c-btn--text::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
}

.card-desc {
    font-family: "Noto Sans JP", sans-serif;
    font-size: 0.9rem;
    color: #666666;
    min-height: 5.4em;
    margin-bottom: 20px;
    line-height: 1.8;
}

.card-specs {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: #666666;
    border-top: 1px solid #EEEEEE;
    padding-top: 15px;
    margin-bottom: 20px;
}

.spec-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    letter-spacing: 0.1em;
    justify-content: flex-start;
}

.spec-item .spec-label {
    font-size: 0.75rem;
    color: #666666;
    width: 80px;
    font-weight: 500;
}

.spec-item .spec-dots {
    display: flex;
    gap: 8px;
}

.spec-item .dot {
    width: 8px;
    height: 8px;
    background-color: #E0E0E0;
    border-radius: 50%;
}

.spec-item .dot.filled {
    background-color: #111111;
}



.back-home-container {
    display: flex;
    justify-content: center;
    margin-top: 60px;
    padding-bottom: 20px;
}





@media (max-width: 1199px) {
    .housing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .housing-grid {
        grid-template-columns: 1fr;
        gap: 0;
        background-color: transparent;
        border-top: 1px solid #EEEEEE;
    }

    .housing-card {
        border: none;
        border-left: 1px solid #EEEEEE;
        border-right: 1px solid #EEEEEE;
        border-bottom: 1px solid #EEEEEE;
        padding: 20px;
    }
}

/* ==========================================
   Hamburger Menu Styles
   ========================================== */
.hamburger-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    left: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    width: 50px;
    height: 50px;
    background-color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2000;
    padding: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hamburger-btn__line {
    width: 24px;
    height: 2px;
    background-color: #111;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

.hamburger-btn.is-active .hamburger-btn__line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger-btn.is-active .hamburger-btn__line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.is-active .hamburger-btn__line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    width: 50%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.98);
    z-index: 1999;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.05);
}

.nav-drawer.is-active {
    transform: translateX(0);
}

.nav-drawer__inner {
    width: 100%;
    height: 100%;
    padding: 240px 20px 40px;
    box-sizing: border-box;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-drawer__list {
    list-style: none;
    padding: 0;
    margin: 0;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    height: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 30px;
}

.nav-drawer__list>li {
    margin: 0;
}

.nav-drawer__list a {
    text-decoration: none;
    color: #111;
    font-size: 16px;
    font-weight: 500;
    font-family: "Noto Sans JP", sans-serif;
    transition: color 0.3s;
    display: inline-block;
    letter-spacing: 0.1em;
}

.nav-drawer__list a:hover {
    color: #E60012;
}

.nav-drawer__sublist {
    list-style: none;
    padding: 20px 5px 0 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-right: 1px solid #eee;
    margin-right: 15px;
}

.nav-drawer__sublist li {
    margin: 0;
}

.nav-drawer__sublist li a {
    font-size: 13px;
    font-weight: normal;
    color: #666;
}

@media screen and (max-width: 768px) {
    .nav-drawer {
        width: 100%;
        justify-content: flex-start;
    }

    .nav-drawer__inner {
        padding: 80px 40px;
        display: block;
        text-align: left;
    }

    .nav-drawer__list {
        writing-mode: horizontal-tb;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        height: auto;
        max-height: none;
        width: 100%;
        gap: 15px;
    }

    .nav-drawer__list>li {
        width: 100%;
        margin-bottom: 10px;
        border-bottom: 1px solid #f5f5f5;
        padding-bottom: 10px;
    }

    .nav-drawer__list a {
        display: block;
        width: 100%;
        font-size: 16px;
    }

    .nav-drawer__sublist {
        padding: 5px 0 0 15px;
        border-right: none;
        margin-right: 0;
        border-left: 2px solid #eee;
        gap: 8px;
    }
}


/* Shared Hamburger, Footer and CTA styles are now handled in layout.css */