/* 프리미엄 리뉴얼 공통 */
#premium-renewal * {
    font-family: "Pretendard", sans-serif;
}

#premium-renewal {
    width: 100%;
    margin: 0;
    overflow-x: hidden;
    background: #ffffff;
    color: #131313;
    font-family: "Pretendard", sans-serif;
    letter-spacing: -0.03em;
    scrollbar-gutter: stable;
}

#premium-renewal *,
#premium-renewal *::before,
#premium-renewal *::after {
    box-sizing: border-box;
}

#premium-renewal a {
    color: inherit;
    text-decoration: none;
}

#premium-renewal button,
#premium-renewal input {
    font: inherit;
}

#premium-renewal button {
    border: 0;
    cursor: pointer;
}

#premium-renewal h1,
#premium-renewal h2,
#premium-renewal h3,
#premium-renewal p {
    margin: 0;
}

/* section01: 서비스 소개 */
#premium-renewal .psi-section01 {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 57px 0 42px;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(180deg, #FFFFFF 0%, #D1DFFF 100%);
}

#premium-renewal .psi-section01__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
}

#premium-renewal .psi-section01 h1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#premium-renewal .psi-section01__label {
    font-size: clamp(16px, 1.6vw, 23px);
    font-weight: 600;
    color: rgba(19, 19, 19, 0.5);
}

#premium-renewal .psi-section01__copy {
    font-size: clamp(28px, 4.86vw, 70px);
    font-weight: 600;
    line-height: 1.2;
    color: #131313;
}

/* 상단 인터렉션 */
#premium-renewal .psi-section01__visual {
    position: relative;
    overflow: hidden;
    --visual-w: clamp(320px, 52vw, 908px);
    width: var(--visual-w);
    aspect-ratio: 907 / 463;
    margin: clamp(70px, 5.1vw, 74px) auto 0;
}

#premium-renewal .psi-badge,
#premium-renewal .psi-deco {
    position: absolute;
    display: block;
    height: auto;
}

/* --- 배지: 하나씩 떨어지는 모션 --- */
#premium-renewal .psi-badge {
    opacity: 0;
    animation-name: psi-badge-drop;
    animation-duration: 1.5s;
    animation-fill-mode: forwards;
}

#premium-renewal .psi-badge--analyance {
    width: 53%;
    left: 46%;
    top: 67%;
    --fall-dist: calc(var(--visual-w) * 0.5424);
    animation-delay: 0s;
}

#premium-renewal .psi-badge--builder {
    width: 65%;
    left: 5%;
    top: 46%;
    --fall-dist: calc(var(--visual-w) * 0.4366);
    animation-delay: 0.25s;
}

#premium-renewal .psi-badge--sellpia {
    width: 39%;
    left: 21%;
    top: 29%;
    --fall-dist: calc(var(--visual-w) * 0.4410);
    animation-delay: 0.5s;
}

#premium-renewal .psi-badge--crm {
    width: 36%;
    left: 56%;
    top: 21%;
    z-index: 1;
    --fall-dist: calc(var(--visual-w) * 0.3528);
    animation-delay: 0.75s;
}

#premium-renewal .psi-badge--review {
    width: 70%;
    left: 11%;
    top: 0;
    --fall-dist: calc(var(--visual-w) * 0.5424);
    animation-delay: 1s;
}

@keyframes psi-badge-drop {
    0%      { opacity: 0; transform: translateY(calc(var(--fall-dist) * -1)); animation-timing-function: cubic-bezier(1, 0, 0.667, 1); }
    66.67%  { opacity: 1; transform: translateY(0); animation-timing-function: cubic-bezier(0.333, 0, 0, 1); }
    76.67%  { transform: translateY(-22px); animation-timing-function: cubic-bezier(1, 0, 0.667, 1); }
    86.67%  { transform: translateY(0); animation-timing-function: cubic-bezier(0.333, 0, 0, 1); }
    93.33%  { transform: translateY(-9px); animation-timing-function: cubic-bezier(1, 0, 0.667, 1); }
    100%    { opacity: 1; transform: translateY(0); }
}

