/* ==========================================================================
   owainj.co.uk – the silly bits (shared by Home and Privacy)
   ========================================================================== */

/* --- Achievement popups --- */
.achievements {
    position: fixed;
    top: 5.5rem; /* below the header so it never covers the navigation */
    right: 1rem;
    z-index: 10003;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: min(340px, calc(100vw - 2rem));
}
.achievement {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.6rem 0.6rem 0.9rem;
    border-radius: 10px;
    background: #1e293b;
    color: #f1f5f9;
    border: 2px solid #fbbf24;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    animation: fun-pop-in 0.3s ease-out;
    text-align: left;
}
.achievement__icon {
    font-size: 1.6rem;
}
.achievement__text {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.35;
}
.achievement__text strong {
    display: block;
    color: #fbbf24;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.achievement button {
    min-width: 36px;
    min-height: 36px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #f1f5f9;
    font-size: 1.2rem;
    cursor: pointer;
}
.achievement button:focus-visible {
    outline: 3px solid #fbbf24;
}
@keyframes fun-pop-in {
    from { transform: translateY(-10px) scale(0.95); opacity: 0; }
    to { transform: none; opacity: 1; }
}

/* --- Emoji rain --- */
.emoji-rain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 10004;
}
.emoji-rain span {
    position: absolute;
    top: -3rem;
    font-size: 2rem;
    animation: fun-fall linear forwards;
}
@keyframes fun-fall {
    to { transform: translateY(110vh) rotate(360deg); }
}

/* --- The banana (footer) --- */
.banana-btn {
    background: none;
    border: none;
    padding: 0 0.15rem;
    font: inherit;
    font-weight: 700;
    color: inherit;
    cursor: pointer;
    border-radius: 4px;
}
.banana-btn:hover {
    text-decoration: underline wavy #eab308;
}
.banana-btn.is-bouncing {
    display: inline-block;
    animation: fun-wobble 0.35s ease-in-out;
}
#banana-status {
    min-height: 1.4em;
    font-style: italic;
}
@keyframes fun-wobble {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-12deg) scale(1.15); }
    75% { transform: rotate(12deg) scale(1.15); }
}

/* --- Home: tagline and wave --- */
.tagline {
    margin: 0.35rem 0 0;
    font-size: 1.05rem;
    color: var(--text-muted);
    min-height: 1.6em;
}
.wave-row {
    margin-top: 0.75rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.fun-btn {
    min-height: 40px;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}
.fun-btn:hover {
    border-color: var(--accent);
    background: var(--surface-2);
}
.wave-hand {
    display: inline-block;
    transform-origin: 70% 70%;
}
.wave-hand.is-waving {
    animation: fun-wave 0.9s ease-in-out;
}
@keyframes fun-wave {
    0%, 100% { transform: rotate(0); }
    15%, 45%, 75% { transform: rotate(16deg); }
    30%, 60% { transform: rotate(-10deg); }
}
#wave-status {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    color: var(--text-subtle);
    min-height: 1.4em;
}

/* --- Home: player stats --- */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.6rem;
    margin: 0;
}
.stats div {
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
}
.stats dt {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-subtle);
}
.stats dd {
    margin: 0.15rem 0 0;
    font-weight: 700;
    color: var(--ink);
}

/* --- Home: contact one-liners --- */
.contact-list .quip {
    display: block;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-subtle);
}

/* --- Radio: volume one-liner --- */
.volume-quip {
    font-size: 0.8rem;
    color: var(--text-subtle);
    min-width: 7.5rem;
}

/* --- Privacy: TL;DR, asides, reading progress --- */
.tldr h2 {
    margin-top: 0;
}
.tldr ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}
.tldr li {
    display: flex;
    gap: 0.6rem;
    margin: 0.5rem 0;
    color: var(--text-muted);
}
.tldr li span:first-child {
    flex-shrink: 0;
}
.tldr .small-print {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    color: var(--text-subtle);
}
.policy .aside {
    padding: 0.6rem 0.9rem;
    border-left: 4px solid #eab308;
    background: var(--surface-2);
    border-radius: 0 6px 6px 0;
    font-style: italic;
}
.read-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0;
    background: linear-gradient(90deg, #3f51b5, #8b5cf6);
    z-index: 10005;
}

@media (prefers-reduced-motion: reduce) {
    .achievement,
    .banana-btn.is-bouncing,
    .wave-hand.is-waving {
        animation: none;
    }
}
