/* WIP: one editorial heading scale across the primary homepage sections. */
.title-section .hero-subtitle {
    font-size: 20px;
}
.quick-access-title-main,
.category-tabs-title,
.home-sf-title {
    font-size: clamp(1rem, 1.375vw, 1.5rem);
    font-weight: 600;
    letter-spacing: -0.045em;
    line-height: 1.05;
}
.home-section-title-accent {
    color: #2563eb;
}
/* WIP: StyleFlow editorial showcase — one cinematic feature, four compact looks,
   then two wide cards. Uses the canonical StyleFlow manifest via Index.php. */
.home-sf-section {
    width: 92%;
    max-width: 1680px;
    margin: clamp(3rem, 4vw, 4rem) auto 1.5rem;
    padding: 0 2rem;
    content-visibility: auto;
    contain-intrinsic-block-size: auto 1200px;
}
.home-sf-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}
.home-sf-heading {
    max-width: 760px;
}
.home-sf-title {
    margin: 0;
    color: #111827;
    font-size: clamp(1rem, 1.375vw, 1.5rem);
    font-weight: 600;
    letter-spacing: -0.045em;
    line-height: 1.05;
}
.home-sf-title-accent {
    color: #2563eb;
}
.home-sf-subtitle {
    max-width: 680px;
    margin: 1rem 0 0;
    color: #64748b;
    font-size: 1rem;
    line-height: 1.7;
}
.home-sf-view-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    flex: 0 0 auto;
    min-height: 46px;
    padding: 0 1.15rem;
    border: 1px solid #dbe1ea;
    border-radius: 999px;
    color: #111827;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.home-sf-view-all:hover {
    color: #111827;
    border-color: #aeb8c8;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
    transform: translateY(-2px);
}
.home-sf-view-all svg {
    width: 16px;
    height: 16px;
}
.home-sf-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: clamp(300px, 20vw, 340px);
    gap: 18px;
}
.home-sf-load-more-wrap {
    display: flex;
    justify-content: center;
    padding-top: clamp(1.5rem, 2.4vw, 2.25rem);
}
.home-sf-load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-width: 154px;
    min-height: 44px;
    padding: 0 1.3rem;
    border: 1px solid #d4dbe6;
    border-radius: 999px;
    color: #1f2937;
    background: #fff;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.045);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.home-sf-load-more:hover,
