/* 가능성.com - Possibility */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #F2EDE3;
    color: #5C4033;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 300;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* === Hero === */
#hero {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F2EDE3;
    position: relative;
}

.hero-inner {
    text-align: center;
}

#hero-title {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-size: 120px;
    letter-spacing: 0.02em;
    color: #5C4033;
    opacity: 0;
    transform: scale(0.88);
    transition: opacity 1.8s ease, transform 1.8s ease;
}

#hero-title.visible {
    opacity: 1;
    transform: scale(1);
}

#hero-line {
    width: 0;
    height: 1px;
    background-color: #C4865A;
    margin: 20px auto;
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#hero-line.visible {
    width: 30vw;
}

#hero-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.15em;
    color: #C4865A;
    opacity: 0;
    transition: opacity 1.2s ease;
}

#hero-subtitle.visible {
    opacity: 1;
}

/* === Branching SVG Section === */
#branching {
    padding: 100px 40px;
    display: flex;
    justify-content: center;
}

.branch-container {
    max-width: 800px;
    width: 100%;
}

#branch-svg {
    width: 100%;
    height: auto;
}

.branch-line {
    stroke: #D4C2B0;
    stroke-width: 2;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 1.2s ease;
}

.branch-line.drawn {
    stroke-dashoffset: 0;
}

.branch-node {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.3s ease;
    cursor: pointer;
}

.branch-node.visible {
    opacity: 1;
}

.branch-node:hover {
    transform: scale(1.5);
}

.node-green { fill: #8FA98B; }
.node-purple { fill: #9B7A8F; }
.node-tan { fill: #D4C2B0; }
.node-mauve { fill: #C9B8D4; }

.branch-node-fork {
    fill: #C4865A;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.branch-node-fork.visible {
    opacity: 1;
}

.node-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    fill: #5C4033;
    text-anchor: middle;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.node-label.show {
    opacity: 1;
}

/* === Content Path Cards === */
#content-paths {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 40px 120px;
}

.path-row {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
}

.path-card {
    flex: 1;
    background-color: #E8D5C4;
    border: 1px solid rgba(196, 134, 90, 0.2);
    padding: 48px 36px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.path-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.path-card.path-left {
    transform: translateX(-20px) translateY(30px);
}

.path-card.path-right {
    transform: translateX(20px) translateY(30px);
    margin-top: 40px;
}

.path-card.path-left.visible {
    transform: translateX(0) translateY(0);
}

.path-card.path-right.visible {
    transform: translateX(0) translateY(0);
    margin-top: 40px;
}

.path-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #C4865A;
    display: block;
    margin-bottom: 14px;
}

.path-card h2 {
    font-family: 'Fraunces', serif;
    font-weight: 400;
    font-size: 28px;
    color: #5C4033;
    margin-bottom: 14px;
}

.path-card p {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 300;
    font-size: 14px;
    line-height: 1.8;
    color: rgba(92, 64, 51, 0.7);
}

/* === Reflection Section === */
#reflection {
    background-color: #5C4033;
    padding: 100px 40px;
    text-align: center;
}

.reflection-inner {
    max-width: 600px;
    margin: 0 auto;
}

.reflection-title {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-size: 48px;
    color: #F2EDE3;
    margin-bottom: 12px;
}

.reflection-prompt {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.1em;
    color: #C4865A;
    margin-bottom: 40px;
}

.reflection-input-wrap {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 40px;
}

#possibility-input {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 300;
    font-size: 14px;
    padding: 12px 20px;
    border: 1px solid rgba(196, 134, 90, 0.4);
    background-color: rgba(242, 237, 227, 0.08);
    color: #F2EDE3;
    width: 320px;
    outline: none;
    transition: border-color 0.3s ease;
}

#possibility-input::placeholder {
    color: rgba(242, 237, 227, 0.3);
}

#possibility-input:focus {
    border-color: #C4865A;
}

#possibility-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.1em;
    padding: 12px 24px;
    background-color: #C4865A;
    color: #F2EDE3;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#possibility-btn:hover {
    background-color: #9B7A8F;
}

#planted-possibilities {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.planted-seed {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    padding: 6px 14px;
    background-color: rgba(143, 169, 139, 0.2);
    color: #8FA98B;
    border: 1px solid rgba(143, 169, 139, 0.3);
    opacity: 0;
    animation: seed-appear 0.6s ease forwards;
}

@keyframes seed-appear {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Footer === */
#footer {
    text-align: center;
    padding: 60px 40px;
    background-color: #F2EDE3;
}

.footer-rule {
    width: 60px;
    height: 1px;
    background-color: #C4865A;
    margin: 0 auto 24px;
    opacity: 0.5;
}

.footer-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: #2C1E14;
}

/* === Responsive === */
@media (max-width: 768px) {
    #hero-title {
        font-size: 48px;
    }

    .path-row {
        flex-direction: column;
        gap: 24px;
    }

    .path-card.path-right {
        margin-top: 0;
    }

    .reflection-title {
        font-size: 32px;
    }

    .reflection-input-wrap {
        flex-direction: column;
        align-items: center;
    }

    #possibility-input {
        width: 100%;
        max-width: 320px;
    }

    #branching {
        padding: 60px 20px;
    }

    #content-paths {
        padding: 40px 20px 80px;
    }
}

@media (max-width: 480px) {
    #hero-title {
        font-size: 36px;
    }

    #hero-line.visible {
        width: 50vw;
    }

    .path-card {
        padding: 32px 24px;
    }

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