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

/* BODY */
body {
    font-family: "Lato", sans-serif;
    background: #f5f3ef;
    color: #1a1a1a;
    padding: 30px;
}

/* CONTAINER */
.container {
    max-width: 1400px;
    width: 100%;
    margin: auto;
}

/* HERO */
.hero h1 {
  font-family: "Lato", sans-serif;
  font-weight: 300;
  font-style: normal;
  font-size: 50px;
}

.hero h2 {
  font-family: "Lato", sans-serif;
  font-weight: 200;
  font-style: normal;
  font-size: 40px;
}

.hero p {
    margin-top: 20px;
    max-width: 1000px;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    text-align: justify;
    text-justify: inter-word;   
    hyphens: auto;
}

/* HERO - subpage */
.hero-subpage {
    display: flex;
    align-items: center;
    gap: 32px;
}

.hero-brand {
    display: flex;
    flex-direction: column;
}

.hero-brand-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

.hero-brand-link:hover h1,
.hero-brand-link:hover h2 {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.hero-divider {
    width: 1px;
    height: 72px;
    background-color: #bbb;
     flex-shrink: 0;
}

.hero-category {
    font-family: "Lato", sans-serif;
    font-weight: 400;
    font-size: 30px;
    letter-spacing: 4px;
    margin: 0;
    color: #575656;
    
}

/* GRID */
.grid {
    font-family: "Lato", sans-serif;
    font-weight: 300;
    font-style: bold;
    margin-top: 60px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 220px;
    gap: 20px;
    
}

/* BOOK GRID */
.book-grid {
    margin-top: 50px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 60px 5px;
}

/* BOOK ITEM */
.book {
    display: flex;
    flex-direction: column;
}

/* IMAGE */
.book img {
    width: 100%;
    aspect-ratio: 2 / 3;  
    width: 160px;
    height:250px;
    object-fit:scale-down;
    border-radius: 1px;
    transition: transform 0.3s ease;
}

/* TITLE */
.book p {
    margin-top: 0px;
    width: 160px;
    text-align: center;
    font-size: 13px;
    line-height: 1.4;
    color: #444;
}

/* HOVER */
.book:hover img {
    transform: scale(1.03);
}

/* TILE */
.tile {
    position: relative;
    padding: 25px;
    display: flex;
    align-items: flex-end;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    border-radius: 4px;
    transition: transform 0.3s ease;
    
}

.tile span {
    font-size: 14px;
    letter-spacing: 2px;
    z-index: 1; /* keeps text above overlay */
}

/* SUBTLE OVERLAY LAYER */
.tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.05);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* HOVER */
.tile:hover {
    transform: translateY(-3px);
}

.tile:hover::after {
    opacity: 1;
}

/* CATEGORY COLORS */
.engineering { background: #bfc2c0; }
.codes { background: #e8e3d9; }
.tall { background: #2c2c2c; color: #ffffff; }
.philosophy { background: #d9c7aa; }

.sustainability {
    background: #7c8a6a;
    color: #ffffff;
    grid-column: span 2;
}

/* CATEGORY IMAGES */
.engineering {
    background-image: url('images/engineering.jpg');
    background-color: hwb(150 48% 51% / 0.11);
    background-blend-mode: multiply;
    background-size:contain;
    background-position: right;
    background-repeat: no-repeat;
    background-repeat: no-repeat;
}

.codes {
    background-image: url('images/codes.jpg');
    background-color: #e8e3d9c2;
    background-blend-mode: multiply;
    background-size:contain;
    background-position: right;
    background-repeat: no-repeat;
    background-repeat: no-repeat;
}

.tall {
    background-image: url('images/tall.jpg');
    background-color: #2c2c2c65;
    background-blend-mode: multiply;
    color: white;
    background-size:contain;
    background-position: right;
    background-repeat: no-repeat;
    background-repeat: no-repeat;
}

.philosophy {
    background-image: url('images/philosophy.jpg');
    background-color: #d9c7aa7e;
    background-blend-mode: multiply;
    background-size:contain;
    background-position: right;
    background-repeat: no-repeat;
    background-repeat: no-repeat;
}

.sustainability {
    background-image: url('images/sustainability.jpg');
    background-color: #7c8a6a62;
    background-blend-mode: multiply;
    color: white;
    grid-column: span 1;
    background-size:contain;
    background-position: right;
    background-repeat: no-repeat;
    background-repeat: no-repeat;
}

/* FOOTER */
.footer {
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #777;
}

/* SIDE TEXT */
.side-text {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: rotate(90deg) translateY(-50%);
    transform-origin: right;
    font-size: 12px;
    letter-spacing: 3px;
    color: #aaa;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    body {
        padding: 30px;
    }

    .hero h1 {
        font-size: 48px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .sustainability {
        grid-column: span 1;
    }

    .side-text {
        display: none;
    }
}