/* ══════════════════════════════════════════════════
   Buurman — Changelog Page (changelog.html)
   ══════════════════════════════════════════════════ */

/* ── Hero ────────────────────────────────────────── */
.changelog-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(2, 132, 199, 0.10), transparent),
        linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
    padding: 5.5rem 0 4rem;
    text-align: center;
}

.changelog-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(2, 132, 199, 0.2), transparent);
}

.changelog-hero::after {
    content: "";
    position: absolute;
    top: 15%;
    left: 8%;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.05) 0%, transparent 70%);
    animation: float-orb 10s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    40%  { transform: translate(24px, -16px) scale(1.08); }
    70%  { transform: translate(-12px, 12px) scale(0.96); }
}

@media (prefers-reduced-motion: reduce) {
    .changelog-hero::after { animation: none; }
}

.changelog-hero h1 {
    font-size: clamp(2.5rem, 5.5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--bg-dark);
    margin-bottom: 1rem;
}

.changelog-hero p {
    font-size: 1.1875rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 520px;
    margin: 0 auto;
}

@media (max-width: 640px) {
    .changelog-hero { padding: 3.5rem 0 2.75rem; }
}

/* ── Layout: sidebar + feed (wide screens) ──────── */
.changelog-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 0 3.5rem;
    align-items: start;
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 1024px) {
    .changelog-layout {
        grid-template-columns: 1fr;
        max-width: 700px;
        padding: 0 1.5rem;
    }
    .changelog-nav { display: none; }
}

/* ── Sticky sidebar nav ─────────────────────────── */
.changelog-nav {
    position: sticky;
    top: 5.5rem;
    padding: 1.75rem 0;
}

.changelog-nav-title {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.875rem;
    padding-left: 0.875rem;
}

.changelog-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.1875rem;
}

.changelog-nav-item a {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.875rem;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.changelog-nav-item a:hover {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

.changelog-nav-item.active a {
    background: var(--primary-50);
    color: var(--primary-dark);
    border-color: var(--primary-100);
    font-weight: 600;
}

.changelog-nav-item a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.changelog-nav-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--border);
    flex-shrink: 0;
    transition: background 0.15s;
}

.changelog-nav-item.active .changelog-nav-dot {
    background: var(--primary);
}

.changelog-nav-latest .changelog-nav-dot {
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* ── Timeline feed ───────────────────────────────── */
.changelog-feed {
    padding: 3rem 0 5rem;
    background: var(--bg);
}

/* ── Vertical timeline spine ─────────────────────── */
.timeline {
    position: relative;
    padding-left: 1.5rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.5rem;
    bottom: 3rem;
    width: 2px;
    background: linear-gradient(180deg,
        var(--primary) 0%,
        var(--primary-100) 25%,
        var(--border) 70%,
        transparent 100%
    );
    border-radius: 1px;
}

@media (max-width: 1024px) {
    .timeline { padding-left: 0; }
    .timeline::before { display: none; }
}

/* ── Week Entry ─────────────────────────────────── */
.week-entry {
    position: relative;
    margin-bottom: 5rem;
    scroll-margin-top: 5.5rem;
}

.week-entry:last-child { margin-bottom: 0; }

/* Timeline node dot */
.week-entry::before {
    content: "";
    position: absolute;
    left: -1.5rem;
    top: 0.9375rem;
    width: 11px;
    height: 11px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--border);
    z-index: 2;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.week-entry:hover::before {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.08);
}

/* Latest entry: pulsing primary dot */
.week-entry--latest::before {
    width: 13px;
    height: 13px;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
    animation: pulse-node 2.5s ease-in-out infinite;
}

@keyframes pulse-node {
    0%, 100% { box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12), 0 0 12px rgba(2, 132, 199, 0.15); }
    50%       { box-shadow: 0 0 0 8px rgba(2, 132, 199, 0.06), 0 0 20px rgba(2, 132, 199, 0.10); }
}

@media (prefers-reduced-motion: reduce) {
    .week-entry--latest::before { animation: none; }
}

@media (max-width: 1024px) {
    .week-entry::before { display: none; }
    .week-entry { margin-bottom: 4rem; scroll-margin-top: 4.5rem; }
}

/* ── Week header ────────────────────────────────── */
.week-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 1.125rem;
    flex-wrap: wrap;
}

.week-date {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.125rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 2rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
    white-space: nowrap;
}

.week-date:hover {
    background: var(--primary-50);
    border-color: var(--primary-100);
    color: var(--primary-dark);
    box-shadow: 0 2px 14px rgba(2, 132, 199, 0.12);
}

.week-date:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.week-entry--latest .week-date {
    background: var(--primary-50);
    border-color: var(--primary-100);
    color: var(--primary-dark);
}

.week-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-100), var(--border) 40%, transparent);
    min-width: 2rem;
}

.week-version {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* "Latest" badge */
.latest-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3125rem;
    padding: 0.1875rem 0.5625rem;
    background: linear-gradient(135deg, var(--success), var(--success-dark));
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
    margin-left: 0.0625rem;
}

.latest-badge::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.55; transform: scale(0.75); }
}

@media (prefers-reduced-motion: reduce) {
    .latest-badge::before { animation: none; }
}

