/* ============================================================
   Changelog — shared timeline styling
   Single source of truth for BOTH the static fallback page
   (public/changelog-static.html) and the dynamic Firestore-rendered
   page (g8ChangelogRenderer at /changelog). Anti-doublon: edit here once.

   Dark glassmorphic timeline. Brand orange accents. One pill visual
   language. Mobile-first responsive. Hover states. Co-creation
   gratitude voice (Sprint 5.A memory rule).

   2026-06-09 density pass (founder: "trop gros, 100% on voit rien"):
   tightened paddings / margins / type so far more ships are visible
   per viewport without zooming out. Look preserved, scale reduced.
   ============================================================ */

:root {
    --bg-deep: #0a0a0a;
    --bg-soft: #15161a;
    --bg-card: rgba(20, 21, 26, 0.85);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(241, 118, 25, 0.30);
    --text-primary: #f5f5f7;
    --text-secondary: #a8a8b0;
    --text-tertiary: #6c6c75;
    --brand-orange: #f17619;
    --brand-orange-soft: rgba(241, 118, 25, 0.10);
    --brand-orange-glow: rgba(241, 118, 25, 0.18);
}

body {
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.55;
}

/* Layered dark background: gradient + subtle texture for depth */
.changelog-body {
    background:
        radial-gradient(ellipse at top, rgba(241, 118, 25, 0.06), transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(241, 118, 25, 0.04), transparent 60%),
        linear-gradient(180deg, #0a0a0a 0%, #0d0d10 100%);
    min-height: 100vh;
    padding-top: 84px;
    padding-bottom: 2.5rem;
    position: relative;
}

.changelog-body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.015) 1px, transparent 0);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 0;
}

.changelog-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1.25rem;
    position: relative;
    z-index: 1;
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--brand-orange);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    margin-bottom: 1.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    background: var(--brand-orange-soft);
    border: 1px solid var(--border-accent);
    transition: all 0.2s ease;
}
.back-link:hover {
    background: var(--brand-orange-glow);
    transform: translateX(-2px);
}

/* Header */
.changelog-header {
    text-align: center;
    margin-bottom: 2rem;
}
.changelog-header h1 {
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 0 0 0.6rem 0;
    color: var(--text-primary);
}
.changelog-header h1 .accent {
    color: var(--brand-orange);
}
.changelog-header p {
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Promise callout */
.changelog-promise {
    background: linear-gradient(135deg, rgba(241, 118, 25, 0.10), rgba(241, 118, 25, 0.03));
    border: 1px solid var(--border-accent);
    border-left: 3px solid var(--brand-orange);
    border-radius: 11px;
    padding: 1rem 1.3rem;
    margin: 0 0 2.25rem 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.changelog-promise p {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.5;
}
.changelog-promise p:last-child { margin-bottom: 0; }
.changelog-promise strong {
    color: var(--brand-orange);
    font-weight: 700;
}
.changelog-promise a {
    color: var(--brand-orange);
    text-decoration: underline;
    text-decoration-color: rgba(241, 118, 25, 0.4);
    text-underline-offset: 3px;
    font-weight: 500;
}
.changelog-promise a:hover {
    text-decoration-color: var(--brand-orange);
}

/* Timeline structure */
.timeline {
    position: relative;
    padding-left: 28px;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(180deg,
        rgba(241, 118, 25, 0.6) 0%,
        rgba(241, 118, 25, 0.3) 60%,
        rgba(241, 118, 25, 0.05) 100%);
    border-radius: 1px;
}

.month-marker {
    position: relative;
    margin: 2rem 0 1rem 0;
    padding-left: 0;
}
.month-marker:first-child { margin-top: 0; }
.month-marker::before {
    content: "";
    position: absolute;
    left: -28px;
    top: 50%;
    transform: translate(0, -50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--brand-orange);
    border: 3px solid var(--bg-deep);
    box-shadow: 0 0 0 2px var(--brand-orange), 0 0 14px rgba(241, 118, 25, 0.55);
}
.month-marker h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}
.month-marker .month-meta {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand-orange);
    margin-top: 0.25rem;
}

