/* 히어로 꾸미기: 공개 홈과 관리자 미리보기가 함께 씁니다. */

.hero-opt { position: relative; }
.hero-opt:not(.hero-press) { overflow: hidden; }
.hero-opt:not(.hero-press) > .wrap { position: relative; z-index: 1; }

/* 사진 */
.hero-photo { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: #1c1c1c; }
.hero-photo img,
.hero-photo-link {
    display: block;
    width: 100%;
    height: 100%;
}
.hero-photo-link { position: absolute; inset: 0; }
.hero-photo-link:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }
.hero-photo img {
    object-fit: cover;
    filter: brightness(var(--br, 1)) blur(var(--bl, 0px));
    opacity: var(--op, 1);
    transform: scale(var(--sc, 1));
}

/* 슬라이드: 사진과 글이 같은 자리에서 겹쳐 바뀝니다. */
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0s linear 0.8s;
}
.hero-slide.is-active { opacity: 1; visibility: visible; transition: opacity 0.8s ease, visibility 0s; }

/* 슬라이드: 다음 사진은 오른쪽에서, 이전 사진은 왼쪽에서 들어옵니다. */
.hero-slides.is-slide .hero-slide {
    opacity: 1;
    visibility: hidden;
    transform: translate3d(100%, 0, 0);
    transition: none;
}
.hero-slides.is-slide.is-reverse .hero-slide { transform: translate3d(-100%, 0, 0); }
.hero-slides.is-slide .hero-slide.is-out {
    visibility: visible;
    transform: translate3d(-100%, 0, 0);
    z-index: 1;
    transition: transform 0.8s ease;
}
.hero-slides.is-slide.is-reverse .hero-slide.is-out { transform: translate3d(100%, 0, 0); }
.hero-slides.is-slide .hero-slide.is-active {
    visibility: visible;
    transform: translate3d(0, 0, 0);
    z-index: 2;
    transition: transform 0.8s ease;
}

.hero-texts { display: grid; grid-template-columns: minmax(0, 1fr); }
.hero-text { min-width: 0; }
.hero-text {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0s linear 0.8s;
}
.hero-text.is-active { opacity: 1; visibility: visible; transition: opacity 0.8s ease, visibility 0s; }
.hero.hero-opt .lede { white-space: pre-line; }

.hero-nav { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.42);
    color: #fff;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
    pointer-events: auto;
}
.hero-arrow:hover { background: rgba(0, 0, 0, 0.65); }
.hero-prev { left: 12px; }
.hero-next { right: 12px; }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 12px; }
.hero-dot {
    position: relative;
    width: 12px;
    height: 12px;
    min-height: 0;
    padding: 0;
    border: 1px solid #fff;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    pointer-events: auto;
}
.hero-dot::after { content: ""; position: absolute; inset: -10px; }
.hero-dot.is-active { background: #fff; }
.hero-arrow:focus-visible, .hero-dot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    .hero-slide, .hero-text,
    .hero-slides.is-slide .hero-slide,
    .hero-slides.is-slide .hero-slide.is-active,
    .hero-slides.is-slide .hero-slide.is-out { transition: none; }
}

.lead-photo {
    position: relative;
    height: 240px;
    margin-top: 22px;
    border-radius: 12px;
    overflow: hidden;
}

.has-photo:not(.hero-press) .hero-split-grid { grid-template-columns: 1fr; }

/* 사진 링크: 글자 영역은 통과시키고, 버튼과 링크만 누를 수 있게 합니다. */
.has-link:not(.hero-press) > .wrap { pointer-events: none; }
.has-link:not(.hero-press) > .wrap a,
.has-link:not(.hero-press) > .wrap button { pointer-events: auto; }

/* 밝기 */
.hero-br-3 { --br: 0.3; } .hero-br-4 { --br: 0.4; } .hero-br-5 { --br: 0.5; } .hero-br-6 { --br: 0.6; }
.hero-br-7 { --br: 0.7; } .hero-br-8 { --br: 0.8; } .hero-br-9 { --br: 0.9; } .hero-br-10 { --br: 1; }
.hero-br-11 { --br: 1.1; } .hero-br-12 { --br: 1.2; } .hero-br-13 { --br: 1.3; } .hero-br-14 { --br: 1.4; }
.hero-br-15 { --br: 1.5; }

