/* ═══════════════════════════════════════════════════════════
   SFO TERMINAL — HOME V2
   Editorial terminal aesthetic: Bloomberg meets The Information
   All classes prefixed hv2- to avoid collisions
   ═══════════════════════════════════════════════════════════ */

/* ─── TOP NAV OVERRIDE ─────────────────────────────────────
   Replace the burgundy #2a1215 with a color that matches
   the institutional dark mode palette
   ──────────────────────────────────────────────────────── */
.top-nav {
    background-color: #151820 !important;
    border-bottom: 1px solid var(--border) !important;
}

/* ─── TYPOGRAPHY ───────────────────────────────────────── */
:root {
    --hv2-font-display: 'Cormorant Garamond', 'Georgia', serif;
    --hv2-font-body: 'DM Sans', var(--font-stack);
    --hv2-font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ─── WORKSPACE OVERRIDE ──────────────────────────────── */
.hv2-workspace {
    padding: 0 !important;
    max-width: none;
    font-family: var(--hv2-font-body);
    background: var(--bg-body);
}

/* ═══════════════════════════════════════════════════════════
   1. MARKET PULSE STRIP
   ═══════════════════════════════════════════════════════════ */
.hv2-pulse {
    position: sticky;
    top: var(--nav-height);
    z-index: 50;
    background: #0c0e14;
    border-bottom: 1px solid var(--border);
    margin: 0 -28px; /* bleed to workspace edges (counteract parent padding if any) */
}

.hv2-pulse-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    height: 38px;
    max-width: 1400px;
}

