/* ===================================================
   HOME PAGE (index.php only)
   =================================================== */

.hm-page {
    background:
        radial-gradient(1200px 520px at 50% -140px, rgba(99, 102, 241, 0.16), transparent 70%),
        radial-gradient(600px 400px at 92% 8%, rgba(14, 165, 233, 0.10), transparent 70%),
        radial-gradient(600px 400px at 6% 22%, rgba(168, 85, 247, 0.08), transparent 70%),
        var(--bg-primary);
}

.hm-page .glow-bg {
    background-image:
        linear-gradient(rgba(79, 70, 229, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 70, 229, 0.045) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 30%, transparent 75%);
}

.hm-page .main-navbar {
    position: sticky;
    top: 10px;
    z-index: 50;
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 18px;
    box-shadow: 0 8px 24px -12px rgba(15, 23, 42, 0.12);
}

/* ---------- NAVBAR TABS ---------- */
.hm-page .main-navbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
}

.hm-page .nav-tabs {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
}

.hm-page .nav-tab-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.2;
    color: #475569;
    white-space: nowrap;
}

.hm-page .nav-tab-btn svg {
    flex-shrink: 0;
}

.hm-page .nav-tab-btn:hover {
    background: rgba(255, 255, 255, 0.75);
    color: var(--text-primary);
}

.hm-page .nav-tab-btn.active {
    background: #ffffff;
    color: var(--accent-color);
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 6px 14px -6px rgba(79, 70, 229, 0.35);
}

.hm-page .nav-tabs .new-pill {
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 0.6rem;
    line-height: 1.2;
}

.hm-page .nav-tabs .new-pill-safe {
    background: #6366f1;
}

.tab-label-short {
    display: none;
}

/* ---------- HERO ---------- */
.hm-hero {
    padding: 34px 0 26px;
}

.hm-hero .badge-primary {
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(99, 102, 241, 0.25);
    box-shadow: 0 6px 18px -8px rgba(79, 70, 229, 0.35);
}

.hm-hero .hero-title {
    font-size: clamp(2.1rem, 5.2vw, 3.6rem);
    line-height: 1.08;
    letter-spacing: -1.5px;
    margin: 14px auto 14px;
    max-width: 820px;
}

.hm-hero .hero-title .gradient-text {
    background: linear-gradient(120deg, #4f46e5 0%, #7c3aed 45%, #0ea5e9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hm-hero .hero-subtitle {
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    max-width: 640px;
    color: #475569;
    line-height: 1.6;
}

/* Counters + platform chips, shown under the "SSL secured links" row */
.hm-trust-strip {
    text-align: center;
    margin-top: 4px;
}

/* Compact pill bar with the four live counters */
.hm-stats {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 2px;
    max-width: 100%;
    margin: 20px auto 0;
    padding: 5px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 999px;
    box-shadow: 0 8px 20px -14px rgba(15, 23, 42, 0.25);
}

.hm-stat {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 12px 4px 5px;
    border-radius: 999px;
    text-align: left;
    min-width: 0;
}

.hm-stat + .hm-stat::before {
    content: "";
    position: absolute;
    left: -2px;
    top: 50%;
    width: 1px;
    height: 16px;
    margin-top: -8px;
    background: #e2e8f0;
}

.hm-stat-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hm-stat-icon svg {
    width: 13px;
    height: 13px;
}

.hm-stat-icon.is-indigo { background: #eef2ff; color: #4f46e5; }
.hm-stat-icon.is-amber { background: #fff7ed; color: #ea580c; }
.hm-stat-icon.is-emerald { background: #ecfdf5; color: #059669; }
.hm-stat-icon.is-sky { background: #f0f9ff; color: #0284c7; }

.hm-stat-body {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    min-width: 0;
    white-space: nowrap;
}

.hm-stat-body strong {
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.hm-stat-body span {
    font-size: 0.76rem;
    color: var(--text-muted);
    font-weight: 600;
}

.hm-platforms {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
}

.hm-platforms-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-right: 2px;
}

.hm-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #475569;
    line-height: 1.4;
}

.hm-chip i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

/* ---------- SHORTENER CARD ---------- */
.hm-shortener {
    position: relative;
    margin-bottom: 0;
}

.hm-shortener::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: calc(var(--radius-xl) + 2px);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.55), rgba(14, 165, 233, 0.35) 50%, rgba(168, 85, 247, 0.45));
    filter: blur(18px);
    opacity: 0.35;
    z-index: -1;
}

.hm-shortener > .glass-card {
    border: 1px solid rgba(99, 102, 241, 0.18);
}

.hm-secure-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    margin-top: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.hm-secure-row span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ---------- AD SLOTS ---------- */
.hm-ad {
    margin: 22px auto 0;
    text-align: center;
}

.hm-ad-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #94a3b8;
}

