/* TechPenser — homepage-only premium layer (scoped) */
/* Loaded only from index.html; uses existing theme variables */

.page-home {
    --hp-glow: rgba(229, 9, 20, 0.45);
    --hp-glow-soft: rgba(229, 9, 20, 0.12);
    --text-color: var(--text-primary);
}

@media (prefers-reduced-motion: reduce) {
    .page-home *,
    .page-home *::before,
    .page-home *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .page-home .hp-hero__aurora,
    .page-home .hp-hero__mesh,
    .page-home .hp-hero__particles span {
        animation: none !important;
    }
}

/* ---------- Header: mega menu (homepage only) ---------- */
.page-home .navbar .container {
    position: relative;
}

.page-home .nav-mega-wrap {
    position: relative;
}

.page-home .nav-mega-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.page-home .nav-mega-trigger::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.65;
    transition: transform 0.35s ease;
}

.page-home .nav-mega-wrap:hover .nav-mega-trigger::after,
.page-home .nav-mega-wrap:focus-within .nav-mega-trigger::after {
    transform: rotate(180deg);
}

.page-home .nav-mega {
    position: absolute;
    left: 50%;
    top: calc(100% + 0.75rem);
    transform: translateX(-50%) translateY(8px);
    min-width: min(920px, calc(100vw - 2rem));
    padding: 1.25rem 1.5rem;
    border-radius: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
    z-index: 1200;
}

.page-home .nav-mega-wrap:hover .nav-mega,
.page-home .nav-mega-wrap:focus-within .nav-mega {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

body[data-theme="dark"] .page-home .nav-mega {
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
}

.page-home .nav-mega-inner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem 1.5rem;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.page-home .nav-mega-col h4 {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 0.65rem;
}

.page-home .nav-mega-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.page-home .nav-mega-col a {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.35rem 0;
    border-radius: 8px;
    transition: color 0.25s ease, transform 0.25s ease;
}

.page-home .nav-mega-col a:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

.page-home .nav-mega-footer {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.page-home .nav-mega-footer a {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-color);
}

body[data-theme="dark"] .page-home .nav-mega-col a {
    color: #cfcfcf;
}

@media (max-width: 900px) {
    .page-home .nav-mega {
        position: static;
        left: auto;
        top: auto;
        transform: none;
        min-width: 0;
        width: 100%;
        margin-top: 0.5rem;
        display: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        padding: 1rem;
    }

    .page-home .nav-mega-wrap.is-open .nav-mega {
        display: block;
    }

    .page-home .nav-mega-inner {
        grid-template-columns: 1fr;
    }

    .page-home .nav-mega-wrap:hover .nav-mega {
        display: none;
    }

    .page-home .nav-mega-wrap.is-open:hover .nav-mega,
    .page-home .nav-mega-wrap.is-open .nav-mega {
        display: block;
    }
}

/* ---------- Scroll reveal ---------- */
.page-home .hp-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-home .hp-reveal.is-inview {
    opacity: 1;
    transform: translateY(0);
}

.page-home .hp-reveal-left {
    transform: translateX(-24px);
}

.page-home .hp-reveal-left.is-inview {
    transform: translateX(0);
}

.page-home .hp-reveal-right {
    transform: translateX(24px);
}

.page-home .hp-reveal-right.is-inview {
    transform: translateX(0);
}

.page-home .hp-stagger > .hp-reveal-child {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.page-home .hp-stagger.is-inview > .hp-reveal-child {
    opacity: 1;
    transform: translateY(0);
}

.page-home .hp-stagger.is-inview > .hp-reveal-child:nth-child(1) { transition-delay: 0.05s; }
.page-home .hp-stagger.is-inview > .hp-reveal-child:nth-child(2) { transition-delay: 0.12s; }
.page-home .hp-stagger.is-inview > .hp-reveal-child:nth-child(3) { transition-delay: 0.19s; }
.page-home .hp-stagger.is-inview > .hp-reveal-child:nth-child(4) { transition-delay: 0.26s; }
.page-home .hp-stagger.is-inview > .hp-reveal-child:nth-child(5) { transition-delay: 0.33s; }
.page-home .hp-stagger.is-inview > .hp-reveal-child:nth-child(6) { transition-delay: 0.4s; }
.page-home .hp-stagger.is-inview > .hp-reveal-child:nth-child(7) { transition-delay: 0.47s; }
.page-home .hp-stagger.is-inview > .hp-reveal-child:nth-child(8) { transition-delay: 0.54s; }

/* ---------- Hero ---------- */
.page-home .hero.hp-hero {
    padding: 6.5rem 0 5.5rem;
    overflow: hidden;
    position: relative;
    isolation: isolate;
}

.page-home .hp-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.page-home .hp-hero__mesh {
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, var(--hp-glow-soft), transparent 55%),
        radial-gradient(circle at 85% 30%, rgba(138, 3, 3, 0.14), transparent 45%),
        radial-gradient(circle at 10% 70%, rgba(229, 9, 20, 0.1), transparent 40%);
    animation: hpMeshDrift 18s ease-in-out infinite alternate;
}

@keyframes hpMeshDrift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(-2%, 1%, 0) scale(1.03); }
}

