/* =============================================
   moot.ing - Candy Pastel Discussion Board
   ============================================= */

:root {
    --candy-pink: #FFE8F0;
    --mint-green: #E0FFE8;
    --sky-blue: #E0F0FF;
    --lemon-yellow: #FFF8E0;
    --lavender: #F0E8FF;
    --peach: #FFE8D8;
    --text-warm: #3A2830;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1vw, 17px);
    line-height: 1.7;
    color: var(--text-warm);
    background-color: var(--candy-pink);
    overflow-x: hidden;
}

/* =============================================
   Ambient Confetti
   ============================================= */
#ambient-confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    opacity: 0.5;
    will-change: transform;
}

.confetti-piece--circle {
    width: 4px;
    height: 4px;
    border-radius: 50%;
}

.confetti-piece--rect {
    width: 4px;
    height: 6px;
    border-radius: 1px;
}

@keyframes confettiFloat {
    0% {
        transform: translateY(-10px) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(100vh) translateX(var(--drift-x)) rotate(var(--drift-rot));
        opacity: 0;
    }
}

/* =============================================
   Click Confetti
   ============================================= */
#click-confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.confetti-burst {
    position: absolute;
    border-radius: 2px;
    pointer-events: none;
    will-change: transform, opacity;
}

@keyframes confettiBurst {
    0% {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--burst-x), var(--burst-y)) rotate(var(--burst-rot)) scale(0.5);
    }
}

/* =============================================
   Hero Section
   ============================================= */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--candy-pink);
    z-index: 1;
    overflow: hidden;
}

.hero-inner {
    text-align: center;
    z-index: 2;
    position: relative;
}

.logotype {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: clamp(48px, 10vw, 120px);
    color: var(--text-warm);
    letter-spacing: -0.02em;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    animation: bounceInLogo 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.logotype .dot {
    color: #FF9EBF;
    display: inline-block;
    animation: dotPulse 2s ease-in-out infinite 1s;
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

@keyframes bounceInLogo {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    60% {
        opacity: 1;
        transform: scale(1.05) translateY(-4px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Tagline speech bubble */
.tagline-bubble {
    position: relative;
    display: inline-block;
    background: white;
    border-radius: 24px;
    padding: 20px 36px;
    margin-top: 24px;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(58, 40, 48, 0.08);
    opacity: 0;
    transform: translateY(30px);
    animation: popInTagline 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s forwards;
}

.tagline {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: clamp(16px, 2vw, 22px);
    line-height: 1.5;
    color: var(--text-warm);
}

.tagline-bubble .bubble-tail {
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid white;
}

@keyframes popInTagline {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    60% {
        transform: translateY(-4px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =============================================
   Discussion Board / Masonry Section
   ============================================= */
#discussion-board {
    position: relative;
    z-index: 1;
    padding: 80px 24px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.masonry-grid {
    column-count: 3;
    column-gap: 20px;
}

/* =============================================
   Speech Card Styles
   ============================================= */
.speech-card {
    break-inside: avoid;
    margin-bottom: 20px;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(58, 40, 48, 0.06);
    position: relative;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.25s ease;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
}

.speech-card.visible {
    animation: bounceInCard 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.speech-card:hover {
    transform: scale(1.03) rotate(0deg) !important;
    box-shadow: 0 8px 24px rgba(58, 40, 48, 0.12);
    z-index: 10;
}

/* Speech bubble tail */
.speech-card::after {
    content: '';
    position: absolute;
    bottom: -8px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
}

/* Alternate tail direction */
.speech-card:nth-child(odd)::after {
    left: 24px;
}

.speech-card:nth-child(even)::after {
    right: 24px;
    left: auto;
}

/* Card color variants */
.card-mint {
    background-color: var(--mint-green);
}
.card-mint::after {
    border-top-color: var(--mint-green);
}

.card-sky {
    background-color: var(--sky-blue);
}
.card-sky::after {
    border-top-color: var(--sky-blue);
}

.card-lemon {
    background-color: var(--lemon-yellow);
}
.card-lemon::after {
    border-top-color: var(--lemon-yellow);
}

.card-lavender {
    background-color: var(--lavender);
}
.card-lavender::after {
    border-top-color: var(--lavender);
}

.card-peach {
    background-color: var(--peach);
}
.card-peach::after {
    border-top-color: var(--peach);
}

/* Card content */
.card-tag {
    display: inline-block;
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(58, 40, 48, 0.08);
    color: var(--text-warm);
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.speech-card h3 {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: clamp(18px, 2.5vw, 22px);
    line-height: 1.3;
    margin-bottom: 8px;
    color: var(--text-warm);
}

.speech-card p {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1vw, 16px);
    line-height: 1.7;
    color: var(--text-warm);
    opacity: 0.85;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(58, 40, 48, 0.08);
}

.card-author {
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    font-size: 12px;
    color: var(--text-warm);
    opacity: 0.7;
}

.card-reactions {
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    font-size: 12px;
    color: var(--text-warm);
    opacity: 0.5;
}

/* Bounce in animation for cards */
@keyframes bounceInCard {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px) rotate(var(--card-rotate, 0deg));
    }
    60% {
        opacity: 1;
        transform: scale(1.05) translateY(-4px) rotate(0deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0) rotate(var(--card-settle, 0deg));
    }
}

/* =============================================
   Footer
   ============================================= */
#footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 60px 24px 80px;
}

.footer-bubble {
    display: inline-block;
    position: relative;
    background: white;
    border-radius: 24px;
    padding: 24px 40px;
    box-shadow: 0 4px 20px rgba(58, 40, 48, 0.08);
}

.footer-bubble p {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: clamp(16px, 2vw, 22px);
    color: var(--text-warm);
}

.footer-bubble .bubble-tail {
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid white;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 900px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .masonry-grid {
        column-count: 1;
    }

    #discussion-board {
        padding: 40px 16px 40px;
    }

    .tagline-bubble {
        margin-left: 16px;
        margin-right: 16px;
    }
}