/* 흐리게 (살짝 키워서 가장자리 번짐을 가립니다) */
.hero-bl-0 { --bl: 0px; --sc: 1; }
.hero-bl-1 { --bl: 2px; --sc: 1.03; }
.hero-bl-2 { --bl: 4px; --sc: 1.05; }
.hero-bl-3 { --bl: 6px; --sc: 1.07; }
.hero-bl-4 { --bl: 8px; --sc: 1.09; }
.hero-bl-5 { --bl: 12px; --sc: 1.13; }

/* 투명도 */
.hero-op-1 { --op: 0.1; } .hero-op-2 { --op: 0.2; } .hero-op-3 { --op: 0.3; } .hero-op-4 { --op: 0.4; }
.hero-op-5 { --op: 0.5; } .hero-op-6 { --op: 0.6; } .hero-op-7 { --op: 0.7; } .hero-op-8 { --op: 0.8; }
.hero-op-9 { --op: 0.9; } .hero-op-10 { --op: 1; }

/* 글자 크기 */
.hero-ts-1 { --ts: 0.65; } .hero-ts-2 { --ts: 0.8; } .hero-ts-3 { --ts: 1; }
.hero-ts-4 { --ts: 1.2; } .hero-ts-5 { --ts: 1.4; } .hero-ts-6 { --ts: 1.65; }
.hero-bs-1 { --bs: 0.85; } .hero-bs-2 { --bs: 0.93; } .hero-bs-3 { --bs: 1; }
.hero-bs-4 { --bs: 1.15; } .hero-bs-5 { --bs: 1.3; }

.hero.hero-opt h1 {
    font-size: calc(clamp(2rem, 4vw, 3.35rem) * var(--ts, 1));
    overflow-wrap: anywhere;
}
.hero.hero-opt.hero-press h1 { font-size: calc(clamp(1.85rem, 3vw, 2.7rem) * var(--ts, 1)); }
.hero.hero-opt .lede { font-size: calc(1.12rem * var(--bs, 1)); overflow-wrap: anywhere; }

/* 글 정렬 */
.hero-a-left > .wrap { text-align: left; }
.hero-a-center > .wrap { text-align: center; }
.hero-a-right > .wrap { text-align: right; }
.hero-a-left h1, .hero-a-left .lede { margin-left: 0; margin-right: auto; }
.hero-a-center h1, .hero-a-center .lede { margin-left: auto; margin-right: auto; }
.hero-a-right h1, .hero-a-right .lede { margin-left: auto; margin-right: 0; }
.hero-a-left .hero-actions { justify-content: flex-start; }
.hero-a-center .hero-actions { justify-content: center; }
.hero-a-right .hero-actions { justify-content: flex-end; }

/* 높이와 위아래 위치 */
.hero-h-1, .hero-h-2, .hero-h-3 { display: flex; }
.hero-h-1 { min-height: 420px; }
.hero-h-2 { min-height: 560px; }
.hero-h-3 { min-height: 700px; }
.hero-h-1 > .wrap, .hero-h-2 > .wrap, .hero-h-3 > .wrap { flex: 0 0 auto; }
.hero-v-top { align-items: flex-start; }
.hero-v-middle { align-items: center; }
.hero-v-bottom { align-items: flex-end; }

