/* Traffic Plus — Homepage (2026 premium) */

.hp-page {
    --hp-brand: #C62626;
    --hp-brand-light: #FF6B6B;
    --hp-black: #000000;
    --hp-gradient: linear-gradient(135deg, #FF6B6B 0%, #E83535 38%, #C62626 68%, #8B1515 100%);
    --hp-hero-bg: linear-gradient(160deg, #fff 0%, #fff8f8 40%, #ffecec 100%);
    --hp-muted: #737373;
    --hp-border: rgba(0, 0, 0, 0.08);
    --hp-pattern: url('../images/bgpattern-halftone.png');
    background: #fff;
}

/* ─── Hero ─── */
.hp-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(28px, 5vw, 52px) 0 clamp(32px, 4.5vw, 48px);
    background: var(--hp-hero-bg);
}

.hp-hero__mesh {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(198, 38, 38, 0.06) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
}

.hp-hero__glow {
    position: absolute;
    width: 520px;
    height: 520px;
    top: -180px;
    right: -120px;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.22) 0%, transparent 68%);
    pointer-events: none;
}

.hp-hero__glow--2 {
    width: 400px;
    height: 400px;
    top: auto;
    bottom: -100px;
    left: -80px;
    right: auto;
    background: radial-gradient(circle, rgba(198, 38, 38, 0.12) 0%, transparent 70%);
}

.hp-hero__inner {
    position: relative;
    z-index: 1;
}

.hp-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    margin-bottom: 18px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hp-brand);
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.14), rgba(198, 38, 38, 0.06));
    border: 1px solid rgba(255, 107, 107, 0.28);
    border-radius: 999px;
}

.hp-hero__title {
    margin: 0 0 16px;
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--hp-black);
}

.hp-hero__title span {
    background: var(--hp-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hp-hero__lead {
    margin: 0 0 20px;
    max-width: 34rem;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--hp-muted);
}

.hp-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.hp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 22px;
    font-size: 0.9375rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.hp-btn--primary {
    color: #fff;
    background: var(--hp-gradient);
    box-shadow: 0 6px 22px rgba(198, 38, 38, 0.28);
}

.hp-btn--primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(198, 38, 38, 0.34);
}

.hp-btn--outline {
    color: var(--hp-brand);
    background: #fff;
    border: 1px solid rgba(198, 38, 38, 0.3);
}

.hp-btn--outline:hover {
    color: var(--hp-brand);
    background: rgba(255, 107, 107, 0.06);
    transform: translateY(-1px);
}

.hp-hero__trust {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hp-trust-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--hp-black);
    background: #fff;
    border: 1px solid var(--hp-border);
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.hp-trust-chip i {
    color: var(--hp-brand);
}

/* Hero visual card */
.hp-hero__visual {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 340px;
}

.hp-mockup {
    width: 100%;
    max-width: 440px;
    padding: 22px;
    background: #fff;
    border: 1px solid rgba(198, 38, 38, 0.12);
    border-radius: 22px;
    box-shadow: 0 24px 64px rgba(198, 38, 38, 0.12), 0 8px 24px rgba(0, 0, 0, 0.06);
    animation: hpFloat 5s ease-in-out infinite;
}

@keyframes hpFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hp-mockup__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.hp-mockup__head span:first-child {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--hp-black);
}

.hp-mockup__live {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #2e7d32;
    background: rgba(46, 125, 50, 0.1);
    border-radius: 999px;
}

.hp-mockup__live::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #2e7d32;
    border-radius: 50%;
    animation: hpPulse 2s ease infinite;
}

@keyframes hpPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hp-mockup__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.hp-mockup__stat {
    padding: 12px 8px;
    text-align: center;
    background: linear-gradient(145deg, #fafafa, #fff);
    border: 1px solid var(--hp-border);
    border-radius: 12px;
}

.hp-mockup__stat strong {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--hp-brand);
    line-height: 1.1;
}

.hp-mockup__stat small {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--hp-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hp-mockup__chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 88px;
    padding: 8px 4px 0;
}

.hp-mockup__chart span {
    flex: 1;
    border-radius: 6px 6px 2px 2px;
    background: var(--hp-gradient);
    opacity: 0.88;
    animation: hpBarGrow 1.2s ease backwards;
}

.hp-mockup__chart span:nth-child(1) { animation-delay: 0.1s; }
.hp-mockup__chart span:nth-child(2) { animation-delay: 0.2s; }
.hp-mockup__chart span:nth-child(3) { animation-delay: 0.3s; }
.hp-mockup__chart span:nth-child(4) { animation-delay: 0.4s; }
.hp-mockup__chart span:nth-child(5) { animation-delay: 0.5s; }
.hp-mockup__chart span:nth-child(6) { animation-delay: 0.6s; }