/* --- 코인 & 다이아 --- */
#premium-renewal .psi-deco {
    opacity: 0;
    will-change: transform;
}

#premium-renewal .psi-deco--coin {
    width: 14%; 
    left: 0; 
    top: 46%;
    animation:
        psi-coin-bounce 0.9s ease-out 2.6s forwards,
        psi-float-sm 3.6s ease-in-out 3.6s infinite;
}

#premium-renewal .psi-deco--diamond {
    width: 14%;
    right: 3%;
    top: 46%;
    z-index: 2;
    animation:
        psi-deco-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 2.8s forwards,
        psi-float 3s ease-in-out 3.4s infinite;
}

@keyframes psi-coin-bounce {
    0%   { opacity: 0; transform: translateY(-50px) scale(0.6) rotate(-25deg); }
    45%  { opacity: 1; transform: translateY(0) scale(1) rotate(8deg); }
    62%  { opacity: 1; transform: translateY(-14px) scale(1) rotate(-4deg); }
    78%  { opacity: 1; transform: translateY(0) scale(1) rotate(2deg); }
    89%  { opacity: 1; transform: translateY(-5px) scale(1) rotate(-1deg); }
    100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
}

@keyframes psi-deco-pop {
    0%   { opacity: 0; transform: translateY(-24px) scale(0.4) rotate(-20deg); }
    60%  { opacity: 1; transform: translateY(4px) scale(1.08) rotate(6deg); }
    80%  { transform: translateY(-2px) scale(0.97) rotate(-3deg); }
    100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
}

@keyframes psi-float {
    0%, 100% { transform: translateY(0) translateX(0) rotate(0deg); }
    50%      { transform: translateY(-8px) translateX(3px) rotate(3deg); }
}

@keyframes psi-float-sm {
    0%, 100% { transform: translateY(0) translateX(0) rotate(0deg); }
    50%      { transform: translateY(-5px) translateX(-2px) rotate(-2deg); }
}

/* 모션 */
@media (prefers-reduced-motion: reduce) {
    #premium-renewal .psi-badge,
    #premium-renewal .psi-deco {
        opacity: 1;
        animation: none;
    }
    #premium-renewal .psi-deco { transform: none; }
}

/* 접근성 전용 텍스트 */
#premium-renewal .psi-blind {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* ===== section02: 브랜드 성장 (전환) ===== */
#premium-renewal .psi-section02 {
    padding: clamp(100px, 10.4167vw, 200px) clamp(0px, 3.125vw, 60px);
    background: linear-gradient(180deg, #D1DFFF 10.58%, #FFFFFF 87.98%);
}

#premium-renewal .psi-section02__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
}

#premium-renewal .psi-section02 h2 {
    flex-shrink: 0;
    padding-right: clamp(100px, 13.3vw, 200px);
    font-size: clamp(24px, 4.2vw, 60px);
    font-weight: 600;
    line-height: 1.4;
}

#premium-renewal .psi-section02__rolling-wrap {
    max-width: 800px;
    width: 100%;
    min-width: 0;
    height: 446px;
    overflow: visible;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#premium-renewal .rolling-list-container {
    position: relative;
    width: calc(100% + 40px);
    height: 100%;
    margin: 0 -20px;
    overflow: hidden;
}

#premium-renewal .rolling-list-container .fixed-active-box {
    position: absolute;
    top: 176px;
    left: 20px;
    width: calc(100% - 40px);
    height: 94px;
    border-radius: 12px;
    box-sizing: border-box;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0px 8.61px 17.7px 0px rgba(51, 31, 59, 0.16);
}

#premium-renewal .rolling-list-container .fixed-active-box::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 2px; /* 테두리 두께 */
    background: linear-gradient(90deg, #4A83FF 0%, #BA0BFF 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

#premium-renewal .rolling-list-container .rolling-list {
    position: absolute;
    top: 0;
    left: 20px;
    width: calc(100% - 40px);
    transition: transform 0.5s ease-in-out;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#premium-renewal .rolling-list-container .rolling-item {
    height: 74px;
    background: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 30px;
    box-sizing: border-box;
    font-size: clamp(16px, 1.5vw, 23px);
    font-weight: 600;
    color: #2C2C2C;
    opacity: 0.5;
    transition: opacity 0.5s, background 0.5s, height 0.5s;
    border: 2px solid transparent;
    box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.05);
}

