@charset "utf-8";

/* ========================================================
   THECORE Main Page Stylesheet (main.css)
   Pixel-Perfect alignment with Figma Design & Dev Mode Spec
======================================================== */

:root {
    --main-font: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --main-color-black: #222222;
    --main-accent: #ba0000;
    --color-red: #ba0000;
    --color-white: #ffffff;
}

/* Base resets & typography */
body {
    margin: 0;
    padding: 0;
    font-family: var(--main-font);
    color: var(--main-color-black);
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

#wrap {
    width: 100%;
    position: relative;
    overflow-x: clip;
}

.main-page {
    width: 100%;
    position: relative;
    overflow-x: clip;
}

/* Icon Helpers */
.arr-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23222222' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7'%3E%3C/path%3E%3Cpath d='M7 7h10v10'%3E%3C/path%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-left: 8px;
    transition: transform 0.25s ease;
}

/* ========================================================
   01 / SMART DIGITAL CAMPAIGNS (sec1: 954px)
======================================================== */
.sec-smart-campaigns {
    width: 100%;
    padding: clamp(100px, 12.084vw, 232px) clamp(24px, 3.125vw, 60px) clamp(60px, 5.42vw, 104px);
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f7f7f7 url('../images/main/smart_campaigns_bg.jpg') no-repeat center top / 100% 126%;
}

.smart-campaigns-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(48px, 4.584vw, 88px);
    width: 100%;
    max-width: 1800px;
}

/* Keep keyboard navigation immediate while the scroll sequence is pending. */
.smart-actions-col [data-aos]:focus-visible,
.innovation-bottom-row[data-aos]:focus-within {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

/* SMART DIGITAL CAMPAIGNS THAT INSPIRE */
.smart-title {
    max-width: 1280px;
    width: 100%;
    font-family: 'Pretendard', sans-serif;
    font-weight: 600;
    font-size: clamp(26px, 6.25vw, 120px);
    line-height: 1.1666667;
    text-align: center;
    text-transform: uppercase;
    color: #222222;
    margin: 0 auto;
    word-break: keep-all;
}

.smart-title > span {
    display: block;
    white-space: nowrap;
}

.smart-title__accent {
    color: var(--main-accent);
}

.smart-body-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: clamp(40px, 12vw, 400px);
}

.smart-desc {
    max-width: 560px;
    padding-bottom: 4px;
    width: 100%;
    font-size: clamp(16px, 1.04vw, 20px);
    line-height: 1.6;
    font-weight: 500;
    color: #222222;
    margin: 0;
    word-break: keep-all;
}

.smart-desc > span {
    display: block;
}

.smart-actions-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 38px;
    max-width: 560px;
    width: 100%;
}

.smart-about-link {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-size: 18px;
    font-weight: 600;
    color: #222222;
    text-decoration: none;
    line-height: 22px;
    text-transform: uppercase;
    transition: color 0.2s;
}

.smart-about-link:hover {
    color: var(--main-accent);
}

.smart-about-link__arrow {
    width: 7px;
    height: 7px;
    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
    transform: rotate(45deg);
}

.smart-pills-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: flex-end;
}