/* 글자 색: 사진이 있을 때만 적용합니다. */
html body .hero-opt.has-photo.hero-c-light h1,
html body .hero-opt.has-photo.hero-c-light .eyebrow { color: #fff; }
html body .hero-opt.has-photo.hero-c-light .lede { color: rgba(255, 255, 255, 0.9); }
html body .hero-opt.has-photo.hero-c-light .btn-ghost { color: #fff !important; border-color: rgba(255, 255, 255, 0.7); }
html body .hero-opt.has-photo.hero-c-dark h1,
html body .hero-opt.has-photo.hero-c-dark .eyebrow { color: #111; }
html body .hero-opt.has-photo.hero-c-dark .lede { color: rgba(17, 17, 17, 0.85); }
html body .hero-opt.has-photo.hero-c-dark .btn-ghost { color: #111 !important; border-color: rgba(0, 0, 0, 0.5); }

/* 글자 가독성: 사진 위에 어두운 막(글자가 검정이면 흰 막)을 깔고, 글자에 은은한 그림자를 넣습니다. */
.hero-opt { --shc: 0, 0, 0; --sh: 0; --sh-hi: 0; }
.hero-opt.hero-c-dark, .hero-opt.hero-c-default { --shc: 255, 255, 255; }
.hero-sh-1 { --sh: 0.2; --sh-hi: 0.34; }
.hero-sh-2 { --sh: 0.35; --sh-hi: 0.55; }
.hero-sh-3 { --sh: 0.5; --sh-hi: 0.75; }

.hero-opt .hero-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: rgba(var(--shc), var(--sh));
}
/* 글이 있는 쪽만: 글 위치 쪽에서 반대쪽으로 옅어집니다. */
.hero-st-side.hero-a-left .hero-photo::after {
    background: linear-gradient(to right, rgba(var(--shc), var(--sh-hi)) 0%, rgba(var(--shc), var(--sh)) 45%, rgba(var(--shc), 0) 100%);
}
.hero-st-side.hero-a-right .hero-photo::after {
    background: linear-gradient(to left, rgba(var(--shc), var(--sh-hi)) 0%, rgba(var(--shc), var(--sh)) 45%, rgba(var(--shc), 0) 100%);
}
.hero-st-side.hero-a-center .hero-photo::after {
    background: radial-gradient(ellipse at center, rgba(var(--shc), var(--sh-hi)) 0%, rgba(var(--shc), var(--sh)) 55%, rgba(var(--shc), 0) 100%);
}
.hero-st-side.hero-a-center.hero-v-top .hero-photo::after {
    background: linear-gradient(to bottom, rgba(var(--shc), var(--sh-hi)) 0%, rgba(var(--shc), var(--sh)) 50%, rgba(var(--shc), 0) 100%);
}
.hero-st-side.hero-a-center.hero-v-bottom .hero-photo::after {
    background: linear-gradient(to top, rgba(var(--shc), var(--sh-hi)) 0%, rgba(var(--shc), var(--sh)) 50%, rgba(var(--shc), 0) 100%);
}

html body .hero-opt.has-photo.hero-c-light h1,
html body .hero-opt.has-photo.hero-c-light .eyebrow,
html body .hero-opt.has-photo.hero-c-light .lede {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 0 16px rgba(0, 0, 0, 0.3);
}
html body .hero-opt.has-photo.hero-c-dark h1,
html body .hero-opt.has-photo.hero-c-dark .eyebrow,
html body .hero-opt.has-photo.hero-c-dark .lede,
html body .hero-opt.has-photo.hero-c-default h1,
html body .hero-opt.has-photo.hero-c-default .eyebrow,
html body .hero-opt.has-photo.hero-c-default .lede {
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7), 0 0 14px rgba(255, 255, 255, 0.5);
}
html body .hero-opt.has-photo:not(.hero-press) .lede { font-weight: 500; line-height: 1.75; }
html body.template-association .hero-association .lede,
html body.template-association .hero-association.hero-opt.has-photo .lede { line-height: 1.9; }
html body .hero-opt.has-photo.hero-c-light .lede { color: rgba(255, 255, 255, 0.96); }
html body .hero-opt.has-photo.hero-c-light h1 [class*="ink-"],
html body .hero-opt.has-photo.hero-c-light .lede [class*="ink-"] {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 0 16px rgba(0, 0, 0, 0.3) !important;
}
html body .hero-opt.has-photo.hero-c-dark h1 [class*="ink-"],
html body .hero-opt.has-photo.hero-c-dark .lede [class*="ink-"],
html body .hero-opt.has-photo.hero-c-default h1 [class*="ink-"],
html body .hero-opt.has-photo.hero-c-default .lede [class*="ink-"] {
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7), 0 0 14px rgba(255, 255, 255, 0.5) !important;
}

/* 글자 상자: 제목과 소개 문구만 반투명 상자로 감쌉니다. (사진이 있을 때만) */
.hero-copybox { min-width: 0; }
.hero-opt.has-photo:not(.hero-bx-none) .hero-copybox {
    box-sizing: border-box;
    width: fit-content;
    max-width: 100%;
    padding: 26px 32px;
    border-radius: 16px;
}
.hero-opt.has-photo:not(.hero-bx-none).hero-a-left .hero-copybox { margin-left: 0; margin-right: auto; }
.hero-opt.has-photo:not(.hero-bx-none).hero-a-center .hero-copybox { margin-left: auto; margin-right: auto; }
.hero-opt.has-photo:not(.hero-bx-none).hero-a-right .hero-copybox { margin-left: auto; margin-right: 0; }
.hero-opt.has-photo:not(.hero-bx-none) .hero-copybox h1 { margin-top: 0; }
.hero-opt.has-photo:not(.hero-bx-none) .hero-copybox .lede { margin-bottom: 0; }

.hero-opt.has-photo.hero-bx-dark .hero-copybox { background: rgba(0, 0, 0, 0.58); }
.hero-opt.has-photo.hero-bx-light .hero-copybox { background: rgba(255, 255, 255, 0.8); }
.hero-opt.has-photo.hero-bx-blur .hero-copybox {
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(12px) saturate(1.1);
    backdrop-filter: blur(12px) saturate(1.1);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .hero-opt.has-photo.hero-bx-blur .hero-copybox { background: rgba(0, 0, 0, 0.38); }
}

html body .hero-opt.has-photo.hero-bx-dark .hero-copybox h1,
html body .hero-opt.has-photo.hero-bx-blur .hero-copybox h1 { color: #fff; text-shadow: none; }
html body .hero-opt.has-photo.hero-bx-dark .hero-copybox .lede,
html body .hero-opt.has-photo.hero-bx-blur .hero-copybox .lede { color: rgba(255, 255, 255, 0.94); text-shadow: none; }
html body .hero-opt.has-photo.hero-bx-light .hero-copybox h1 { color: #111; text-shadow: none; }
html body .hero-opt.has-photo.hero-bx-light .hero-copybox .lede { color: rgba(17, 17, 17, 0.9); text-shadow: none; }

/* 상자를 켜면 영문 소제목과 보조 버튼도 같은 색 바탕을 깔아 사진 위에서 읽히게 합니다. */
.hero-opt.has-photo:not(.hero-bx-none) .eyebrow { display: inline-block; padding: 4px 12px; border-radius: 999px; text-shadow: none; }
html body .hero-opt.has-photo.hero-bx-dark .eyebrow,
html body .hero-opt.has-photo.hero-bx-blur .eyebrow { color: #fff; background: rgba(0, 0, 0, 0.58); text-shadow: none; }
html body .hero-opt.has-photo.hero-bx-light .eyebrow { color: #111; background: rgba(255, 255, 255, 0.8); text-shadow: none; }
html body .hero-opt.has-photo.hero-bx-dark .btn-ghost,
html body .hero-opt.has-photo.hero-bx-blur .btn-ghost { color: #fff !important; background: rgba(0, 0, 0, 0.58); border-color: rgba(255, 255, 255, 0.7); }
html body .hero-opt.has-photo.hero-bx-light .btn-ghost { color: #111 !important; background: rgba(255, 255, 255, 0.8); border-color: rgba(0, 0, 0, 0.5); }

@media (max-width: 600px) {
    .hero-opt.has-photo:not(.hero-bx-none) .hero-copybox { padding: 18px 18px; border-radius: 12px; }
}

@media (max-width: 860px) {
    .hero-h-1 { min-height: 240px; }
    .hero-h-2 { min-height: 300px; }
    .hero-h-3 { min-height: 360px; }
    .lead-photo { height: 200px; }
}

@media (prefers-reduced-motion: no-preference) {
    body.template-corporate .hero-slides:not(.is-slide) .hero-slide.is-active img {
        animation: corp-ken 16s ease-out forwards;
    }
    body.template-corporate .hero-copy > .eyebrow,
    body.template-corporate .hero-copy > h1,
    body.template-corporate .hero-copybox > h1,
    body.template-corporate .hero-text.is-active h1 {
        animation: corp-up 0.7s ease both;
    }
    body.template-corporate .hero-copy > .lede,
    body.template-corporate .hero-copybox > .lede,
    body.template-corporate .hero-text.is-active .lede {
        animation: corp-up 0.7s ease 0.12s both;
    }
    body.template-corporate .hero-split > .hero-actions {
        animation: corp-dock 0.7s ease 0.22s both;
    }
}
@media (max-width: 860px) {
    body.template-corporate .hero-split > .hero-actions { animation: none; }
}

@keyframes corp-ken {
    from { transform: scale(var(--sc, 1)); }
    to { transform: scale(calc(var(--sc, 1) * 1.06)); }
}

@keyframes corp-up {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}

@keyframes corp-dock {
    from { opacity: 0; transform: translate(-50%, 16px); }
    to { opacity: 1; transform: translateX(-50%); }
}

@media (max-width: 600px) {
    .hero-arrow { width: 32px; height: 32px; font-size: 1.4rem; }
    .hero-prev { left: 6px; }
    .hero-next { right: 6px; }
    .hero-ts-1 { --ts: 0.7; } .hero-ts-2 { --ts: 0.85; }
    .hero-ts-4 { --ts: 1.1; } .hero-ts-5 { --ts: 1.2; } .hero-ts-6 { --ts: 1.3; }
    .hero-bs-4 { --bs: 1.08; } .hero-bs-5 { --bs: 1.18; }
}
