/* Homepage finale; shared category-page styles are intentionally untouched. */
.home-page .section-stack:has(> .home-finale-scene) { gap: 1rem; }
.home-music-album .home-streaming-links { grid-auto-rows: 1fr; }
.home-streaming-links .platform-link {
    color: #fff;
    background: var(--platform-color);
    border-color: var(--platform-color);
    gap: 0.45rem;
    box-shadow: 0 2px 4px rgba(27, 47, 81, 0.16);
}
.platform-spotify { --platform-color: #157d3f; }
.platform-applemusic { --platform-color: #cf2444; }
.platform-amazon { --platform-color: #7137b8; }
.platform-tidal { --platform-color: #171717; }
.platform-link img { width: 1.2rem; height: 1.2rem; object-fit: contain; filter: brightness(0) invert(1); }
.home-activity .platform-link:hover { background: var(--platform-color); border-color: var(--platform-color); filter: brightness(1.1); }

.home-music-book .home-activity-button {
    color: #fff;
    background: #7137b8;
    border-color: #7137b8;
    box-shadow: 0 3px 5px rgba(61, 23, 114, 0.25);
}
.home-music-book .home-activity-button:hover { background: #6029a2; border-color: #6029a2; }

/* Keep the homepage finale aligned with the compact spacing used by the other
   homepage sections. */
.home-finale-scene { position: relative; display: grid; gap: 1rem; min-width: 0; isolation: isolate; }
.home-page .things-teaser.home-magic-refresh {
    --things-visible: 8;
    --things-gap: 0.55rem;
    padding: 1.25rem 2.25rem 0.2rem;
    border: 0;
    border-radius: 1rem;
    background: linear-gradient(180deg, #fff1d5, #fffbef 58%, #fff0d4);
    box-shadow: none;
}
.home-magic-refresh .things-library-vine { display: none; }
.home-magic-refresh .things-library-header {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: center;
    padding: 0;
    gap: 1rem;
}
.home-magic-refresh .things-library-heading { transform: none; gap: 0.15rem; justify-items: center; }
.home-page .home-magic-refresh .section-header {
    margin: 0;
    font: 900 clamp(1.5rem, 3.3vw, 3.1rem) / 1.15 var(--font-ui);
    letter-spacing: -0.035em;
    white-space: nowrap;
    transform: none;
    text-shadow: 0 2px #fff;
}
.home-page .home-magic-refresh .section-subtitle {
    width: 100%;
    min-width: 0;
    min-height: 2.7rem;
    aspect-ratio: auto;
    height: 3.3rem;
    padding: 0.5rem 2.5rem;
    font-size: clamp(0.85rem, 1.4vw, 1.3rem);
    line-height: 1.2;
    white-space: normal;
}
.home-page .home-magic-refresh .things-teaser-link {
    width: 100%;
    max-width: 100%;
    min-height: 4.5rem;
    aspect-ratio: 5.2;
    margin: 0;
    padding: 1rem 2.5rem;
    gap: 0.65rem;
    border: 0;
    border-radius: 0;
    background: url('../web-assets/home-things-cta-v3.webp') center / 100% 100% no-repeat;
    font-size: clamp(0.95rem, 1.45vw, 1.35rem);
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: none;
}
.home-magic-refresh .things-teaser-chest { width: clamp(2rem, 3vw, 3rem); }
.home-magic-refresh .things-library-sparkle { opacity: 1; }
.home-magic-refresh .things-library-scroll { margin-top: 0.6rem; }
.home-page .home-magic-refresh .thing-tile {
    aspect-ratio: 0.85;
    padding: 0.4rem 0.35rem 0.6rem;
    border: 1px solid #e7d9bd;
    border-radius: 0.75rem;
    background: #fffdf7;
    box-shadow: 0 2px 5px rgba(91, 70, 45, 0.12);
    font-size: clamp(0.8rem, 1.1vw, 1rem);
}
.home-page .home-magic-refresh .thing-tile span { white-space: normal; overflow: visible; text-overflow: clip; text-shadow: none; text-align: center; line-height: 1.25; }
.home-magic-refresh .things-library-ledge { height: 2.2rem; margin-top: -0.35rem; }

.home-family-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 12.5rem;
    gap: 0.6rem 1.5rem;
    padding: 1rem 2.25rem;
    border: 2px solid #fff;
    border-radius: 1.3rem;
    background: linear-gradient(180deg, #fff, #e4effb);
    color: #193a78;
}
.home-family-header { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 1.4rem; }
.home-family-header h2 { display: flex; align-items: center; gap: 0.6rem; margin: 0; color: #b52268; font: 900 clamp(1.35rem, 2.3vw, 2rem) / 1.2 var(--font-ui); }
.home-family-header h2 img { width: 2rem; height: 2rem; object-fit: contain; }
.home-family-header p { margin: 0; font-size: 0.8rem; font-weight: 800; }
.home-family-content { display: contents; }
.home-family-points { grid-column: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; }
.home-family-point { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); align-items: center; gap: 0.6rem; }
.home-family-point + .home-family-point { border-left: 1px solid #c5d8ed; padding-left: 0.8rem; }
.home-family-point > img { width: 100%; height: 6rem; object-fit: contain; }
.home-family-point h3 { margin: 0 0 0.35rem; color: #253587; font: 900 1rem / 1.25 var(--font-ui); }
.home-family-point p { margin: 0; font-size: 0.78rem; font-weight: 700; line-height: 1.45; }
.home-family-link {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1.4rem;
    border: 1px solid #e685b1;
    border-radius: 0.9rem;
    background: linear-gradient(180deg, #de4f8a, #a51860);
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 900;
    line-height: 1.4;
    box-shadow: inset 0 2px 2px #ffffff60, 0 3px 5px #6b204d50;
}
.home-family-link:hover { filter: brightness(1.06); }
.home-family-link:focus-visible { outline: 3px solid #173b75; outline-offset: 4px; }
.home-page .tumblethorn-footer { margin-top: 1rem; }
@media (max-width: 1100px) {
    .home-family-panel { grid-template-columns: minmax(0, 1fr) 10rem; padding-inline: 1.7rem; gap: 1rem; }
    .home-family-point { grid-template-columns: 3rem minmax(0, 1fr); gap: 0.45rem; }
    .home-family-point > img { height: 5rem; }
    .home-family-point h3 { font-size: 0.9rem; }
    .home-family-link { padding: 1rem; font-size: 1rem; }
    .home-family-header p { font-size: 0.75rem; }
}
@media (max-width: 800px) {
    .home-page .things-teaser.home-magic-refresh { --things-visible: 4; padding-inline: 1.6rem; }
    .home-magic-refresh .things-library-header { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; }
    .home-page .home-magic-refresh .section-header { font-size: 2rem; }
    .home-page .home-magic-refresh .section-subtitle { width: min(100%, 30rem); }
    .home-page .home-magic-refresh .things-teaser-link { width: min(100%, 28rem); justify-self: center; }
    .home-family-panel { grid-template-columns: minmax(0, 1fr); }
    .home-family-link { grid-column: 1; grid-row: auto; justify-self: end; min-height: 3.2rem; }
    .home-family-point { grid-template-columns: minmax(0, 1fr); text-align: center; }
    .home-family-point > img { width: 4.5rem; justify-self: center; }
}
@media (max-width: 600px) {
    .home-page .things-teaser.home-magic-refresh { --things-visible: 2.5; padding: 1rem 1rem 0.15rem; }
    .home-page .home-magic-refresh .section-header { font-size: clamp(1.3rem, 6vw, 1.8rem); }
    .home-page .home-magic-refresh .section-subtitle { font-size: 0.83rem; padding-inline: 1.5rem; }
    .home-page .home-magic-refresh .things-teaser-link { min-height: 4.1rem; padding: 0.85rem 1.6rem; font-size: 0.82rem; gap: 0.4rem; }
    .home-magic-refresh .things-teaser-chest { width: 1.8rem; }
    .home-magic-refresh .things-library-scroll { padding: 0.25rem 0.2rem 0; }
    .home-page .home-magic-refresh .thing-tile { min-height: 0; }
    .home-family-panel { padding: 1.1rem 1.3rem; }
    .home-family-header p { font-size: 0.8rem; }
    .home-family-points { grid-template-columns: minmax(0, 1fr); gap: 0.8rem; }
    .home-family-point { grid-template-columns: 4.5rem minmax(0, 1fr); text-align: left; gap: 0.75rem; }
    .home-family-point + .home-family-point { border-left: 0; padding-left: 0; border-top: 1px solid #c5d8ed; padding-top: 0.8rem; }
    .home-family-point p { font-size: 0.83rem; }
    .home-family-link { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .home-magic-refresh .things-library-scroll { scroll-behavior: auto; }
    .home-page .home-magic-refresh .thing-tile img { transition: none; }
    .home-page .home-magic-refresh .thing-tile:hover img,
    .home-page .home-magic-refresh .things-teaser-link:hover { transform: none; }
}
