/* gabs.feedback -- Market Feedback */

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

:root {
    --paper: #F4EDE4;
    --kraft: #E8DCC8;
    --slate: #D8DDE3;
    --ink: #2C2416;
    --chalkboard: #1E1A14;
    --chalk: #F0EDE6;
    --sienna: #8B4513;
    --string: #A0522D;
    --ochre: #D4A04A;
    --neg-red: #B85450;
    --pos-green: #6B8F6B;
    --cream-card: #FBF7F0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    line-height: 1.7;
    color: var(--ink);
    background-color: var(--paper);
    overflow-x: hidden;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Crect width='6' height='6' fill='%23F4EDE4'/%3E%3Crect x='0' y='0' width='1' height='1' fill='%23000' opacity='0.02'/%3E%3Crect x='3' y='4' width='1' height='1' fill='%23000' opacity='0.015'/%3E%3C/svg%3E");
}

.section {
    min-height: 100vh;
    position: relative;
}

/* ===================== HERO: MARKET GATE ===================== */

#market-gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tag-string {
    margin-bottom: -10px;
    z-index: 2;
}

.string-path {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: drawString 0.6s ease forwards 0.3s;
}

@keyframes drawString {
    to { stroke-dashoffset: 0; }
}

.price-tag {
    width: clamp(220px, 40vw, 340px);
    height: clamp(140px, 25vw, 200px);
    background: var(--cream-card);
    border: 2px solid var(--string);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    clip-path: polygon(0% 0%, 90% 0%, 100% 50%, 90% 100%, 0% 100%);
    transform: translateY(-120%);
    animation: tagDrop 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 0.5s, tagSwing 3s ease-in-out infinite 1.7s;
    transform-origin: top center;
}

.tag-hole {
    position: absolute;
    top: 12px;
    left: 20px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid var(--string);
}

@keyframes tagDrop {
    to { transform: translateY(0); }
}

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

.tag-domain {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(1.8rem, 5vw, 3rem);
    color: var(--ink);
}

.tag-korean {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--sienna);
    margin-top: 4px;
}

.scroll-arrow {
    margin-top: 60px;
    opacity: 0;
    animation: fadeIn 0.5s ease 3s forwards, bounce 1.5s ease-in-out 3.5s infinite;
}

.arrow-path {
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: drawString 0.8s ease forwards 3s;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* ===================== STALL COUNTER ===================== */

#stall-counter {
    padding: 80px 24px;
    min-height: auto;
}

.bento-masonry {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 960px;
    margin: 0 auto;
}

.feedback-card {
    padding: 28px 24px;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feedback-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(44, 36, 22, 0.1);
}

.card-cream { background: var(--cream-card); }
.card-kraft { background: var(--kraft); }
.card-slate { background: var(--slate); }

.torn-1 { clip-path: polygon(0% 2%, 3% 0%, 98% 1%, 100% 3%, 99% 97%, 97% 100%, 2% 99%, 0% 97%); }
.torn-2 { clip-path: polygon(1% 0%, 99% 2%, 100% 1%, 98% 98%, 100% 100%, 1% 98%, 0% 100%, 2% 2%); }
.torn-3 { clip-path: polygon(0% 1%, 2% 0%, 100% 0%, 98% 2%, 100% 99%, 97% 100%, 0% 98%, 1% 97%); }

.card-label {
    font-family: 'Noto Serif KR', serif;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sienna);
    display: block;
    margin-bottom: 4px;
}

.feedback-card h3 {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--ink);
    margin-bottom: 8px;
}

.feedback-card p {
    font-size: 0.95rem;
    color: var(--ink);
    margin-bottom: 12px;
}

/* ===================== WORTH METER ===================== */

.worth-meter {
    width: 100%;
    height: 8px;
    background: rgba(44, 36, 22, 0.1);
    border-radius: 0;
}

.meter-fill {
    height: 100%;
    width: 0;
    transition: width 0.8s ease-out;
}

.meter-fill.green { background-color: var(--pos-green); }
.meter-fill.red { background-color: var(--neg-red); }

/* ===================== STAGGER REVEAL ===================== */

.stagger-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.stagger-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===================== CHALKBOARD ===================== */

#chalkboard {
    background-color: var(--chalkboard);
    padding: 80px 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='5' height='5'%3E%3Crect width='5' height='5' fill='%231E1A14'/%3E%3Crect x='1' y='1' width='1' height='1' fill='%23FFF' opacity='0.02'/%3E%3Crect x='3' y='4' width='1' height='1' fill='%23FFF' opacity='0.015'/%3E%3C/svg%3E");
}

.chalk-title {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--chalk);
    text-shadow: 0 0 4px rgba(240, 237, 230, 0.3);
    text-align: center;
    margin-bottom: 48px;
}

.chalk-list {
    list-style: none;
    max-width: 700px;
    margin: 0 auto;
}

.chalk-item {
    position: relative;
    padding: 16px 0 16px 32px;
}

.chalk-bullet {
    position: absolute;
    left: 0;
    top: 20px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid var(--chalk);
}

.chalk-text {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    color: var(--chalk);
    text-shadow: 0 0 4px rgba(240, 237, 230, 0.2);
}

.wiggly-line {
    display: block;
    width: 100%;
    height: 10px;
    margin-top: 4px;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.wiggly-line path {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    transition: stroke-dashoffset 0.8s ease;
}

.chalk-item.revealed .wiggly-line {
    opacity: 0.5;
}

.chalk-item.revealed .wiggly-line path {
    stroke-dashoffset: 0;
}

/* ===================== RECEIPT TAPE ===================== */

#receipt-tape {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
}

.receipt-strip {
    width: 100%;
    max-width: 480px;
    height: 400px;
    background: #FFF8E7;
    border: 1px solid rgba(44, 36, 22, 0.15);
    overflow: hidden;
    position: relative;
}

.receipt-strip:hover .receipt-scroll {
    animation-play-state: paused;
}

.receipt-scroll {
    animation: receiptRoll 20s linear infinite;
    padding: 20px 16px;
}

@keyframes receiptRoll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100%); }
}

@media (prefers-reduced-motion: reduce) {
    .receipt-scroll {
        animation: none;
    }
}

.receipt-entry {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.75rem, 1.2vw, 0.9rem);
    color: var(--ink);
    padding: 8px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.receipt-dash {
    border-top: 1px dashed var(--ink);
    opacity: 0.3;
}

/* ===================== STAMP FOOTER ===================== */

#stamp-footer {
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
}

.stamp-seal {
    width: 140px;
    height: 140px;
    border: 3px solid var(--sienna);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transform: scale(0) rotate(-30deg);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stamp-seal::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border: 1px solid var(--sienna);
    border-radius: 50%;
}

.stamp-seal.revealed {
    transform: scale(1) rotate(-8deg);
}

.stamp-text {
    font-family: 'Noto Serif KR', serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--sienna);
    text-align: center;
    line-height: 1.3;
    letter-spacing: 0.05em;
}

.footer-domain {
    font-family: 'Caveat', cursive;
    font-size: 1.2rem;
    color: var(--string);
    margin-top: 24px;
}

/* ===================== RESPONSIVE ===================== */

@media (max-width: 768px) {
    .bento-masonry {
        grid-template-columns: 1fr;
    }

    .feedback-card {
        grid-column: span 1 !important;
        clip-path: none;
    }
}

@media (max-width: 600px) {
    #stall-counter {
        padding: 40px 16px;
    }

    #chalkboard {
        padding: 60px 20px;
    }
}
