/* === REMEMBERING ROB — Collage Wall === */

:root {
    --color-orange: #F26B21;
    --color-hotpink: #E91E87;
    --color-neon-green: #B8E62E;
    --color-red: #D32F2F;
    --color-purple: #7B1FA2;
    --color-bg: #FFF8F0;
    --color-charcoal: #2D2D2D;
    --color-text-light: #888;
    --color-white: #FFFFFF;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--color-bg);
    background-image:
        radial-gradient(ellipse at 15% 30%, rgba(242, 107, 33, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 15%, rgba(233, 30, 135, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(184, 230, 46, 0.03) 0%, transparent 50%);
    color: var(--color-charcoal);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Desaturation → color: page gains color as you scroll */
.collage-wall,
.contribute {
    filter: saturate(var(--scroll-saturation, 0.15));
    transition: filter 0.15s linear;
}

/* Hero always full color (the gradient title is the first splash of color) */
.hero { filter: saturate(1); }

/* === FLOATING DOODLES === */

.doodles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.doodle {
    position: absolute;
    opacity: 0.055;
    will-change: transform;
}

.doodle svg {
    width: 100%;
    height: 100%;
}

@keyframes drift-1 {
    0%   { transform: translateY(0)    rotate(0deg); }
    50%  { transform: translateY(-30px) rotate(5deg); }
    100% { transform: translateY(0)    rotate(0deg); }
}
@keyframes drift-2 {
    0%   { transform: translateY(0)    rotate(0deg); }
    50%  { transform: translateY(25px)  rotate(-4deg); }
    100% { transform: translateY(0)    rotate(0deg); }
}
@keyframes drift-3 {
    0%   { transform: translateY(0)    rotate(-2deg); }
    50%  { transform: translateY(-20px) rotate(3deg); }
    100% { transform: translateY(0)    rotate(-2deg); }
}
@keyframes drift-4 {
    0%   { transform: translateY(0)    rotate(2deg); }
    50%  { transform: translateY(22px)  rotate(-3deg); }
    100% { transform: translateY(0)    rotate(2deg); }
}

@media (max-width: 639px) {
    .doodle { opacity: 0.04; }
    .doodle:nth-child(n+5) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .doodle { animation: none !important; }
}

/* === HERO === */

.hero {
    text-align: center;
    padding: 3rem 1rem 1rem;
}

.hero-name {
    font-family: 'Fredoka One', cursive;
    font-size: clamp(4rem, 12vw, 8rem);
    background: linear-gradient(
        90deg,
        var(--color-hotpink),
        var(--color-orange),
        #B8E62E,
        var(--color-purple),
        #00BCD4,
        var(--color-hotpink)
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: hair-shift 25s ease-in-out infinite;
    filter: drop-shadow(4px 4px 0 var(--color-hotpink));
    line-height: 1;
    letter-spacing: -0.02em;
}

@keyframes hair-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-subtitle {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--color-text-light);
    margin-top: 0.5rem;
}

/* === COLLAGE WALL === */

.collage-wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 2rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* === MEMORY CARDS === */

.memory-card {
    transform: rotate(var(--rotation, 0deg))
               translate(var(--offset-x, 0), var(--offset-y, 0));
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    will-change: transform;
}

.memory-card:hover {
    transform: rotate(0deg) translate(0, 0) scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    z-index: 100 !important;
}

.memory-card--featured {
    grid-column: span 2;
}

/* --- Photo Card (Polaroid style) --- */

.memory-card--photo {
    background: var(--color-white);
    padding: 8px 8px 28px 8px;
    border-radius: 2px;
    box-shadow:
        2px 3px 8px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.05);
}

.memory-card--photo::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%) rotate(var(--pin-rotation, 0deg));
    width: 16px;
    height: 16px;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.memory-card--photo:nth-child(3n)::before { background: var(--color-orange); }
.memory-card--photo:nth-child(3n+1)::before { background: var(--color-hotpink); }
.memory-card--photo:nth-child(3n+2)::before { background: var(--color-neon-green); }

.memory-card--photo img {
    width: 100%;
    height: auto;
    display: block;
}

.memory-card__caption {
    font-family: 'Caveat', cursive;
    font-size: 0.95rem;
    color: var(--color-charcoal);
    padding-top: 4px;
    text-align: center;
    display: block;
}

/* --- Audio Card --- */

.memory-card--audio {
    background: var(--card-color, var(--color-hotpink));
    color: var(--color-white);
    padding: 1.5rem;
    border-radius: 8px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 3px 4px 12px rgba(0, 0, 0, 0.2);
}

.memory-card__audio-icon {
    font-size: 2rem;
    opacity: 0.7;
}

.memory-card__title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.4rem;
    margin: 0.5rem 0 0.25rem;
}

.memory-card__contributor {
    font-size: 0.9rem;
    opacity: 0.85;
}

.memory-card__duration {
    font-size: 0.85rem;
    opacity: 0.6;
    margin-top: 0.25rem;
}

