/* 회사소개: 공통 콘텐츠 폭, KEPCO 개요/연혁을 참고한 독립 레이아웃 */
/* 스크롤은 Lenis에 맡기고, ScrollTrigger의 높이 측정용 위치 이동은 즉시 반영한다. */
html {
    scroll-behavior: auto;
}

.company {
    position: relative;
    z-index: 1;
    background: #fff;
    color: #171a20;
    overflow: clip;
    border-radius: 0 0 clamp(28px, 4vw, 64px) clamp(28px, 4vw, 64px);
}

.company *,
.company *::before,
.company *::after {
    box-sizing: border-box;
}

.company h1,
.company h2,
.company h3,
.company h4,
.company p {
    margin: 0;
}

.company ul,
.company ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

.company img {
    display: block;
    max-width: 100%;
}

.co-container {
    width: 100%;
    max-width: var(--maxw);
    padding-inline: var(--pad-x);
    margin-inline: auto;
}

.co-section {
    padding-block: clamp(90px, 10vw, 180px);
}

.co-eyebrow {
    color: var(--blue-d);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .1em;
    margin-bottom: 22px !important;
}

.co-title {
    font-size: clamp(32px, 4vw, 64px);
    line-height: 1.3;
    letter-spacing: -.045em;
    font-weight: 750;
    word-break: keep-all;
}

.co-section-heading {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    align-items: end;
    margin-bottom: 64px;
}

.co-section-heading>p {
    font-size: clamp(18px, 1.6vw, 24px);
    line-height: 1.7;
    color: #646975;
    word-break: keep-all;
}

.co-hero-heading {
    padding-block: 100px 75px;
}

.co-hero h1 {
    font-family: Poppins, Pretendard, sans-serif;
    font-size: clamp(42px, 5.3vw, 100px);
    line-height: 1.12;
    font-weight: 600;
    letter-spacing: -.05em;
}

.co-hero-description {
    font-size: clamp(17px, 1.6vw, 24px);
    line-height: 1.6;
    margin-top: 30px !important;
    color: #666b75;
    word-break: keep-all;
}

.co-mobile-br {
    display: none;
}

.co-hero-media {
    width: min(100% - var(--pad-x)*2, var(--maxw) - var(--pad-x)*2);
    height: clamp(340px, 48vw, 820px);
    margin: auto;
    border-radius: 16px;
    overflow: hidden;
}

.co-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.co-greeting {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8%;
}

.co-greeting-body {
    font-size: clamp(17px, 1.5vw, 21px);
    line-height: 1.9;
    color: #666b75;
    word-break: keep-all;
}

.co-greeting-body p+p {
    margin-top: 22px;
}

.co-greeting-body strong {
    color: #212631;
    font-weight: 600;
}

.co-signature {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    margin-top: 44px;
    font-size: 16px;
    color: #171a20;
}