.hv2-pulse-left,
.hv2-pulse-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hv2-pulse-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hv2-pulse-label {
    font-family: var(--hv2-font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
}

.hv2-pulse-price {
    font-family: var(--hv2-font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-primary);
}

.hv2-pulse-change {
    font-family: var(--hv2-font-mono);
    font-size: 0.7rem;
    font-weight: 500;
}

.hv2-pulse-change.hv2-up { color: var(--success); }
.hv2-pulse-change.hv2-down { color: var(--danger); }

.hv2-pulse-divider {
    width: 1px;
    height: 16px;
    background: var(--border);
}

.hv2-market-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.hv2-dot-open {
    background: var(--success);
    box-shadow: 0 0 6px rgba(0, 183, 70, 0.5);
    animation: hv2-pulse-glow 2s ease-in-out infinite;
}

.hv2-dot-closed {
    background: #f59e0b;
    box-shadow: 0 0 4px rgba(245, 158, 11, 0.3);
}

@keyframes hv2-pulse-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hv2-market-status {
    font-family: var(--hv2-font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.06em;
}

.hv2-status-open { color: var(--success); }
.hv2-status-closed { color: #f59e0b; }

.hv2-clock {
    font-family: var(--hv2-font-mono);
    font-size: 0.72rem;
    color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════
   2. HERO — CURRENT ISSUE
   ═══════════════════════════════════════════════════════════ */
.hv2-hero {
    display: flex;
    gap: 48px;
    padding: 48px 48px 40px;
    max-width: 1400px;
    align-items: flex-start;
}

.hv2-hero-cover {
    position: relative;
    flex-shrink: 0;
    width: 320px;
}

.hv2-cover-frame {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    aspect-ratio: 8.5 / 11;
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
}

/* Composed magazine cover = masthead banner stacked on top of cover art.
   Mirrors the published magazine's actual cover composition. */
.hv2-cover-masthead-img {
    width: 100%;
    height: auto;
    display: block;
    flex-shrink: 0;
    object-fit: cover;
    object-position: center;
}

.hv2-cover-art-img {
    width: 100%;
    flex: 1;
    min-height: 0;
    display: block;
    object-fit: cover;
    object-position: center top;
}

.hv2-cover-placeholder {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    color: var(--text-secondary);
    font-size: 2rem;
    background: linear-gradient(145deg, #1a1d26, #0c0e14);
}

.hv2-cover-placeholder span {
    font-family: var(--hv2-font-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
}

.hv2-cover-badge {
    position: absolute;
    top: 16px;
    right: -8px;
    background: var(--text-accent);
    color: #fff;
    font-family: var(--hv2-font-mono);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    padding: 4px 12px;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(77, 166, 255, 0.3);
}

.hv2-hero-details {
    flex: 1;
    min-width: 0;
    padding-top: 8px;
}

.hv2-hero-edition {
    font-family: var(--hv2-font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-accent);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.hv2-hero-title {
    font-family: var(--hv2-font-display);
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}

.hv2-hero-subtitle {
    font-family: var(--hv2-font-display);
    font-size: 1.2rem;
    font-weight: 400;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.hv2-hero-divider {
    width: 48px;
    height: 2px;
    background: var(--text-accent);
    margin-bottom: 24px;
    opacity: 0.6;
}

.hv2-article-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hv2-article-list li {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(43, 50, 66, 0.5);
}

.hv2-article-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.hv2-article-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
}

.hv2-article-author {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-left: auto;
    white-space: nowrap;
    font-style: italic;
}

.hv2-hero-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hv2-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--text-accent);
    color: #fff;
    text-decoration: none;
    font-family: var(--hv2-font-body);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 4px;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.hv2-btn-primary:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.hv2-hero-tag {
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ═══════════════════════════════════════════════════════════
   3. SECTIONS — Shared
   ═══════════════════════════════════════════════════════════ */
.hv2-section {
    padding: 0 48px 48px;
    max-width: 1400px;
}

.hv2-section-header {
    margin-bottom: 24px;
}

.hv2-section-title {
    font-family: var(--hv2-font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.hv2-section-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   3. TOOL GRID
   ═══════════════════════════════════════════════════════════ */
.hv2-tool-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.hv2-tool-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
    position: relative;
}

.hv2-tool-card:hover {
    background: var(--bg-hover);
    border-color: rgba(77, 166, 255, 0.2);
    transform: translateY(-2px);
}

.hv2-tool-card.hv2-tool-featured {
    border-color: rgba(255, 215, 0, 0.15);
    background: linear-gradient(145deg, var(--bg-card), rgba(255, 215, 0, 0.03));
}

.hv2-tool-card.hv2-tool-featured:hover {
    border-color: rgba(255, 215, 0, 0.3);
}

.hv2-tool-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(77, 166, 255, 0.08);
    color: var(--text-accent);
    font-size: 1rem;
    flex-shrink: 0;
}

.hv2-tool-featured .hv2-tool-icon {
    background: rgba(255, 215, 0, 0.08);
    color: #ffd700;
}

.hv2-tool-info {
    flex: 1;
    min-width: 0;
}

.hv2-tool-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.hv2-tool-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.45;
}

.hv2-tier-badge {
    font-family: var(--hv2-font-mono);
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-block;
}

.hv2-tier-free {
    background: rgba(100, 116, 139, 0.12);
    color: #94a3b8;
}

.hv2-tier-bronze {
    background: rgba(205, 127, 50, 0.12);
    color: #cd7f32;
}

.hv2-tier-silver {
    background: rgba(192, 192, 192, 0.12);
    color: #c0c0c0;
}

.hv2-tier-gold {
    background: rgba(255, 215, 0, 0.10);
    color: #ffd700;
}

/* ─── Coming Soon ───────────────────────────────────────
   Applied to .hv2-tool-card and to badges on the education
   card. Cards are dimmed, icon de-saturated, hover is
   subtler than active tools.
   ──────────────────────────────────────────────────── */
.hv2-tool-card.hv2-coming-soon {
    opacity: 0.62;
    background: var(--bg-card);
    border-color: rgba(148, 163, 184, 0.12);
    cursor: pointer;
}

.hv2-tool-card.hv2-coming-soon:hover {
    opacity: 0.85;
    border-color: rgba(148, 163, 184, 0.28);
    transform: translateY(-1px);
}

.hv2-tool-card.hv2-coming-soon .hv2-tool-icon {
    background: rgba(148, 163, 184, 0.06);
    color: var(--text-secondary);
}

.hv2-coming-soon-badge {
    background: rgba(148, 163, 184, 0.14);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.22);
}

/* ═══════════════════════════════════════════════════════════
   4. PODCAST & EDUCATION ROW
   ═══════════════════════════════════════════════════════════ */
.hv2-content-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.hv2-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.hv2-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

.hv2-card-header i {
    color: var(--text-accent);
    font-size: 0.85rem;
}

/* ─── Podcast Card ─────────────────────────────────────── */
.hv2-podcast-body {
    display: flex;
    gap: 20px;
    padding: 20px;
    align-items: center;
}

.hv2-podcast-art {
    width: 132px;
    height: 88px;
    border-radius: 8px;
    background: #000;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    text-decoration: none;
    padding: 8px;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.hv2-podcast-art:hover {
    border-color: var(--text-accent);
    transform: scale(1.02);
}

.hv2-podcast-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.hv2-podcast-info {
    flex: 1;
}

.hv2-podcast-episode {
    font-family: var(--hv2-font-mono);
    font-size: 0.65rem;
    color: var(--text-accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 4px;
}

.hv2-podcast-title {
    font-family: var(--hv2-font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.hv2-podcast-hosts {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin: 0 0 12px;
}

.hv2-host-label {
    color: var(--text-secondary);
    opacity: 0.7;
}

.hv2-host-sep {
    margin: 0 4px;
    opacity: 0.4;
}

.hv2-podcast-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-accent);
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.hv2-podcast-link:hover { opacity: 0.8; }

/* ─── Education Card ──────────────────────────────────── */
.hv2-education-body {
    padding: 20px;
}

.hv2-edu-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.hv2-edu-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(77, 166, 255, 0.08);
    color: var(--text-accent);
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.hv2-edu-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.hv2-edu-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.45;
}

.hv2-edu-divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

/* ═══════════════════════════════════════════════════════════
   5. SUBSCRIBE CTA
   ═══════════════════════════════════════════════════════════ */
.hv2-cta {
    margin: 0 48px 48px;
    max-width: 1304px; /* 1400 - 2*48 */
    background: linear-gradient(135deg, #1a1510, #1a1d26);
    border: 1px solid rgba(255, 215, 0, 0.12);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.hv2-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c0880a, #e6a817, #c0880a, transparent);
}

.hv2-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 36px 40px;
    gap: 32px;
}

.hv2-cta-text {
    flex: 1;
}

.hv2-cta-title {
    font-family: var(--hv2-font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.hv2-cta-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.hv2-cta-offer {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.hv2-cta-price {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    font-family: var(--hv2-font-display);
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.hv2-cta-period {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #e6a817;
    margin-top: 6px;
}

.hv2-btn-subscribe {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #c0880a, #e6a817);
    color: #fff;
    text-decoration: none;
    font-family: var(--hv2-font-body);
    font-size: 0.88rem;
    font-weight: 700;
    padding: 14px 32px;
    border-radius: 4px;
    letter-spacing: 0.02em;
    transition: opacity 0.15s ease, transform 0.15s ease;
    box-shadow: 0 2px 12px rgba(230, 168, 23, 0.2);
}

.hv2-btn-subscribe:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.hv2-cta-trial {
    font-size: 0.75rem;
    color: #e6a817;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   6. FOOTER
   ═══════════════════════════════════════════════════════════ */
.hv2-footer {
    border-top: 1px solid var(--border);
    padding: 0 48px;
}

.hv2-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    max-width: 1400px;
}

.hv2-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hv2-footer-name {
    font-family: var(--hv2-font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.hv2-footer-tagline {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.hv2-footer-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.hv2-footer-founded {
    font-family: var(--hv2-font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    opacity: 0.6;
}

.hv2-footer-links {
    display: flex;
    gap: 16px;
}

.hv2-footer-links a {
    color: var(--text-secondary);
    font-size: 1rem;
    transition: color 0.15s ease;
    text-decoration: none;
}

.hv2-footer-links a:hover {
    color: var(--text-primary);
}

.hv2-footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 24px;
    padding: 16px 48px 20px;
    border-top: 1px solid var(--border);
    max-width: 1400px;
}

.hv2-footer-nav a {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.hv2-footer-nav a:hover {
    color: var(--text-accent);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

/* ─── Tablet (≤ 1100px) ───────────────────────────────── */
@media (max-width: 1100px) {
    .hv2-hero {
        gap: 32px;
        padding: 36px 32px 32px;
    }
    .hv2-hero-cover { width: 260px; }
    .hv2-hero-title { font-size: 2.4rem; }
    .hv2-pulse-inner { padding: 0 32px; }
    .hv2-section { padding: 0 32px 36px; }
    .hv2-tool-grid { grid-template-columns: repeat(2, 1fr); }
    .hv2-cta { margin: 0 32px 36px; }
    .hv2-cta-inner { padding: 28px 32px; }
    .hv2-footer { padding: 0 32px; }
}

/* ─── Mobile (≤ 768px) ────────────────────────────────── */
@media (max-width: 768px) {
    .hv2-pulse { margin-left: 0; }

    .hv2-pulse-inner {
        padding: 0 18px;
        height: 34px;
        overflow-x: auto;
        gap: 12px;
    }

    .hv2-pulse-left { gap: 10px; }

    .hv2-pulse-right {
        display: none; /* hide clock on mobile — save space */
    }

    .hv2-hero {
        flex-direction: column;
        gap: 24px;
        padding: 28px 18px 24px;
        align-items: center;
    }

    .hv2-hero-cover {
        width: 220px;
    }

    .hv2-hero-details {
        text-align: center;
        padding-top: 0;
    }

    .hv2-hero-title { font-size: 2rem; }
    .hv2-hero-subtitle { font-size: 1rem; }

    .hv2-hero-divider {
        margin: 20px auto;
    }

    .hv2-article-list li {
        flex-direction: column;
        gap: 2px;
        text-align: left;
    }

    .hv2-article-author { margin-left: 0; }

    .hv2-hero-actions {
        flex-direction: column;
        gap: 12px;
    }

    .hv2-section { padding: 0 18px 28px; }
    .hv2-section-title { font-size: 1.4rem; }
    .hv2-tool-grid { grid-template-columns: 1fr; }

    .hv2-content-row { grid-template-columns: 1fr; }

    .hv2-podcast-body {
        flex-direction: column;
        align-items: flex-start;
    }

    .hv2-cta {
        margin: 0 18px 28px;
    }

    .hv2-cta-inner {
        flex-direction: column;
        padding: 28px 24px;
        text-align: center;
    }

    .hv2-cta-offer {
        flex-direction: column;
        gap: 12px;
    }

    .hv2-footer { padding: 0 18px; }

    .hv2-footer-inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* ─── Small mobile (≤ 480px) ──────────────────────────── */
@media (max-width: 480px) {
    .hv2-pulse-item:nth-child(n+7) { display: none; } /* hide DIA on tiny screens */
    .hv2-hero-cover { width: 180px; }
    .hv2-hero-title { font-size: 1.7rem; }
    .hv2-cta-title { font-size: 1.3rem; }
    .hv2-cta-price { font-size: 2.6rem; }
}
