/* ==========================================================================
   Landing page (home.php)
   Depends on the --pub-* tokens from wpl-public-theme.css.
   ========================================================================== */

.pub-shell {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 0.75rem;
}

.pub-section { padding: 3.6rem 0; }
.pub-section-tight { padding: 2.4rem 0; }

/* --------------------------------------------------------------------------
   Shared bits
   -------------------------------------------------------------------------- */

.pub-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--pub-accent-2);
}

.pub-h2 {
    margin: 0 0 0.35rem;
    font-family: 'Playfair Display', Lora, Georgia, serif;
    font-size: clamp(1.6rem, 3.2vw, 2.15rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--pub-ink);
}

.pub-lead {
    margin: 0;
    max-width: 60ch;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--pub-ink-2);
}

.pub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.4rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease,
                transform 0.15s ease, filter 0.2s ease;
}

.pub-btn:active { transform: translateY(1px); }

.pub-btn-primary {
    background: linear-gradient(145deg, var(--pub-accent-2), var(--pub-brand));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), 0 6px 18px rgba(35, 87, 137, 0.35);
}

.pub-btn-primary:hover,
.pub-btn-primary:focus-visible { color: #fff; filter: brightness(1.09); }

.pub-btn-ghost {
    color: var(--pub-ink);
    border-color: var(--pub-border);
    background: var(--pub-surface);
}

.pub-btn-ghost:hover,
.pub-btn-ghost:focus-visible {
    color: var(--pub-ink);
    border-color: var(--pub-accent-2);
    background: var(--pub-surface-2);
}

.pub-btn-clear {
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.07);
}

.pub-btn-clear:hover,
.pub-btn-clear:focus-visible {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.15);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.pub-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(2.5rem, 5vw, 3.5rem);
}

.pub-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: url('/assets/images/peter-and-miles-spideys-1a.png');
    background-size: cover;
    background-position: center 28%;
}

/* Two-layer scrim: a directional wash so the copy column stays readable, and a
   vertical one that weights the bottom edge. Both are fixed dark values rather
   than theme tokens — the hero is a photographic banner and stays dark in both
   modes, so the handoff to a light page is a deliberate edge, not a mid-tone
   smear (fading to --pub-page would also wash out the white stats sitting on
   top of it). */
.pub-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(100deg, rgba(8, 17, 28, 0.94) 0%, rgba(8, 17, 28, 0.76) 44%, rgba(8, 17, 28, 0.34) 72%, rgba(8, 17, 28, 0.52) 100%),
        linear-gradient(180deg, rgba(8, 17, 28, 0.35) 0%, rgba(8, 17, 28, 0.12) 42%, rgba(8, 17, 28, 0.78) 100%);
}

.pub-hero-inner { max-width: 720px; }

.pub-hero .pub-eyebrow { color: var(--pub-accent-2); }

.pub-hero-title {
    margin: 0 0 0.85rem;
    font-family: 'Playfair Display', Lora, Georgia, serif;
    font-size: clamp(2.3rem, 6.2vw, 4rem);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -0.01em;
    color: #fff;
}

.pub-hero-title em {
    font-style: normal;
    color: var(--pub-accent-2);
}

.pub-hero-sub {
    margin: 0 0 1.8rem;
    max-width: 54ch;
    font-size: clamp(1rem, 1.6vw, 1.12rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
}

.pub-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pub-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 2.6rem;
    margin-top: 2.6rem;
    padding-top: 1.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.pub-stat-value {
    display: block;
    font-family: 'Playfair Display', Lora, Georgia, serif;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
}

.pub-stat-label {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

/* --------------------------------------------------------------------------
   How it works
   -------------------------------------------------------------------------- */

.pub-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
    margin-top: 2rem;
}

.pub-step {
    position: relative;
    padding: 1.6rem 1.4rem 1.5rem;
    border: 1px solid var(--pub-border);
    border-radius: 16px;
    background: var(--pub-surface);
    box-shadow: var(--pub-shadow);
}

.pub-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 1rem;
    border-radius: 12px;
    background: var(--pub-accent-soft);
    color: var(--pub-accent-2);
    font-size: 1rem;
}

.pub-step h3 {
    margin: 0 0 0.45rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--pub-ink);
}

.pub-step p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--pub-ink-2);
}