.memory-card__play-hint {
    font-family: 'Caveat', cursive;
    font-size: 1.1rem;
    opacity: 0.8;
    margin-top: auto;
    padding-top: 0.5rem;
}

/* --- Video Card --- */

.memory-card--video {
    background: var(--color-charcoal);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 3px 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
}

.memory-card--video img {
    width: 100%;
    display: block;
}

.memory-card__play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    transition: background 0.2s;
}

.memory-card--video:hover .memory-card__play-overlay {
    background: rgba(0, 0, 0, 0.1);
}

.memory-card__play-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--color-charcoal);
    padding-left: 4px;
}

.memory-card__video-caption {
    padding: 8px 12px;
    font-family: 'Caveat', cursive;
    color: var(--color-white);
    font-size: 0.95rem;
}

/* === LIGHTBOX === */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1001;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.lightbox__close:hover { opacity: 1; }

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.2s, background 0.2s;
}

.lightbox__nav:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.lightbox__prev { left: 1rem; }
.lightbox__next { right: 1rem; }

.lightbox__content {
    position: relative;
    z-index: 1001;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox__image {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox__caption {
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Caveat', cursive;
    font-size: 1.2rem;
    margin-top: 0.75rem;
    text-align: center;
}

.lightbox__contributor {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* --- Lightbox: Audio Card --- */

.lightbox__audio-card {
    background: var(--card-color, var(--color-hotpink));
    color: white;
    padding: 2.5rem;
    border-radius: 12px;
    max-width: 600px;
    width: 90vw;
}

.lightbox__animation {
    margin: -2.5rem -2.5rem 1.5rem -2.5rem;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.lightbox__animation-video {
    width: 100%;
    display: block;
}

.lightbox__audio-card .lightbox__title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
}

.lightbox__audio-card .lightbox__contributor {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.lightbox__quote {
    font-family: 'Caveat', cursive;
    font-size: 1.4rem;
    font-style: italic;
    opacity: 0.9;
    margin: 1.5rem 0;
    padding-left: 1rem;
    border-left: 3px solid rgba(255, 255, 255, 0.4);
    line-height: 1.4;
}

/* Audio player */

.audio-player {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 1rem 0;
}

.audio-player__play-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid white;
    background: transparent;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-player__play-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.audio-player__progress {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
}

.audio-player__bar {
    height: 100%;
    background: white;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.audio-player__time {
    font-size: 0.9rem;
    opacity: 0.8;
    min-width: 3em;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Transcript toggle */

.transcript-toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    margin-top: 0.5rem;
}

.transcript-toggle:hover {
    color: white;
}

.transcript-text {
    margin-top: 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.85;
    max-height: 40vh;
    overflow-y: auto;
}

.transcript-text p {
    margin-bottom: 0.75rem;
}

/* --- Lightbox: Video --- */

.lightbox__video {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 8px;
}

/* === CONTRIBUTE SECTION === */

.contribute {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.contribute h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    color: var(--color-orange);
    margin-bottom: 0.75rem;
}

.contribute p {
    color: var(--color-text-light);
    line-height: 1.6;
}

.contribute__channels {
    margin-top: 0.75rem;
    font-size: 0.95rem;
}

.contribute a {
    color: var(--color-hotpink);
    text-decoration: none;
}

.contribute a:hover {
    text-decoration: underline;
}

/* === FOOTER === */

.footer {
    text-align: center;
    padding: 2rem;
    color: var(--color-text-light);
    font-size: 0.85rem;
}

.footer a {
    color: var(--color-hotpink);
    text-decoration: none;
}

/* === ODD DUCK EASTER EGG === */

.odd-duck {
    position: fixed;
    bottom: 15vh;
    z-index: 999;
    pointer-events: none;
    animation: duck-swim 12s linear forwards;
}

.odd-duck svg {
    width: 80px;
    height: 60px;
}

.odd-duck__quote {
    position: absolute;
    top: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-family: 'Caveat', cursive;
    font-size: 1rem;
    color: var(--color-orange);
    opacity: 0;
    animation: quote-fade 12s ease forwards;
}

@keyframes duck-swim {
    0%   { left: -100px; transform: translateY(0); }
    25%  { transform: translateY(-8px); }
    50%  { transform: translateY(4px); }
    75%  { transform: translateY(-6px); }
    100% { left: calc(100vw + 100px); transform: translateY(0); }
}

@keyframes quote-fade {
    0%   { opacity: 0; }
    10%  { opacity: 1; }
    85%  { opacity: 1; }
    100% { opacity: 0; }
}

/* === RESPONSIVE === */

@media (min-width: 1024px) {
    .collage-wall {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .collage-wall {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
        padding: 1.5rem;
    }
}

@media (max-width: 639px) {
    .collage-wall {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .memory-card--featured {
        grid-column: span 2;
    }

    .hero {
        padding: 2rem 1rem 0.5rem;
    }

    .lightbox__content {
        max-width: 95vw;
    }

    .lightbox__nav {
        display: none;
    }

    .lightbox__audio-card {
        padding: 1.5rem;
    }

    .lightbox__quote {
        font-size: 1.2rem;
    }
}
