/* Archive gallery — preview cards */

.arch-main {
    position: relative;
    padding: 2.5rem 0 4rem;
}

.arch-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.arch-filter {
    appearance: none;
    border: 1px solid var(--border-color, rgba(148, 163, 184, 0.35));
    background: color-mix(in srgb, var(--card, #fff) 88%, transparent);
    color: var(--text, #334155);
    font: 600 0.72rem/1 Inter, system-ui, sans-serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.dark .arch-filter {
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(255, 255, 255, 0.1);
}

.arch-filter:hover {
    border-color: color-mix(in srgb, var(--accent) 45%, transparent);
    transform: translateY(-1px);
}

.arch-filter.is-active {
    background: color-mix(in srgb, var(--accent) 16%, transparent);
    border-color: color-mix(in srgb, var(--accent) 55%, transparent);
    color: var(--accent-strong, #0284c7);
}

.dark .arch-filter.is-active {
    color: #7dd3fc;
}

.arch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 1.25rem;
}

.arch-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color, rgba(148, 163, 184, 0.28));
    border-radius: 1rem;
    background: color-mix(in srgb, var(--card, #fff) 92%, transparent);
    overflow: hidden;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.dark .arch-card {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(255, 255, 255, 0.08);
}

.arch-card:hover {
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
    transform: translateY(-3px);
    box-shadow: 0 18px 40px -24px rgba(14, 165, 233, 0.45);
}

.arch-card.is-hidden {
    display: none;
}

.arch-preview {
    position: relative;
    height: 190px;
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 10% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 55%),
        linear-gradient(160deg, rgba(15, 23, 42, 0.06), transparent);
    border-bottom: 1px solid var(--border-color, rgba(148, 163, 184, 0.22));
}

.dark .arch-preview {
    background:
        radial-gradient(120% 80% at 10% 0%, rgba(14, 165, 233, 0.18), transparent 55%),
        linear-gradient(160deg, rgba(2, 6, 23, 0.65), rgba(15, 23, 42, 0.35));
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.arch-preview-frame {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.arch-preview-frame iframe {
    width: 400%;
    height: 400%;
    border: 0;
    transform: scale(0.25);
    transform-origin: 0 0;
    filter: saturate(0.85);
    transition: filter 0.25s ease;
}

.arch-card:hover .arch-preview-frame iframe {
    filter: saturate(1);
}

.arch-preview-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(2, 6, 23, 0.08) 100%);
    pointer-events: none;
}

.dark .arch-preview-shine {
    background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.35) 100%);
}

.arch-body {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1.1rem 1.15rem 1.2rem;
    flex: 1;
}

.arch-title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text, #0f172a);
    line-height: 1.25;
}

.dark .arch-title {
    color: #f1f5f9;
}

.arch-desc {
    font-size: 0.875rem;
    line-height: 1.45;
    color: #64748b;
    flex: 1;
}

.dark .arch-desc {
    color: #94a3b8;
}

.arch-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.arch-tag {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.22rem 0.55rem;
    border-radius: 0.35rem;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--accent-strong, #0284c7);
}

.dark .arch-tag {
    background: rgba(14, 165, 233, 0.14);
    color: #7dd3fc;
}

.arch-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.arch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    flex: 1;
    min-height: 2.5rem;
    padding: 0.55rem 0.9rem;
    border-radius: 0.65rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.arch-btn:hover {
    transform: translateY(-1px);
}

.arch-btn--primary {
    background: #0ea5e9;
    color: #fff;
    box-shadow: 0 10px 22px -12px rgba(14, 165, 233, 0.7);
}

.arch-btn--primary:hover {
    background: #38bdf8;
}

.arch-btn--ghost {
    border: 1px solid var(--border-color, rgba(148, 163, 184, 0.35));
    color: #475569;
    background: transparent;
}

.dark .arch-btn--ghost {
    border-color: rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
}

.arch-btn--ghost:hover {
    border-color: color-mix(in srgb, var(--accent) 45%, transparent);
    color: var(--accent-strong, #0284c7);
}

.arch-empty {
    display: none;
    text-align: center;
    padding: 3rem 1rem;
    color: #64748b;
    font-size: 0.95rem;
}

.arch-empty.is-visible {
    display: block;
}

/* Easter-egg toast (index) */
.ee-toast {
    position: fixed;
    left: 50%;
    bottom: max(1.5rem, env(safe-area-inset-bottom));
    transform: translateX(-50%) translateY(120%);
    z-index: 80;
    padding: 0.75rem 1.15rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.92);
    color: #e2e8f0;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 16px 40px -18px rgba(2, 6, 23, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.ee-toast.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.ee-archive-trigger {
    appearance: none;
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: default;
}

.ee-archive-trigger.is-hot {
    color: #0ea5e9;
    text-shadow: 0 0 18px rgba(14, 165, 233, 0.45);
}

@media (max-width: 640px) {
    .arch-preview {
        height: 160px;
    }

    .arch-actions {
        flex-direction: column;
    }
}