/* 원본 회사소개와 동일한 손글씨체. 이름에 필요한 글자만 담은 로컬 폰트입니다. */
@font-face {
    font-family: 'Company Signature';
    src: url('/lib/nanum-pen/signature.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

.co-signature-drawing {
    font-family: 'Company Signature', cursive;
    font-size: 42px;
    font-weight: 400;
    line-height: 1;
    color: #111;
    transform: rotate(-6deg);
    transform-origin: left center;
    white-space: nowrap;
}

.co-signature-drawing > span { display: inline-block; }
.co-signature.is-ready .co-signature-drawing > span { clip-path: inset(0 100% 0 0); }
.co-signature.is-drawn .co-signature-drawing > span { animation: co-sign .55s ease-out both; }
.co-signature.is-drawn .co-signature-drawing > span:nth-child(1) { animation-delay: .45s; }
.co-signature.is-drawn .co-signature-drawing > span:nth-child(2) { animation-delay: 1s; }
.co-signature.is-drawn .co-signature-drawing > span:nth-child(3) { animation-delay: 1.55s; }
@keyframes co-sign {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
}

.co-partners {
    padding: 40px 0 120px;
}

.co-marquee {
    overflow: hidden;
}

.co-marquee-track {
    display: flex;
    width: max-content;
    animation: co-marquee 35s linear infinite;
}

.co-logo-group {
    display: flex;
    align-items: center;
    gap: 75px;
    padding-right: 75px;
    flex-shrink: 0;
}

.co-logo-group img {
    width: 140px;
    height: 56px;
    object-fit: contain;
}

@keyframes co-marquee {
    to {
        transform: translateX(-50%);
    }
}

.co-history {
    padding-top: 80px;
    padding-bottom: 180px;
    background: #f8f9fb;
}

.co-history-article {
    position: relative;
    margin-top: 70px;
}

.co-history-stage {
    position: sticky;
    top: 92px;
    height: calc(100svh - 116px);
    min-height: 400px;
    z-index: 2;
    pointer-events: none;
}

.co-history-blue {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5%;
    color: var(--blue-d);
}

.co-history-blue strong {
    font-family: Poppins, sans-serif;
    font-size: clamp(50px, 8vw, 130px);
    font-weight: 500;
    letter-spacing: -.06em;
}

.co-history-blue p {
    font-size: clamp(24px, 3vw, 44px);
    margin-top: 20px;
}

.co-history-visual {
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: #e3e6e9;
    --history-shade: .3;
}

.co-history-images {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Keep every layer in one image coordinate space, including during column collapse. */
.co-history-scene {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    aspect-ratio: 3 / 2;
    transform: translateY(-50%);
}

.co-history-scene img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
}

.co-history-layer {
    -webkit-mask-image: var(--history-mask);
    mask-image: var(--history-mask);
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.co-motion .co-history-layer { opacity: 0; }
.co-history-layer--experience { --history-mask: url('/img/company/history-office/experience-mask.svg'); }
.co-history-layer--developers { --history-mask: url('/img/company/history-office/developers-mask.svg'); }
.co-history-layer--infrastructure { --history-mask: url('/img/company/history-office/infrastructure-mask.svg'); }
.co-history-layer--partnership { --history-mask: url('/img/company/history-office/partnership-mask.svg'); }
.co-history-layer--complete { --history-mask: url('/img/company/history-office/complete-mask.svg'); }

@supports not ((mask-image: linear-gradient(black, black)) or (-webkit-mask-image: linear-gradient(black, black))) {
    .co-history-layer { display: none; }
}

.co-history-images::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(18, 23, 29, .78), transparent 42%), rgba(18, 23, 29, var(--history-shade));
}

.co-history-caption {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 7%;
    color: #fff;
}

.co-history-caption h3 {
    font-family: Poppins, sans-serif;
    font-size: clamp(48px, 8vw, 130px);
    white-space: nowrap;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.3;
}

.co-history-caption p {
    font-size: clamp(22px, 2.5vw, 38px);
    margin-top: 20px;
    word-break: keep-all;
}

.co-history-intro > span {
    display: block;
    font-size: 16px;
    line-height: 1.7;
    margin-top: 16px;
    word-break: keep-all;
}

.co-history-current {
    display: none;
}

.co-motion .co-history-current {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 7%;
    opacity: 0;
    visibility: hidden;
}

.co-history-current h3 {
    width: 100%;
    max-width: 7.5em;
    font-family: Pretendard, sans-serif;
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
    text-wrap: balance;
    text-shadow: 0 2px 20px rgba(0, 0, 0, .2);
}

@media (min-width: 1280px) {
    .co-history-current h3 {
        font-size: 3.75rem;
    }
}

@media (min-width: 1600px) {
    .co-history-current h3 {
        font-size: 4.25rem;
    }
}

.co-history-progress {
    position: absolute;
    width: 2px;
    height: 100%;
    top: 0;
    left: 48%;
    background: #d9dce3;
    opacity: 0;
}

.co-history-progress > span {
    position: relative;
    display: block;
    height: 0;
    background: var(--blue-d);
}

.co-history-progress > span::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--blue-d);
    transform: translate(-50%, 50%);
}

.co-year-reel {
    display: inline-block;
    height: 1.3em;
    width: .62em;
    overflow: hidden;
    vertical-align: bottom;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}

.co-year-reel-track {
    display: flex;
    flex-direction: column;
}

.co-year-reel-track > span {
    display: block;
    height: 1.3em;
    line-height: 1.3;
    flex-shrink: 0;
    text-align: center;
}

.company .co-history-list {
    width: 48%;
    margin-left: auto;
    padding-top: 65vh;
    position: relative;
    padding-bottom: 60px;
}

.co-history-year {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 20px;
    padding-block: 36px;
    border-bottom: 1px solid #dce0e6;
}

.co-year {
    font-family: Poppins, sans-serif;
    color: var(--blue-d);
    font-size: 25px;
    font-weight: 500;
}

.co-history-year h4 {
    font-size: 23px;
    line-height: 1.5;
    margin-bottom: 20px;
    word-break: keep-all;
}

.co-history-year ul {
    font-size: 16px;
    line-height: 1.9;
    color: #6c727e;
    word-break: keep-all;
}

.co-history-year ul li+li {
    margin-top: 8px;
}

.co-location {
    position: relative;
    z-index: 3;
    background: #fff;
    border-radius: clamp(28px, 4vw, 64px) clamp(28px, 4vw, 64px) 0 0;
    margin-top: -64px;
}

.co-location-map {
    position: relative;
    background: #f0f3f7;
    border-radius: 14px;
    overflow: hidden;
    min-height: 420px;
}

.co-location-map .root_daum_roughmap {
    width: 100% !important;
}

.co-location-map .wrap_map {
    height: 420px !important;
}

/* 약도는 고정하고 휠·터치 스크롤은 페이지로 전달한다. */
.co-location-map .wrap_map,
.co-location-map .wrap_map * {
    pointer-events: none !important;
}

.co-location-map .wrap_map button {
    display: none !important;
}

.co-location-info {
    display: grid;
    grid-template-columns: 1fr .7fr 1fr 2fr;
    gap: 30px;
    margin: 40px 0 0;
}