#premium-renewal .rolling-list-container .rolling-item.visible-item {
    opacity: 1;
}

#premium-renewal .rolling-list-container .rolling-item.active {
    height: 94px;
    opacity: 1;
    box-shadow: 0px 6px 16px 0px rgba(0, 0, 0, 0.10);
    font-size: clamp(18px, 1.8vw, 28px);
}

#premium-renewal .rolling-list-container .rolling-item .icon {
    flex-shrink: 0;
    width: clamp(26px, 2.36vw, 34px);
    height: clamp(26px, 2.36vw, 34px);
}

#premium-renewal .rolling-list-container .rolling-item.active .icon {
    width: clamp(34px, 2.77vw, 40px);
    height: clamp(34px, 2.77vw, 40px);
}

/* ===== section03: 월 4만원 포함 기능 ===== */
#premium-renewal .psi-section03 {
    padding: 100px 0;
    background: #fff;
    text-align: center;
}

#premium-renewal .psi-section03__inner {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 clamp(16px, 5vw, 60px);
}

#premium-renewal .psi-section03 h2 {
    margin-bottom: clamp(40px, 6.9vw, 100px);
    font-size: clamp(24px, 4.2vw, 60px);
    font-weight: 700;
    line-height: 1.4; 
}

#premium-renewal .psi-section03__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(10px, 1.4vw, 20px);
    max-width: 1300px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

#premium-renewal .psi-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: clamp(130px, 14vw, 200px);
    padding: clamp(16px, 2.8vw, 40px);
    border: 1px solid transparent;
    border-radius: 20px;
    background:
        linear-gradient(#fff, #fff) padding-box,
        var(--card-border) border-box;
    box-shadow:
        0 10px 14px -4px rgba(145, 158, 171, 0.15),
        0 0 2px 0 rgba(145, 158, 171, 0.2);
    text-align: left;
}


/* 카드별 테두리 색 */
#premium-renewal .psi-card--pay,
#premium-renewal .psi-card--product { --card-border: linear-gradient(133.6deg, #EB987A 1.22%, #F5A1BC 98.78%); }
#premium-renewal .psi-card--api,
#premium-renewal .psi-card--storage { --card-border: linear-gradient(133.6deg, #76F07E 1.22%, #99CA6E 98.78%); }
#premium-renewal .psi-card--ssl,
#premium-renewal .psi-card--board   { --card-border: linear-gradient(133.6deg, #4C85FF 1.22%, #6CC7FF 98.78%); }

#premium-renewal .psi-card__icon {
    position: absolute;
    top: clamp(16px, 2.8vw, 40px);
    right: clamp(16px, 2.8vw, 40px);
    width: auto;
    height: clamp(34px, 3.75vw, 54px);
}

#premium-renewal .psi-card__text {
    font-size: clamp(16px, 1.8vw, 26px);
    font-weight: 600;
    line-height: 1.4;
    color: #131313;
}

/* ===== section04: 브랜드 레퍼런스 ===== */
#premium-renewal .psi-section04 {
    padding: 100px 0;
    background: #fff;
    text-align: center;
}

#premium-renewal .psi-section04 h2 {
    font-size: clamp(24px, 4.2vw, 60px);
    font-weight: 700;
    line-height: 1.4;
}

#premium-renewal .psi-section04__link {
    display: inline-block;
    margin-top: clamp(22px, 3.5vw, 50px);
    color: rgba(15, 23, 42, 0.4);
    font-size: clamp(14px, 1.1vw, 16px);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* 3D 링 */
#premium-renewal .psi-brand-scene {
    position: relative;
    width: 100%;
    height: 650px;
    overflow: hidden;
}

