.hero {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(390px, 0.78fr);
    gap: 56px;
    align-items: center;
}

.hero-media {
    position: relative;
    min-height: 520px;
}

.hero-media-link {
    position: absolute;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    background: #ebe9e3;
    box-shadow: 0 20px 48px rgba(24, 20, 16, 0.16);
    outline: 1px solid rgba(0, 0, 0, 0.08);
    outline-offset: -1px;
    transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-media-link img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.hero-media-link:nth-child(1) {
    z-index: 3;
    top: 18px;
    right: 88px;
    width: 270px;
    aspect-ratio: 2 / 3;
    transform: rotate(-2deg);
}

.hero-media-link:nth-child(2) {
    z-index: 2;
    top: 88px;
    right: 0;
    width: 230px;
    aspect-ratio: 2 / 3;
    transform: rotate(4deg);
}

.hero-media-link:nth-child(3) {
    z-index: 4;
    right: 260px;
    bottom: 2px;
    width: 172px;
    aspect-ratio: 2 / 3;
    transform: rotate(-6deg);
}

.home-library-preview {
    padding: 24px 0 72px;
    border-top: 1px solid var(--reading-border);
}

.home-library-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.home-library-heading h2 {
    margin-top: 8px;
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.12;
    letter-spacing: 0;
}

.home-library-heading a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    color: var(--site-accent);
    font-weight: 700;
}

.home-library-list {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr 0.85fr;
    gap: 18px;
}

.home-library-item {
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(23, 23, 23, 0.12);
    transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.home-library-item:first-child {
    grid-row: span 2;
}

.home-library-image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #ebe9e3;
}

.home-library-item:first-child .home-library-image {
    aspect-ratio: 4 / 3;
}

.home-library-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.home-library-copy {
    padding: 20px;
}

.home-library-meta {
    display: block;
    color: var(--site-accent);
    font-size: 0.72rem;
    font-weight: 800;
}

.home-library-copy h3 {
    margin-top: 8px;
    font-family: var(--font-serif);
    font-size: 1.22rem;
    line-height: 1.4;
}

.home-library-copy p {
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.65;
}

@media (hover: hover) {
    .hero-media-link:hover {
        z-index: 6;
        transform: rotate(0) translateY(-6px);
    }

    .home-library-item:hover {
        color: inherit;
        text-decoration: none;
        transform: translateY(-3px);
        box-shadow: 0 12px 32px rgba(23, 23, 23, 0.14);
    }
}

@media (max-width: 980px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .hero-media {
        min-height: 430px;
        max-width: 600px;
    }

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

    .home-library-item:first-child {
        grid-column: 1 / -1;
        grid-row: auto;
    }
}