.page-home .hp-hero__aurora {
    position: absolute;
    width: 140%;
    height: 60%;
    left: -20%;
    top: 10%;
    background: linear-gradient(105deg, transparent 0%, rgba(229, 9, 20, 0.07) 35%, transparent 55%, rgba(138, 3, 3, 0.06) 75%, transparent 100%);
    filter: blur(40px);
    animation: hpAurora 12s ease-in-out infinite;
}

@keyframes hpAurora {
    0%, 100% { opacity: 0.55; transform: translateX(0); }
    50% { opacity: 0.9; transform: translateX(4%); }
}

.page-home .hp-hero__particles {
    position: absolute;
    inset: 0;
}

.page-home .hp-hero__particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(229, 9, 20, 0.55);
    box-shadow: 0 0 12px var(--hp-glow);
    animation: hpFloat 7s ease-in-out infinite;
}

.page-home .hp-hero__particles span:nth-child(1) { left: 12%; top: 22%; animation-delay: 0s; }
.page-home .hp-hero__particles span:nth-child(2) { left: 78%; top: 18%; animation-delay: 1.2s; }
.page-home .hp-hero__particles span:nth-child(3) { left: 64%; top: 62%; animation-delay: 2.1s; }
.page-home .hp-hero__particles span:nth-child(4) { left: 28%; top: 58%; animation-delay: 0.8s; }
.page-home .hp-hero__particles span:nth-child(5) { left: 44%; top: 30%; animation-delay: 1.6s; }

@keyframes hpFloat {
    0%, 100% { transform: translate3d(0, 0, 0); opacity: 0.35; }
    50% { transform: translate3d(6px, -14px, 0); opacity: 0.95; }
}

.page-home .hero.hp-hero .container {
    position: relative;
    z-index: 2;
}