.hm-ad-frame {
    margin: 0 auto;
    overflow: hidden;
}

/* Image banners keep their aspect ratio when squeezed (ad codes often hard-code height) */
.hm-ad-frame img {
    max-width: 100%;
    height: auto !important;
    display: block;
    margin: 0 auto;
}

/* 728x90: the box shrinks on narrow screens and JS scales the banner to match */
.hm-ad-leaderboard .hm-ad-box {
    width: 100%;
    max-width: 728px;
    height: 90px;
    margin: 0 auto;
    overflow: hidden;
}

.hm-ad-leaderboard .hm-ad-frame {
    width: 728px;
    height: 90px;
    transform-origin: top left;
}

.hm-ad-leaderboard.is-mobile-code .hm-ad-box {
    height: auto;
}

.hm-ad-leaderboard.is-mobile-code .hm-ad-frame {
    width: auto;
    height: auto;
    max-width: 100%;
    transform: none;
}

/* 250x250 inside the shortener card, under the submit button */
.hm-ad-square {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--border-color);
}

.hm-ad-square .hm-ad-frame {
    width: 250px;
    min-height: 250px;
    max-width: 100%;
}

/* ---------- SECTIONS ---------- */
.hm-section {
    margin-top: 88px;
}

.hm-section-head {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 36px;
}

.hm-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #e0e7ff;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.hm-section-title {
    font-size: clamp(1.6rem, 3.4vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.8px;
    line-height: 1.15;
    color: var(--text-primary);
    margin: 14px 0 10px;
}

.hm-section-sub {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* How it works */
.hm-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    counter-reset: hmstep;
}

.hm-step {
    position: relative;
    padding: 28px 24px 24px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 22px;
    box-shadow: 0 14px 30px -20px rgba(15, 23, 42, 0.25);
}

.hm-step-num {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    box-shadow: 0 10px 20px -8px rgba(79, 70, 229, 0.6);
    margin-bottom: 16px;
}

