/* okurairi.net - Japanese-minimal museum archive
   Palette:
     #f7f3ed  Rice Paper      (background)
     #b0a898  Shelf Gray      (lines)
     #4a4a4a  Ink Dark        (body text)
     #8a8578  Dust Warm       (metadata)
     #e8e2d8  Linen Light     (subtle backgrounds)
     #c4b8a8  Aged Shelf      (hover)
     #2d2d2d  Deep Ink        (headings)
     #d4c8b8  Paper Edge      (borders)
*/

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

html {
    scroll-behavior: smooth;
}

body {
    background: #f7f3ed;
    color: #4a4a4a;
    font-family: "Noto Serif JP", serif;
    font-weight: 300;
    line-height: 2.0;
    font-size: 1rem;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Subtle paper grain overlay */
.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch' seed='3'/><feColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.52 0 0 0 0 0.47 0 0 0 0.04 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    background-repeat: repeat;
}

/* ======= Menu ======= */
.menu {
    position: fixed;
    top: 28px;
    right: 32px;
    z-index: 20;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    color: #8a8578;
    text-align: right;
}

.menu-toggle {
    background: none;
    border: none;
    color: #8a8578;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    cursor: pointer;
    padding: 4px 6px;
    transition: color 1.6s ease-in-out;
}

.menu-toggle:hover {
    color: #4a4a4a;
}

.menu-toggle::after {
    content: "";
    display: block;
    margin-top: 4px;
    height: 1px;
    width: 100%;
    background: #b0a898;
    transform-origin: right;
    transform: scaleX(0.4);
    transition: transform 1.4s ease-in-out;
}

.menu-toggle:hover::after,
.menu.open .menu-toggle::after {
    transform: scaleX(1);
}

.menu-links {
    list-style: none;
    margin-top: 14px;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 1.4s ease-in-out, transform 1.4s ease-in-out;
}

.menu.open .menu-links {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.menu-links li {
    line-height: 2.2;
}

.menu-links a {
    color: #8a8578;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 1.2s ease-in-out, border-color 1.2s ease-in-out;
}

.menu-links a:hover {
    color: #2d2d2d;
    border-bottom-color: #c4b8a8;
}

/* ======= Hero (the empty shelf) ======= */
.hero {
    position: relative;
    height: 100vh;
    min-height: 640px;
    width: 100%;
    z-index: 2;
}

.hero-shelf {
    position: absolute;
    bottom: 30vh;
    left: 10%;
    right: 10%;
}

.hero-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-bottom: 18px;
    opacity: 0;
    transform: translateY(8px);
    animation: hero-fade 3.6s ease-in-out 0.4s forwards;
}

.domain-name {
    font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
    font-weight: 400;
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: #2d2d2d;
    letter-spacing: 0.02em;
}

.domain-subtitle {
    font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    color: #8a8578;
    letter-spacing: 0.18em;
}

.hero-line {
    height: 1px;
    width: 100%;
    background: #b0a898;
    transform: scaleX(0);
    transform-origin: left center;
    animation: line-draw 4.5s ease-in-out 0.2s forwards;
}

@keyframes hero-fade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes line-draw {
    to {
        transform: scaleX(1);
    }
}

/* ======= Archive shelves ======= */
.archive {
    position: relative;
    z-index: 2;
    padding-top: 80px;
    padding-bottom: 240px;
}

.shelf {
    position: relative;
    max-width: 480px;
    margin: 0 auto;
    padding: 40px 0 20px;
    border-bottom: 1px solid #b0a898;
    margin-bottom: 250px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 2s ease-in-out, transform 2s ease-in-out;
    will-change: opacity, transform;
}

.shelf.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.shelf-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 0.75rem;
    font-weight: 300;
    color: #8a8578;
    letter-spacing: 0.18em;
    margin-bottom: 28px;
}

.shelf-number {
    color: #b0a898;
}

.shelf-date {
    color: #8a8578;
}

.shelf-title {
    font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
    font-weight: 400;
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: #2d2d2d;
    line-height: 1.5;
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.shelf-jp {
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    color: #8a8578;
    letter-spacing: 0.12em;
    margin-bottom: 22px;
}

.shelf-desc {
    font-family: "Noto Serif JP", serif;
    font-weight: 300;
    font-size: 1rem;
    line-height: 2.0;
    color: #4a4a4a;
    margin-bottom: 26px;
}

.shelf-tag {
    font-family: "Noto Sans JP", sans-serif;
    font-size: 0.7rem;
    font-weight: 300;
    color: #b0a898;
    letter-spacing: 0.22em;
    text-transform: lowercase;
    padding-bottom: 8px;
    transition: color 1.6s ease-in-out;
}

.shelf:hover .shelf-tag {
    color: #c4b8a8;
}

.shelf:hover {
    border-bottom-color: #c4b8a8;
}

/* ======= Storage room (footer) ======= */
.storage {
    position: relative;
    z-index: 2;
    max-width: 560px;
    margin: 0 auto;
    padding: 120px 24px 180px;
    text-align: center;
}

.storage-line {
    height: 1px;
    background: #b0a898;
    width: 100%;
    margin: 60px 0;
    position: relative;
}

.storage-line-middle {
    background: transparent;
    margin: 60px 0;
    padding: 24px 0;
    border-top: 1px solid #b0a898;
    border-bottom: 1px solid #b0a898;
    background-color: rgba(232, 226, 216, 0.35);
}

.storage-text {
    font-family: "Noto Serif JP", serif;
    font-weight: 300;
    font-size: 1rem;
    color: #4a4a4a;
    line-height: 2.2;
    margin-bottom: 6px;
}

.storage-text-jp {
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    color: #8a8578;
    letter-spacing: 0.12em;
}

.storage-footer {
    margin-top: 80px;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 0.7rem;
    font-weight: 300;
    color: #b0a898;
    letter-spacing: 0.22em;
}

.storage-footer-jp {
    color: #8a8578;
}

/* ======= Responsive ======= */
@media (max-width: 720px) {
    .hero-shelf {
        left: 8%;
        right: 8%;
        bottom: 28vh;
    }

    .shelf {
        max-width: 88%;
        margin-bottom: 200px;
    }

    .archive {
        padding-bottom: 180px;
    }

    .menu {
        top: 22px;
        right: 22px;
    }

    .storage {
        padding: 80px 18px 120px;
    }
}

@media (max-width: 420px) {
    .shelf {
        margin-bottom: 160px;
    }

    .archive {
        padding-top: 40px;
        padding-bottom: 120px;
    }
}
