/* ─────────────────────────────────────────────────────────────
   Home page — section rhythm, product cards with tag pills,
   primary + secondary CTA pairs. Loaded only on /index.html.
   ───────────────────────────────────────────────────────────── */

/* Sections: label, title, hairline between groups */
.product-body > .home-section {
    padding-top: 2.2em;
    border-top: 1px solid rgba(var(--rgb-grey-dark), 0.12);
}

.home-eyebrow {
    font-family: var(--font-family);
    font-size: 0.55em;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-grey);
}

.home-eyebrow + h3,
.home-eyebrow + h4 { --spacing: 0.2em; }

.home-section h4 {
    font-family: var(--font-family);
    font-size: 0.62em;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* CTA pair: primary button + secondary link, side by side */
.home-cta-pair {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6em 1.1em;
}

.tkfy .home-cta-pair .cta-button {
    margin-top: 0;
    padding: 0.55em 1.2em;
    border-color: var(--color-grey-dark);
    background: var(--color-grey-dark);
    color: var(--color-white);
    font-family: var(--font-family);
    font-size: 0.68em;
}

.tkfy .home-cta-pair .cta-button:hover,
.tkfy .home-cta-pair .cta-button:focus-visible {
    background: transparent;
    color: var(--color-grey-dark);
}

.tkfy .home-cta-pair .cta-button + a { display: inline; margin-top: 0; }

.home-cta-sub {
    font-family: var(--font-family);
    font-size: 0.62em;
    color: var(--color-grey-dark);
}

.home-section a:focus-visible {
    outline: 3px solid var(--color-grey-dark);
    outline-offset: 3px;
}

/* Product cards */
.home-cards {
    display: flex;
    flex-direction: column;
    gap: 2.4em;
    margin-top: 1.2em;
}

.home-card > * + * { margin-top: 0.7em; }

.home-card-art {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 0.3em;
    box-shadow: 0 0 0 1px rgba(var(--rgb-black), 0.05), 0 0.8em 2.4em -1.4em rgba(var(--rgb-black), 0.45);
}

.home-card-art img {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.home-card--ac .home-card-art img { object-position: 50% 8%; }

/* Tag pills overlaid bottom-left (Steam-tag style), coloured per world */
.home-tags {
    position: absolute;
    left: 0.6em;
    right: 0.6em;
    bottom: 0.6em;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35em;
    margin: 0;
    padding: 0;
    list-style: none;
    pointer-events: none;
}

.home-tags--right { justify-content: flex-end; }

.home-tags li {
    padding: 0.35em 0.8em;
    border: 1px solid var(--pill-line, rgba(255, 255, 255, 0.35));
    border-radius: 999px;
    background: var(--pill-bg);
    color: var(--pill-ink);
    font-family: var(--font-family);
    font-size: 0.42em;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.4;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* LOVE X LOVE: purple-magenta art → warm yellow pills */
.home-card--lxl  { --pill-bg: #ffc847; --pill-ink: #3b0a36; --pill-line: rgba(59, 10, 54, 0.35); }
/* Adventure Calls: charcoal + marigold poster → marigold pills */
.home-card--ac   { --pill-bg: #f5a623; --pill-ink: #1d1c1a; --pill-line: rgba(29, 28, 26, 0.3); }
/* Bitterwind: lilac sky, grey sea → deep teal pills */
.home-card--bw   { --pill-bg: #0f4c5c; --pill-ink: #e8f6f3; }
/* Dolven: green + gold fantasy → oxblood pills, gold text */
.home-card--dv   { --pill-bg: #5a1a14; --pill-ink: #f3d27a; --pill-line: rgba(243, 210, 122, 0.4); }

.home-card h3 a { text-decoration: none; }

@media (hover: hover) {
    .home-card h3 a:hover { text-decoration: underline; }
}

/* Bitterwind: Royal Road reviews */
.home-card .home-reviews { margin-top: 1.8em; }

.home-reviews > * + * { margin-top: 0.8em; }

.home-review-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8em;
}

@media (min-width: 40em) {
    .home-review-grid { grid-template-columns: 1fr 1fr; }
}

.home-review {
    display: flex;
    flex-direction: column;
    gap: 0.45em;
    margin: 0;
    padding: 0.9em 1em 1em;
    background: var(--color-white);
    border: 1px solid rgba(var(--rgb-grey-dark), 0.1);
    border-left: 3px solid #0f4c5c;
    border-radius: 0 0.4em 0.4em 0;
}

.home-stars {
    font-size: 0.6em;
    letter-spacing: 0.12em;
    color: #d98a00;
}

.home-review-title {
    font-family: var(--font-family);
    font-size: 0.62em;
    font-weight: 800;
    line-height: 1.35;
    color: var(--color-grey-dark);
}

.home-review blockquote {
    margin: 0;
    padding: 0;
    border: 0;
}

.home-review blockquote p {
    font-family: var(--font-family-serif);
    font-size: 0.78em;
    font-style: italic;
    line-height: 1.45;
}

.home-review blockquote p::before { content: "\201C"; }
.home-review blockquote p::after  { content: "\201D"; }

.home-review figcaption {
    margin-top: auto;
    font-family: var(--font-family);
    font-size: 0.52em;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-grey);
}

/* Stay in touch */
.home-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55em;
    margin: 0.6em 0 0;
    padding: 0;
    list-style: none;
    font-family: var(--font-family);
    font-size: 0.62em;
}

@media (prefers-reduced-motion: reduce) {
    .tkfy .home-cta-pair .cta-button { transition: none; }
}

/* Dolven: Steam reviews (thumbs-up instead of stars) */
.home-review--steam { border-left-color: #5a1a14; }

.home-rec {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    align-self: flex-start;
    padding: 0.25em 0.7em;
    border-radius: 999px;
    background: #5a1a14;
    color: #f3d27a;
    font-family: var(--font-family);
    font-size: 0.45em;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.home-rec svg {
    width: 1.2em;
    height: 1.2em;
    fill: currentColor;
}

.home-reviews-summary {
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--color-grey);
}

/* ── Spooks, the TKFY ghost — drifts behind the brand links ──
   Sits "behind the glass": small, soft and faded until a link is hovered,
   then he floats to it and comes forward. Driven by assets/javascripts/spooks.js. */
.logos[data-spooks] {
    position: relative;
    isolation: isolate;
}

.logos .spooks-ghost {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    width: 2.3em;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(var(--sx, 0px), var(--sy, 0px), 0) scale(0.8);
    filter: blur(1.5px) saturate(0.85);
    transition:
        transform 2.6s cubic-bezier(0.45, 0, 0.25, 1),
        opacity 0.8s ease,
        filter 0.8s ease;
}

.logos .spooks-ghost.is-ready { opacity: 0.45; }

.logos .spooks-ghost.is-near {
    opacity: 0.8;
    filter: none;
    transform: translate3d(var(--sx, 0px), var(--sy, 0px), 0) scale(1.05);
    transition:
        transform 0.9s cubic-bezier(0.3, 0.7, 0.2, 1),
        opacity 0.4s ease,
        filter 0.4s ease;
}

/* Keep the label readable when Spooks is behind it: a light outline drawn
   with text-shadow, so the glyphs, size and layout don't change */
.logos[data-spooks] a.brand:is(:hover, :focus-visible) span {
    text-shadow:
         0.05em  0      0 var(--secondary-color),
        -0.05em  0      0 var(--secondary-color),
         0       0.05em 0 var(--secondary-color),
         0      -0.05em 0 var(--secondary-color),
         0.035em  0.035em 0 var(--secondary-color),
        -0.035em  0.035em 0 var(--secondary-color),
         0.035em -0.035em 0 var(--secondary-color),
        -0.035em -0.035em 0 var(--secondary-color),
         0 0 0.25em rgba(255, 255, 255, 0.9);
}

.logos .spooks-bob { display: block; }

.logos .spooks-ghost img {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    filter: drop-shadow(0 0.3em 0.4em rgba(49, 1, 75, 0.25));
}

@media (prefers-reduced-motion: no-preference) {
    .logos .spooks-bob { animation: spooks-bob 4.5s ease-in-out infinite; }
}

@keyframes spooks-bob {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50%      { transform: translateY(-0.2em) rotate(3deg); }
}

@media (prefers-reduced-motion: reduce) {
    .logos .spooks-ghost,
    .logos .spooks-ghost.is-near { transition: opacity 0.3s ease; }
}