/* Week stats bar */
.week-stats {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding-bottom: 0.875rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.week-stats-sep {
    color: var(--border);
    user-select: none;
}

.week-stats-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3125rem;
}

.week-stats-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.week-stats-dot--new      { background: var(--success); }
.week-stats-dot--improved { background: var(--primary); }
.week-stats-dot--fixed    { background: #f59f00; }
.week-stats-dot--security { background: var(--text-muted); }

/* ── Feature cards ──────────────────────────────── */
.features-list {
    display: grid;
    gap: 1.125rem;
}

.feature-entry {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 2rem 2.25rem;
    border: 1px solid var(--border);
    border-left-width: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Color-coded left borders */
.feature-entry--new      { border-left: 3px solid var(--success); }
.feature-entry--improved { border-left: 3px solid var(--primary); }
.feature-entry--fixed    { border-left: 3px solid #f59f00; }

.compact-group--new      { border-left: 3px solid var(--success); }
.compact-group--improved { border-left: 3px solid var(--primary); }
.compact-group--fixed    { border-left: 3px solid #f59f00; }

/* Hover glow matches border color */
.feature-entry:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(2, 132, 199, 0.08);
}

.feature-entry--new:hover {
    border-color: rgba(16, 185, 129, 0.25);
    border-left-color: var(--success);
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.08);
}

.feature-entry--improved:hover {
    border-color: rgba(2, 132, 199, 0.22);
    border-left-color: var(--primary);
    box-shadow: 0 12px 32px rgba(2, 132, 199, 0.09);
}

.feature-entry--fixed:hover {
    border-color: rgba(245, 159, 0, 0.22);
    border-left-color: #f59f00;
    box-shadow: 0 12px 32px rgba(245, 159, 0, 0.07);
}

/* Hero feature card — headline features */
.feature-entry--hero {
    border-color: var(--primary-100);
    background: linear-gradient(160deg, #f0f9ff 0%, var(--surface) 55%);
}

.feature-entry--hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary-lighter));
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.feature-entry--hero:hover {
    border-color: var(--primary);
    box-shadow: 0 16px 48px rgba(2, 132, 199, 0.13);
    transform: translateY(-3px);
}

/* Icon micro-interaction */
.feature-entry .feature-entry-icon {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature-entry:hover .feature-entry-icon {
    transform: scale(1.1) rotate(-3deg);
}

/* Card header */
.feature-entry-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.feature-entry-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Smaller icon for compact-group headers */
.feature-entry-icon-sm {
    width: 36px;
    height: 36px;
    border-radius: 9px;
}

.feature-entry h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
    flex: 1;
    min-width: 0;
}

.feature-entry p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Feature geo/category tags */
.feature-tags {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.feature-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.1875rem 0.5625rem;
    background: var(--border-light);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.feature-tag--geo {
    background: rgba(2, 132, 199, 0.06);
    border-color: var(--primary-100);
    color: var(--primary-dark);
}

/* Country list inside feature card */
.country-list {
    margin-top: 0.875rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.country-list strong {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Inline links within cards */
.feature-entry a,
.compact-list a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: rgba(2, 132, 199, 0.3);
    text-underline-offset: 2px;
    transition: text-decoration-color 0.2s;
}

.feature-entry a:hover,
.compact-list a:hover {
    text-decoration-color: var(--primary);
}

/* Category badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1875rem 0.625rem;
    border-radius: 1rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.badge-new {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-dark);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-improved {
    background: rgba(2, 132, 199, 0.09);
    color: var(--primary-dark);
    border: 1px solid rgba(2, 132, 199, 0.18);
}

.badge-fixed {
    background: rgba(252, 196, 25, 0.12);
    color: #b45309;
    border: 1px solid rgba(252, 196, 25, 0.25);
}

/* ── Compact groups ──────────────────────────────── */
.compact-group {
    background: var(--surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.compact-group:hover {
    box-shadow: 0 10px 28px rgba(2, 132, 199, 0.07);
}

.compact-group--improved:hover { border-color: rgba(2, 132, 199, 0.2); }
.compact-group--fixed:hover    { border-color: rgba(245, 159, 0, 0.2); }
.compact-group--new:hover      { border-color: rgba(16, 185, 129, 0.2); }

.compact-group-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1.5rem 2.25rem 0;
}

.compact-group-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}

.compact-list {
    list-style: none;
    padding: 1rem 2.25rem 1.75rem;
}

.compact-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.compact-list li + li {
    border-top: 1px solid var(--border-light);
}

.compact-list li svg {
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.compact-list strong {
    color: var(--text);
    font-weight: 600;
}

/* ── Reveal animation ────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ── Copy-link toast ─────────────────────────────── */
.copy-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(1rem);
    background: var(--bg-dark);
    color: #fff;
    padding: 0.625rem 1.25rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 100;
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Responsive tweaks ──────────────────────────── */
@media (max-width: 768px) {
    .feature-entry          { padding: 1.5rem; }
    .feature-entry--hero::before { display: none; }
    .compact-group-header   { padding: 1.25rem 1.5rem 0; }
    .compact-list           { padding: 1rem 1.5rem 1.5rem; }
    .week-stats             { font-size: 0.75rem; }
}

@media (max-width: 480px) {
    .feature-entry { padding: 1.25rem; }
    .feature-entry-header { gap: 0.625rem; }
}