.page-home .hp-hero-badge {
    animation: hpFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.page-home .hp-hero-title-wrap {
    max-width: 920px;
    margin: 0 auto;
    animation: hpFadeUp 0.95s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.page-home .hp-hero-title {
    font-size: clamp(2rem, 4.2vw, 3.35rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.page-home .hp-hero-title .hp-typed {
    display: inline;
    background: linear-gradient(135deg, #E50914 0%, #8A0303 55%, #600000 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-home .hp-hero-title .hp-cursor {
    display: inline-block;
    width: 3px;
    height: 0.9em;
    margin-left: 2px;
    background: var(--primary-color);
    vertical-align: -0.05em;
    animation: hpBlink 1s step-end infinite;
}

@keyframes hpBlink {
    50% { opacity: 0; }
}

.page-home .hp-hero-sub {
    max-width: 640px;
    margin: 1.25rem auto 0;
    font-size: 1.12rem;
    color: var(--muted-text);
    animation: hpFadeUp 0.95s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both;
}

@keyframes hpFadeUp {
    from {
        opacity: 0;
        transform: translateY(26px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-home .hp-hero .search-container {
    animation: hpFadeUp 0.95s cubic-bezier(0.16, 1, 0.3, 1) 0.58s both;
}

.page-home .hp-hero-actions {
    animation: hpFadeUp 0.95s cubic-bezier(0.16, 1, 0.3, 1) 0.68s both;
}

.page-home .hp-hero-stats {
    animation: hpFadeUp 0.95s cubic-bezier(0.16, 1, 0.3, 1) 0.78s both;
}

.page-home .hp-hero .btn-primary,
.page-home .hp-hero #search-btn {
    position: relative;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.page-home .hp-hero .btn-primary:hover,
.page-home .hp-hero #search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(229, 9, 20, 0.38);
}

.page-home .hp-hero .btn-secondary {
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.page-home .hp-hero .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(229, 9, 20, 0.22);
}

.page-home .hp-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
    gap: 2.5rem;
    align-items: center;
}

.page-home .hp-hero-copy {
    max-width: 660px;
}

.page-home .hp-search-panel {
    margin-top: 2rem;
}

.page-home .hp-search-panel--hero .hp-search-label {
    display: block;
    margin-bottom: 0.85rem;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    color: var(--muted-text);
}

.page-home .search-container {
    display: flex;
    gap: 1rem;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 0.9rem;
}

.page-home .search-container input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 1rem;
    padding: 0.6rem 0.4rem;
}

.page-home .search-container input::placeholder {
    color: rgba(255, 255, 255, 0.62);
}

.page-home .search-container input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.14);
}

.page-home .hp-hero-badges {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, auto));
    gap: 0.85rem;
    margin-top: 1.75rem;
}

.page-home .hp-hero-badges span {
    display: inline-flex;
    padding: 0.85rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.94rem;
    color: var(--text-color);
}

.page-home .hp-dashboard-preview {
    display: flex;
    justify-content: flex-end;
}

.page-home .hp-dashboard-panel {
    width: 100%;
    max-width: 500px;
    padding: 1.5rem;
    border-radius: 28px;
    background: rgba(16, 16, 16, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(24px);
    position: relative;
    overflow: hidden;
}

.page-home .hp-dashboard-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(229, 9, 20, 0.12), transparent 44%);
    pointer-events: none;
}

.page-home .hp-dashboard-panel__header,
.page-home .hp-dashboard-summary,
.page-home .hp-dashboard-metrics,
.page-home .hp-dashboard-card {
    position: relative;
    z-index: 1;
}

.page-home .hp-dashboard-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.45rem;
}

.page-home .hp-dashboard-label {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.45rem;
}

.page-home .hp-dashboard-panel__header strong {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
}

.page-home .hp-dashboard-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    background: rgba(229, 9, 20, 0.16);
    color: #ffe8e8;
    font-size: 0.81rem;
    font-weight: 700;
}

.page-home .hp-dashboard-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.4rem;
}

.page-home .hp-dashboard-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.page-home .hp-dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-home .hp-dashboard-metrics > div {
    padding: 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.page-home .hp-dashboard-metric-value {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.35rem;
}

.page-home .hp-dashboard-metric-label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.92rem;
}

.page-home .hp-dashboard-card {
    padding: 1.4rem;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.page-home .hp-dashboard-widget__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.page-home .hp-dashboard-widget__top span {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
}

.page-home .hp-dashboard-widget__top strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
}

.page-home .hp-dashboard-bar {
    height: 8px;
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.page-home .hp-dashboard-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, rgba(229, 9, 20, 0.95), rgba(255, 255, 255, 0.7));
    border-radius: 999px;
}

.page-home .hp-dashboard-rows {
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.87rem;
    gap: 0.75rem;
}

.page-home .hp-dashboard-graph {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.7rem;
    margin-top: 1.3rem;
}