/* Week + entries */
.week-block {
    position: relative;
    margin-bottom: 1.5rem;
}
.week-block::before {
    content: "";
    position: absolute;
    left: -24px;
    top: 9px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--bg-soft);
    border: 2px solid var(--brand-orange);
}
.week-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 0.6rem;
}

.ship-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    margin-bottom: 0.55rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    align-items: start;
}
.ship-card:hover {
    border-color: var(--border-accent);
    background: rgba(28, 30, 36, 0.92);
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(241, 118, 25, 0.08);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.26rem 0.5rem;
    border-radius: 5px;
    white-space: nowrap;
    line-height: 1;
    border: 1px solid;
    min-width: 72px;
    justify-content: center;
}
.tag-launched {
    color: #ffffff;
    background: linear-gradient(135deg, #f17619, #d97706);
    border-color: #f17619;
    box-shadow: 0 0 10px rgba(241, 118, 25, 0.32);
}
.tag-shipped {
    color: #ffb280;
    background: rgba(241, 118, 25, 0.14);
    border-color: rgba(241, 118, 25, 0.4);
}
.tag-improved {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.10);
    border-color: rgba(251, 191, 36, 0.35);
}
.tag-fixed {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.10);
    border-color: rgba(96, 165, 250, 0.35);
}
.tag-archived {
    color: #9ca3af;
    background: rgba(156, 163, 175, 0.08);
    border-color: rgba(156, 163, 175, 0.30);
}

.ship-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}
.ship-text strong {
    color: var(--text-primary);
    font-weight: 700;
    display: block;
    margin-bottom: 0.18rem;
    font-size: 0.94rem;
}
.ship-text a {
    color: var(--brand-orange);
    text-decoration: underline;
    text-decoration-color: rgba(241, 118, 25, 0.4);
    text-underline-offset: 2px;
    font-weight: 500;
}
.ship-text a:hover {
    text-decoration-color: var(--brand-orange);
}
.ship-text code {
    background: rgba(241, 118, 25, 0.10);
    color: #ffb280;
    padding: 0.05rem 0.32rem;
    border-radius: 4px;
    font-family: ui-monospace, SF Mono, Menlo, monospace;
    font-size: 0.86em;
}

/* Footer CTA */
.changelog-cta {
    margin-top: 2.5rem;
    padding: 1.5rem 1.5rem 1.6rem;
    background: linear-gradient(135deg, rgba(241, 118, 25, 0.12), rgba(241, 118, 25, 0.04));
    border: 1px solid var(--border-accent);
    border-radius: 14px;
    text-align: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.changelog-cta p {
    color: var(--text-primary);
    font-size: 0.98rem;
    margin: 0 0 1rem 0;
}
.changelog-cta strong {
    color: var(--brand-orange);
}
.changelog-cta a.cta-btn {
    display: inline-block;
    padding: 0.75rem 1.8rem;
    background: var(--brand-orange);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.92rem;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(241, 118, 25, 0.35);
    transition: all 0.2s ease;
}
.changelog-cta a.cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(241, 118, 25, 0.45);
}

/* Mobile */
@media (max-width: 640px) {
    .changelog-body { padding-top: 76px; }
    .timeline {
        padding-left: 22px;
    }
    .timeline::before {
        left: 7px;
    }
    .month-marker::before {
        left: -22px;
        width: 16px;
        height: 16px;
    }
    .week-block::before {
        left: -19px;
        width: 9px;
        height: 9px;
    }
    .ship-card {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.8rem 0.9rem;
    }
    .tag {
        justify-self: start;
    }
    .changelog-header h1 {
        font-size: 1.7rem;
    }
}

/* Override: nav must stay readable on the dark bg */
.main-nav {
    background: rgba(10, 10, 10, 0.85) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.main-nav .nav-link { color: var(--text-secondary) !important; }
.main-nav .nav-link:hover { color: var(--text-primary) !important; }
.main-nav .logo-text { color: var(--text-primary) !important; }

/* Footer spacing on the changelog page (the shared .main-footer is dark already) */
.changelog-body + .main-footer,
.main-footer.changelog-footer {
    margin-top: 0;
}