@keyframes hpBarGrow {
    from { transform: scaleY(0); transform-origin: bottom; }
    to { transform: scaleY(1); transform-origin: bottom; }
}

/* ─── Section backgrounds & patterns ─── */
.hp-section-bg {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.hp-section-bg > .container {
    position: relative;
    z-index: 1;
}

/* Hero — halftone wave, bottom corners */
.hp-bg--hero {
    background: var(--hp-hero-bg);
}

.hp-bg--hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        var(--hp-pattern) right -8% bottom -6% / 58% auto no-repeat,
        var(--hp-pattern) left -8% bottom -6% / 58% auto no-repeat;
    opacity: 0.55;
    mask-image: linear-gradient(180deg, transparent 35%, #000 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 35%, #000 100%);
    pointer-events: none;
    z-index: 0;
}

/* Steps — halftone sweep from lower-left */
.hp-bg--steps {
    background: linear-gradient(180deg, #f6f7fb 0%, #eef1f6 100%);
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.hp-bg--steps::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--hp-pattern) -12% 108% / 62% auto no-repeat;
    opacity: 0.65;
    mask-image: radial-gradient(ellipse 80% 70% at 15% 95%, #000 0%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 15% 95%, #000 0%, transparent 72%);
    pointer-events: none;
    z-index: 0;
}

/* Listings — halftone from lower-right, mirrored */
.hp-bg--listings {
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.hp-bg--listings::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--hp-pattern) 112% 108% / 62% auto no-repeat;
    transform: scaleX(-1);
    opacity: 0.6;
    mask-image: radial-gradient(ellipse 80% 70% at 85% 95%, #000 0%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 85% 95%, #000 0%, transparent 72%);
    pointer-events: none;
    z-index: 0;
}

/* Features — centered halftone arc */
.hp-bg--features {
    background: linear-gradient(165deg, #fff7f7 0%, #fff 45%, #f7f8fc 100%);
    border-top: 1px solid rgba(198, 38, 38, 0.06);
}

.hp-bg--features::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--hp-pattern) center 115% / 70% auto no-repeat;
    opacity: 0.5;
    mask-image: linear-gradient(180deg, transparent 0%, #000 55%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 55%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* CTA — inverted halftone on dark gradient */
.hp-bg--cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--hp-pattern) center bottom / cover no-repeat;
    opacity: 0.14;
    filter: invert(1) brightness(1.6);
    mix-blend-mode: soft-light;
    pointer-events: none;
    z-index: 0;
}

.hp-bg--cta::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 90% 80% at 50% 110%, rgba(255, 107, 107, 0.22) 0%, transparent 55%);
    pointer-events: none;
    z-index: 0;
}

/* ─── Section shared ─── */
.hp-section {
    padding: clamp(28px, 4vw, 48px) 0;
}

.hp-section--soft {
    background: linear-gradient(180deg, #fff 0%, #f8f9fc 100%);
}

.hp-section__head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 24px;
}

.hp-section__eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hp-brand);
}

.hp-section__title {
    margin: 0 0 12px;
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--hp-black);
}

.hp-section__lead {
    margin: 0;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--hp-muted);
}

/* ─── Steps ─── */
.hp-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.hp-step {
    position: relative;
    padding: 20px 18px;
    height: 100%;
    background: #fff;
    border: 1px solid var(--hp-border);
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.hp-step:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(198, 38, 38, 0.1);
    border-color: rgba(198, 38, 38, 0.15);
}

.hp-step__num {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    color: #fff;
    background: var(--hp-gradient);
    border-radius: 8px;
}

.hp-step__icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--hp-brand);
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15), rgba(198, 38, 38, 0.06));
    border-radius: 14px;
}

.hp-step h3 {
    margin: 0 0 8px;
    font-size: 1.0625rem;
    font-weight: 800;
    color: var(--hp-black);
}

.hp-step p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--hp-muted);
}

/* ─── Stats strip ─── */
.hp-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.hp-stat {
    padding: 18px 14px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--hp-border);
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

.hp-stat strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--hp-brand);
    line-height: 1.1;
}

.hp-stat span {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--hp-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ─── Search panel (listings) ─── */
.hp-search-panel {
    padding: 16px 18px;
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid var(--hp-border);
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(198, 38, 38, 0.06);
}

.hp-search-panel__label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--hp-black);
}

.hp-search-panel__label i {
    color: var(--hp-brand);
}

.hp-search-field,
.hp-filter-field {
    position: relative;
}

