/* ═══════════════════════════════════════════════════════════════
   HOMEVERDICTS — Design System
   Concept: "The Verdict" — Editorial authority meets modern glass
   Color: Deep navy + warm amber accents + clean whites
   Typography: Playfair Display (editorial) + Inter (body)
   ═══════════════════════════════════════════════════════════════ */

:root {
    /* ── Core Palette ── */
    --hv-navy:        #0B1426;
    --hv-navy-mid:    #162038;
    --hv-navy-light:  #1E2D4F;
    --hv-slate:       #64748B;
    --hv-slate-light: #94A3B8;
    --hv-amber:       #F59E0B;
    --hv-amber-dark:  #D97706;
    --hv-amber-glow:  rgba(245, 158, 11, 0.15);
    --hv-emerald:     #10B981;
    --hv-emerald-bg:  rgba(16, 185, 129, 0.08);
    --hv-rose:        #F43F5E;
    --hv-rose-bg:     rgba(244, 63, 94, 0.08);
    --hv-white:       #FFFFFF;
    --hv-off-white:   #F8FAFC;
    --hv-border:      #E2E8F0;
    --hv-border-dark: #CBD5E1;
    --hv-text:        #1E293B;
    --hv-text-mid:    #475569;
    --hv-text-light:  #94A3B8;

    /* ── Glass Effect ── */
    --hv-glass:       rgba(255, 255, 255, 0.7);
    --hv-glass-blur:  12px;
    --hv-glass-border: rgba(255, 255, 255, 0.2);

    /* ── Shadows ── */
    --hv-shadow-sm:   0 1px 3px rgba(11, 20, 38, 0.06);
    --hv-shadow-md:   0 4px 16px rgba(11, 20, 38, 0.08);
    --hv-shadow-lg:   0 8px 32px rgba(11, 20, 38, 0.12);
    --hv-shadow-glow: 0 0 24px rgba(245, 158, 11, 0.2);

    /* ── Spacing ── */
    --hv-gap-xs:  4px;
    --hv-gap-sm:  8px;
    --hv-gap-md:  16px;
    --hv-gap-lg:  24px;
    --hv-gap-xl:  40px;
    --hv-gap-2xl: 64px;

    /* ── Radius ── */
    --hv-radius-sm:  6px;
    --hv-radius-md:  12px;
    --hv-radius-lg:  20px;
    --hv-radius-xl:  28px;

    /* ── Typography ── */
    --hv-font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --hv-font-display: 'Playfair Display', Georgia, serif;

    /* ── Layout ── */
    --hv-max-width:    1200px;
    --hv-content-width: 780px;
}

/* ═══ Reset & Base ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--hv-font-body);
    color: var(--hv-text);
    background: var(--hv-off-white);
    line-height: 1.7;
}

/* ═══ HEADER — Floating Glass Nav ═══ */
.hv-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 var(--hv-gap-lg);
    transition: all 0.3s ease;
}

.hv-header__inner {
    max-width: var(--hv-max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    padding: 0 var(--hv-gap-lg);
    margin-top: var(--hv-gap-md);
    background: var(--hv-glass);
    backdrop-filter: blur(var(--hv-glass-blur));
    -webkit-backdrop-filter: blur(var(--hv-glass-blur));
    border: 1px solid var(--hv-glass-border);
    border-radius: var(--hv-radius-xl);
    box-shadow: var(--hv-shadow-md);
}

.hv-header.is-scrolled .hv-header__inner {
    margin-top: 0;
    border-radius: 0 0 var(--hv-radius-xl) var(--hv-radius-xl);
    background: rgba(255, 255, 255, 0.92);
}

/* Logo */
.hv-logo {
    display: flex;
    align-items: center;
    gap: var(--hv-gap-sm);
    text-decoration: none;
    color: var(--hv-navy);
}

.hv-logo__icon {
    width: 36px;
    height: 36px;
    background: var(--hv-navy);
    border-radius: var(--hv-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hv-amber);
}

.hv-logo__text {
    font-family: var(--hv-font-display);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hv-logo__text span {
    color: var(--hv-amber-dark);
}

/* Navigation */
.hv-nav { display: flex; align-items: center; gap: var(--hv-gap-xs); }

.hv-nav__link {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--hv-text-mid);
    text-decoration: none;
    border-radius: var(--hv-radius-md);
    transition: all 0.2s ease;
}

.hv-nav__link:hover,
.hv-nav__link:focus-visible {
    color: var(--hv-navy);
    background: rgba(11, 20, 38, 0.04);
}

.hv-nav__link--active {
    color: var(--hv-navy);
    background: rgba(11, 20, 38, 0.06);
    font-weight: 600;
}

/* Search toggle */
.hv-search-toggle {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hv-slate);
    transition: all 0.2s;
}