.page-home .hp-dashboard-graph span {
    display: block;
    width: 100%;
    min-height: 70px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(229, 9, 20, 0.95), rgba(229, 9, 20, 0.3));
}

.page-home .hp-dashboard-graph span:nth-child(1) { height: 42px; }
.page-home .hp-dashboard-graph span:nth-child(2) { height: 62px; }
.page-home .hp-dashboard-graph span:nth-child(3) { height: 84px; }
.page-home .hp-dashboard-graph span:nth-child(4) { height: 56px; }
.page-home .hp-dashboard-graph span:nth-child(5) { height: 70px; }

.page-home .hp-trust-strip {
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.page-home .trust-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

.page-home .trust-card {
    padding: 1.6rem 1.5rem;
    border-radius: 24px;
    background: rgba(18, 18, 18, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.page-home .trust-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(229, 9, 20, 0.12);
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.page-home .trust-card h3 {
    margin-bottom: 0.65rem;
}

.page-home .tool-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.page-home .btn-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.25rem;
    padding: 0.9rem 1.25rem;
    border-radius: 16px;
    background: rgba(229, 9, 20, 0.12);
    color: #fff;
    font-weight: 700;
    border: 1px solid rgba(229, 9, 20, 0.25);
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.page-home .btn-card:hover {
    transform: translateY(-2px);
    background: rgba(229, 9, 20, 0.18);
    box-shadow: 0 14px 32px rgba(229, 9, 20, 0.18);
}

.page-home .hp-workflow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    position: relative;
    padding-top: 2rem;
}

.page-home .hp-workflow-line {
    position: absolute;
    top: 50%;
    left: 5%;
    right: 5%;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    z-index: 0;
}

.page-home .hp-step {
    position: relative;
    z-index: 1;
    padding: 2rem 1.5rem;
    border-radius: 24px;
    background: rgba(26, 26, 26, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.16);
}

.page-home .hp-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(229, 9, 20, 0.16);
    color: #fff;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-home .hp-cat-card {
    display: grid;
    gap: 1rem;
    padding: 1.6rem;
    border-radius: 24px;
    background: rgba(20, 20, 20, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.page-home .hp-cat-card:hover {
    transform: translateY(-6px);
    border-color: rgba(229, 9, 20, 0.24);
    box-shadow: 0 26px 56px rgba(229, 9, 20, 0.12);
}

.page-home .hp-cat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    font-size: 1.25rem;
}

.page-home .hp-blog-card {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.page-home .hp-blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.22);
}

.page-home .hp-final-cta__panel {
    position: relative;
    padding: 3rem 2.2rem;
    border-radius: 32px;
    background: rgba(16, 16, 16, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.page-home .hp-final-cta__panel::before {
    content: '';
    position: absolute;
    right: -40px;
    top: -30px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.16), transparent 55%);
    pointer-events: none;
}

.page-home .hp-final-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.75rem;
}

@media (max-width: 980px) {
    .page-home .hp-hero-grid {
        grid-template-columns: 1fr;
    }

    .page-home .hp-dashboard-preview {
        justify-content: center;
    }

    .page-home .hp-dashboard-panel {
        max-width: 100%;
    }

    .page-home .trust-grid,
    .page-home .hp-workflow,
    .page-home .hp-cat-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .page-home .search-container {
        flex-direction: column;
    }

    .page-home .search-container button {
        width: 100%;
    }

    .page-home .hp-hero-badges {
        grid-template-columns: 1fr;
    }

    .page-home .hp-workflow-line {
        display: none;
    }
}

/* ---------- Section shell ---------- */
.page-home .hp-section {
    position: relative;
    padding: 5rem 0;
}

.page-home .hp-section--tight {
    padding: 4.25rem 0;
}

.page-home .hp-section__glow {
    pointer-events: none;
    position: absolute;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.22), transparent 65%);
    top: -120px;
    right: -120px;
}

body[data-theme="dark"] .page-home .hp-section__glow {
    opacity: 0.28;
}

