/* ============================================
   download.css – Download page specific styles
   ============================================ */

/* --- Page Hero (Compact) --- */
.page-hero {
    padding: 12rem 0 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: #fff;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 60%, rgba(59, 130, 246, 0.07) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 40%, rgba(6, 182, 212, 0.05) 0%, transparent 55%),
        radial-gradient(#e2e8f0 1px, transparent 1px);
    background-size: auto, auto, 28px 28px;
}

.page-hero-content {
    position: relative;
    z-index: 2;
    max-width: 780px;
    margin: 0 auto;
    padding-bottom: 5rem;
}

.page-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.25rem;
    font-weight: 500;
    letter-spacing: -0.05em;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.65;
}

.hero-meta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.hero-meta-sep {
    color: #e5e5e5;
    font-size: 0.85rem;
}

/* --- Platform Tabs Bar --- */
.platform-tabs-bar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    z-index: 50;
}

.platform-tabs-bar.is-sticky {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    border-bottom: 1px solid #ebebeb;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.tabs-placeholder {
    height: 0;
    transition: height 0.1s;
}

.platform-tabs-inner {
    display: flex;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 4rem;
    max-width: 1440px;
    margin: 0 auto;
}

.platform-tabs-inner::-webkit-scrollbar { display: none; }

.platform-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 1.1rem 1.5rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    cursor: pointer;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-family: inherit;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.platform-tab svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
    opacity: 0.65;
    flex-shrink: 0;
}

.platform-tab img.platform-tab-img {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    filter: brightness(0) saturate(100%);
    opacity: 0.45;
}

.platform-tab:hover img.platform-tab-img {
    opacity: 0.7;
}

.platform-tab.active img.platform-tab-img {
    filter: brightness(0) saturate(100%) invert(50%) sepia(89%) saturate(2064%) hue-rotate(210deg) brightness(103%) contrast(96%);
    opacity: 1;
}

.platform-tab:hover {
    color: var(--text-primary);
    background: #fafafa;
}

.platform-tab.active {
    color: var(--brand-blue);
    border-bottom-color: var(--brand-blue);
    background: none;
}

.platform-tab.active svg { opacity: 1; }

/* --- Platform Panels --- */
.platform-panel { display: none; }
.platform-panel.active { display: block; }

/* --- Download Section --- */
.dl-section { padding: 5rem 0 7rem; }

/* --- OS Banner (Platform heading inside panel) --- */
.os-banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0 0 3rem;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 3rem;
}

.os-icon-wrap {
    width: 60px;
    height: 60px;
    background: #0a0a0a;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.os-icon-wrap svg {
    width: 32px;
    height: 32px;
}

.os-icon-wrap img.os-icon-img {
    filter: brightness(0) invert(1);
}

.os-banner-text h2 {
    font-size: 1.7rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    margin-bottom: 0.3rem;
}

.os-banner-text p {
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

/* --- Download Cards Grid --- */
.dl-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
}

.dl-grid--single {
    grid-template-columns: 1fr;
    max-width: 680px;
}

/* --- Download Card --- */
.dl-card {
    background: #fff;
    border: 1.5px solid #e8e8e8;
    border-radius: 20px;
    padding: 2.25rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.2s;
}

.dl-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.07);
    border-color: #d8d8d8;
}

.dl-card--featured {
    border-color: rgba(59, 130, 246, 0.4);
    background: linear-gradient(145deg, #fff 0%, #f5f9ff 100%);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.12), 0 8px 30px rgba(59, 130, 246, 0.07);
}

.dl-card--featured:hover {
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2), 0 16px 45px rgba(59, 130, 246, 0.1);
}

.dl-card--archived { opacity: 0.82; }
.dl-card--archived:hover { opacity: 1; }

/* --- Card Badges --- */
.dl-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.9rem;
}

.dl-badge {
    font-size: 0.71rem;
    font-weight: 600;
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.dl-badge--blue   { background: rgba(59,130,246,0.1); color: var(--brand-blue); border: 1px solid rgba(59,130,246,0.2); }
.dl-badge--green  { background: rgba(22,163,74,0.1);  color: #16a34a;           border: 1px solid rgba(22,163,74,0.2);  }
.dl-badge--gray   { background: #f3f4f6;               color: var(--text-secondary); border: 1px solid #e5e7eb; }
.dl-badge--amber  { background: rgba(245,158,11,0.1); color: #b45309;           border: 1px solid rgba(245,158,11,0.25); }

/* --- Card Content --- */
.dl-card-name {
    font-size: 1.55rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 0.55rem;
    line-height: 1.15;
}

.dl-card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* --- Download Options --- */
.dl-options-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.dl-btns {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.dl-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    border: none;
}

.dl-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

.dl-btn--primary {
    background: var(--text-primary);
    color: #fff;
}

.dl-btn--primary:hover {
    background: #2a2a2a;
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dl-btn--outline {
    background: #f5f5f5;
    color: var(--text-primary);
    border: 1px solid #ebebeb;
}

.dl-btn--outline:hover {
    background: #ececec;
    transform: translateX(3px);
}

.dl-btn--ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid #e5e5e5;
}

.dl-btn--ghost:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: #fafafa;
}

.dl-btn-note {
    font-size: 0.77rem;
    color: inherit;
    opacity: 0.55;
    margin-left: auto;
    white-space: nowrap;
    font-weight: 400;
}

.dl-btn--primary .dl-btn-note { opacity: 0.65; }

.dl-card-note {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    line-height: 1.65;
    padding-top: 1rem;
    border-top: 1px solid #f3f3f3;
    margin-top: 0.25rem;
}

/* --- iOS Notice Banner --- */
.ios-notice {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 14px;
    padding: 1.1rem 1.4rem;
    font-size: 0.88rem;
    color: #92400e;
    line-height: 1.65;
    margin-bottom: 2rem;
}

.ios-notice svg { flex-shrink: 0; margin-top: 2px; }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .dl-grid { grid-template-columns: 1fr; }
    .dl-grid--single { max-width: 100%; }
}

@media (max-width: 768px) {
    .page-hero { padding: 10rem 0 0; }
    .page-hero-content { padding-bottom: 3rem; }

    .platform-tabs-inner { padding: 0 1.25rem; }
    .platform-tab { padding: 0.9rem 1rem; font-size: 0.82rem; gap: 6px; }
    .platform-tab svg { width: 15px; height: 15px; }
    .platform-tab img.platform-tab-img { width: 15px; height: 15px; }

    .os-banner { flex-direction: column; align-items: flex-start; gap: 1rem; padding-bottom: 2rem; margin-bottom: 2rem; }

    .dl-section { padding: 3.5rem 0 5rem; }
    .dl-card { padding: 1.75rem 1.5rem; gap: 1.5rem; }
    .dl-card-name { font-size: 1.35rem; }

    .hero-meta-row { gap: 0.5rem; }
}
