/* --- BASE & RESET --- */
* { box-sizing: border-box; scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; }

body, html {
    margin: 0; padding: 0;
    font-family: 'Archivo Narrow', sans-serif;
    width: 100%;
    min-height: 100svh;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #f4f1ea;
    background-image: radial-gradient(#ddd9ce 1.2px, transparent 1.2px);
    background-size: 24px 24px;
    color: black;
}

/* --- TOP-LEFT BACK ARROW --- */
.back-arrow {
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 9999;

    padding: 6px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;
    color: #000;
    font-size: 28px;
    line-height: 1;

    background: transparent;
    border: none;
    text-shadow: 0 1px 0 rgba(244, 241, 234, 0.9);

    transition: transform 0.12s ease, opacity 0.12s ease;
}

.back-arrow:hover {
    opacity: 0.7;
}

.back-arrow:active {
    transform: translateX(-1px);
}

.back-arrow:focus-visible {
    outline: 3px solid #000;
    outline-offset: 2px;
}

/* --- NOTEBOOKS GRID (Original layout) --- */
#notebooks-container {
    width: 100%;
    min-height: 100svh;
}

#notebooks-stage {
    padding: 90px 50px 60px 50px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    align-items: stretch;
    max-width: 1400px;
    margin: 0 auto;
}

.notebook-item {
    position: relative;
    width: 100%;
    transition: transform 0.4s ease;
}

.notebook-item img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transform-origin: center;
    transition: transform 0.35s ease;
}

/* --- SLIGHT TILTS --- */
.notebook-item:nth-child(odd) img { transform: rotate(-1deg); }
.notebook-item:nth-child(even) img { transform: rotate(1deg); }
.notebook-item:nth-child(3n) img { transform: rotate(0.6deg); }

.notebook-item:hover img { transform: rotate(0deg); }

/* --- MOBILE --- */
@media (max-width: 800px) {
    .back-arrow { top: 12px; left: 12px; }
    #notebooks-stage {
        padding: 70px 20px 50px 20px;
        gap: 28px;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

/* --- TABLET --- */
@media (max-width: 1100px) {
    #notebooks-stage { gap: 40px; }
}