/* ---------- Featured tools premium cards ---------- */
.page-home .hp-featured .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.page-home .hp-featured .tool-card.featured {
    position: relative;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.page-home .hp-featured .tool-card.featured::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.55), rgba(138, 3, 3, 0.15), rgba(229, 9, 20, 0.35));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.page-home .hp-featured .tool-card.featured:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 28px 60px rgba(229, 9, 20, 0.18);
}

.page-home .hp-featured .tool-card.featured:hover::after {
    opacity: 1;
}

.page-home .hp-featured .tool-card.featured h3::before {
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.page-home .hp-featured .tool-card.featured:hover h3::before {
    transform: scale(1.12) rotate(-6deg);
}

.page-home .hp-view-all {
    display: flex;
    justify-content: center;
    margin-top: 2.25rem;
}

.page-home .hp-pulse-btn {
    position: relative;
    overflow: visible;
}

.page-home .hp-pulse-btn::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid rgba(229, 9, 20, 0.35);
    animation: hpPulse 2.6s ease-out infinite;
    pointer-events: none;
}

@keyframes hpPulse {
    0% { transform: scale(1); opacity: 0.55; }
    70% { transform: scale(1.08); opacity: 0; }
    100% { transform: scale(1.08); opacity: 0; }
}

/* ---------- Why / How sections ---------- */
.page-home .hp-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.page-home .hp-glass-card {
    padding: 1.75rem 1.5rem;
    border-radius: 22px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

body[data-theme="dark"] .page-home .hp-glass-card {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.page-home .hp-glass-card:hover {
    transform: translateY(-6px);
    border-color: rgba(229, 9, 20, 0.35);
    box-shadow: 0 22px 50px rgba(229, 9, 20, 0.12);
}

.page-home .hp-icon-ring {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.15), rgba(138, 3, 3, 0.12));
    border: 1px solid rgba(229, 9, 20, 0.25);
}

.page-home .hp-glass-card h3 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.page-home .hp-glass-card p {
    font-size: 0.95rem;
    color: var(--muted-text);
    line-height: 1.65;
}

/* How it works */
.page-home .hp-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    position: relative;
    margin-top: 2rem;
}

.page-home .hp-step {
    text-align: center;
    padding: 1.75rem 1rem;
    border-radius: 22px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    position: relative;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.page-home .hp-step:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 44px rgba(229, 9, 20, 0.12);
}

body[data-theme="dark"] .page-home .hp-step {
    background: var(--card-bg);
}

.page-home .hp-step-num {
    width: 44px;
    height: 44px;
    margin: 0 auto 1rem;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #E50914, #8A0303);
    box-shadow: 0 10px 28px rgba(229, 9, 20, 0.35);
}

.page-home .hp-steps::before {
    content: '';
    position: absolute;
    top: 52px;
    left: 12%;
    right: 12%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(229, 9, 20, 0.35), rgba(138, 3, 3, 0.35), transparent);
    z-index: 0;
    pointer-events: none;
}

.page-home .hp-step {
    z-index: 1;
}

@media (max-width: 900px) {
    .page-home .hp-card-grid,
    .page-home .hp-steps {
        grid-template-columns: 1fr;
    }

    .page-home .hp-steps::before {
        display: none;
    }
}

/* ---------- Category overview ---------- */
.page-home .hp-cat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.page-home .hp-cat-card {
    display: block;
    padding: 1.6rem 1.4rem;
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    position: relative;
    overflow: hidden;
}

body[data-theme="dark"] .page-home .hp-cat-card {
    background: var(--card-bg);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}

.page-home .hp-cat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 90% 10%, rgba(229, 9, 20, 0.12), transparent 45%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.page-home .hp-cat-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(229, 9, 20, 0.4);
    box-shadow: 0 22px 55px rgba(229, 9, 20, 0.15);
}

.page-home .hp-cat-card:hover::before {
    opacity: 1;
}

