/* ==========================================================
   HOMEPAGE V2
   Append this block to the end of styles.css.
   All rules are scoped to .home-page so internal pages are unaffected.
   ========================================================== */

.home-page,
.home-page * {
    box-sizing: border-box;
}

.home-page {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto 60px;
    color: #2b261f;
    font-family: Roboto, Arial, sans-serif;
}

.home-intro,
.home-section,
.home-map-feature,
.home-directory {
    background: rgba(248, 242, 226, 0.96);
    border: 1px solid rgba(75, 58, 34, 0.42);
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.home-intro {
    position: relative;
    padding: clamp(32px, 6vw, 72px);
    overflow: hidden;
    text-align: center;
}

.home-intro::before {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 0%, rgba(181, 147, 73, 0.23), transparent 55%),
        linear-gradient(135deg, rgba(85, 26, 139, 0.06), transparent 45%);
}

.home-intro > * {
    position: relative;
}

.home-eyebrow {
    margin: 0 0 8px;
    color: #765a24;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.home-intro h1,
.home-section-heading h2,
.home-map-copy h2 {
    margin: 0;
    color: #3d2455;
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.15;
}

.home-intro h1 {
    font-size: clamp(2rem, 5vw, 4rem);
}

.home-intro-text {
    max-width: 720px;
    margin: 20px auto 0;
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.75;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 26px;
}

.home-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid #6d5526;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.home-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.home-button-primary {
    color: white;
    background: #4c2b66;
    border-color: #4c2b66;
}

.home-button-secondary {
    color: #3b2d16;
    background: rgba(255, 255, 255, 0.5);
}

.home-section {
    margin-top: 28px;
    padding: clamp(22px, 4vw, 42px);
}

.home-section-heading {
    margin-bottom: 22px;
}

.home-section-heading h2,
.home-map-copy h2 {
    font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.home-section-heading-with-link {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}

.home-text-link,
.home-card-link {
    color: #4c2b66;
    font-weight: 700;
    text-underline-offset: 3px;
}

.home-destination-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.home-destination-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 22px;
    background: rgba(255, 255, 255, 0.44);
    border: 1px solid rgba(75, 58, 34, 0.3);
    border-top: 4px solid #8a6c30;
    border-radius: 12px;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.home-destination-card:hover {
    transform: translateY(-4px);
    border-color: #8a6c30;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.home-destination-card h3,
.home-book-copy h3,
.home-directory h3 {
    margin: 0;
    color: #2d2431;
    font-family: Georgia, "Times New Roman", serif;
}

.home-destination-card h3 {
    font-size: 1.35rem;
}

.home-destination-card p {
    flex-grow: 1;
    margin: 12px 0 16px;
    line-height: 1.65;
}

.home-card-link {
    display: inline-block;
    margin-bottom: 16px;
}

.home-secondary-links {
    margin: 0;
    padding: 14px 0 0;
    border-top: 1px solid rgba(75, 58, 34, 0.22);
    list-style: none;
}

.home-secondary-links li + li {
    margin-top: 5px;
}

.home-secondary-links a,
.home-directory a,
.home-book-copy a {
    color: #374e6d;
    text-decoration-color: rgba(55, 78, 109, 0.35);
    text-underline-offset: 3px;
}

.home-book-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.home-book-card {
    min-width: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.48);
    border: 1px solid rgba(75, 58, 34, 0.32);
    border-radius: 12px;
    box-shadow: 0 7px 16px rgba(0, 0, 0, 0.13);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.home-book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.22);
}

.home-book-card > a {
    display: block;
}

.home-book-card img {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 0;
}

.home-book-copy {
    padding: 14px;
}

.home-book-series {
    margin: 0 0 5px;
    color: #705c38;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.home-book-copy h3 {
    margin-bottom: 10px;
    font-size: 1.05rem;
    line-height: 1.25;
}

.home-book-copy a,
.home-status {
    font-size: 0.85rem;
    font-weight: 700;
}

.home-status {
    display: inline-block;
    padding: 4px 8px;
    color: #fff;
    background: #4c2b66;
    border-radius: 999px;
}

.home-book-card-forthcoming {
    border-color: rgba(76, 43, 102, 0.56);
}

.home-map-feature {
    display: grid;
    grid-template-columns: minmax(260px, 0.75fr) minmax(400px, 1.25fr);
    gap: 28px;
    align-items: center;
    margin-top: 28px;
    padding: clamp(22px, 4vw, 42px);
}

.home-map-copy p:not(.home-eyebrow) {
    line-height: 1.7;
}

.home-map-copy .home-actions {
    justify-content: flex-start;
}

.home-map-image {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(75, 58, 34, 0.42);
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

.home-map-image img {
    display: block;
    width: 100%;
    transition: transform 300ms ease, filter 300ms ease;
}

.home-map-image:hover img {
    transform: scale(1.025);
    filter: saturate(1.06) contrast(1.03);
}

.home-directory {
    margin-top: 28px;
    overflow: hidden;
}

.home-directory summary {
    margin: 0;
    padding: 18px 22px;
    color: #2d2431;
    background: rgba(181, 147, 73, 0.16);
    font-weight: 700;
    cursor: pointer;
}

.home-directory-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    padding: 24px;
}

.home-directory section {
    min-width: 0;
}

.home-directory h3 {
    margin-bottom: 10px;
}

.home-directory a {
    display: block;
    padding: 3px 0;
}

@media screen and (max-width: 1000px) {
    .home-destination-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-book-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-directory-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 720px) {
    .home-page {
        width: min(100% - 20px, 1180px);
        margin-top: 14px;
    }

    .home-section-heading-with-link {
        display: block;
    }

    .home-section-heading-with-link .home-text-link {
        display: inline-block;
        margin-top: 10px;
    }

    .home-map-feature {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 520px) {
    .home-destination-grid,
    .home-book-grid,
    .home-directory-grid {
        grid-template-columns: 1fr;
    }

    .home-book-card {
        display: grid;
        grid-template-columns: 110px 1fr;
    }

    .home-book-card img {
        height: 100%;
        min-height: 165px;
    }

    .home-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .home-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-button,
    .home-destination-card,
    .home-book-card,
    .home-map-image img {
        transition: none;
    }

    .home-button:hover,
    .home-destination-card:hover,
    .home-book-card:hover,
    .home-map-image:hover img {
        transform: none;
    }
}
