@charset "UTF-8";

/* -------------------- 全体 -------------------- */

/* rem基準初期化 */
html {
    font-size: 62.5%;
    /* = 10px */
}

@media screen and (max-width: 767px) {
    html {
        font-size: calc(10 / 390 * 100vw);
    }
}

/* カラーパレット */
:root {
    --color-bg: #f7f4ef;
    --color-main: #1a2744;
    --color-text: #2d2d2d;
    --color-subtext: #6b6b6b;
    --color-accent: #c9a84c;
}


body {
    font-family: "Noto Sans JP", sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
}

ul {
    list-style: none;
}

#about,
#new-books,
#second-shelf,
#visit {
    scroll-margin-top: 8rem;
}

/* ヘッダー
---------------------------------------- */

.header {
    padding: 3.5rem 0 2.5rem;
    position: relative;
}

.header-inner {
    max-width: 110rem;
    margin: 0 auto;
    padding: 0 2rem;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.nav-left,
.nav-right {
    justify-self: center;
    display: flex;
    gap: clamp(2rem, 4vw, 6.5rem);
}

.nav-left {
    padding-left: clamp(2rem, 6vw, 10rem);
}

.nav-right {
    padding-right: clamp(2rem, 6vw, 10rem);
}


.nav-left a,
.nav-right a {
    position: relative;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: 2px;
}

.nav-left a::before,
.nav-left a::after,
.nav-right a::before,
.nav-right a::after {
    opacity: 0;
    transition: 0.3s;
    font-size: 1.1em;
    transform: translateY(-0.05em);
}

.nav-left a::before,
.nav-right a::before {
    content: "(";
    margin-right: 0.3rem;
}

.nav-left a::after,
.nav-right a::after {
    content: ")";
    margin-left: 0.3rem;
}

.nav-left a:hover::before,
.nav-left a:hover::after,
.nav-right a:hover::before,
.nav-right a:hover::after {
    color: var(--color-accent);
    opacity: 1;
}

.logo {
    margin: 0;
    justify-self: center;
}

.logo a {
    display: block;
}

.logo img {
    display: block;
    width: clamp(12rem, 12vw, 14.5rem);
    height: auto;
}

.hamburger-button {
    display: none;
}


@media screen and (max-width: 767px) {
    .header {
        padding: 1.6rem 0 1.2rem;
        position: relative;
    }

    .header-inner {
        max-width: none;
        padding: 0 2rem;
        display: flex;
        justify-content: flex-start;
        align-items: center;
    }

    .nav-left,
    .nav-right {
        display: none;
    }

    .logo {
        margin: 0;
        justify-self: auto;
    }

    .logo img {
        width: 12.8rem;
        height: auto;
    }

    .hamburger-button {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 0.7rem;
        width: 4rem;
        height: 4rem;
        background: transparent;
        border: none;
        position: fixed;
        right: 2rem;
        top: 2rem;
        transform: none;
        z-index: 10000;
    }

    .hamburger-button.is-open span:nth-child(1) {
        transform: translateY(0.4rem) rotate(45deg);
    }

    .hamburger-button.is-open span:nth-child(2) {
        transform: translateY(-0.4rem) rotate(-45deg);
    }

    .hamburger-button span {
        width: 2.4rem;
        height: 1px;
        background: #000;
        transition: transform 0.3s ease;
        margin-left: auto;
    }
}

.sp-nav {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    width: 70vw;
    height: 100vh;
    background: var(--color-bg);
    border-left: 3px solid rgba(201,168,76,0.4);
    z-index: 9999;
    padding-top: 10rem;
    padding-left: 1.6rem;
    gap: 3.2rem;
}

.sp-nav.is-open {
    display: flex;
}

.sp-nav a {
    font-size: 1.6rem;
    letter-spacing: 0.12em;
    text-decoration: none;
    color: var(--color-text);

    position: relative;
}

.sp-nav a::before,
.sp-nav a::after {
    opacity: 0;
    transition: 0.3s;

    font-size: 1.1em;
}

.sp-nav a::before {
    content: "(";
    margin-right: 0.4rem;
}

.sp-nav a::after {
    content: ")";
    margin-left: 0.4rem;
}

.sp-nav a:active::before,
.sp-nav a:active::after {
    opacity: 1;
    color: var(--color-accent);
}


/* ヒーロー画像 */
.hero {
    padding-bottom: 4rem;
}

.hero-inner {
    max-width: 110rem;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero img {
    width: 100%;
    height: 48rem;
    object-fit: cover;
    object-position: top;
    border-radius: 1.6rem;
}

@media screen and (max-width: 767px) {
    .hero {
        padding-bottom: 2.2rem;
    }

    .hero-inner {
        max-width: none;
        padding: 0 2rem;
    }

    .hero img {
        height: 25rem;
        border-radius: 1rem;
    }
}

/* about
---------------------------------------- */
.about {
    padding: 4rem 0 5rem;
}

.about-inner {
    max-width: 64rem;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    font-size: 2.4rem;
    letter-spacing: 0.18em;
    color: var(--color-main);
    margin-bottom: 2.6rem;
    position: relative;
    display: inline-flex;
    align-items: center;
}

.section-title::before {
    content: "(";
    margin-right: 0.8rem;
    font-size: 1.8rem;
    color: var(--color-accent);
}

.section-title::after {
    content: ")";
    margin-left: 0.8rem;
    font-size: 1.8rem;
    color: var(--color-accent);
}

.about-text-en {
    font-family: "Zen Old Mincho", serif;
    font-size: 2rem;
    line-height: 1.8;
    letter-spacing: 0.04em;
    margin-bottom: 2.2rem;
}

.about-text-ja {
    font-size: 1.3rem;
    color: var(--color-subtext);
    letter-spacing: 0.08em;
    margin-bottom: 4rem;
}

.about-image img {
    width: 18rem;
    height: auto;
}


@media screen and (max-width: 767px) {
    .about {
        padding: 4.8rem 0;
    }

    .about-inner {
        max-width: none;
        padding: 0 2rem;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 1.6rem;
    }

    .about-text-en {
        font-size: 1.8rem;
        line-height: 1.9;
    }

    .about-text-ja {
        font-size: 1.2rem;
    }

    .about-image img {
        width: 16rem;
    }
}


/* New Books
---------------------------------------- */

.new-books {
    padding: 6rem 0;
}

.section-inner {
    max-width: 110rem;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.book-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-top: 1.9rem;
    border: 1px solid rgba(45, 45, 45, 0.18);
    align-items: end;
}

.book-item {
    position: relative;
    padding: 3.2rem 2rem 2.4rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

.book-item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 1.8rem;
    bottom: 1.8rem;
    right: 0;
    width: 1px;
    background: rgba(45, 45, 45, 0.12);
}

.book-item img {
    display: block;
    max-height: 22rem;
    width: auto;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.12));
    transition: transform 0.25s ease;
}

