


:root {
    
    --bg: #fafaf7;             
    --surface: #ffffff;        
    --ink: #1a1a1a;            
    --ink-soft: #6b6b6b;       
    --line: #ececec;           
    --accent: #2d5f4f;         

    
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --font-serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;

    
    --ease: cubic-bezier(0.22, 1, 0.36, 1);   
    --t-fast: 220ms;
    --t-med:  420ms;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}


body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.6;
    padding: 0 24px;
}


.page-title {
    font-family: var(--font-serif);
    color: var(--ink);
    font-weight: 500;
    font-size: clamp(36px, 5vw, 56px);   
    letter-spacing: -0.02em;
    text-align: center;
    margin: 64px 0 12px;
    animation: title-rise var(--t-med) var(--ease) both;
}


.page-title::after {
    content: "";
    display: block;
    width: 0;
    height: 1px;
    background: var(--ink);
    margin: 20px auto 0;
    animation: line-grow 700ms var(--ease) 200ms forwards;
}


.page-subtitle {
    color: var(--ink-soft);
    font-size: 14px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 56px;
    animation: fade-in var(--t-med) var(--ease) 150ms both;
}


.book-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    width: 100%;
    max-width: 1100px;
    padding: 0;
    margin-bottom: 80px;
}

.book-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    
    opacity: 0;
    animation: card-rise var(--t-med) var(--ease) forwards;
}

.book-item:nth-child(1) { animation-delay: 250ms; }
.book-item:nth-child(2) { animation-delay: 330ms; }
.book-item:nth-child(3) { animation-delay: 410ms; }
.book-item:nth-child(4) { animation-delay: 490ms; }


.book-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    outline-offset: 4px;
}

.book-title {
    font-family: var(--font-sans);
    color: var(--ink);
    font-weight: 500;
    font-size: 17px;
    letter-spacing: 0.02em;
    margin: 24px 0 0;
    position: relative;
    padding-bottom: 4px;
    text-decoration: none;
    transition: color var(--t-fast) var(--ease);
}


.book-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--t-fast) var(--ease);
}

.book-card:hover .book-title,
.book-card:focus-visible .book-title {
    color: var(--accent);
}

.book-card:hover .book-title::after,
.book-card:focus-visible .book-title::after {
    transform: scaleX(1);
}


.book-image {
    width: 100%;
    max-width: 200px;
    aspect-ratio: 3 / 4;        
    object-fit: cover;
    display: block;
    border-radius: 6px;
    background: var(--line);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition:
        transform var(--t-med) var(--ease),
        box-shadow var(--t-med) var(--ease);
}

.book-item:hover .book-image {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.18);
}


.site-footer {
    margin-top: auto;
    padding: 28px 0 40px;
    text-align: center;
    width: 100%;
    border-top: 1px solid var(--line);
}

.site-footer a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 0.05em;
    transition: color var(--t-fast) var(--ease);
}

.site-footer a:hover {
    color: var(--accent);
}


@keyframes title-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes card-rise {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes line-grow {
    from { width: 0; }
    to   { width: 48px; }   
}


@media (max-width: 900px) {
    .book-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px 24px;
    }
}

@media (max-width: 480px) {
    .book-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px 16px;
    }

    .page-title {
        margin-top: 48px;
    }

    .book-image {
        max-width: 150px;
    }
}


@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