.hm-step h3 {
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.hm-step p {
    font-size: 0.92rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

.hm-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50px;
    right: -21px;
    width: 22px;
    height: 2px;
    background: repeating-linear-gradient(90deg, #c7d2fe 0 6px, transparent 6px 10px);
}

/* Features */
.hm-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.hm-features .feature-box-card {
    border-radius: 22px;
    padding: 26px 24px;
}

.hm-features .feature-box-title {
    font-size: 1.06rem;
}

.hm-features .feature-box-desc {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Transparency card */
.hm-section .transparency-banner-card {
    background:
        radial-gradient(600px 300px at 100% 0%, rgba(99, 102, 241, 0.35), transparent 70%),
        radial-gradient(500px 300px at 0% 100%, rgba(14, 165, 233, 0.22), transparent 70%),
        #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 48px 36px;
}

/* FAQ */
.hm-faq {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hm-faq details {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0 20px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hm-faq details[open] {
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 12px 26px -18px rgba(79, 70, 229, 0.45);
}

.hm-faq summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.hm-faq summary::-webkit-details-marker { display: none; }

.hm-faq summary::after {
    content: "+";
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 1.2rem;
    font-weight: 700;
    transition: transform 0.2s ease;
}

.hm-faq details[open] summary::after {
    transform: rotate(45deg);
}

.hm-faq details p {
    margin: 0 0 18px;
    font-size: 0.93rem;
    line-height: 1.65;
    color: #475569;
}

/* CTA */
.hm-cta {
    position: relative;
    overflow: hidden;
    margin-top: 88px;
    padding: 52px 32px;
    border-radius: 28px;
    text-align: center;
    color: #ffffff;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #0ea5e9 130%);
    box-shadow: 0 30px 60px -28px rgba(79, 70, 229, 0.75);
}

.hm-cta::before,
.hm-cta::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    pointer-events: none;
}

.hm-cta::before { width: 320px; height: 320px; top: -160px; right: -80px; }
.hm-cta::after { width: 220px; height: 220px; bottom: -120px; left: -60px; }

.hm-cta h2 {
    position: relative;
    font-size: clamp(1.6rem, 3.4vw, 2.3rem);
    font-weight: 800;
    letter-spacing: -0.6px;
    margin: 0 0 10px;
}

.hm-cta p {
    position: relative;
    max-width: 560px;
    margin: 0 auto 26px;
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.hm-cta-actions {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.hm-btn-light {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 14px;
    background: #ffffff;
    color: #4338ca;
    font-weight: 800;
    font-size: 0.98rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 12px 24px -12px rgba(15, 23, 42, 0.5);
    transition: transform 0.2s ease;
}

.hm-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.98rem;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.35);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hm-btn-light:hover,
.hm-btn-ghost:hover {
    transform: translateY(-2px);
}

.hm-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Footer */
.hm-footer {
    margin-top: 72px;
    padding: 44px 0 28px;
    border-top: 1px solid var(--border-color);
}

.hm-footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 32px;
}

.hm-footer-brand p {
    margin: 12px 0 0;
    max-width: 340px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #64748b;
}

.hm-footer h4 {
    margin: 0 0 12px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-primary);
}

.hm-footer-links {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.hm-footer-links a,
.hm-footer-links button {
    padding: 0;
    background: none;
    border: none;
    text-align: left;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    cursor: pointer;
}

.hm-footer-links a:hover,
.hm-footer-links button:hover {
    color: var(--accent-color);
}

.hm-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.84rem;
    color: var(--text-muted);
}

.hm-footer-bottom strong {
    color: var(--text-primary);
}

/* Scroll reveal (only applied when JS adds .hm-reveal-ready) */
.hm-reveal-ready .hm-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hm-reveal-ready .hm-reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .hm-reveal-ready .hm-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1120px) {
    .hm-page .nav-tabs .new-pill { display: none; }
    .hm-page .nav-tab-btn { padding: 8px 11px; }
}

/* Short tab labels where space is tight: small laptops (tabs share the row) and phones */
@media (min-width: 861px) and (max-width: 1000px), (max-width: 560px) {
    .hm-page .tab-label-long { display: none; }
    .hm-page .tab-label-short { display: inline; }
}

/* Phone & small tablet: brand + menu on row 1, full-width segmented tabs on row 2 */
@media (max-width: 860px) {
    .hm-page .main-navbar {
        display: flex;
        flex-wrap: wrap;
        position: relative;
        top: auto;
        gap: 10px;
    }
    .hm-page .nav-tabs {
        order: 3;
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        border-radius: 12px;
    }
    .hm-page .nav-tab-btn {
        width: 100%;
        min-width: 0;
        padding: 9px 6px;
        gap: 6px;
        font-size: 0.84rem;
    }
}

@media (max-width: 360px) {
    .hm-page .nav-tab-btn { font-size: 0.78rem; gap: 4px; }
    .hm-page .nav-tab-btn svg { width: 14px; height: 14px; }
}

@media (max-width: 980px) {
    .hm-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hm-steps { grid-template-columns: 1fr; }
    .hm-step:not(:last-child)::after { display: none; }
    .hm-footer-grid { grid-template-columns: 1fr 1fr; }
    .hm-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
    .hm-page .main-navbar {
        top: 6px;
        margin-top: 6px;
        border-radius: 14px;
    }
    .hm-hero { padding: 22px 0 18px; }
    .hm-platforms { gap: 5px; margin-top: 12px; }
    .hm-chip { padding: 2px 8px; font-size: 0.66rem; }
    .hm-hero .hero-title { letter-spacing: -0.8px; }
    .hm-stats {
        display: inline-grid;
        grid-template-columns: repeat(2, auto);
        justify-content: center;
        gap: 2px 6px;
        margin-top: 16px;
        padding: 5px 8px;
        border-radius: 18px;
    }
    .hm-stat { padding: 3px 6px 3px 3px; gap: 6px; }
    .hm-stat + .hm-stat::before { display: none; }
    .hm-stat-icon { width: 22px; height: 22px; }
    .hm-stat-icon svg { width: 12px; height: 12px; }
    .hm-stat-body strong { font-size: 0.82rem; }
    .hm-stat-body span { font-size: 0.72rem; }
    .hm-features { grid-template-columns: 1fr; }
    .hm-section { margin-top: 60px; }
    .hm-section-head { margin-bottom: 24px; }
    .hm-section .transparency-banner-card { padding: 32px 20px; }
    .hm-cta { margin-top: 60px; padding: 40px 20px; border-radius: 22px; }
    .hm-cta-actions a,
    .hm-cta-actions button { width: 100%; justify-content: center; }
    .hm-footer { margin-top: 52px; }
}
