/* ════════════════════════════════════════════════════════════════
   DOWNLOAD - PHAENOMENA V2
   Palette: GOLD #FBC302 + GRAFITE #1A1817
   ════════════════════════════════════════════════════════════════ */

.page-download {
    background: var(--v2-cream, #F8F6F1);
    color: #1A1817;
}

/* ═══ HERO ════════════════════════════════════════════════════════ */
.v2-dl-hero {
    background: var(--v2-cream, #F8F6F1);
    padding: clamp(80px, 14vh, 160px) var(--v2-pad-x) clamp(56px, 9vh, 90px);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(26,24,23,0.06);
}
.v2-dl-hero::after {
    content: "";
    position: absolute;
    bottom: -180px;
    right: -180px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(251,195,2,0.1) 0%, transparent 60%);
    pointer-events: none;
}
.v2-dl-hero-content {
    max-width: var(--v2-container-max);
    margin: 0 auto;
    position: relative;
    z-index: 2;
}
.v2-dl-hero-content .v2-section-tag {
    color: #B8753A;
    font-family: var(--v2-mono, 'JetBrains Mono', monospace);
    font-size: clamp(0.7812rem, 0.82vw, 0.9062rem);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 22px;
    display: inline-block;
}
.v2-dl-h1 {
    font-family: var(--v2-sans, 'Plus Jakarta Sans', sans-serif);
    font-size: clamp(48px, 7vw, 100px);
    font-weight: 800;
    line-height: 0.96;
    letter-spacing: -0.03em;
    color: #1A1817;
    margin: 0 0 24px;
}
.v2-dl-h1 em {
    color: #FBC302;
    font-style: normal;
}
.v2-dl-lead {
    font-family: var(--v2-sans, 'Plus Jakarta Sans', sans-serif);
    font-size: clamp(0.9375rem, 1.4vw, 1.0625rem);
    line-height: 1.7;
    color: rgba(26,24,23,0.7);
    margin: 0;
    max-width: 680px;
    text-wrap: pretty;
}
.v2-dl-lead strong {
    color: #1A1817;
    font-weight: 700;
}

/* ═══ FILTRO STICKY ═══════════════════════════════════════════════ */
.v2-dl-filter-sticky {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff;
    border-bottom: 1px solid rgba(26,24,23,0.1);
    box-shadow: 0 4px 20px -8px rgba(26,24,23,0.1);
}
.v2-dl-filter-inner {
    max-width: var(--v2-container-max);
    margin: 0 auto;
    padding: 0 var(--v2-pad-x);
}
.v2-dl-filter-nav {
    display: flex;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.v2-dl-filter-nav::-webkit-scrollbar { display: none; }

.v2-dl-filter-tab {
    background: none;
    border: none;
    padding: 18px 22px;
    cursor: pointer;
    font-family: var(--v2-sans, 'Plus Jakarta Sans', sans-serif);
    font-size: clamp(0.9062rem, 0.94vw, 1.0625rem);
    font-weight: 500;
    color: rgba(26,24,23,0.55);
    white-space: nowrap;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: color 0.3s ease;
    flex-shrink: 0;
}
.v2-dl-filter-tab::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: #1A1817;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.v2-dl-filter-tab:hover { color: #1A1817; }
.v2-dl-filter-tab.is-active {
    color: #1A1817;
    font-weight: 700;
}
.v2-dl-filter-tab.is-active::after { transform: scaleX(1); }
.v2-dl-filter-tab svg {
    color: #FBC302;
    opacity: 0.7;
    flex-shrink: 0;
}
.v2-dl-filter-tab.is-active svg { opacity: 1; }

/* ═══ CONTENUTO SEZIONI ═══════════════════════════════════════════ */
.v2-dl-content {
    max-width: var(--v2-container-max);
    margin: 0 auto;
    padding: clamp(40px, 6vh, 80px) var(--v2-pad-x) clamp(64px, 10vh, 120px);
    display: flex;
    flex-direction: column;
    gap: clamp(48px, 8vh, 96px);
}

/* Sezione singola */
.v2-dl-section {
    display: flex;
    flex-direction: column;
    gap: 0;
}
[hidden] { display: none !important; }

.v2-dl-section-head {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 22px;
    align-items: flex-start;
    padding-bottom: 24px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(26,24,23,0.15);
}
.v2-dl-section-eyebrow {
    font-family: var(--v2-mono, 'JetBrains Mono', monospace);
    font-size: 1.5rem;
    font-weight: 300;
    color: #FBC302;
    line-height: 1;
    letter-spacing: -0.03em;
    padding-top: 4px;
}
.v2-dl-section-title {
    font-family: var(--v2-sans, 'Plus Jakarta Sans', sans-serif);
    font-size: clamp(1.375rem, 2.4vw, 32px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1A1817;
    margin: 0 0 8px;
    line-height: 1.2;
}
.v2-dl-section-desc {
    font-family: var(--v2-sans, 'Plus Jakarta Sans', sans-serif);
    font-size: clamp(0.9375rem, 0.97vw, 1.0938rem);
    line-height: 1.6;
    color: rgba(26,24,23,0.6);
    margin: 0;
    text-wrap: pretty;
}

/* Sottogruppo (per schede tecniche raggruppate per categoria) */
.v2-dl-subgroup {
    margin-top: 8px;
    border-top: 1px solid rgba(26,24,23,0.07);
}
.v2-dl-subgroup:first-of-type {
    border-top: none;
}
.v2-dl-subgroup-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0 12px;
}
.v2-dl-subgroup-name {
    font-family: var(--v2-mono, 'JetBrains Mono', monospace);
    font-size: clamp(0.7188rem, 0.75vw, 0.8438rem);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #B8753A;
    font-weight: 700;
}
.v2-dl-subgroup-count {
    font-family: var(--v2-mono, 'JetBrains Mono', monospace);
    font-size: clamp(0.6875rem, 0.72vw, 0.8125rem);
    letter-spacing: 0.14em;
    color: rgba(26,24,23,0.45);
    font-weight: 600;
}

/* Lista file */
.v2-dl-list {
    display: flex;
    flex-direction: column;
}

/* Riga singolo file */
.v2-dl-row {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(26,24,23,0.06);
    transition: background 0.2s ease;
}
.v2-dl-row:hover {
    background: rgba(251,195,2,0.04);
    margin: 0 -12px;
    padding-left: 12px;
    padding-right: 12px;
    border-radius: 6px;
    border-bottom-color: transparent;
}
.v2-dl-row:last-child {
    border-bottom: none;
}

/* Icona tipo file */
.v2-dl-row-icon {
    font-family: var(--v2-mono, 'JetBrains Mono', monospace);
    font-size: clamp(0.6875rem, 0.72vw, 0.8125rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.v2-dl-icon-pdf {
    background: rgba(220, 50, 47, 0.1);
    color: #DC322F;
}
.v2-dl-icon-zip {
    background: rgba(251,195,2,0.12);
    color: #B8753A;
}

/* Info file */
.v2-dl-row-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.v2-dl-row-name {
    font-family: var(--v2-sans, 'Plus Jakarta Sans', sans-serif);
    font-size: clamp(0.9375rem, 1.0vw, 1.125rem);
    font-weight: 600;
    color: #1A1817;
    letter-spacing: -0.01em;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.v2-dl-row-meta {
    font-family: var(--v2-mono, 'JetBrains Mono', monospace);
    font-size: clamp(0.75rem, 0.78vw, 0.875rem);
    color: rgba(26,24,23,0.5);
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.v2-dl-row-tag {
    background: rgba(2,160,225,0.1);
    color: #02A0E1;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: clamp(0.6875rem, 0.72vw, 0.8125rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Bottone download */
.v2-dl-btn {
    background: var(--v2-cream, #F8F6F1);
    border: 1px solid rgba(26,24,23,0.15);
    color: #1A1817;
    padding: 9px 18px;
    border-radius: 8px;
    font-family: var(--v2-sans, 'Plus Jakarta Sans', sans-serif);
    font-size: clamp(0.8438rem, 0.88vw, 1rem);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: 0.01em;
}
.v2-dl-btn:hover {
    background: #1A1817;
    color: #FBC302;
    border-color: #1A1817;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px -4px rgba(26,24,23,0.25);
}
.v2-dl-btn svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}
.v2-dl-btn:hover svg {
    transform: translateY(2px);
}

/* ═══ CTA FINALE ══════════════════════════════════════════════════ */
.v2-dl-cta {
    padding: clamp(64px, 10vh, 120px) var(--v2-pad-x);
    background: #1A1817;
    color: #F8F6F1;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.v2-dl-cta::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #FBC302, transparent);
}
.v2-dl-cta-inner {
    max-width: 760px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}
.v2-section-tag-gold {
    color: #FBC302 !important;
    font-family: var(--v2-mono, 'JetBrains Mono', monospace);
    font-size: clamp(0.7812rem, 0.82vw, 0.9062rem);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-weight: 600;
    display: inline-block;
}
.v2-dl-cta .v2-section-tag {
    margin-bottom: 16px;
    display: inline-block;
}
.v2-dl-cta-title {
    font-family: var(--v2-sans, 'Plus Jakarta Sans', sans-serif);
    font-size: clamp(36px, 4.5vw, 64px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #F8F6F1;
    margin: 0 0 22px;
    line-height: 1.05;
    text-wrap: pretty;
}
.v2-dl-cta-title em {
    color: #FBC302;
    font-style: normal;
}
.v2-dl-cta-text {
    font-family: var(--v2-sans, 'Plus Jakarta Sans', sans-serif);
    font-size: clamp(1rem, 1.08vw, 1.1875rem);
    line-height: 1.7;
    color: rgba(248,246,241,0.7);
    margin: 0 0 36px;
    text-wrap: pretty;
}
.v2-dl-cta-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}
.v2-dl-cta .v2-btn-cta-primary {
    background: #FBC302;
    color: #1A1817;
    padding: 16px 32px;
    font-family: var(--v2-sans, 'Plus Jakarta Sans', sans-serif);
    font-size: clamp(0.9375rem, 1.0vw, 1.125rem);
    font-weight: 700;
    border-radius: 999px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 24px -8px rgba(251,195,2,0.4);
}
.v2-dl-cta .v2-btn-cta-primary:hover {
    background: #ffffff;
    transform: translateY(-2px);
}
.v2-dl-cta .v2-btn-cta-secondary {
    background: transparent;
    color: #F8F6F1;
    border: 1px solid rgba(248,246,241,0.3);
    padding: 16px 32px;
    font-family: var(--v2-sans, 'Plus Jakarta Sans', sans-serif);
    font-size: clamp(0.9375rem, 1.0vw, 1.125rem);
    font-weight: 500;
    border-radius: 999px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}
.v2-dl-cta .v2-btn-cta-secondary:hover {
    background: rgba(248,246,241,0.08);
    border-color: rgba(248,246,241,0.55);
}
.v2-dl-cta .v2-btn-cta-primary span {
    transition: transform 0.3s ease;
}
.v2-dl-cta .v2-btn-cta-primary:hover span {
    transform: translateX(4px);
}

/* ═══ RESPONSIVE ══════════════════════════════════════════════════ */
@media (max-width: 767px) {
    .v2-dl-row {
        grid-template-columns: 44px 1fr;
        grid-template-rows: auto auto;
        gap: 10px 14px;
    }
    .v2-dl-row-icon {
        grid-row: 1 / 3;
    }
    .v2-dl-btn {
        grid-column: 2;
        justify-self: start;
        font-size: 12px;
        padding: 8px 14px;
    }
    .v2-dl-row-name {
        white-space: normal;
        font-size: 14px;
    }
    .v2-dl-section-head {
        grid-template-columns: 40px 1fr;
        gap: 14px;
    }
    .v2-dl-cta-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .v2-dl-cta .v2-btn-cta-primary,
    .v2-dl-cta .v2-btn-cta-secondary {
        width: 100%;
        justify-content: center;
    }
}

@media (min-width: 2000px) {
    .v2-dl-filter-tab {
        font-size: clamp(0.9375rem, 1.0vw, 1.125rem);
        padding: 20px 28px;
    }
}
