/* desca.works --- candy-coated playground */

:root {
    --candy-pink: #FF6B9D;
    --candy-lilac: #C56CF0;
    --candy-lemon: #FFD93D;
    --candy-mint: #6BCB77;
    --candy-sky: #4D96FF;
    --candy-cream: #FFF8F0;
    --candy-cotton: #FFE8F0;
    --candy-grape: #2D1B4E;

    --bounce-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
    --bounce-ease-strong: cubic-bezier(0.18, 1.7, 0.58, 1);
    --bounce-duration: 0.6s;

    --radius-card: 24px;
    --radius-pill: 999px;
    --radius-section: 32px;
    --radius-soft: 16px;
    --radius-min: 12px;

    --shadow-offset: 6px 8px 0px;
    --shadow-pink: 6px 8px 0px rgba(255, 107, 157, 0.28);
    --shadow-lilac: 6px 8px 0px rgba(197, 108, 240, 0.28);
    --shadow-lemon: 6px 8px 0px rgba(255, 217, 61, 0.32);
    --shadow-mint: 6px 8px 0px rgba(107, 203, 119, 0.30);
    --shadow-sky: 6px 8px 0px rgba(77, 150, 255, 0.30);
    --shadow-cotton: 6px 8px 0px rgba(255, 232, 240, 0.55);
    --shadow-grape: 6px 8px 0px rgba(45, 27, 78, 0.18);

    --font-display: "Baloo 2", "Nunito", system-ui, sans-serif;
    --font-body: "Nunito", system-ui, sans-serif;
    --font-accent: "Quicksand", "Nunito", system-ui, sans-serif;
}

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

html, body {
    background: var(--candy-cream);
    color: var(--candy-grape);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.5;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 20%, rgba(255, 217, 61, 0.18), transparent 35%),
        radial-gradient(circle at 88% 12%, rgba(197, 108, 240, 0.16), transparent 38%),
        radial-gradient(circle at 50% 90%, rgba(107, 203, 119, 0.14), transparent 40%),
        var(--candy-cream);
}

a {
    color: var(--candy-sky);
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

img, svg {
    display: block;
    max-width: 100%;
}

/* ---------- Floating pill menu ---------- */

.floating-menu {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
}

.menu-button {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-pill);
    background: var(--candy-pink);
    box-shadow: var(--shadow-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    animation: wobble 3s var(--bounce-ease) infinite;
    transition: transform 0.25s var(--bounce-ease);
}

.menu-button:hover {
    transform: scale(1.08) rotate(-4deg);
}

.menu-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-pill);
    background: var(--candy-cream);
    display: inline-block;
}

@keyframes wobble {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

.radial-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    pointer-events: none;
}

.radial-item {
    position: absolute;
    top: -24px;
    left: -24px;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-pill);
    background: var(--candy-cream);
    box-shadow: var(--shadow-grape);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(0, 0) scale(0);
    transition: transform 0.5s var(--bounce-ease), background-color 0.25s ease;
    pointer-events: none;
}

.radial-item:nth-child(1) { background: var(--candy-lemon); box-shadow: var(--shadow-lemon); }
.radial-item:nth-child(2) { background: var(--candy-pink); box-shadow: var(--shadow-pink); }
.radial-item:nth-child(3) { background: var(--candy-mint); box-shadow: var(--shadow-mint); }
.radial-item:nth-child(4) { background: var(--candy-sky); box-shadow: var(--shadow-sky); }
.radial-item:nth-child(5) { background: var(--candy-lilac); box-shadow: var(--shadow-lilac); }

.floating-menu.open .radial-item {
    pointer-events: auto;
    transform: rotate(var(--angle)) translate(96px) rotate(calc(-1 * var(--angle))) scale(1);
}