.pill-btn {
    box-sizing: border-box;
    width: 180px;
    flex: 1 1 0;
    min-width: 0;
    height: 50px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    border: 1px solid #000000;
    border-radius: 25px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 500;
    font-size: 15px;
    color: #222222;
    text-decoration: none;
    line-height: 18px;
    text-transform: uppercase;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.pill-btn:hover,
.pill-btn:focus-visible {
    background: var(--main-accent);
    color: #ffffff;
    font-weight: 700;
}

.pill-btn:focus-visible {
    outline: 2px solid var(--main-accent);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .pill-btn { transition: none; }
    .sec-smart-campaigns [data-aos],
    .sec-innovation [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ========================================================
   02 / INNOVATION FOR SUCCESS (Frame 19: 1031px)
======================================================== */
.sec-innovation {
    width: 100%;
    background: #ffffff;
    padding: clamp(60px, 5.20834vw, 100px) clamp(24px, 3.125vw, 60px);
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

.innovation-split-grid {
    display: grid;
    grid-template-columns: minmax(0, 893fr) minmax(0, 871fr);
    align-items: stretch;
    gap: clamp(24px, 1.875vw, 36px);
    width: 100%;
    max-width: 1800px;
}

.innovation-media-col {
    min-width: 0;
}

.innovation-img-box {
    width: 100%;
    aspect-ratio: 893 / 831;
    border-radius: 10px;
    overflow: hidden;
}

.innovation-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.innovation-text-col {
    min-width: 0;
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: clamp(24px, 2.1875vw, 42px) 0;
    box-sizing: border-box;
}

.innovation-top-bar {
    display: flex;
    align-items: center;
    gap: 18px;
    width: 100%;
    height: 22px;
}

.work-badge {
    font-family: 'Pretendard', sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    color: #ba0000;
    text-transform: uppercase;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: #d7d7d7;
    border: none;
}

.innovation-main-title {
    max-width: 540px;
    width: 100%;
    font-family: 'Pretendard', sans-serif;
    font-weight: 600;
    font-size: clamp(30px, 4.166667vw, 80px);
    line-height: 1;
    text-transform: uppercase;
    color: #222222;
    margin: 0 auto;
    align-self: center;
    text-align: center;
    word-break: keep-all;
}

.innovation-bottom-row {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
}

.innovation-lead-text {
    max-width: 540px;
    width: 100%;
    font-size: clamp(16px, 1.041667vw, 20px);
    line-height: 1.6;
    font-weight: 500;
    color: #222222;
    margin: 0;
    word-break: keep-all;
}

.innovation-lead-text > span {
    display: block;
}

.innovation-work-link {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-size: 18px;
    font-weight: 600;
    color: #222222;
    line-height: 22px;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}

.innovation-work-link:hover,
.innovation-work-link:focus-visible {
    color: var(--main-accent);
}

.innovation-work-link__arrow {
    width: 7px;
    height: 7px;
    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
    transform: rotate(45deg);
}

/* ========================================================
   03 / sec2 슬라이드 (Creative, Algorithm, Conversion)
======================================================== */
.sec-core-cards {
    --core-card-height: clamp(360px, calc(100svh - 300px), 634px);
    width: 100%;
    background: #fff;
    padding: clamp(20px, 4vh, 50px) clamp(24px, 3.125vw, 60px) clamp(28px, 6vh, 100px);
    box-sizing: border-box;
    overflow: hidden;
}

.core-lead-slogan {
    max-width: 420px;
    margin: 0 0 40px auto;
    font-size: clamp(16px, 1.041667vw, 20px);
    line-height: 1.5;
    font-weight: 400;
    text-align: right;
    color: #222;
    word-break: keep-all;
}

.core-cards-track {
    display: flex;
    gap: calc(var(--core-card-height) * 60 / 634);
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
}

.core-cards-track::-webkit-scrollbar { display: none; }
.core-cards-track:focus-visible { outline: 2px solid var(--main-accent); outline-offset: 6px; }
.is-core-pinned .core-cards-track { overflow-x: hidden; scroll-snap-type: none; }

.core-card-item {
    flex: 0 0 calc(var(--core-card-height) * 1019 / 634);
    display: grid;
    grid-template-columns: minmax(0, 447fr) minmax(0, 480fr);
    gap: calc(var(--core-card-height) * 92 / 634);
    height: var(--core-card-height);
    scroll-snap-align: start;
}

.card-left-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-giant-watermark {
    font-family: var(--main-font);
    font-size: calc(var(--core-card-height) * 65 / 634);
    font-weight: 500;
    line-height: 1;
    color: #ddd;
}
.card-giant-watermark .core-card-link {
    display: block;
    width: fit-content;
    color: inherit;
    text-decoration: none;
}
.card-giant-watermark .is-current { color: #222; }
.card-giant-watermark .core-card-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -2px;
}

.card-info-bottom {
    display: flex;
    flex-direction: column;
    gap: calc(var(--core-card-height) * 15 / 634);
}

.card-en-title {
    margin: 0;
    font-size: calc(var(--core-card-height) * 40 / 634);
    line-height: 1.2;
    font-weight: 600;
    color: #222;
}

.card-ko-detail {
    margin: 0;
    font-size: calc(var(--core-card-height) * 20 / 634);
    line-height: 1.5;
    font-weight: 500;
    color: #222;
    word-break: keep-all;
}

.card-right-photo {
    min-width: 0;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
}
.card-right-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 1024px), (max-height: 649px) {
    .sec-core-cards { --core-card-height: 480px; }
    .card-ko-detail { font-size: 16px; }
    .core-cards-track { padding-bottom: 12px; }
}

@media (max-width: 768px) {
    .core-lead-slogan { margin-bottom: 32px; font-size: 14px; }
    .core-cards-track { gap: 24px; }
    .core-card-item {
        flex-basis: 86%;
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        height: auto;
        align-content: start;
    }
    .card-left-text { gap: 28px; }
    .card-giant-watermark { font-size: 32px; }
    .card-info-bottom { gap: 12px; }
    .card-en-title { font-size: 26px; }
    .card-ko-detail { font-size: 15px; }
    .card-right-photo { height: auto; aspect-ratio: 480 / 634; }
}

/* ========================================================
   04 / OUR SERVICES
======================================================== */
.section4 {
    padding: clamp(80px, 7.291667vw, 140px) 0 clamp(80px, 9.375vw, 180px);
    width: 100%;
    background-color: #ffffff;
    box-sizing: border-box;
}

.section-head {
    width: 75%;
    max-width: 1440px;
    margin: 0 auto clamp(40px, 3.4375vw, 66px);
}

.section-head__title {
    margin: 0;
    color: var(--main-color-black, #222222);
    font-size: clamp(36px, 4.166667vw, 80px);
    line-height: 1;
    font-weight: 600;
}

.services-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-top: 20px;
}

.services-description {
    margin: 0;
    font-size: clamp(16px, 1.041667vw, 20px);
    line-height: 1.5;
    font-weight: 500;
    word-break: keep-all;
}

.services-overview-link {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 30px;
}

.services-overview-link__arrow {
    width: 7px;
    height: 7px;
    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
    transform: rotate(45deg);
}

.services-overview-link:hover,
.services-overview-link:focus-visible {
    color: var(--main-accent);
}

.service-strip {
    display: flex;
    width: 100%;
    height: clamp(480px, 42.1875vw, 810px);
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-strip__item {
    position: relative;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    transition: flex .5s ease;
    cursor: pointer;
}

.service-strip__item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* 배경 오버레이: 평소엔 화면 아래에 있다가, 호버 시 위로 이동 */
.service-strip__item::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: var(--color-red, #ba0000);
    transform: translateY(100%);
    transition: transform .5s ease;
    z-index: 1;
}

.service-strip__item:hover::before,
.service-strip__item:focus-within::before {
    transform: translateY(0);
}

.service-strip__label {
    position: absolute;
    top: clamp(40px, 4.166667vw, 80px);
    right: clamp(20px, 2.083334vw, 40px);
    writing-mode: vertical-rl;
    color: var(--color-white, #ffffff);
    letter-spacing: -0.02em;
    white-space: nowrap;
    font-family: var(--main-font);
    font-size: clamp(28px, 2.34375vw, 45px);
    line-height: 1.2;
    font-weight: 500;
    z-index: 2;
}

.service-strip__item .service-strip__btn {
    position: absolute;
    left: 50%;
    bottom: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 148px;
    max-width: calc(100% - 24px);
    height: 50px;
    padding: 14px 35px;
    gap: 10px;
    font-family: var(--main-font);
    font-size: 18px;
    font-weight: 700;
    line-height: 21px;
    text-align: center;
    white-space: nowrap;
    border-radius: 36.5px;
    border: 1px solid #fff;
    color: var(--color-white, #ffffff);
    background-color: transparent;
    opacity: 0;
    transform: translate(-50%, 10px);
    transition: opacity .3s ease, transform .3s ease, background-color .25s ease;
    z-index: 2;
    text-decoration: none;
}

.service-strip__item:hover .service-strip__btn,
.service-strip__item:focus-within .service-strip__btn {
    color: #fff;
    opacity: 1;
    transform: translate(-50%, 0);
}

.service-strip__item .service-strip__btn:hover,
.service-strip__item .service-strip__btn:focus-visible {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
}

.service-strip__item .service-strip__btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .service-strip .service-strip__item .service-strip__btn {
        transition: none;
        transform: translate(-50%, 0);
    }
}

/* ========================================================
   05 / Ready to Grow?
======================================================== */
.sec-metrics {
    width: 100%;
    background: #ffffff;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    padding: 0 24px clamp(64px, 6.25vw, 120px);
}

.metrics-inner-wrap {
    max-width: 1120px;
    width: 70.4vw;
    position: relative;
}

.metrics-title {
    font-family: 'Pretendard', sans-serif;
    font-weight: 600;
    font-size: clamp(28px, 3.33vw, 48px);
    line-height: 1.1;
    color: #212529;
    margin: 0 0 clamp(32px, 3.9vw, 56px) 0;
}

.metrics-figma-list {
    display: flex;
    flex-direction: column;
}

.metric-figma-row {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 16px 0;
    border-bottom: 1px solid #999999;
    position: relative;
}

.metric-figma-row:first-child {
    padding-top: 0;
}

.metric-figma-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.m-label {
    font-size: clamp(13px, 1.04vw, 16px);
    line-height: 1.5;
    font-weight: 500;
    color: #212529;
}

.m-val {
    align-self: flex-end;
    font-family: 'Pretendard', sans-serif;
    font-weight: 700;
    font-size: clamp(40px, 6.77vw, 104px);
    line-height: 1.1;
    color: #212529;
    letter-spacing: -0.04em;
    text-align: right;
    white-space: nowrap;
}

.m-val .unit {
    color: var(--main-accent);
}

/* ========================================================
   Responsive Media Queries
======================================================== */
@media (max-width: 1024px) {
    .metrics-inner-wrap {
        width: 100%;
    }

    .smart-body-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 40px;
    }
    .smart-actions-col {
        align-items: flex-start;
    }
    .smart-pills-row {
        justify-content: flex-start;
    }
    .innovation-split-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }
    .innovation-media-col, .innovation-text-col {
        width: 100%;
        max-width: 100%;
    }
    .innovation-text-col {
        padding: 0;
    }
    .innovation-main-title {
        margin: 30px 0;
        text-align: left;
    }
    .section4 {
        padding: 80px 0;
    }
    .service-strip {
        height: 480px;
    }
}

@media (max-width: 768px) {
    .metric-figma-row {
        padding-block: 20px;
    }

    .innovation-bottom-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .section4 {
        padding: 60px 0;
    }
    .section-head {
        width: auto;
        margin-inline: 24px;
    }
    .services-heading-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
    }
    .service-strip {
        flex-direction: column;
        height: auto;
    }
    .service-strip__item {
        height: 180px;
        flex: none;
    }
    .service-strip__label {
        writing-mode: horizontal-tb;
        top: 24px;
        left: 24px;
        right: auto;
        font-size: 24px;
    }
    .service-strip__item .service-strip__btn {
        bottom: 24px;
        opacity: 1;
        transform: translate(-50%, 0);
    }
}