.hv-search-toggle:hover { background: rgba(11, 20, 38, 0.04); color: var(--hv-navy); }

/* Mobile menu */
.hv-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--hv-navy);
}

@media (max-width: 768px) {
    .hv-nav { display: none; }
    .hv-menu-toggle { display: flex; align-items: center; justify-content: center; }
    .hv-nav.is-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: var(--hv-gap-md);
        right: var(--hv-gap-md);
        background: var(--hv-white);
        border-radius: var(--hv-radius-lg);
        box-shadow: var(--hv-shadow-lg);
        padding: var(--hv-gap-md);
        gap: var(--hv-gap-xs);
    }
}

/* ═══ HERO — Category Landing ═══ */
.hv-hero {
    position: relative;
    padding: var(--hv-gap-2xl) var(--hv-gap-lg);
    background: linear-gradient(135deg, var(--hv-navy) 0%, var(--hv-navy-mid) 50%, var(--hv-navy-light) 100%);
    overflow: hidden;
}

.hv-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--hv-amber-glow) 0%, transparent 70%);
    pointer-events: none;
}

.hv-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--hv-amber), transparent);
}

.hv-hero__inner {
    max-width: var(--hv-max-width);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hv-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--hv-amber);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--hv-gap-lg);
}

.hv-hero__title {
    font-family: var(--hv-font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--hv-white);
    line-height: 1.15;
    max-width: 700px;
    margin-bottom: var(--hv-gap-md);
}

.hv-hero__subtitle {
    font-size: 1.125rem;
    color: var(--hv-slate-light);
    max-width: 560px;
    line-height: 1.6;
}

/* ═══ ARTICLE CONTENT ═══ */
.hv-article {
    max-width: var(--hv-content-width);
    margin: 0 auto;
    padding: var(--hv-gap-xl) var(--hv-gap-lg);
}

.hv-article h2 {
    font-family: var(--hv-font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--hv-navy);
    margin: var(--hv-gap-xl) 0 var(--hv-gap-md);
    line-height: 1.3;
    scroll-margin-top: 100px;
}

.hv-article h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--hv-text);
    margin: var(--hv-gap-lg) 0 var(--hv-gap-sm);
}

.hv-article p {
    margin-bottom: var(--hv-gap-md);
    color: var(--hv-text-mid);
    font-size: 1.0625rem;
    line-height: 1.8;
}

.hv-article ul, .hv-article ol {
    margin: 0 0 var(--hv-gap-md) var(--hv-gap-lg);
    color: var(--hv-text-mid);
}

.hv-article li {
    margin-bottom: var(--hv-gap-sm);
    line-height: 1.7;
}

.hv-article li strong {
    color: var(--hv-text);
}

/* ═══ TABLE OF CONTENTS — Glass Card ═══ */
.hv-toc {
    background: var(--hv-glass);
    backdrop-filter: blur(var(--hv-glass-blur));
    border: 1px solid var(--hv-border);
    border-radius: var(--hv-radius-lg);
    padding: var(--hv-gap-lg);
    margin: var(--hv-gap-lg) 0;
    box-shadow: var(--hv-shadow-sm);
}

.hv-toc__header {
    display: flex;
    align-items: center;
    gap: var(--hv-gap-sm);
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--hv-navy);
    margin-bottom: var(--hv-gap-md);
}

.hv-toc__toggle {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--hv-slate);
    padding: 4px;
    border-radius: 4px;
    transition: transform 0.2s;
}

.hv-toc__toggle[aria-expanded="false"] { transform: rotate(180deg); }

.hv-toc__list {
    list-style: none;
    counter-reset: toc;
    padding: 0;
    margin: 0;
}

.hv-toc__list li {
    counter-increment: toc;
    margin-bottom: 2px;
}

.hv-toc__list li a {
    display: flex;
    align-items: center;
    gap: var(--hv-gap-sm);
    padding: 8px 12px;
    font-size: 0.875rem;
    color: var(--hv-text-mid);
    text-decoration: none;
    border-radius: var(--hv-radius-sm);
    transition: all 0.15s ease;
}

.hv-toc__list li a::before {
    content: counter(toc, decimal-leading-zero);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--hv-amber-dark);
    min-width: 24px;
}

.hv-toc__list li a:hover,
.hv-toc__list li a:focus-visible {
    background: var(--hv-amber-glow);
    color: var(--hv-navy);
}

/* ═══ AUTHOR BOX ═══ */
.hv-author-box {
    display: flex;
    gap: var(--hv-gap-lg);
    padding: var(--hv-gap-lg);
    margin: var(--hv-gap-xl) 0;
    background: var(--hv-white);
    border: 1px solid var(--hv-border);
    border-radius: var(--hv-radius-lg);
    box-shadow: var(--hv-shadow-sm);
}