.floating-menu.open .radial-item:nth-child(1) { transition-delay: 0.05s; }
.floating-menu.open .radial-item:nth-child(2) { transition-delay: 0.10s; }
.floating-menu.open .radial-item:nth-child(3) { transition-delay: 0.15s; }
.floating-menu.open .radial-item:nth-child(4) { transition-delay: 0.20s; }
.floating-menu.open .radial-item:nth-child(5) { transition-delay: 0.25s; }

.floating-menu.open .menu-button {
    background: var(--candy-grape);
    transform: rotate(45deg) scale(1.05);
    animation: none;
}

.floating-menu.open .menu-dot {
    background: var(--candy-lemon);
}

.radial-item:hover {
    transform: rotate(var(--angle)) translate(108px) rotate(calc(-1 * var(--angle))) scale(1.15);
}

/* ---------- Common reveal animation ---------- */

.reveal {
    opacity: 0;
    transform: translateY(60px) scale(0.85);
    transition: opacity 0.6s var(--bounce-ease), transform 0.6s var(--bounce-ease);
    transition-delay: calc(var(--card-index, 0) * 80ms);
}

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

.reveal[data-reveal="shape"] {
    transform: scale(0) rotate(-180deg);
    transition: opacity 0.4s var(--bounce-ease), transform 0.4s var(--bounce-ease);
    transition-delay: calc(var(--card-index, 0) * 40ms);
}

.reveal[data-reveal="shape"].visible {
    transform: scale(1) rotate(0deg);
}

/* ---------- Section heads ---------- */

.section-head {
    text-align: center;
    padding: 80px 24px 32px;
    position: relative;
}

.display-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--candy-grape);
    display: inline-block;
    max-width: 920px;
}

.display-title .word {
    display: inline-block;
    margin: 0 8px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.5s var(--bounce-ease), transform 0.5s var(--bounce-ease);
}

.display-title .word:nth-child(odd) {
    transform: translateX(-50px);
}

.display-title .word:nth-child(even) {
    transform: translateX(50px);
}

.display-title.visible .word {
    opacity: 1;
    transform: translate(0, 0);
}

.display-title.visible .word:nth-child(1) { transition-delay: 0.0s; }
.display-title.visible .word:nth-child(2) { transition-delay: 0.12s; }
.display-title.visible .word:nth-child(3) { transition-delay: 0.24s; }
.display-title.visible .word:nth-child(4) { transition-delay: 0.36s; }

.section-sub {
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: 1.1rem;
    margin-top: 16px;
    color: var(--candy-grape);
    opacity: 0.78;
}

/* ---------- Hero / Spill Zone ---------- */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px 60px;
    overflow: hidden;
}

.ambient-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.amb {
    position: absolute;
    border-radius: var(--radius-pill);
    opacity: 0.7;
    animation: floaty 22s ease-in-out infinite;
}

.amb-1 { top: 8%; left: 6%; width: 60px; height: 60px; background: var(--candy-lemon); animation-duration: 18s; }
.amb-2 { top: 18%; right: 12%; width: 36px; height: 36px; background: var(--candy-mint); animation-duration: 24s; }
.amb-3 { bottom: 22%; left: 14%; width: 90px; height: 90px; background: var(--candy-lilac); opacity: 0.4; animation-duration: 28s; }
.amb-4 { bottom: 12%; right: 10%; width: 48px; height: 48px; background: var(--candy-pink); animation-duration: 20s; }
.amb-5 { top: 52%; left: 4%; width: 24px; height: 24px; background: var(--candy-sky); animation-duration: 16s; }
.amb-6 { top: 32%; right: 6%; width: 72px; height: 72px; background: var(--candy-cotton); animation-duration: 26s; }
.amb-7 { bottom: 6%; left: 42%; width: 30px; height: 30px; background: var(--candy-lemon); animation-duration: 21s; }
.amb-8 { top: 6%; left: 48%; width: 18px; height: 18px; background: var(--candy-mint); animation-duration: 19s; }