@media (max-width: 767.98px) {
    .pub-steps { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Product rails
   -------------------------------------------------------------------------- */

.pub-rail-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    margin-bottom: 1.5rem;
}

.pub-rail-more {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.95rem;
    border: 1px solid var(--pub-border);
    border-radius: 999px;
    color: var(--pub-ink);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.pub-rail-more i { transition: transform 0.2s ease; }

.pub-rail-more:hover,
.pub-rail-more:focus-visible {
    border-color: var(--pub-accent-2);
    background: var(--pub-accent-soft);
    color: var(--pub-ink);
}

.pub-rail-more:hover i { transform: translateX(3px); }

/* Swiper needs room outside the track for the lift/shadow on hover, so the
   viewport is padded and pulled back with a negative margin. */
.pub-rail .swiper {
    padding: 0.5rem 0.5rem 0.25rem;
    margin: -0.5rem -0.5rem 0;
}

.pub-rail .swiper-slide { height: auto; }

.pub-rail-nav {
    display: flex;
    gap: 0.4rem;
}

.pub-rail-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--pub-border);
    border-radius: 50%;
    background: var(--pub-surface);
    color: var(--pub-ink);
    font-size: 0.8rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.pub-rail-btn:hover {
    border-color: var(--pub-accent-2);
    background: var(--pub-accent-soft);
}

.pub-rail-btn.swiper-button-disabled {
    opacity: 0.35;
    cursor: default;
}

.pub-rail-empty {
    padding: 2.5rem 1.5rem;
    border: 1px dashed var(--pub-border);
    border-radius: 16px;
    background: var(--pub-surface);
    color: var(--pub-muted);
    text-align: center;
    font-size: 0.92rem;
}

/* --------------------------------------------------------------------------
   Product card
   -------------------------------------------------------------------------- */

.pub-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--pub-border);
    border-radius: 14px;
    background: var(--pub-surface);
    box-shadow: var(--pub-shadow);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pub-card:hover {
    transform: translateY(-4px);
    border-color: var(--pub-accent-2);
    box-shadow: var(--pub-shadow-lift);
}

@media (prefers-reduced-motion: reduce) {
    .pub-card:hover { transform: none; }
}

.pub-card-art {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    background: var(--pub-surface-2);
    overflow: hidden;
}

.pub-card-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.pub-card:hover .pub-card-art img { transform: scale(1.04); }

@media (prefers-reduced-motion: reduce) {
    .pub-card:hover .pub-card-art img { transform: none; }
}

.pub-card-pub {
    position: absolute;
    top: 0.55rem;
    left: 0.55rem;
    max-width: calc(100% - 3.4rem);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(8, 17, 28, 0.82);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    backdrop-filter: blur(3px);
}

.pub-card-fav {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(8, 17, 28, 0.7);
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.pub-card-fav:hover { background: rgba(8, 17, 28, 0.9); transform: scale(1.08); }
.pub-card-fav.is-on { color: var(--pub-hot); }
.pub-card-fav.is-on i { font-weight: 900; }

.pub-card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 0.55rem;
    padding: 0.75rem 0.8rem 0.85rem;
}

.pub-card-title {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--pub-ink);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

a.pub-card-title:hover { color: var(--pub-accent-2); }

.pub-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid var(--pub-border-soft);
}

.pub-card-price {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--pub-ink);
}

.pub-card-date {
    font-size: 0.72rem;
    color: var(--pub-muted);
    text-align: right;
    line-height: 1.25;
}

.pub-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.pub-chip-hot { background: var(--pub-hot-soft); color: var(--pub-hot); }
.pub-chip-soon { background: var(--pub-accent-soft); color: var(--pub-accent-2); }
.pub-chip-good { background: var(--pub-good-soft); color: var(--pub-good); }

/* --------------------------------------------------------------------------
   Closing CTA
   -------------------------------------------------------------------------- */

.pub-cta {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(2.6rem, 6vw, 4rem) 0;
    border-top: 1px solid var(--pub-border);
    background:
        radial-gradient(1100px 320px at 15% -10%, rgba(85, 152, 231, 0.22), transparent 70%),
        var(--pub-page-2);
}

.pub-cta-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 2rem 3rem;
    align-items: center;
}

.pub-cta-aside {
    padding: 1.5rem 1.4rem;
    border: 1px solid var(--pub-border);
    border-radius: 16px;
    background: var(--pub-surface);
    box-shadow: var(--pub-shadow);
}

.pub-cta-aside h3 {
    margin: 0 0 0.4rem;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--pub-ink);
}

.pub-cta-aside p {
    margin: 0 0 1rem;
    font-size: 0.89rem;
    line-height: 1.6;
    color: var(--pub-ink-2);
}

@media (max-width: 991.98px) {
    .pub-cta-grid { grid-template-columns: 1fr; }
}