.home-sf-load-more:focus-visible {
    border-color: rgba(37, 99, 235, 0.55);
    color: #2563eb;
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.1);
}
.home-sf-load-more:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.18);
    outline-offset: 3px;
}
.home-sf-load-more svg {
    width: 16px;
    height: 16px;
}
.home-sf-card {
    --home-sf-split: 50%;
    position: relative;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(207, 216, 229, 0.82);
    border-radius: 13.333px;
    color: #111827;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
    cursor: pointer;
    outline: none;
    transition: border-color 0.24s ease, box-shadow 0.24s ease, transform 0.24s ease;
}
.home-sf-card:hover,
.home-sf-card:focus-visible,
.home-sf-card:focus-within,
.home-sf-card.is-comparing {
    border-color: rgba(148, 163, 184, 0.48);
    box-shadow:
        0 16px 38px rgba(15, 23, 42, 0.075),
        0 3px 10px rgba(15, 23, 42, 0.025);
}
@media (hover: hover) and (pointer: fine) {
    .home-sf-card:hover {
        z-index: 2;
        transform: scale(1.012);
    }
}
.home-sf-card:nth-child(1) {
    grid-column: 1 / 7;
    grid-row: span 2;
}
.home-sf-card:nth-child(2) { grid-column: 7 / 10; }
.home-sf-card:nth-child(3) { grid-column: 10 / 13; }
.home-sf-card:nth-child(4) { grid-column: 7 / 10; }
.home-sf-card:nth-child(5) { grid-column: 10 / 13; }
.home-sf-card:nth-child(6) { grid-column: 1 / 4; }
.home-sf-card:nth-child(7) { grid-column: 4 / 7; }
.home-sf-card:nth-child(8) { grid-column: 7 / 10; }
.home-sf-card:nth-child(9) { grid-column: 10 / 13; }
.home-sf-card:nth-child(n+6) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
}
.home-sf-media {
    position: relative;
    min-height: 0;
    overflow: hidden;
    border-radius: inherit;
    isolation: isolate;
    background:
        linear-gradient(135deg, rgba(241, 245, 249, 0.72), rgba(255, 255, 255, 0.96)),
        repeating-linear-gradient(45deg, rgba(148, 163, 184, 0.14) 0 2px, transparent 2px 8px);
}
.home-sf-media > img,
.home-sf-after img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: transparent;
}
.home-sf-after {
    position: absolute;
    inset: 0;
    overflow: hidden;
    clip-path: inset(0 0 0 var(--home-sf-split));
}
.home-sf-divider {
    position: absolute;
    z-index: 3;
    top: 0;
    bottom: 0;
    left: var(--home-sf-split);
    width: 2px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.13);
    cursor: ew-resize;
    outline: none;
    touch-action: none;
    transform: translateX(-50%);
}
.home-sf-divider::before {
    content: '';
    position: absolute;
    inset: 0 -16px;
}
.home-sf-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26' fill='none' stroke='%23374151' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.5 8.5 6 13l4.5 4.5'/%3E%3Cpath d='M15.5 8.5 20 13l-4.5 4.5'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transform: translate(-50%, -50%);
}
.home-sf-divider:focus-visible::after {
    outline: 3px solid rgba(79, 110, 247, 0.35);
    outline-offset: 3px;
}
.home-sf-tag {
    position: absolute;
    z-index: 4;
    top: 14px;
    padding: 0.35rem 0.58rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(15, 23, 42, 0.22);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.home-sf-tag--before { left: 14px; }
.home-sf-tag--after { right: 14px; }
.home-sf-card-body {
    min-width: 0;
    padding: 1rem 1.05rem 1.05rem;
    border-top: 0;
    background: #fff;
}
.home-sf-card:nth-child(1) .home-sf-card-body {
    padding: 1.4rem 1.5rem 1.45rem;
}
.home-sf-card:nth-child(n+6) .home-sf-card-body {
    display: block;
    padding: 1rem 1.05rem 1.05rem;
    border-left: 0;
}
.home-sf-card-title {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #0a0a0a;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: normal;
    line-height: 1.4;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.home-sf-card-link {
    display: inherit;
    padding: 0;
    overflow: inherit;
    border: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    text-align: left;
    cursor: pointer;
    -webkit-box-orient: inherit;
    -webkit-line-clamp: inherit;
}
.home-sf-card-link:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.22);
    outline-offset: 3px;
    border-radius: 3px;
}
.home-sf-prompt {
    display: none;
    margin: 0.6rem 0 0;
    overflow: hidden;
    color: #7a8799;
    font-size: 0.79rem;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.home-sf-card:nth-child(1) .home-sf-prompt,
.home-sf-card:nth-child(n+6) .home-sf-prompt {
    font-size: 0.84rem;
    -webkit-line-clamp: 3;
}
.home-sf-footer {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    margin-top: 0.9rem;
}
.home-sf-model {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 0.65rem;
    border: 1px solid #e0e5ec;
    border-radius: 999px;
    color: #64748b;
    background: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}
.home-sf-use {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 32px;
    padding: 0 0.78rem;
    border: 1px solid #dbe1ea;
    border-radius: 999px;
    color: #111827;
    background: #fff;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 650;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.home-sf-use:hover {
    color: #fff;
    border-color: #111827;
    background: #111827;
}
body.dark-mode .home-sf-title,
body.dark-mode .home-sf-card-title {
    color: #f8fafc;
}
body.dark-mode .home-sf-subtitle,
body.dark-mode .home-sf-prompt {
    color: #94a3b8;
}
body.dark-mode .home-sf-card,
body.dark-mode .home-sf-view-all,
body.dark-mode .home-sf-load-more,
body.dark-mode .home-sf-model,
body.dark-mode .home-sf-use {
    color: #e5e7eb;
    border-color: #334155;
    background: #162033;
}
body.dark-mode .home-sf-card-body {
    border-color: #2a3649;
    background: #111b2e;
}
body.dark-mode .home-sf-use:hover {
    color: #111827;
    border-color: #f8fafc;
    background: #f8fafc;
}
@media (prefers-reduced-motion: reduce) {
    .home-sf-card {
        transition: border-color 0.24s ease, box-shadow 0.24s ease;
    }
    .home-sf-card:hover {
        transform: none;
    }
}
@media (max-width: 1180px) {
    .home-sf-section {
        contain-intrinsic-block-size: auto 2300px;
    }
    .home-sf-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 380px;
    }
    .home-sf-card,
    .home-sf-card:nth-child(n) {
        grid-column: auto;
        grid-row: auto;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr) auto;
    }
    .home-sf-card:nth-child(1) {
        grid-column: 1 / -1;
        min-height: 540px;
    }
    .home-sf-card:nth-child(n+6) .home-sf-card-body {
        border-left: 0;
    }
}
@media (max-width: 768px) {
    .home-sf-section {
        width: auto;
        max-width: none;
        margin: 3rem 0 1.5rem;
        padding: 0;
        contain-intrinsic-block-size: auto 720px;
    }
    .home-sf-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 1.25rem;
    }
    .quick-access-title-main,
    .category-tabs-title,
    .home-sf-title {
        font-size: 1rem;
    }
    .home-sf-grid {
        display: flex;
        gap: 14px;
        margin-right: -4vw;
        padding: 2px 4vw 18px 0;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    .home-sf-grid::-webkit-scrollbar {
        display: none;
    }
    .home-sf-card,
    .home-sf-card:nth-child(n) {
        flex: 0 0 min(84vw, 360px);
        width: min(84vw, 360px);
        height: 470px;
        min-height: 0;
        scroll-snap-align: start;
    }
    .home-sf-card:nth-child(1) {
        min-height: 0;
    }
    .home-sf-card:nth-child(1) .home-sf-card-body,
    .home-sf-card:nth-child(n+6) .home-sf-card-body {
        padding: 1.05rem;
    }
    .home-sf-card-title {
        font-size: 0.95rem;
    }
    .home-sf-card:nth-child(1) .home-sf-prompt,
    .home-sf-card:nth-child(n+6) .home-sf-prompt {
        font-size: 0.79rem;
        -webkit-line-clamp: 2;
    }
}