@keyframes floaty {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(14px, -18px) rotate(20deg); }
    50% { transform: translate(-10px, 22px) rotate(-12deg); }
    75% { transform: translate(20px, 10px) rotate(16deg); }
}

.spill-cluster {
    position: relative;
    width: min(96vw, 980px);
    height: clamp(360px, 56vh, 560px);
    z-index: 2;
}

.spill-card {
    position: absolute;
    background: var(--candy-pink);
    color: var(--candy-cream);
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    box-shadow: var(--shadow-pink);
    transition: transform 0.3s var(--bounce-ease), box-shadow 0.3s var(--bounce-ease);
    will-change: transform;
}

.spill-text {
    line-height: 1;
    padding: 0 8px;
}

.pill-1 {
    top: 8%;
    left: 4%;
    width: 56%;
    height: 32%;
    background: var(--candy-pink);
    box-shadow: var(--shadow-pink);
    transform: rotate(-3deg);
    font-size: clamp(3rem, 9vw, 7rem);
}

.pill-2 {
    top: 18%;
    right: 14%;
    width: 14%;
    height: 26%;
    min-width: 90px;
    background: var(--candy-lemon);
    box-shadow: var(--shadow-lemon);
    color: var(--candy-grape);
    transform: rotate(2deg);
    font-size: clamp(2rem, 6vw, 4rem);
}

.pill-3 {
    bottom: 12%;
    left: 18%;
    width: 64%;
    height: 32%;
    background: var(--candy-lilac);
    box-shadow: var(--shadow-lilac);
    transform: rotate(-1deg);
    font-size: clamp(3rem, 9vw, 7rem);
}

.spill-card.reveal {
    opacity: 0;
    transform: translateY(-120px) rotate(-20deg) scale(0.8);
}

.spill-card.reveal.visible.pill-1 { transform: rotate(-3deg); opacity: 1; }
.spill-card.reveal.visible.pill-2 { transform: rotate(2deg); opacity: 1; }
.spill-card.reveal.visible.pill-3 { transform: rotate(-1deg); opacity: 1; }

.spill-card:hover {
    transform: scale(1.04) rotate(0deg) !important;
}

.badge-circle {
    position: absolute;
    bottom: -4%;
    right: 4%;
    width: clamp(120px, 18vw, 180px);
    height: clamp(120px, 18vw, 180px);
    border-radius: var(--radius-pill);
    background: var(--candy-mint);
    box-shadow: var(--shadow-mint);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: var(--font-accent);
    font-weight: 700;
    font-size: clamp(0.85rem, 1.4vw, 1.05rem);
    color: var(--candy-grape);
    line-height: 1.2;
    padding: 16px;
    animation: gentle-spin 18s linear infinite;
}

@keyframes gentle-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.confetti-decor {
    position: absolute;
    border-radius: var(--radius-pill);
    pointer-events: none;
}

.decor-a {
    top: 0;
    left: 30%;
    width: 22px;
    height: 22px;
    background: var(--candy-lemon);
    box-shadow: var(--shadow-lemon);
}

.decor-b {
    top: 48%;
    left: -2%;
    width: 14px;
    height: 14px;
    background: var(--candy-sky);
    box-shadow: var(--shadow-sky);
}

.decor-c {
    bottom: 18%;
    right: 28%;
    width: 26px;
    height: 26px;
    background: var(--candy-pink);
    box-shadow: var(--shadow-pink);
}

.scroll-cue {
    position: relative;
    margin-top: 32px;
    padding: 14px 26px;
    background: var(--candy-cotton);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-cotton);
    font-family: var(--font-accent);
    font-weight: 600;
    color: var(--candy-grape);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    z-index: 2;
}

.squiggle {
    display: inline-block;
}

/* ---------- Discovery Grid ---------- */

.discovery {
    padding: 32px 24px 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.discovery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-flow: dense;
    gap: 24px;
    margin-top: 40px;
}

