/* senggack.org - Non-Profit Humanist Editorial */
/* Palette: #faf6f0 #fdf6e8 #3d3526 #6b5e4a #d97706 #fbbf24 #b45309 #ffffff #d4c5a9 */

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

html {
    background-color: #faf6f0;
}

body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.85;
    color: #3d3526;
    background-color: #faf6f0;
    overflow-x: hidden;
}

/* ===== Bookmark Ribbon ===== */
#bookmark-ribbon {
    position: fixed;
    right: 0;
    top: 0;
    width: 10px;
    height: 0;
    z-index: 100;
    pointer-events: none;
}

#bookmark-ribbon::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: 0;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 20px solid #d97706;
}

/* ===== Welcome ===== */
#welcome {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 5vw;
}

#welcome-content {
    text-align: center;
    max-width: 700px;
}

#org-name {
    font-family: 'Bitter', serif;
    font-weight: 700;
    font-size: clamp(48px, 8vw, 80px);
    color: #b45309;
    letter-spacing: -0.01em;
    margin-bottom: 24px;
    opacity: 0;
    transition: opacity 0.8s ease;
}

#org-name.visible {
    opacity: 1;
}

.hangul {
    display: inline;
}

#mission {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 20px;
    font-weight: 400;
    color: #3d3526;
    line-height: 1.8;
    margin-bottom: 16px;
    opacity: 0;
    transition: opacity 0.8s ease 0.3s;
}

#mission.visible {
    opacity: 1;
}

#wavy-underline {
    width: 100%;
    max-width: 400px;
    height: 8px;
    display: block;
    margin: 0 auto;
}

#wavy-path {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 1s ease-in-out 0.6s;
}

#wavy-path.drawn {
    stroke-dashoffset: 0;
}

/* ===== Writings ===== */
#writings {
    padding: 80px 5vw 120px;
    max-width: 1040px;
    margin: 0 auto;
}

#writings-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
}

.main-column {
    max-width: 640px;
}

.text-block {
    margin-bottom: 2em;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.text-block.visible {
    opacity: 1;
    transform: translateY(0);
}

.text-block p {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.85;
    color: #3d3526;
}

.wavy-word {
    position: relative;
    display: inline;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 60 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,3 C5,1 10,5 15,3 C20,1 25,5 30,3 C35,1 40,5 45,3 C50,1 55,5 60,3' fill='none' stroke='%23d97706' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-position: bottom;
    background-size: 60px 6px;
    padding-bottom: 4px;
}

/* ===== Margin Notes ===== */
.margin-column {
    position: relative;
}

.margin-note {
    margin-bottom: 2em;
    opacity: 0;
    transition: opacity 0.5s ease 0.2s;
    position: relative;
    padding-left: 20px;
}

.margin-note.visible {
    opacity: 1;
}

.dot-connector {
    position: absolute;
    left: -20px;
    top: 12px;
    width: 0;
    height: 0;
    border-top: 1px dotted #d4c5a9;
    transition: width 0.4s ease;
}

.margin-note.visible .dot-connector {
    width: 20px;
}

.note-text {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: #6b5e4a;
}

.note-text em {
    font-style: italic;
}

/* ===== Community ===== */
#community {
    background: #fdf6e8;
    padding: 100px 5vw;
    opacity: 0;
    transition: opacity 0.6s ease;
}

#community.visible {
    opacity: 1;
}

#community-title {
    font-family: 'Bitter', serif;
    font-weight: 700;
    font-size: 36px;
    color: #b45309;
    text-align: center;
    margin-bottom: 48px;
}

#card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    max-width: 700px;
    margin: 0 auto;
}

.quote-card {
    background: #ffffff;
    padding: 32px 28px;
    box-shadow: 2px 4px 8px rgba(61, 53, 38, 0.1);
    transform: rotate(var(--rotation, 0deg)) scale(0.9);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    position: relative;
    text-align: center;
}

.quote-card.visible {
    opacity: 1;
    transform: rotate(var(--rotation, 0deg)) scale(1);
}

.pin-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 0 auto 16px;
}

.pin-amber {
    background: #d97706;
}

.pin-terra {
    background: #b45309;
}

.quote-text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 16px;
    font-style: italic;
    line-height: 1.7;
    color: #3d3526;
}

/* ===== Final ===== */
#final {
    padding: 120px 5vw;
    text-align: center;
}

#final-question {
    font-family: 'Bitter', serif;
    font-weight: 700;
    font-size: 32px;
    color: #b45309;
    opacity: 0;
    transition: opacity 0.8s ease;
}

#final-question.visible {
    opacity: 1;
}

/* ===== Hover states ===== */
.wavy-word:hover {
    color: #fbbf24;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    #org-name, #mission {
        opacity: 1;
        transition: none;
    }

    #wavy-path {
        stroke-dashoffset: 0;
        transition: none;
    }

    .text-block {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .margin-note {
        opacity: 1;
        transition: none;
    }

    .dot-connector {
        width: 20px;
        transition: none;
    }

    #community {
        opacity: 1;
        transition: none;
    }

    .quote-card {
        opacity: 1;
        transform: rotate(var(--rotation, 0deg)) scale(1);
        transition: none;
    }

    #final-question {
        opacity: 1;
        transition: none;
    }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    #writings-grid {
        grid-template-columns: 1fr;
    }

    .margin-column {
        border-top: 1px dotted #d4c5a9;
        padding-top: 32px;
        margin-top: 16px;
    }

    .margin-note {
        padding-left: 0;
    }

    .dot-connector {
        display: none;
    }

    #card-grid {
        grid-template-columns: 1fr;
        max-width: 360px;
    }

    #org-name {
        font-size: 40px;
    }
}