.hp-search-field i,
.hp-filter-field i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--hp-brand-light);
    pointer-events: none;
    z-index: 2;
}

.hp-search-field input {
    width: 100%;
    min-height: 50px;
    padding: 12px 52px 12px 2.75rem;
    font-size: 0.9375rem;
    border: 1px solid var(--hp-border);
    border-radius: 12px;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hp-search-field input:focus {
    outline: none;
    border-color: var(--hp-brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.14);
}

.hp-search-field button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--hp-gradient);
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.hp-filter-field select {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px 12px 2.75rem;
    font-size: 0.9375rem;
    border: 1px solid var(--hp-border);
    border-radius: 12px;
    background: #fafafa;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23737373' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.hp-filter-field select:focus {
    outline: none;
    border-color: var(--hp-brand);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.14);
}

.hp-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--hp-border);
    border-radius: 12px;
}

.hp-results {
    margin: 0;
    font-size: 0.875rem;
    color: var(--hp-muted);
}

.hp-results strong {
    color: var(--hp-black);
    font-weight: 800;
}

/* ─── Features bento ─── */
.hp-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.hp-feature {
    padding: 18px 16px;
    height: 100%;
    text-align: center;
    background: #fff;
    border: 1px solid var(--hp-border);
    border-radius: 16px;
    transition: transform 0.25s, box-shadow 0.25s;
}

.hp-feature:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(198, 38, 38, 0.08);
}

.hp-feature__icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.375rem;
    color: #fff;
    background: var(--hp-gradient);
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(198, 38, 38, 0.22);
}

.hp-feature h3 {
    margin: 0 0 8px;
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--hp-black);
}

.hp-feature p {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--hp-muted);
}

/* ─── CTA ─── */
.hp-cta {
    position: relative;
    overflow: hidden;
    padding: clamp(32px, 4.5vw, 52px) 0;
    background: linear-gradient(145deg, #000 0%, #141010 35%, #5C0E0E 62%, #C62626 88%, #FF5757 100%);
    color: #fff;
    text-align: center;
}

.hp-cta__mesh {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 18px 18px;
    pointer-events: none;
}

.hp-cta__inner {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0 auto;
}

.hp-cta h2 {
    margin: 0 0 12px;
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hp-cta p {
    margin: 0 0 24px;
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.92;
}

.hp-btn--white {
    color: var(--hp-brand);
    background: #fff;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

.hp-btn--white:hover {
    color: var(--hp-brand);
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
}

/* ─── Empty / no results ─── */
.hp-empty {
    text-align: center;
    padding: 32px 20px;
    background: #fff;
    border: 1px dashed rgba(198, 38, 38, 0.25);
    border-radius: 18px;
}

.hp-empty__icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--hp-brand);
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15), rgba(198, 38, 38, 0.06));
    border-radius: 50%;
}

.hp-empty h4 {
    margin: 0 0 8px;
    font-weight: 800;
}

.hp-empty p {
    margin: 0 0 20px;
    color: var(--hp-muted);
}

.hp-no-results {
    display: none;
    text-align: center;
    padding: 40px 24px;
    background: #fff;
    border: 1px solid var(--hp-border);
    border-radius: 18px;
}

.hp-no-results.is-visible {
    display: block;
}

.hp-no-results__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--hp-muted);
    background: #f3f4f8;
    border-radius: 50%;
}

/* Reveal */
.hp-page .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.hp-page .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Legacy overrides inside homepage */
.homepage .section-header,
.homepage .header-badge,
.homepage .section-title,
.homepage .section-subtitle,
.homepage .section-stats {
    all: unset;
    display: none;
}

.homepage .search-box,
.homepage .filter-box {
    all: unset;
}

/* Responsive */
@media (max-width: 991px) {
    .hp-hero__inner .row {
        text-align: center;
    }

    .hp-hero__lead {
        margin-left: auto;
        margin-right: auto;
    }

    .hp-hero__actions,
    .hp-hero__trust {
        justify-content: center;
    }

    .hp-hero__visual {
        margin-top: 20px;
    }

    .hp-steps {
        grid-template-columns: 1fr;
    }

    .hp-features {
        grid-template-columns: repeat(2, 1fr);
    }

    .hp-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .hp-features {
        grid-template-columns: 1fr;
    }

    .hp-stats {
        grid-template-columns: 1fr 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hp-mockup,
    .hp-mockup__chart span,
    .hp-mockup__live::before {
        animation: none;
    }

    .hp-page .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hp-btn--primary:hover,
    .hp-step:hover,
    .hp-feature:hover {
        transform: none;
    }
}
