/* ===========================================
   Design Tokens
   =========================================== */
:root {
    --bg-page: #f7f5f0;
    --bg-container: #ffffff;
    --text-primary: #2c2c2c;
    --text-secondary: #5a5a5a;
    --text-muted: #9ca3af;
    --accent: #8a7968;
    --accent-light: #b8a898;
    --line-color: #d1d1d1;
    --line-subtle: #e8e5df;
    --container-width: 900px;
    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'Noto Sans JP', sans-serif;
    --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===========================================
   Reset & Base
   =========================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--text-primary);
}

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

/* ===========================================
   Container (PAPER-style centered column)
   =========================================== */
.app-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 3rem 4rem;
    background-color: var(--bg-container);
    min-height: 100vh;
    border-left: 1px solid var(--line-color);
    border-right: 1px solid var(--line-color);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.12);
}

/* ===========================================
   Hairline divider
   =========================================== */
.hairline {
    height: 1px;
    background-color: var(--line-color);
    width: 100%;
    margin: 2rem 0;
}

/* ===========================================
   Animations
   =========================================== */
.js-fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 1.2s var(--ease-smooth), transform 1.2s var(--ease-smooth);
    will-change: opacity, transform;
}

.js-fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===========================================
   Navigation
   =========================================== */
.site-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1.5rem 0;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.site-nav a {
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    text-transform: uppercase;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
}

/* ===========================================
   Section Title (shared)
   =========================================== */
.section-title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3.5rem;
}

.title-line {
    width: 3rem;
    height: 1px;
    background-color: var(--line-color);
}

.section-title {
    margin: 0 1.25rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--text-primary);
}

/* ===========================================
   Section spacing
   =========================================== */
.section {
    padding: 3.5rem 0;
}

/* ===========================================
   Photo Frame (shared)
   =========================================== */
.photo-frame {
    padding: 10px;
    background: #fff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: box-shadow 0.5s ease;
}

.photo-frame:hover {
    box-shadow: 0 20px 30px -5px rgba(0, 0, 0, 0.1);
}

.photo-img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease;
    display: block;
}

.photo-img.loaded {
    opacity: 1;
}

.photo-caption {
    font-family: var(--font-display);
    font-size: 0.8rem;
    text-align: center;
    margin-top: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ===========================================
   Footer
   =========================================== */
.footer {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--line-color);
    text-align: center;
}

.footer h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-style: italic;
    font-weight: 400;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.links-list {
    list-style: none;
    padding: 0;
    margin: 0 0 3rem;
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.link-item a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--text-primary);
    padding-bottom: 2px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.link-item a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.copyright {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

/* ===========================================
   Modal
   =========================================== */
.modal {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 200;
    background-color: rgba(247, 245, 240, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    align-items: center;
    justify-content: center;
    padding: 2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-content {
    background: white;
    padding: 1rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    max-width: 90vw;
    max-height: 90vh;
    transform: scale(0.95);
    transition: transform 0.5s var(--ease-smooth);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-img {
    max-height: 85vh;
    max-width: 100%;
    display: block;
    object-fit: contain;
}

/* ===========================================
   "View All" link
   =========================================== */
.view-all-link {
    text-align: center;
    margin-top: 2.5rem;
}

.view-all-link a {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-style: italic;
    letter-spacing: 0.08em;
    color: var(--accent);
    border-bottom: 1px solid var(--accent-light);
    padding-bottom: 2px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.view-all-link a:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
}

/* ===========================================
   Responsive
   =========================================== */
@media (max-width: 767px) {
    .app-container {
        padding: 2rem 1.5rem;
        border-left: none;
        border-right: none;
        box-shadow: none;
    }

    .site-nav {
        gap: 1.25rem;
    }

    .site-nav a {
        font-size: 0.78rem;
    }

    .links-list {
        gap: 1.5rem;
    }
}