.d-card {
    position: relative;
    border-radius: var(--radius-card);
    padding: 28px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    cursor: pointer;
    transition: transform 0.25s var(--bounce-ease), box-shadow 0.25s var(--bounce-ease);
    will-change: transform;
}

.d-card.span-tall {
    grid-row: span 2;
    min-height: 460px;
}

.d-card.span-wide {
    grid-column: span 2;
}

.c-pink { background: var(--candy-pink); color: var(--candy-cream); box-shadow: var(--shadow-pink); border-radius: 32px; }
.c-lilac { background: var(--candy-lilac); color: var(--candy-cream); box-shadow: var(--shadow-lilac); border-radius: 28px 40px 28px 40px; }
.c-mint { background: var(--candy-mint); color: var(--candy-grape); box-shadow: var(--shadow-mint); border-radius: 36px; }
.c-sky { background: var(--candy-sky); color: var(--candy-cream); box-shadow: var(--shadow-sky); border-radius: 40px 28px 40px 28px; }
.c-lemon { background: var(--candy-lemon); color: var(--candy-grape); box-shadow: var(--shadow-lemon); border-radius: 32px; }
.c-cotton { background: var(--candy-cotton); color: var(--candy-grape); box-shadow: var(--shadow-cotton); border-radius: 28px; }
.c-pink-soft { background: var(--candy-cotton); color: var(--candy-pink); box-shadow: var(--shadow-pink); border-radius: 36px 28px 36px 28px; }
.c-mint-soft { background: var(--candy-mint); color: var(--candy-cream); box-shadow: var(--shadow-mint); border-radius: 40px; }
.c-sky-soft { background: var(--candy-cream); color: var(--candy-sky); box-shadow: var(--shadow-sky); border-radius: 28px 40px 28px 40px; border: 3px solid var(--candy-sky); }

.d-card:hover {
    transform: translateY(-8px) rotate(var(--hover-rotate, 1.5deg));
    box-shadow: 10px 14px 0px rgba(45, 27, 78, 0.18);
}

.d-card.c-pink:hover { box-shadow: 10px 14px 0px rgba(255, 107, 157, 0.35); }
.d-card.c-lilac:hover { box-shadow: 10px 14px 0px rgba(197, 108, 240, 0.35); }
.d-card.c-mint:hover, .d-card.c-mint-soft:hover { box-shadow: 10px 14px 0px rgba(107, 203, 119, 0.4); }
.d-card.c-sky:hover, .d-card.c-sky-soft:hover { box-shadow: 10px 14px 0px rgba(77, 150, 255, 0.4); }
.d-card.c-lemon:hover { box-shadow: 10px 14px 0px rgba(255, 217, 61, 0.45); }

.d-card.pressed {
    transform: scale(0.96);
    transition: transform 0.1s ease-out;
}

.card-illo {
    width: 96px;
    height: 96px;
    background: rgba(255, 248, 240, 0.25);
    border-radius: var(--radius-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.wide-illo {
    width: 100%;
    max-width: 220px;
    height: 80px;
}

.card-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.6rem;
    line-height: 1.1;
}

.card-text {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.98rem;
    line-height: 1.5;
    opacity: 0.95;
}

/* Negative-rotation cards in grid for organic feel */
.discovery-grid .d-card:nth-child(2) { transform: rotate(-1deg); }
.discovery-grid .d-card:nth-child(5) { transform: rotate(1deg); }
.discovery-grid .d-card:nth-child(7) { transform: rotate(-1.2deg); }

.discovery-grid .d-card:nth-child(2):hover,
.discovery-grid .d-card:nth-child(5):hover,
.discovery-grid .d-card:nth-child(7):hover {
    transform: translateY(-8px) rotate(2deg);
}

/* ---------- Bounce Lane ---------- */

.bounce-lane-wrap {
    padding: 40px 0 80px;
}

.bounce-lane {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 32px 32px 48px;
    margin-top: 24px;
    scrollbar-width: none;
    cursor: grab;
}

.bounce-lane::-webkit-scrollbar {
    display: none;
}

.bounce-lane.dragging {
    cursor: grabbing;
}

.bounce-card {
    flex: 0 0 auto;
    width: 160px;
    height: 200px;
    border-radius: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--candy-cream);
    user-select: none;
    scroll-snap-align: center;
    transition: transform 0.4s var(--bounce-ease);
    will-change: transform;
}

