/* Force allow sticky behavior */
.wrapper.main-wrap,
body {
    overflow: visible !important;
    overflow-x: hidden !important;
}

/* scroll-reveal 초기 상태 */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}


/* New Hero Section Styling matching "슬기로운크린생활" reference */
.hero-sticky-wrapper {
    position: relative;
    width: 100%;
}

.main-cover {
    position: sticky !important;
    top: 0 !important;
    width: 100%;
    height: 100svh !important;
    /* full viewport height */
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 세련된 그라데이션: 상하단은 딥하게 눌러 가독성과 깊이감을 주고 중앙은 은은하게 */
    background: linear-gradient(to bottom,
            rgba(8, 8, 8, 0.95) 0%,
            rgba(8, 8, 8, 0.6) 40%,
            rgba(8, 8, 8, 0.7) 60%,
            rgba(8, 8, 8, 0.98) 100%);
    z-index: 1;
}

.hero-text-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    z-index: 2;
    text-align: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-line1,
.hero-line2,
.hero-line3 {
    font-family: 'Pretendard', sans-serif;
    font-size: min(28px, 6.5vw);
    font-weight: 500;
    color: #ffffff;
    letter-spacing: -0.03em;
    line-height: 1.35;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    white-space: nowrap;
}

.hero-line1 {
    margin-bottom: 0px;
}

.hero-line2 {
    margin: 0 0 40px 0;
}

@media (min-width: 1024px) {

    .hero-line1,
    .hero-line2,
    .hero-line3 {
        font-size: 52px;
        /* PC에서 사이즈 대폭 상향 */
        font-weight: 600;
        line-height: 1.35;
    }
}

.hero-line2 strong {
    font-weight: 800;
    color: #ffffff;
}

.hero-btn-group {
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 340px;
}

.hero-outline-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 56px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.3);
    /* Premium glass effect */
}

.hero-outline-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

/* Hero Animation Sequence */
.hero-text-content .hero-line1 {
    transition-delay: 0.1s;
}

.hero-text-content .hero-line2 {
    transition-delay: 0.3s;
}

.hero-text-content .hero-line3 {
    transition-delay: 0.5s;
}

.hero-text-content .hero-btn-group {
    transition-delay: 0.7s;
}

.hero-text-content .scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-text-content.animated .scroll-reveal {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Scrollytelling CSS */
.hero-scroll-overlay {
    position: relative;
    width: 100%;
    z-index: 10;
    margin-top: -100svh;
    /* Overlay the sticky video container */
    pointer-events: none;
    /* Let clicks pass to the video/buttons if needed, but we re-enable it on buttons */
}

.scrolly-text-step {
    height: 100svh;
    /* Each step takes full height */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    pointer-events: auto;
    /* Enable clicking inside steps */
}

/* Big animated text / Cards */
.scrolly-text-content {
    color: #fff;
    font-family: 'Pretendard', sans-serif;
    font-size: min(48px, 9vw);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.04em;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    word-break: keep-all;
}

.scrolly-card {
    background: rgba(16, 16, 16, 0.65);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.scrolly-card:hover {
    border-color: rgba(255, 255, 255, 0.4);
}

.scrolly-card-img-wrap {
    width: 100%;
    height: 160px;
    background-color: rgba(0, 0, 0, 0.4);
    /* Placeholder background */
    position: relative;
    overflow: hidden;
}

.scrolly-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.scrolly-card:hover .scrolly-card-img {
    opacity: 1;
    transform: scale(1.05);
}

.scrolly-card-body {
    padding: 32px;
    color: #fff;
}

.scrolly-card-title {
    font-family: 'Pretendard', sans-serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 12px 0;
}

.scrolly-card-desc {
    font-family: 'Pretendard', sans-serif;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    word-break: keep-all;
}

/* 폰트 크기 및 모바일 대응 */
@media (max-width: 768px) {
    .scrolly-text-content {
        font-size: 32px;
        line-height: 1.4;
    }

    .scrolly-card-img-wrap {
        height: 120px;
    }

    .scrolly-card-body {
        padding: 16px;
    }

    .scrolly-card-title {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .scrolly-card-desc {
        font-size: 13px;
        line-height: 1.4;
    }
}

/* Grouped cards grid */
.hero-scrolly-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 900px;
}

@media (max-width: 768px) {
    .hero-scrolly-cards-grid {
        gap: 12px;
        padding: 0;
    }
}

/* Active state toggled by JS */
.scrolly-text-step.reveal .scrolly-text-content,
.scrolly-text-step.reveal .scrolly-card,
.scrolly-text-step.reveal .hero-text-content {
    opacity: 1;
    transform: translateY(0);
}

.scrolly-text-step .hero-text-content {
    /* Override absolute centering to let flexbox handle it */
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    /* Initial state for fade effect instead of typical .animated */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Header overrides for minimal look */
.haneol-header .logo a {
    font-family: 'Pretendard', sans-serif;
    font-weight: 800;
    letter-spacing: -0.05em;
}

/* ─── Typography Upgrade for Section Titles ─── */
.showcase-header__title,
.card-section-title,
.common-title {
    font-family: 'Pretendard', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: -0.04em !important;
    /* Tighter for premium look */
    line-height: 1.35 !important;
    color: #111 !important;
    word-break: keep-all;
}

/* Specific adjustments */
.showcase-header__title {
    font-size: 42px !important;
    /* Slightly larger */
}

.card-section-title {
    font-size: 38px !important;
}

.common-title {
    font-size: 36px !important;
}

@media (max-width: 768px) {
    .showcase-header__title {
        font-size: 30px !important;
    }

    .card-section-title {
        font-size: 28px !important;
    }

    .common-title {
        font-size: 26px !important;
    }
}

