/* ========================================
   gabs.bar -- Mid-Century Modern Data Bar
   ======================================== */

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

:root {
    --walnut: #3e2723;
    --cream: #faf3e6;
    --teak: #d4a574;
    --burnt-orange: #e65100;
    --olive: #558b2f;
    --dusty-blue: #5c7a99;
    --warm-white: #fff8f0;
    --charcoal: #2c2c2c;
    --dark-wood: #4a3228;
    --mid-wood: #5c4033;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--charcoal);
    background-color: var(--cream);
}

.kr {
    font-family: 'Noto Sans KR', sans-serif;
}

/* ========================================
   Hero Section
   ======================================== */
#hero {
    background-color: var(--walnut);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-chart {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hero-grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

.hero-grid-lines span {
    display: block;
    width: 100%;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.hero-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 24px;
    height: 340px;
    padding-bottom: 60px;
    position: relative;
    z-index: 1;
}

.hero-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex: 1;
    max-width: 80px;
    height: 100%;
    justify-content: flex-end;
}

.hero-bar {
    width: 100%;
    height: 0;
    border-radius: 4px 4px 0 0;
    transition: height 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition-delay: calc(var(--bar-index) * 100ms);
}

.hero-bar-group .coaster {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 248, 240, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--warm-white);
    font-family: 'Abril Fatface', serif;
    font-size: 0.9rem;
    flex-shrink: 0;
}

#hero.visible .hero-bar {
    height: var(--bar-height);
}

.hero-title {
    font-family: 'Abril Fatface', serif;
    font-weight: 400;
    font-size: clamp(3rem, 8vw, 6rem);
    color: var(--warm-white);
    margin-top: 2rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.hero-title .dot {
    color: var(--burnt-orange);
}

.hero-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: rgba(255, 248, 240, 0.6);
    margin-top: 0.5rem;
    text-align: center;
    letter-spacing: 0.05em;
    text-transform: lowercase;
}

/* ========================================
   Bento Grid Section
   ======================================== */
#bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    gap: 8px;
    padding: 8px;
    max-width: 1400px;
    margin: 0 auto;
}

.bento-panel {
    background-color: var(--warm-white);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.bento-panel:nth-child(even) {
    background-color: var(--cream);
}

.span-2 {
    grid-column: span 2;
}

.span-row-2 {
    grid-row: span 2;
}

.panel-title {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    color: var(--charcoal);
    margin-bottom: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.panel-title::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 8px;
    background-color: var(--burnt-orange);
    clip-path: polygon(
        50% 0%, 63% 30%, 100% 35%, 72% 58%,
        80% 100%, 50% 72%, 20% 100%, 28% 58%,
        0% 35%, 37% 30%
    );
    vertical-align: middle;
    flex-shrink: 0;
}

/* Chart Container */
.chart-container {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chart-grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
    z-index: 0;
}

.chart-grid-lines span {
    display: block;
    width: 100%;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    flex: 1;
    padding-bottom: 28px;
    position: relative;
    z-index: 1;
    min-height: 0;
}

.bar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    height: 100%;
    justify-content: flex-end;
    gap: 4px;
    max-width: 60px;
}

.bar {
    width: 70%;
    height: 0;
    border-radius: 4px 4px 0 0;
    transition: height 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition-delay: calc(var(--bar-index) * 100ms);
    min-width: 16px;
}

.bento-panel.visible .bar {
    height: var(--bar-height);
}

.bar-label {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 0.65rem;
    color: var(--charcoal);
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
    opacity: 0.7;
}

/* ========================================
   Footer Bar
   ======================================== */
#footer-bar {
    background: repeating-linear-gradient(
        2deg,
        #3e2723,
        #4a3228 1px,
        #3e2723 2px,
        #5c4033 3px,
        #3e2723 4px
    );
    padding: 1.5rem;
    margin-top: 8px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.footer-link-group {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.footer-drink {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--warm-white);
    transition: transform 0.3s ease;
}

.footer-drink:hover {
    transform: translateY(-4px);
}

.drink-icon.starburst {
    width: 24px;
    height: 24px;
    background-color: var(--burnt-orange);
    clip-path: polygon(
        50% 0%, 63% 30%, 100% 35%, 72% 58%,
        80% 100%, 50% 72%, 20% 100%, 28% 58%,
        0% 35%, 37% 30%
    );
    display: block;
}

.drink-label {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.footer-tagline {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 0.85rem;
    color: rgba(255, 248, 240, 0.5);
    text-align: center;
}

/* ========================================
   Mobile Responsive (< 640px)
   ======================================== */
@media (max-width: 640px) {
    #bento {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
    }

    .span-2 {
        grid-column: span 2;
    }

    .hero-bars {
        gap: 12px;
    }

    .hero-bar-group {
        max-width: 50px;
    }

    .hero-bar-group .coaster {
        width: 36px;
        height: 36px;
        font-size: 0.7rem;
    }

    .hero-chart {
        height: 300px;
    }

    .hero-bars {
        height: 260px;
    }

    .footer-link-group {
        gap: 2rem;
    }

    .bar-label {
        font-size: 0.55rem;
    }
}

@media (max-width: 400px) {
    #bento {
        grid-template-columns: 1fr;
        grid-auto-rows: 200px;
    }

    .span-2 {
        grid-column: span 1;
    }
}

/* ========================================
   Tablet (641-1024px)
   ======================================== */
@media (min-width: 641px) and (max-width: 1024px) {
    #bento {
        grid-template-columns: repeat(3, 1fr);
    }
}