#premium-renewal .psi-brand-scene::before,
#premium-renewal .psi-brand-scene::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 340px;
    z-index: 2;
    pointer-events: none;
}

#premium-renewal .psi-brand-scene::before {
    left: 0;
    background: linear-gradient(90deg, #FFFFFF 11.35%, rgba(255, 255, 255, 0) 97.1%);
}

#premium-renewal .psi-brand-scene::after {
    right: 0;
    background: linear-gradient(-90deg, #FFFFFF 11.35%, rgba(255, 255, 255, 0) 97.1%);
}

#premium-renewal .psi-brand-slider {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    transform: perspective(1176.3px);
    transform-style: preserve-3d;
}

#premium-renewal .psi-brand-ring {
    position: relative;
    width: 1px;
    height: 1px;
    transform-style: preserve-3d;
    animation: psi-brand-rotate 60s linear infinite;
}

#premium-renewal .psi-brand-axis {
    position: absolute;
    top: -450.6px;
    left: -2180px;
    width: 4360px;
    height: 901.2px;
    display: flex;
    justify-content: space-between;
    transform: rotateY(var(--angle));
    transform-style: preserve-3d;
}

#premium-renewal .psi-brand-card {
    position: relative;
    display: flex;
    align-items: flex-end;
    flex: 0 0 705.8px;
    width: 705.8px;
    height: 921.9px;
    padding: 30px;
    border-radius: 16px;
    overflow: hidden;
    backface-visibility: hidden;
    color: #fff;
    will-change: transform;
    -webkit-transform: translateZ(0);
}

#premium-renewal .psi-brand-axis .psi-brand-card:first-child {
    transform: rotateY(90deg);
}

#premium-renewal .psi-brand-axis .psi-brand-card:last-child {
    transform: rotateY(-90deg);
}

#premium-renewal .psi-brand-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease-out;
}

#premium-renewal .psi-brand-card img.psi-img-loaded {
    opacity: 1;
}

#premium-renewal .psi-brand-card__name {
    position: relative;
    z-index: 1;
    font-size: clamp(35px, 5.41vw, 78px);
    font-weight: 700;
}

@keyframes psi-brand-rotate {
    from { transform: rotateY(0deg); }
    to   { transform: rotateY(-360deg); }
}

@media (prefers-reduced-motion: reduce) {
    #premium-renewal .psi-brand-ring {
        animation: none;
    }
}

/* section05: 클로징 CTA */
#premium-renewal .psi-section05 {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 150px 24px 148px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(195, 226, 255, 0.61) 100%);
    text-align: center;
}

#premium-renewal .psi-section05::before {
    position: absolute;
    z-index: 0;
    bottom: -44vw;
    left: 50%;
    width: min(72vw, 1360px);
    height: min(38vw, 720px);
    transform: translateX(-50%);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    background: #6ea8ff;
    filter: blur(clamp(120px, 15vw, 300px));
    pointer-events: none;
    content: "";
}

#premium-renewal .psi-section05 > * {
    position: relative;
    z-index: 1;
}

#premium-renewal .psi-section05 h2 {
    font-size: clamp(24px, 3.8vw, 54px);
    font-weight: 600;
}

#premium-renewal .psi-section05 a {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(163px, 13vw, 194px);
    height: clamp(51px, 4.2vw, 60px);
    margin-top: 48px;
    border: 2px solid transparent;
    border-radius: 100px;
    background: linear-gradient(#111111, #111111) padding-box,
                linear-gradient(102.47deg, #7a4dff 22.86%, #ff6eca 77.14%) border-box;
    color: #ffffff;
    font-size: clamp(16px, 1.4vw, 20px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0;
    box-shadow: 0 6px 18px rgba(48, 31, 103, 0.12);
    transform: translateY(0);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

#premium-renewal .psi-section05 a::before {
    position: absolute;
    top: -30%;
    left: -75%;
    width: 55%;
    height: 160%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.32), transparent);
    transform: skewX(-18deg);
    transition: left 0.75s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    content: "";
}