.book-item:hover img {
    transform: translateY(-6px);
}

.book-title {
    font-size: 1.3rem;
    text-align: center;
    margin-top: 1.3rem;
    color: var(--color-text);
    transition: color 0.25s ease;
}

.book-item:hover .book-title {
    color: var(--color-accent);
}

.book-author {
    font-size: 1.1rem;
    font-family: "Zen Old Mincho", serif;
    color: var(--color-subtext);
    margin-top: 0.4rem;
    letter-spacing: 0.08em;
}

@media screen and (max-width: 900px) and (min-width: 768px) {
    .book-item {
        padding: 2.4rem 1.2rem 2rem;
    }

    .book-item img {
        max-height: 18rem;
    }

    .book-title {
        font-size: 1.2rem;
        line-height: 1.5;
    }

    .book-author {
        font-size: 1rem;
    }
}

@media screen and (max-width: 767px) {
    .new-books {
        padding: 4rem 0;
    }

    .book-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .book-item {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .book-item::before {
        content: "";
        position: absolute;
        left: 1.8rem;
        right: 1.8rem;
        bottom: 0;
        height: 1px;
        background: rgba(45, 45, 45, 0.12);
    }

    .book-item:nth-last-child(-n + 2)::before {
        display: none;
    }


    .book-item img {
        height: 17rem;
        width: auto;
    }

    .book-title {
        font-size: 1rem;
        margin-top: 1rem;
        line-height: 1.6;
    }

    .book-author {
        font-size: 1rem;
        margin-top: auto;
    }

    .book-item:hover img {
        transform: none;
    }

    .book-item:hover .book-title {
        color: var(--color-text);
    }

    .nav-left a:hover::before,
    .nav-left a:hover::after,
    .nav-right a:hover::before,
    .nav-right a:hover::after {
        opacity: 0;
    }

    .footer-nav a:hover::before,
    .footer-nav a:hover::after {
        opacity: 0;
    }
}

/* Second Shelf
---------------------------------------- */

.second-shelf {
    padding: 6rem 0;
}

.used-label {
    font-size: 1rem;
    color: var(--color-accent);
    letter-spacing: 0.08em;
    margin-top: 0.8rem;
}

@media screen and (max-width: 767px) {
    .second-shelf {
        padding: 4rem 0;
    }
}

/* Visit
---------------------------------------- */

.visit {
    padding: 6rem 0 8rem;
}

.visit-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 5rem;
    margin-top: 2.4rem;
}