.bounce-card span {
    font-size: 2.4rem;
    line-height: 1;
}

.bounce-card em {
    font-family: var(--font-accent);
    font-style: normal;
    font-weight: 600;
    font-size: 1rem;
    background: rgba(255, 248, 240, 0.25);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
}

.bc-pink { background: var(--candy-pink); box-shadow: var(--shadow-pink); }
.bc-lilac { background: var(--candy-lilac); box-shadow: var(--shadow-lilac); }
.bc-lemon { background: var(--candy-lemon); color: var(--candy-grape); box-shadow: var(--shadow-lemon); }
.bc-mint { background: var(--candy-mint); color: var(--candy-grape); box-shadow: var(--shadow-mint); }
.bc-sky { background: var(--candy-sky); box-shadow: var(--shadow-sky); }

.bounce-card:nth-child(odd) { transform: rotate(-2deg); }
.bounce-card:nth-child(even) { transform: rotate(2deg); }

/* ---------- Story Stack ---------- */

.story-stack {
    padding: 40px 0 80px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.story-panel {
    margin: 0 16px;
    border-radius: var(--radius-section);
    min-height: 80vh;
    padding: 48px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
    scroll-snap-align: start;
    cursor: pointer;
    transition: transform 0.4s var(--bounce-ease);
}

.sp-pink { background: var(--candy-pink); color: var(--candy-cream); box-shadow: var(--shadow-pink); }
.sp-mint { background: var(--candy-mint); color: var(--candy-grape); box-shadow: var(--shadow-mint); }
.sp-sky { background: var(--candy-sky); color: var(--candy-cream); box-shadow: var(--shadow-sky); }
.sp-lemon { background: var(--candy-lemon); color: var(--candy-grape); box-shadow: var(--shadow-lemon); }

.story-panel:hover {
    transform: translateY(-6px) scale(1.01);
}

.story-illo {
    width: 100%;
    max-width: 360px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    background: rgba(255, 248, 240, 0.35);
    border-radius: var(--radius-card);
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.3);
    opacity: 0;
    transition: transform 0.8s var(--bounce-ease-strong), opacity 0.8s ease;
}

.story-panel.visible .story-illo {
    transform: scale(1);
    opacity: 1;
    transition-delay: 0.2s;
}

.story-text h3 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.4rem, 6vw, 4rem);
    line-height: 1;
    margin-bottom: 16px;
}

.story-text p {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.2rem;
    line-height: 1.5;
    max-width: 480px;
}

/* ---------- Footer Playground ---------- */

