/* Intro Sequence */
.intro-sequence {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #030810;
    overflow: hidden;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Skip Button */
.skip-button {
    position: absolute;
    top: 32px;
    right: 32px;
    z-index: 30;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    backdrop-filter: blur(5px);
}

.skip-button:hover {
    color: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
}

.skip-button:active {
    transform: scale(0.96);
}

/* Title frame */
#ft {
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

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

.ft-kicker {
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.22);
    margin-bottom: 28px;
}

.ft-title {
    font-family: Georgia, serif;
    font-size: clamp(56px, 10vw, 100px);
    font-weight: 400;
    font-style: italic;
    color: rgba(255,255,255,0.86);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 28px;
}

.ft-rule {
    width: 36px;
    height: 1px;
    background: rgba(255,255,255,0.14);
    margin: 0 auto 24px;
}

.ft-sub {
    font-family: Georgia, serif;
    font-size: 15px;
    color: rgba(255,255,255,0.30);
    line-height: 1.6;
    letter-spacing: 0.02em;
    margin-bottom: 18px;
}

.ft-byline {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.16);
}

/* Frame container */
#sh {
    position: relative;
    width: 100%;
    height: 100vh;
    background: #030810;
    overflow: hidden;
}

/* Individual frames */
.fr {
    position: absolute;
    inset: 0;
    display: flex;
    opacity: 0;
}

/* Frame 0 — stat + map */
#f0 {
    align-items: center;
    justify-content: center;
    padding: 40px 36px;
    gap: 44px;
}

.f0l {
    flex: 0 0 auto;
    width: 230px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 0;
}

.fno {
    font-size: 108px;
    font-weight: 200;
    color: rgba(255, 255, 255, 0.84);
    line-height: 0.88;
    letter-spacing: -6px;
    display: block;
}

.fnos {
    font-size: 54px;
    font-weight: 200;
    letter-spacing: -2px;
}

.flab {
    font-size: 13px;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.18);
    margin-top: 16px;
    display: block;
}

.fbod {
    font-family: Georgia, serif;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.32);
    line-height: 1.90;
    margin-top: 22px;
    max-width: 248px;
}

.f0r {
    width: 310px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#twmap {
    width: 100%;
    height: auto;
    display: block;
}

/* Frame 1 — chart */
#f1 {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 38px 52px;
    gap: 16px;
}

.f1t {
    font-family: Georgia, serif;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.40);
    line-height: 1.90;
    text-align: center;
    max-width: 520px;
}

.f1leg {
    display: flex;
    justify-content: center;
    gap: 26px;
}

.f1li {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 9.5px;
    letter-spacing: 0.10em;
    color: rgba(255, 255, 255, 0.25);
}

.f1ls {
    width: 18px;
    height: 1.5px;
}

/* Frame 2 — goals */
#f2 {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.f2t {
    font-family: Georgia, serif;
    font-size: 23px;
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.68;
    text-align: center;
    max-width: 490px;
}

.f2row {
    margin-top: 38px;
    display: flex;
    align-items: center;
}

.f2d {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

.f2l {
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
}

.f2k {
    font-size: 13px;
    letter-spacing: 0.10em;
    color: rgba(255, 255, 255, 0.18);
    padding: 0 10px;
    white-space: nowrap;
}

/* Frame 3 — waters */
#f3 {
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 64px;
}

.f3t {
    font-family: Georgia, serif;
    font-size: 21px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.82;
    text-align: center;
    max-width: 470px;
}

.f3r {
    width: 24px;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin-top: 30px;
}

/* Frame 4 — enter */
#f4 {
    align-items: center;
    justify-content: center;
}

.fen {
    pointer-events: all;
    display: inline-block;
    padding: 14px 52px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.36);
    font-size: 10px;
    background: transparent;
    cursor: pointer;
    letter-spacing: 0.28em;
    transition: all 0.55s;
    font-family: var(--font-sans);
    text-transform: uppercase;
}

.fen:hover {
    border-color: rgba(255, 255, 255, 0.26);
    color: rgba(255, 255, 255, 0.72);
}

/* Progress bar */
#pg {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 1px;
    width: 0;
    background: rgba(255, 255, 255, 0.10);
    z-index: 10;
    transition: width 0.3s ease-out;
}

/* Taiwan SVG */
#twmap path {
    fill: #0b1c2e;
    stroke: #122136;
    stroke-width: 2;
    stroke-linejoin: round;
}

/* Ambient audio button */
.ambient-btn {
    position: absolute;
    bottom: 32px;
    left: 32px;
    z-index: 30;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 10px 18px;
    cursor: pointer;
    transition: all 0.35s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ambient-btn:hover {
    color: rgba(255, 255, 255, 0.65);
    border-color: rgba(255, 255, 255, 0.3);
}

.ambient-btn.ambient-on {
    color: rgba(255, 255, 255, 0.75);
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.04);
}

.ambient-icon {
    font-size: 14px;
    line-height: 1;
}

/* Enter button inside f2 */
.f3en {
    margin-top: 48px;
}

/* Fade Out Animation */
.intro-sequence.fade-out {
    opacity: 0;
    transition: opacity 1.5s cubic-bezier(0.19, 1, 0.22, 1);
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    #f0 {
        flex-direction: column;
        padding: 28px 24px;
        gap: 24px;
        justify-content: center;
    }

    .f0l {
        width: auto;
        align-items: center;
        text-align: center;
    }

    .fno {
        font-size: 72px;
    }

    .fnos {
        font-size: 36px;
    }

    .f0r {
        width: 200px;
    }

    .ambient-btn {
        bottom: 20px;
        left: 20px;
        font-size: 10px;
        padding: 8px 14px;
    }

    #f1 {
        padding: 24px;
    }

    #f2 {
        padding: 40px 24px;
    }

    .f2t {
        font-size: 18px;
    }

    .f2row {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .f2l {
        display: none;
    }

    #f3 {
        padding: 40px 24px;
    }

    .f3t {
        font-size: 17px;
    }

    .skip-button {
        top: 20px;
        right: 20px;
        padding: 10px 20px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .fno {
        font-size: 56px;
    }

    .fnos {
        font-size: 28px;
    }

    .fbod {
        font-size: 13px;
    }

    .f2t {
        font-size: 18px;
    }

    .skip-button {
        top: 16px;
        right: 16px;
        padding: 8px 16px;
        font-size: 11px;
    }
}