.hv-author-box__avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--hv-navy), var(--hv-navy-light));
    color: var(--hv-amber);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--hv-font-display);
    font-size: 1.5rem;
    font-weight: 800;
    flex-shrink: 0;
}

.hv-author-box__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hv-amber-dark);
}

.hv-author-box__name {
    font-family: var(--hv-font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--hv-navy);
    margin: 2px 0 6px;
}

.hv-author-box__bio {
    font-size: 0.875rem;
    color: var(--hv-text-mid);
    line-height: 1.6;
    margin: 0;
}

/* ═══ RELATED ARTICLES ═══ */
.hv-related {
    margin: var(--hv-gap-xl) 0;
}

.hv-related__title {
    font-family: var(--hv-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--hv-navy);
    margin-bottom: var(--hv-gap-lg);
}

.hv-related__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--hv-gap-md);
}

.hv-related__card {
    display: flex;
    flex-direction: column;
    background: var(--hv-white);
    border: 1px solid var(--hv-border);
    border-radius: var(--hv-radius-md);
    overflow: hidden;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: var(--hv-shadow-sm);
}

.hv-related__card:hover {
    transform: translateY(-2px);
    box-shadow: var(--hv-shadow-md);
    border-color: var(--hv-amber);
}

.hv-related__thumb { aspect-ratio: 3/2; overflow: hidden; }
.hv-related__thumb img { width: 100%; height: 100%; object-fit: cover; }

.hv-related__info { padding: var(--hv-gap-md); }

.hv-related__type {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--hv-amber-dark);
}

.hv-related__name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--hv-navy);
    margin-top: 4px;
    line-height: 1.4;
}

/* ═══ FOOTER ═══ */
.hv-footer {
    background: var(--hv-navy);
    color: var(--hv-slate-light);
    padding: var(--hv-gap-2xl) var(--hv-gap-lg) var(--hv-gap-xl);
    margin-top: var(--hv-gap-2xl);
}

.hv-footer__inner {
    max-width: var(--hv-max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--hv-gap-xl);
}

.hv-footer__brand-desc {
    font-size: 0.875rem;
    line-height: 1.7;
    margin-top: var(--hv-gap-md);
    max-width: 300px;
}

.hv-footer__heading {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--hv-white);
    margin-bottom: var(--hv-gap-md);
}

.hv-footer__links {
    list-style: none;
    padding: 0;
}

.hv-footer__links li { margin-bottom: var(--hv-gap-sm); }

.hv-footer__links a {
    color: var(--hv-slate-light);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.15s;
}

.hv-footer__links a:hover { color: var(--hv-amber); }

.hv-footer__bottom {
    max-width: var(--hv-max-width);
    margin: var(--hv-gap-xl) auto 0;
    padding-top: var(--hv-gap-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
}

@media (max-width: 768px) {
    .hv-footer__inner { grid-template-columns: 1fr 1fr; }
    .hv-footer__bottom { flex-direction: column; gap: var(--hv-gap-sm); }
}

/* ═══ CATEGORY CARDS — Homepage Grid ═══ */
.hv-categories {
    max-width: var(--hv-max-width);
    margin: 0 auto;
    padding: var(--hv-gap-2xl) var(--hv-gap-lg);
}

.hv-categories__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--hv-gap-lg);
}

.hv-category-card {
    position: relative;
    padding: var(--hv-gap-lg);
    background: var(--hv-white);
    border: 1px solid var(--hv-border);
    border-radius: var(--hv-radius-lg);
    text-decoration: none;
    transition: all 0.25s ease;
    overflow: hidden;
    box-shadow: var(--hv-shadow-sm);
}

.hv-category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--hv-amber), var(--hv-amber-dark));
    opacity: 0;
    transition: opacity 0.25s;
}

.hv-category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hv-shadow-lg);
    border-color: var(--hv-amber);
}

.hv-category-card:hover::before { opacity: 1; }

.hv-category-card__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--hv-radius-md);
    background: var(--hv-amber-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hv-amber-dark);
    margin-bottom: var(--hv-gap-md);
    font-size: 1.25rem;
}

.hv-category-card__name {
    font-family: var(--hv-font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--hv-navy);
    margin-bottom: 6px;
}

.hv-category-card__count {
    font-size: 0.8125rem;
    color: var(--hv-text-light);
}

.hv-category-card__arrow {
    position: absolute;
    bottom: var(--hv-gap-lg);
    right: var(--hv-gap-lg);
    color: var(--hv-slate-light);
    transition: all 0.2s;
}

.hv-category-card:hover .hv-category-card__arrow {
    color: var(--hv-amber);
    transform: translateX(4px);
}