.page-home .hp-cat-card h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.page-home .hp-cat-card p {
    font-size: 0.9rem;
    color: var(--muted-text);
    margin-bottom: 0.85rem;
}

.page-home .hp-cat-meta {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.02em;
}

@media (max-width: 900px) {
    .page-home .hp-cat-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Blog preview ---------- */
.page-home .hp-blog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.page-home .hp-blog-card {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 1.25rem;
    padding: 0;
    border-radius: 22px;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

body[data-theme="dark"] .page-home .hp-blog-card {
    background: var(--card-bg);
}

.page-home .hp-blog-card:hover {
    transform: translateY(-8px);
    border-color: rgba(229, 9, 20, 0.35);
    box-shadow: 0 24px 55px rgba(229, 9, 20, 0.12);
}

.page-home .hp-blog-card__img {
    overflow: hidden;
    min-height: 140px;
}

.page-home .hp-blog-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-home .hp-blog-card:hover .hp-blog-card__img img {
    transform: scale(1.08);
}

.page-home .hp-blog-card__body {
    padding: 1.25rem 1.25rem 1.25rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.page-home .hp-blog-card__meta {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.35rem;
}

.page-home .hp-blog-card__body h3 {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 0.35rem;
}

.page-home .hp-blog-card__body p {
    font-size: 0.88rem;
    color: var(--muted-text);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    .page-home .hp-blog-card {
        grid-template-columns: 1fr;
    }

    .page-home .hp-blog-card__body {
        padding: 1rem 1.25rem 1.25rem;
    }

    .page-home .hp-blog-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Final CTA ---------- */
.page-home .hp-final-cta {
    position: relative;
    padding: 4rem 0;
    overflow: hidden;
}

.page-home .hp-final-cta__panel {
    position: relative;
    border-radius: 28px;
    padding: clamp(2rem, 4vw, 3.25rem);
    text-align: center;
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.12) 0%, rgba(26, 26, 26, 0.92) 45%, rgba(13, 13, 13, 0.95) 100%);
    border: 1px solid rgba(229, 9, 20, 0.28);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

body:not([data-theme="dark"]) .page-home .hp-final-cta__panel {
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.08) 0%, #ffffff 50%, #fafafa 100%);
    border-color: rgba(229, 9, 20, 0.2);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.08);
}

.page-home .hp-final-cta__panel::before {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(229, 9, 20, 0.22), transparent 65%);
    filter: blur(40px);
    pointer-events: none;
    animation: hpCtaGlow 5s ease-in-out infinite alternate;
}

@keyframes hpCtaGlow {
    from { opacity: 0.45; transform: translate(-50%, -50%) scale(1); }
    to { opacity: 0.85; transform: translate(-50%, -50%) scale(1.06); }
}

.page-home .hp-final-cta__panel h2 {
    position: relative;
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.page-home .hp-final-cta__panel p {
    position: relative;
    color: var(--muted-text);
    max-width: 560px;
    margin: 0 auto 1.5rem;
    font-size: 1.05rem;
}

.page-home .hp-final-cta__actions {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

/* ---------- Full directory label ---------- */
.page-home .categories.hp-full-directory {
    scroll-margin-top: 96px;
}

/* Compact directory CTA + collapsed directory styles */
.page-home .hp-directory-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 0 2rem;
}

.page-home .hp-directory-cta__lead {
    margin: 0;
    color: var(--muted-text);
    max-width: 68ch;
    font-size: 1rem;
}

.page-home .hp-directory-cta__actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.page-home .hp-directory-content.collapsed {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s ease;
}

.page-home .hp-directory-content {
    max-height: 4000px; /* large enough to contain full directory when open */
    transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s ease;
    opacity: 1;
}

.page-home .hp-directory-content[aria-hidden="true"] {
    opacity: 0;
}

@media (max-width: 900px) {
    .page-home .hp-directory-cta { flex-direction: column; align-items: flex-start; }
    .page-home .hp-directory-cta__actions { width: 100%; }
}