@media (hover: hover) {
    #premium-renewal .psi-section05 a:hover {
        transform: translateY(-4px);
        box-shadow: 0 16px 34px rgba(98, 65, 192, 0.24),
                    0 4px 12px rgba(0, 0, 0, 0.16);
    }

    #premium-renewal .psi-section05 a:hover::before {
        left: 125%;
    }
}

#premium-renewal .psi-section05 a:active {
    transform: translateY(-1px) scale(0.985);
    transition-duration: 0.12s;
}

/* 768px 이하 */
@media screen and (max-width: 768px) {
    /* section01 */
    #premium-renewal .psi-section01 {
        padding: 50px 26px 94px;
    }

    #premium-renewal .psi-section01__copy {
        font-size: clamp(26px, 8vw, 34px);
        line-height: 1.35;
        font-weight: 700;
    }

    #premium-renewal .psi-section01__visual {
        width: 100%;
        max-width: 360px;
        aspect-ratio: 338.35 / 228;
        margin-top: clamp(40px, 12vw, 64px);
    }

    #premium-renewal .psi-badge--review    { width: 69%; left: 15%;  top: 0%; }
    #premium-renewal .psi-badge--sellpia   { width: 46%; left: 8%;  top: 23%; }
    #premium-renewal .psi-badge--crm       { width: 41%; left: 51%; top: 22%; }
    #premium-renewal .psi-badge--builder   { width: 66%; left: 8%;  top: 49%; }
    #premium-renewal .psi-badge--analyance { width: 55%; left: 28%; top: 72%; }
    #premium-renewal .psi-deco--coin       { width: 18%; left: 0;   top: 40%; }
    #premium-renewal .psi-deco--diamond    { width: 17%; right: 2%; top: 46%; }

    /* section02 */
    #premium-renewal .psi-section02 {
        padding-bottom: 0;
    }

    #premium-renewal .psi-section02__inner {
        flex-direction: column;
        gap: 40px;
    }

    #premium-renewal .psi-section02 h2 {
        padding-right: 0;
        text-align: center;
        font-weight: 700;
    }

    #premium-renewal .psi-section02__rolling-wrap {
        height: 328px;
    }

    #premium-renewal .rolling-list-container .fixed-active-box {
        top: 132px;
        height: 66px;
        border-radius: 10px;
    }

    #premium-renewal .rolling-list-container .rolling-list {
        gap: 10px;
    }

    #premium-renewal .rolling-list-container .rolling-item {
        gap: 16px;
        height: 56px;
        border-radius: 10px;
    }

    #premium-renewal .rolling-list-container .rolling-item.active {
        height: 64px;
    }

    #premium-renewal .psi-section03 {
        padding: 140px 20px 40px;
    }

    #premium-renewal .psi-section03__inner {
        padding: 0;
    }

    #premium-renewal .psi-section03__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #premium-renewal .psi-card {
        padding: 16px;
        border-radius: 14px;
    }

    #premium-renewal .psi-card__text span {
        display: block;
    }

    #premium-renewal .psi-card--pay     { order: 1; }
    #premium-renewal .psi-card--api     { order: 2; }
    #premium-renewal .psi-card--storage { order: 3; }
    #premium-renewal .psi-card--ssl     { order: 4; }
    #premium-renewal .psi-card--board   { order: 5; }
    #premium-renewal .psi-card--product { order: 6; }

    #premium-renewal .psi-section04 {
        padding: 140px 0 0;
    }

    #premium-renewal .psi-brand-scene {
        margin-top: 40px;
        height: 252px;
    }

    #premium-renewal .psi-brand-scene::before,
    #premium-renewal .psi-brand-scene::after {
        display: none;
    }

    #premium-renewal .psi-brand-axis {
        top: -204.4px;
        left: -989px;
        width: 1978px;
        height: 408.7px;
    }

    #premium-renewal .psi-brand-card {
        flex: 0 0 320px;
        width: 320px;
        height: 417.9px;
        padding: 12px;
        border-radius: 6px;
    }

    #premium-renewal .psi-brand-slider {
        transform: perspective(600px);
    }

    #premium-renewal .psi-section05 {
        padding: 117px 0 70px;
    }
}