/* HR Fiber - Global UI Refinements v5.2 */

:root {
    --hr-primary: #4f008c;
    --hr-primary-light: #7c3aed;
    --hr-secondary: #84cc16;
    --hr-accent: #a855f7;
    --hr-dark: #1e0936;
    --hr-light: #f8fafc;
    --hr-surface: #ffffff;
    --hr-border: rgba(79, 0, 140, 0.08);
    --hr-shadow: 0 4px 24px rgba(30, 9, 54, 0.08);
    --hr-radius: 1rem;
    --hr-section-py: 4rem;
}

.dark {
    --hr-light: #0f172a;
    --hr-surface: #1e293b;
    --hr-border: rgba(255, 255, 255, 0.06);
    --hr-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

/* Refined scrollbar */
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--hr-primary), var(--hr-primary-light));
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--hr-secondary);
}

/* Navigation polish */
nav.bg-white,
nav.dark\:bg-surface-dark {
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.92) !important;
    border-bottom: 1px solid var(--hr-border);
}

.dark nav.bg-white,
.dark nav.dark\:bg-surface-dark {
    background: rgba(30, 41, 59, 0.92) !important;
}

nav .container > div > div.hidden.md\:flex a:not([class*="bg-gradient"]) {
    position: relative;
    padding-bottom: 2px;
}

nav .container > div > div.hidden.md\:flex a:not([class*="bg-gradient"]):hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--hr-primary), var(--hr-secondary));
    border-radius: 2px;
}

/* Section consistency */
.section-block {
    padding-top: var(--hr-section-py);
    padding-bottom: var(--hr-section-py);
}

.section-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.section-heading .section-label {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(79, 0, 140, 0.08);
    color: var(--hr-primary);
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 0.75rem;
}

.dark .section-heading .section-label {
    background: rgba(168, 85, 247, 0.15);
    color: #c4b5fd;
}

.section-heading h2 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.dark .section-heading h2 {
    color: white;
}

.section-heading p {
    color: #64748b;
    max-width: 42rem;
    margin: 0 auto;
    line-height: 1.7;
}

.dark .section-heading p {
    color: #94a3b8;
}

/* Card hover consistency */
.pricing-card,
.card-hover {
    border-radius: 1.25rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.pricing-card:hover,
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--hr-shadow);
}

/* Footer refinement */
footer {
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%) !important;
}

.dark footer {
    background: linear-gradient(180deg, #0f172a 0%, #020617 100%) !important;
}

footer h4 {
    position: relative;
    padding-bottom: 0.5rem;
}

footer h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 2rem;
    height: 2px;
    background: var(--hr-secondary);
    border-radius: 2px;
}

footer ul li a:hover {
    color: var(--hr-primary) !important;
    padding-right: 4px;
    transition: padding 0.2s;
}

/* Nav speed test highlight */
.nav-speed-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    background: linear-gradient(135deg, rgba(132,204,22,0.12), rgba(79,0,140,0.08));
    border: 1px solid rgba(132, 204, 22, 0.25);
    border-radius: 9999px;
    font-weight: 700;
    color: var(--hr-primary) !important;
    transition: all 0.2s;
}

.nav-speed-link:hover {
    background: linear-gradient(135deg, rgba(132,204,22,0.2), rgba(79,0,140,0.12));
    transform: scale(1.03);
}

.dark .nav-speed-link {
    color: #c4b5fd !important;
    border-color: rgba(132, 204, 22, 0.3);
}

/* Button gradient consistency */
.btn-primary-gradient {
    background: linear-gradient(135deg, var(--hr-primary) 0%, var(--hr-primary-light) 100%);
    color: white;
    font-weight: 700;
    border-radius: var(--hr-radius);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 0, 140, 0.35);
}

/* Glow refinement */
.glow-effect {
    box-shadow: 0 0 20px rgba(132, 204, 22, 0.35);
}

.glow-effect:hover {
    box-shadow: 0 0 30px rgba(132, 204, 22, 0.55);
}

/* Typography rhythm */
body {
    line-height: 1.65;
    letter-spacing: 0.01em;
}

h1, h2, h3, h4 {
    letter-spacing: -0.01em;
}

/* Container breathing room on mobile */
@media (max-width: 640px) {
    :root {
        --hr-section-py: 3rem;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