.visit-image img {
    display: block;
    width: 25rem;
    height: auto;
    border-radius: 1.4rem;
}

.visit-info {
    text-align: left;
}

.visit-name {
    font-size: 1.6rem;
    color: var(--color-text);
    margin-bottom: 1.2rem;
}

.visit-address,
.visit-hours,
.visit-access {
    font-size: 1.3rem;
    color: var(--color-subtext);
    line-height: 1.9;
}

.map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 2.4rem;
    font-size: 1.2rem;
    letter-spacing: 0.08em;
    color: var(--color-main);
    text-decoration: none;
    transition: color 0.25s ease;
}

.map-link img {
    display: block;
    width: 1.4rem;
    height: auto;
}

.map-link:hover {
    color: var(--color-accent);
}

@media screen and (max-width: 767px) {
    .visit {
        padding: 5rem 0 6rem;
    }

    .visit-content {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
        margin-top: 2rem;
    }

    .visit-image img {
        width: 100%;
        max-width: 28rem;
        border-radius: 1.2rem;
    }

    .visit-info {
        width: 100%;
        max-width: 28rem;
        text-align: left;
    }

    .visit-name {
        font-size: 1.5rem;
    }

    .visit-address,
    .visit-hours,
    .visit-access {
        font-size: 1.2rem;
        line-height: 1.8;
    }

    .map-link {
        margin-top: 2rem;
        font-size: 1.15rem;
    }
}


/* Footer
---------------------------------------- */
.footer {
    margin-top: 6rem;
    padding: 4rem 0;
    background: #1a2744;
}

.footer-inner {
    max-width: 110rem;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 3.2rem;
    margin-bottom: 2rem;
}

.footer-nav a {
    position: relative;
    font-size: 1.2rem;
    letter-spacing: 0.08em;
    color: #fff;
    text-decoration: none;
}

/* カッコ（非表示状態） */
.footer-nav a::before,
.footer-nav a::after {
    opacity: 0;
    transition: 0.3s;
    font-size: 1.1em;
    transform: translateY(-0.05em);
}

/* 左カッコ */
.footer-nav a::before {
    content: "(";
    margin-right: 0.3rem;
}

/* 右カッコ */
.footer-nav a::after {
    content: ")";
    margin-left: 0.3rem;
}

/* hover */
.footer-nav a:hover::before,
.footer-nav a:hover::after {
    color: var(--color-accent);
    opacity: 1;
}

.footer-copy {
    font-size: 1.1rem;
    letter-spacing: 0.04em;
    color: var(--color-accent);
}


@media screen and (max-width: 767px) {
    .footer {
        margin-top: 2rem;
        padding: 3.5rem 0 3.5rem;
    }

    .footer-nav {
        flex-direction: column;
        gap: 1.4rem;
    }

    .footer-nav a {
        font-size: 1.15rem;
    }

    .footer-copy {
        margin-top: 2rem;
        font-size: 1rem;
    }

    .footer-nav a::before,
    .footer-nav a::after {
        display: none;
    }
}