.footer-playground {
    position: relative;
    padding: 120px 24px;
    background: var(--candy-cotton);
    overflow: hidden;
    margin-top: 40px;
    border-radius: 48px 48px 0 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orbit-shape {
    position: absolute;
    border-radius: var(--radius-pill);
    pointer-events: none;
    animation: orbit 24s linear infinite;
}

.os-1 { top: 12%; left: 8%; width: 80px; height: 80px; background: var(--candy-lemon); box-shadow: var(--shadow-lemon); animation-duration: 22s; }
.os-2 { top: 22%; right: 14%; width: 50px; height: 50px; background: var(--candy-pink); box-shadow: var(--shadow-pink); animation-duration: 28s; animation-direction: reverse; }
.os-3 { bottom: 18%; left: 18%; width: 36px; height: 36px; background: var(--candy-mint); box-shadow: var(--shadow-mint); animation-duration: 19s; }
.os-4 { bottom: 24%; right: 8%; width: 72px; height: 72px; background: var(--candy-sky); box-shadow: var(--shadow-sky); animation-duration: 26s; animation-direction: reverse; }
.os-5 { top: 60%; left: 4%; width: 28px; height: 28px; background: var(--candy-lilac); box-shadow: var(--shadow-lilac); animation-duration: 17s; }
.os-6 { top: 8%; left: 48%; width: 24px; height: 24px; background: var(--candy-pink); box-shadow: var(--shadow-pink); animation-duration: 21s; }
.os-7 { bottom: 8%; left: 50%; width: 60px; height: 60px; background: var(--candy-lemon); box-shadow: var(--shadow-lemon); animation-duration: 25s; animation-direction: reverse; }
.os-8 { top: 48%; right: 4%; width: 20px; height: 20px; background: var(--candy-mint); box-shadow: var(--shadow-mint); animation-duration: 18s; }

@keyframes orbit {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, -16px) rotate(90deg); }
    50% { transform: translate(0, -28px) rotate(180deg); }
    75% { transform: translate(-20px, -16px) rotate(270deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

.footer-card {
    position: relative;
    z-index: 2;
    background: var(--candy-cream);
    border-radius: var(--radius-section);
    padding: 48px 56px;
    text-align: center;
    box-shadow: 8px 10px 0px rgba(45, 27, 78, 0.18);
    max-width: 520px;
    border: 4px solid var(--candy-grape);
}

.footer-card h3 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--candy-grape);
    margin-bottom: 16px;
}

.footer-line {
    font-family: var(--font-accent);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--candy-grape);
    margin-bottom: 6px;
}

.footer-stars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 24px 0 16px;
}

.footer-stars svg {
    animation: star-twinkle 3s ease-in-out infinite;
}

.footer-stars svg:nth-child(2) { animation-delay: 0.4s; }
.footer-stars svg:nth-child(3) { animation-delay: 0.8s; }

@keyframes star-twinkle {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(15deg); }
}

.footer-credit {
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--candy-grape);
    opacity: 0.7;
    margin-top: 8px;
}

/* ---------- Confetti layer ---------- */

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

.confetti-piece {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: var(--radius-min);
    will-change: transform, opacity;
    animation: confetti-fall 1.4s var(--bounce-ease) forwards;
}

.confetti-piece.cp-circle { border-radius: var(--radius-pill); }
.confetti-piece.cp-square { border-radius: 4px; }

@keyframes confetti-fall {
    0% {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg) scale(0);
    }
    20% {
        transform: translate(var(--cx-mid), var(--cy-mid)) rotate(180deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--cx), var(--cy)) rotate(720deg) scale(0.6);
        opacity: 0;
    }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .discovery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .d-card.span-wide {
        grid-column: span 2;
    }
    .story-panel {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 36px 24px;
        min-height: auto;
    }
    .story-illo {
        max-width: 260px;
    }
}

@media (max-width: 620px) {
    .discovery-grid {
        grid-template-columns: 1fr;
    }
    .d-card.span-wide,
    .d-card.span-tall {
        grid-column: auto;
        grid-row: auto;
        min-height: 220px;
    }
    .discovery-grid .d-card:nth-child(odd) { transform: rotate(-1deg); }
    .discovery-grid .d-card:nth-child(even) { transform: rotate(1deg); }

    .spill-cluster {
        height: 480px;
    }
    .pill-1 { width: 80%; left: 4%; top: 4%; height: 24%; }
    .pill-2 { right: 6%; top: 32%; width: 30%; height: 18%; min-width: 70px; }
    .pill-3 { width: 88%; left: 6%; bottom: 18%; height: 24%; }
    .badge-circle { bottom: 0; right: 8%; width: 110px; height: 110px; }

    .floating-menu { top: 16px; right: 16px; }
    .menu-button { width: 56px; height: 56px; }

    .bounce-card { width: 130px; height: 170px; }
}