.co-location-info dt {
    font-family: Poppins, sans-serif;
    color: #8a8f99;
    font-size: 13px;
    margin-bottom: 14px;
}

.co-location-info dd {
    margin: 0;
    font-size: clamp(16px, 1.4vw, 21px);
    line-height: 1.6;
    word-break: keep-all;
}

.co-location-info a {
    color: inherit;
}

body.company-page.ft-reveal .company {
    margin-bottom: max(0px, calc(var(--dg-ft-h, 0px) - clamp(40px, 3.5vw, 56px)));
}

@media(max-width:1023px) {
    .co-hero-heading {
        padding-block: 70px 50px;
    }

    .co-greeting {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .co-section-heading {
        gap: 30px;
    }

    .co-history-stage {
        height: 310px;
        min-height: 0;
        top: 85px;
    }

    .co-history-stage::before {
        content: "";
        position: absolute;
        inset: -24px calc(-1 * var(--pad-x)) 0;
        background: #f8f9fb;
        z-index: -1;
    }

    .co-history-caption h3 {
        font-size: 50px;
    }

    .co-history-current h3 {
        max-width: 100%;
        font-size: 2rem;
    }

    .co-history-caption p {
        font-size: 25px;
    }

    .company .co-history-list {
        width: 100%;
        padding-top: 55vh;
    }

    .co-history-progress {
        left: -12px;
    }

    .co-history-year {
        padding-top: 45px;
    }

    .co-location-info {
        grid-template-columns: 1fr 1fr;
    }
}

@media(max-width:600px) {
    .co-section {
        padding-block: 80px;
    }

    .co-hero-heading {
        padding-block: 50px 40px;
    }

    .co-hero h1 {
        font-size: clamp(32px, 8.3vw, 50px);
    }

    .co-eyebrow {
        font-size: 14px;
        margin-bottom: 16px !important;
    }

    .co-hero-description {
        margin-top: 24px !important;
    }

    .co-mobile-br {
        display: block;
    }

    .co-hero-media {
        /* 이미지에 포함된 레터링이 확대 중에도 좌우로 잘리지 않게 한다. */
        height: min(340px, 62vw);
        border-radius: 10px;
    }

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

    .co-section-heading {
        grid-template-columns: 1fr;
        gap: 22px;
        margin-bottom: 40px;
    }

    .co-partners {
        padding: 0 0 75px;
    }

    .co-logo-group {
        gap: 40px;
        padding-right: 40px;
    }

    .co-logo-group img {
        width: 110px;
        height: 45px;
    }

    .co-history {
        padding-bottom: 130px;
    }

    .co-history-article {
        margin-top: 35px;
    }

    .co-history-stage {
        height: min(260px, 40svh);
    }

    .co-history-caption {
        padding: 7%;
    }

    .co-history-caption h3 {
        font-size: clamp(30px, 8vw, 46px);
    }

    .co-history-caption p {
        font-size: 20px;
        margin-top: 12px;
    }

    .co-history-intro > span {
        font-size: 13px;
        margin-top: 10px;
    }

    .co-history-current h3 {
        font-size: 1.5rem;
    }

    .co-motion .co-history-current {
        padding: 1rem;
    }

    .co-history-blue strong {
        font-size: clamp(32px, 9vw, 54px);
    }

    .co-history-blue p {
        font-size: 20px;
    }

    .co-history-year {
        grid-template-columns: 1fr;
        gap: 12px;
        padding-block: 30px;
    }

    .co-history-year h4 {
        font-size: 21px;
        margin-bottom: 16px;
    }

    .co-history-year ul {
        font-size: 16px;
    }

    .co-location-info {
        gap: 28px 20px;
    }

    .co-location-info>div:last-child {
        grid-column: 1/-1;
    }

    .co-location-map {
        min-height: 340px;
    }

    .co-location-map .wrap_map {
        height: 340px !important;
    }

    body.company-page.ft-reveal .company {
        margin-bottom: max(0px, calc(var(--dg-ft-h, 0px) - clamp(24px, 2.5vw, 40px)));
    }
}

/* JS 실패/모션 감소 환경에서도 모든 콘텐츠를 읽을 수 있게 유지 */
.company:not(.co-motion) .co-history-stage {
    position: relative;
    top: 0;
}

.company:not(.co-motion) .co-history-blue {
    display: none;
}

.company:not(.co-motion) .co-history-list {
    padding-top: 40px;
    width: 100%;
}

@media(prefers-reduced-motion:reduce) {

    .company *,
    .company *::before,
    .company *::after {
        animation: none !important;
        transition: none !important;
    }

    .co-marquee-track {
        width: 100%;
    }

    .co-logo-group {
        flex-wrap: wrap;
        justify-content: center;
        padding: 0 var(--pad-x);
        gap: 25px;
        width: 100%;
    }

    .co-logo-group[aria-hidden] {
        display: none;
    }
}

.company.co-motion .co-history {
    position: sticky;
    top: var(--history-top, 0);
    z-index: 1;
}