@media (max-width: 620px) {
    .hero-media {
        min-height: 318px;
        margin-top: -8px;
    }

    .hero-media-link:nth-child(1) {
        right: 54px;
        width: 180px;
    }

    .hero-media-link:nth-child(2) {
        top: 60px;
        width: 150px;
    }

    .hero-media-link:nth-child(3) {
        right: 190px;
        width: 112px;
    }

    .home-library-heading {
        align-items: start;
        flex-direction: column;
        gap: 8px;
    }

    .home-library-list {
        grid-template-columns: 1fr;
    }

    .home-library-item {
        grid-template-columns: 112px minmax(0, 1fr);
        grid-template-rows: none;
    }

    .home-library-item:first-child {
        grid-column: auto;
        grid-row: auto;
    }

    .home-library-image,
    .home-library-item:first-child .home-library-image {
        height: 100%;
        min-height: 168px;
        aspect-ratio: auto;
    }

    .home-library-copy {
        padding: 16px;
    }

    .home-library-copy p {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-media-link,
    .home-library-item {
        transition: none;
    }
}

/* Clarity reframe: the homepage explains the product before its history. */
.page-shell {
    width: 100%;
    max-width: none;
}

.page-shell > .section,
.home-library-preview,
.offer-map {
    width: min(1120px, calc(100% - 40px));
    margin-inline: auto;
}

.hero {
    position: relative;
    min-height: min(780px, calc(88svh - 62px));
    display: flex;
    align-items: flex-end;
    padding: 72px max(24px, calc((100vw - 1120px) / 2)) 74px;
    background-image:
        linear-gradient(90deg, rgba(18, 16, 13, 0.72) 0%, rgba(18, 16, 13, 0.42) 43%, rgba(18, 16, 13, 0.08) 78%),
        url("/readingclub/assets/hero-community-support.jpg");
    background-position: center 38%;
    background-size: cover;
}

.hero-copy {
    position: relative;
    z-index: 1;
    max-width: 760px;
    color: white;
}

.hero-copy .eyebrow {
    color: rgba(255, 255, 255, 0.76);
}

.hero-copy h1 {
    max-width: none;
    margin-bottom: 14px;
    color: white;
    font-size: clamp(3.8rem, 8vw, 7.8rem);
    line-height: 0.94;
    letter-spacing: 0;
}

.hero-promise {
    display: block;
    max-width: 25em;
    color: white;
    font-family: var(--font-serif);
    font-size: clamp(1.45rem, 3vw, 2.25rem);
    font-weight: 600;
    line-height: 1.35;
    text-wrap: balance;
}

.hero-copy p {
    max-width: 34rem;
    margin-top: 16px;
    margin-bottom: 26px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1rem;
    line-height: 1.75;
}

.hero-copy .primary-btn {
    box-shadow: none;
}

.hero-copy > * {
    animation: hero-enter 560ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-copy > :nth-child(2) {
    animation-delay: 70ms;
}

.hero-copy > :nth-child(3) {
    animation-delay: 130ms;
}

.hero-copy > :nth-child(4) {
    animation-delay: 190ms;
}

.hero-copy > :nth-child(5) {
    animation-delay: 250ms;
}

@keyframes hero-enter {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.offer-map {
    display: grid;
    grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1.5fr);
    gap: 64px;
    padding: 76px 0 84px;
}

.offer-heading {
    align-self: start;
    position: sticky;
    top: 92px;
}

.offer-heading h2 {
    margin-top: 10px;
    font-family: var(--font-serif);
    font-size: clamp(2rem, 3.6vw, 3.3rem);
    line-height: 1.12;
    letter-spacing: 0;
    text-wrap: balance;
}

.offer-list {
    border-top: 1px solid var(--reading-border);
}

.offer-item {
    min-height: 154px;
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr) auto;
    gap: 22px;
    align-items: center;
    padding: 26px 4px;
    border-bottom: 1px solid var(--reading-border);
    color: inherit;
    text-decoration: none;
    transition-property: transform, opacity;
    transition-duration: 180ms;
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

.offer-number {
    align-self: start;
    padding-top: 5px;
    color: var(--site-accent);
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.offer-copy strong,
.offer-copy small {
    display: block;
}

.offer-copy strong {
    font-family: var(--font-serif);
    font-size: 1.55rem;
    line-height: 1.3;
}

.offer-copy small {
    max-width: 37rem;
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.offer-action {
    color: var(--site-accent);
    font-size: 0.86rem;
    font-weight: 700;
    white-space: nowrap;
}

.home-library-preview {
    padding-top: 68px;
    padding-bottom: 84px;
}

.home-library-list {
    grid-template-columns: 1.25fr 0.875fr 0.875fr;
}

.home-library-item {
    border-radius: 8px;
}

.page-shell > .section {
    padding-top: 64px;
    padding-bottom: 76px;
}

.path-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid var(--reading-border);
    border-bottom: 1px solid var(--reading-border);
}

.path-card,
.path-card-featured {
    min-height: 250px;
    padding: 28px 28px 30px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.path-card + .path-card {
    border-left: 1px solid var(--reading-border);
}

.path-card strong {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    line-height: 1.45;
}

.path-card p {
    margin-top: auto;
}

@media (hover: hover) {
    .offer-item:hover {
        color: inherit;
        text-decoration: none;
        opacity: 0.76;
        transform: translateX(5px);
    }

    .path-card:hover {
        border-color: transparent;
        box-shadow: none;
        color: inherit;
        transform: translateY(-3px);
    }
}

@media (max-width: 820px) {
    .hero {
        min-height: min(720px, calc(86svh - 58px));
        padding: 68px 24px 48px;
        background-image:
            linear-gradient(90deg, rgba(18, 16, 13, 0.7) 0%, rgba(18, 16, 13, 0.34) 58%, rgba(18, 16, 13, 0.08) 100%),
            url("/readingclub/assets/hero-community-support.jpg");
        background-position: 58% center;
    }

    .hero-copy h1 {
        font-size: clamp(3.6rem, 15vw, 5.6rem);
    }

    .offer-map {
        grid-template-columns: 1fr;
        gap: 32px;
        padding-top: 58px;
    }

    .offer-heading {
        position: static;
    }

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

    .path-card {
        min-height: 0;
        padding-inline: 4px;
    }

    .path-card + .path-card {
        border-top: 1px solid var(--reading-border);
        border-left: 0;
    }
}

@media (max-width: 620px) {
    .page-shell > .section,
    .home-library-preview,
    .offer-map {
        width: min(100% - 28px, 1120px);
    }

    .hero {
        width: 100%;
        min-height: calc(83svh - 56px);
        padding: 54px 20px 38px;
        background-position: 59% center;
    }

    .hero-copy h1 {
        font-size: 3.65rem;
    }

    .hero-promise {
        font-size: 1.45rem;
    }

    .hero-copy p {
        max-width: 29rem;
        font-size: 0.92rem;
    }

    .offer-map {
        padding-bottom: 58px;
    }

    .offer-item {
        min-height: 0;
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 14px;
        padding: 24px 0;
    }

    .offer-action {
        grid-column: 2;
        margin-top: -4px;
    }

    .home-library-preview {
        padding-top: 52px;
        padding-bottom: 58px;
    }

    .home-library-list {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-copy > * {
        animation: none;
    }

    .offer-item {
        transition: none;
    }
}
