:root{
    --navy:#061220;
    --white:#fff;
    --accent:#ffc400;
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
    margin:0;
    background:var(--navy);
    color:var(--white);
    font-family:"Pretendard","Noto Sans KR","Apple SD Gothic Neo","Malgun Gothic",sans-serif;
}

a{color:inherit;text-decoration:none}
button{font:inherit}

.hero{
    position:relative;
    min-height:100svh;
    overflow:hidden;
    display:flex;
    align-items:center;
    background:#0a2235;
}

.hero-video{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
}

.hero-overlay{
    position:absolute;
    inset:0;
    background:
        linear-gradient(90deg,rgba(2,10,18,.56) 0%,rgba(2,10,18,.30) 44%,rgba(2,10,18,.10) 100%),
        linear-gradient(180deg,rgba(2,10,18,.18) 0%,rgba(2,10,18,.03) 52%,rgba(2,10,18,.34) 100%);
}

.hero-header{
    position:absolute;
    top:0;
    left:0;
    right:0;
    z-index:5;
    padding:24px clamp(28px,5vw,78px);
}

.brand{
    display:inline-flex;
    align-items:center;
}

.brand img{
    display:block;
    width:auto;
    height:clamp(68px,5.4vw,92px);
    max-width:min(520px,72vw);
    object-fit:contain;
    filter:drop-shadow(0 4px 18px rgba(0,0,0,.24));
}

.hero-content{
    position:relative;
    z-index:3;
    width:min(1440px,calc(100% - 10vw));
    margin:0 auto;
    padding-top:78px;
}

.hero-title{
    margin:0;
    max-width:1120px;
    font-size:clamp(72px,7.2vw,118px);
    line-height:.98;
    letter-spacing:-.055em;
    font-weight:900;
    text-shadow:0 8px 30px rgba(0,0,0,.30);
}

.hero-title span,
.hero-title strong{
    display:block;
}

.hero-title strong{
    margin-top:.08em;
    font-size:1em;
    font-weight:900;
}

.hero-copy{
    margin:30px 0 0;
    font-size:clamp(21px,1.55vw,28px);
    line-height:1.5;
    font-weight:700;
    color:rgba(255,255,255,.94);
    text-shadow:0 4px 18px rgba(0,0,0,.28);
}

.hero-actions{
    display:flex;
    gap:14px;
    margin-top:34px;
}

.action{
    min-width:220px;
    min-height:60px;
    padding:0 26px;
    border:1px solid rgba(255,255,255,.52);
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    justify-content:space-between;
    gap:24px;
    background:rgba(6,18,32,.28);
    backdrop-filter:blur(10px);
    font-size:17px;
    font-weight:800;
    transition:.22s ease;
}

.action b{
    font-size:21px;
    font-weight:500;
}

.action:hover{
    transform:translateY(-2px);
    background:var(--accent);
    border-color:var(--accent);
    color:#08131f;
}

.action-primary{
    background:rgba(255,255,255,.95);
    border-color:rgba(255,255,255,.95);
    color:#08131f;
}

.scroll-guide{
    position:absolute;
    z-index:4;
    left:50%;
    bottom:24px;
    transform:translateX(-50%);
    border:0;
    background:transparent;
    color:#fff;
    display:grid;
    justify-items:center;
    gap:8px;
    cursor:pointer;
    animation:float 2s ease-in-out infinite;
}

.scroll-guide span{
    font-size:10px;
    font-weight:800;
    letter-spacing:.24em;
}

.scroll-guide i{
    width:18px;
    height:18px;
    border-right:2px solid #fff;
    border-bottom:2px solid #fff;
    transform:rotate(45deg);
}

.next-preview{
    min-height:65vh;
    display:grid;
    place-items:center;
    padding:80px 24px;
    text-align:center;
    background:var(--navy);
}

.next-preview p{
    margin:0 0 14px;
    font-size:12px;
    letter-spacing:.22em;
    color:rgba(255,255,255,.45);
}

.next-preview h2{
    margin:0;
    font-size:clamp(42px,6vw,84px);
    line-height:1.05;
    letter-spacing:-.05em;
}

@keyframes float{
    0%,100%{transform:translate(-50%,0)}
    50%{transform:translate(-50%,8px)}
}

@media (max-width:900px){
    .hero-header{padding:18px 20px}
    .brand img{height:58px;max-width:62vw}
    .hero-content{width:calc(100% - 40px);padding-top:72px}
    .hero-title{font-size:clamp(58px,11vw,86px);line-height:.98}
    .hero-copy{font-size:clamp(18px,4vw,23px)}
    .hero-actions{flex-wrap:wrap}
    .action{min-width:190px;min-height:56px;font-size:16px}
}

@media (max-width:560px){
    .brand img{height:48px;max-width:68vw}
    .hero-content{width:calc(100% - 32px);padding-top:64px}
    .hero-title{font-size:clamp(48px,13.2vw,70px);letter-spacing:-.05em}
    .hero-copy{margin-top:24px}
    .hero-actions{
        margin-top:28px;
        display:grid;
        grid-template-columns:1fr 1fr;
        width:100%;
        gap:10px;
    }
    .action{
        min-width:0;
        width:100%;
        min-height:54px;
        padding:0 16px;
        font-size:14px;
        gap:8px;
    }
}

/* ===== FINAL HERO OVERRIDES ===== */

/* 로고: 현재 화면 기준 약 절반 크기 */
.hero-header .brand img{
    width:220px !important;
    height:auto !important;
    max-width:220px !important;
}

/* 제목: 정확히 두 줄 + 충분한 상하 간격 */
.hero-content .hero-title{
    display:block !important;
    max-width:1100px !important;
    font-size:clamp(72px,7.2vw,118px) !important;
    line-height:1.02 !important;
    letter-spacing:-0.045em !important;
}

.hero-content .hero-title .hero-title-line{
    display:block !important;
    white-space:nowrap !important;
}

.hero-content .hero-title .hero-title-line + .hero-title-line{
    margin-top:32px !important;
}

.hero-content .hero-title em{
    font:inherit !important;
    font-style:normal !important;
    font-weight:900 !important;
}

.hero-content .hero-title .accent-yellow{
    color:#ffd34e !important;
}

.hero-content .hero-title .accent-blue{
    color:#63c9ff !important;
}

@media (max-width:900px){
    .hero-header .brand img{
        width:170px !important;
        max-width:170px !important;
    }

    .hero-content .hero-title .hero-title-line + .hero-title-line{
        margin-top:24px !important;
    }
}

@media (max-width:560px){
    .hero-header .brand img{
        width:145px !important;
        max-width:145px !important;
    }

    .hero-content .hero-title .hero-title-line{
        white-space:normal !important;
    }

    .hero-content .hero-title .hero-title-line + .hero-title-line{
        margin-top:20px !important;
    }
}



/* ===== LOGO LEFT-EDGE ALIGNMENT ONLY =====
   본문/제목/설명/버튼 위치는 변경하지 않고
   상단 로고만 hero-content의 시작점과 맞춤
*/
.hero-header .brand{
    margin-left:calc(11.5vw - 72px) !important;
}

@media (max-width:900px){
    .hero-header .brand{
        margin-left:0 !important;
    }
}


/* ===== ROOT MAIN CONTENT SECTIONS v2 ===== */
.section-wrap{
    width:min(1240px,calc(100% - 64px));
    margin:0 auto;
}

.next-preview{
    min-height:68vh;
}

.next-preview > div{
    max-width:1040px;
}

.intro-note{
    display:block;
    margin:28px auto 0;
    color:rgba(255,255,255,.64);
    font-size:clamp(15px,1.25vw,19px);
    line-height:1.9;
    font-weight:500;
}

.portfolio-section{
    padding:110px 0 120px;
    background:#f4f7f9;
    color:#0a1a29;
}

.portfolio-dark{
    background:#081725;
    color:#fff;
}

.section-heading{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:32px;
    margin-bottom:34px;
}

.section-kicker{
    margin:0 0 10px;
    color:#768795;
    font-size:11px;
    line-height:1.3;
    font-weight:900;
    letter-spacing:.2em;
}

.portfolio-dark .section-kicker,
.bridge-section .section-kicker,
.closing-cta .section-kicker{
    color:rgba(255,255,255,.46);
}

.section-heading h2,
.bridge-copy h2,
.closing-inner h2{
    margin:0;
    font-size:clamp(34px,4vw,58px);
    line-height:1.08;
    letter-spacing:-.045em;
    font-weight:900;
}

.section-more{
    flex:0 0 auto;
    display:inline-flex;
    align-items:center;
    gap:14px;
    padding:12px 0;
    color:#304150;
    font-size:14px;
    font-weight:800;
}

.portfolio-dark .section-more{
    color:rgba(255,255,255,.75);
}

.section-more span{
    font-size:18px;
    transition:transform .2s ease;
}

.section-more:hover span{
    transform:translateX(4px);
}

.project-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:18px;
}

.project-card{
    position:relative;
    display:block;
    min-width:0;
    color:inherit;
    text-decoration:none;
}

.portfolio-dark .project-card{
    color:#fff;
}

.project-image{
    position:relative;
    display:block;
    overflow:hidden;
    width:100%;
    aspect-ratio:4 / 3;
    border-radius:14px;
    background:#dfe6ea;
    box-shadow:0 12px 34px rgba(4,18,31,.08);
}

.portfolio-dark .project-image{
    background:#102536;
    box-shadow:none;
}

.project-image img{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
    transition:transform .45s cubic-bezier(.2,.7,.2,1),filter .45s ease;
}

.project-card:hover .project-image img{
    transform:scale(1.045);
}

.project-title{
    display:block;
    margin-top:13px;
    padding:0 6px;
    overflow:hidden;
    color:#172738;
    font-size:15px;
    line-height:1.45;
    font-weight:800;
    text-align:center;
    white-space:nowrap;
    text-overflow:ellipsis;
}

.portfolio-dark .project-title{
    color:rgba(255,255,255,.9);
}

.feed-empty{
    min-height:190px;
    display:grid;
    place-items:center;
    align-content:center;
    gap:14px;
    padding:28px;
    border:1px dashed rgba(65,85,100,.25);
    border-radius:14px;
    text-align:center;
}

.portfolio-dark .feed-empty{
    border-color:rgba(255,255,255,.14);
}

.feed-empty p{
    margin:0;
    color:#70808c;
}

.portfolio-dark .feed-empty p{
    color:rgba(255,255,255,.55);
}

.feed-empty a{
    font-weight:800;
}

.bridge-section{
    padding:120px 0;
    background:
        radial-gradient(circle at 75% 18%,rgba(99,201,255,.08),transparent 28%),
        var(--navy);
}

.bridge-grid{
    display:grid;
    grid-template-columns:1.05fr .95fr;
    gap:90px;
    align-items:center;
}

.bridge-copy > p:not(.section-kicker){
    max-width:650px;
    margin:26px 0 0;
    color:rgba(255,255,255,.62);
    font-size:16px;
    line-height:1.9;
}

.bridge-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:30px;
}

.bridge-actions a{
    min-height:48px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:14px;
    padding:0 18px;
    border:1px solid rgba(255,255,255,.18);
    border-radius:999px;
    background:rgba(255,255,255,.04);
    font-size:13px;
    font-weight:800;
}

.bridge-actions a:hover{
    border-color:rgba(255,255,255,.5);
    background:rgba(255,255,255,.08);
}

.bridge-cards{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
}

.bridge-card{
    min-height:145px;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    padding:22px;
    border:1px solid rgba(255,255,255,.1);
    border-radius:14px;
    background:rgba(255,255,255,.035);
}

.bridge-card strong{
    color:#63c9ff;
    font-size:12px;
    letter-spacing:.12em;
}

.bridge-card span{
    font-size:20px;
    font-weight:800;
}

.closing-cta{
    padding:80px 0;
    background:#fff;
    color:#0a1a29;
}

.closing-cta .section-kicker{
    color:#8795a0;
}

.closing-inner{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:40px;
}

.closing-inner h2{
    max-width:760px;
    font-size:clamp(30px,3.5vw,48px);
}

.closing-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    justify-content:flex-end;
}

.closing-actions a{
    min-height:50px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:20px;
    padding:0 20px;
    border:1px solid #cbd5dc;
    border-radius:999px;
    color:#0a1a29;
    font-size:13px;
    font-weight:900;
}

.closing-actions a.is-primary{
    border-color:#0a1a29;
    background:#0a1a29;
    color:#fff;
}

/* JS 실패 시에도 콘텐츠는 기본적으로 항상 보입니다. */
.reveal-section{
    opacity:1;
    transform:none;
}

.reveal-section.is-entering{
    animation:ksmsSectionIn .8s ease both;
}

@keyframes ksmsSectionIn{
    from{opacity:.25;transform:translateY(28px)}
    to{opacity:1;transform:translateY(0)}
}

@media (max-width:1000px){
    .section-wrap{width:min(100% - 40px,1240px)}
    .project-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .bridge-grid{grid-template-columns:1fr;gap:48px}
    .closing-inner{align-items:flex-start;flex-direction:column}
    .closing-actions{justify-content:flex-start}
}

@media (max-width:560px){
    .section-wrap{width:calc(100% - 28px)}
    .portfolio-section,
    .bridge-section{padding:76px 0}
    .section-heading{align-items:flex-start;flex-direction:column;margin-bottom:24px}
    .project-grid{grid-template-columns:1fr;gap:14px}
    .bridge-cards{grid-template-columns:1fr 1fr}
    .bridge-card{min-height:118px;padding:18px}
    .closing-cta{padding:58px 0}
    .closing-actions{display:grid;width:100%;grid-template-columns:1fr}
    .closing-actions a{width:100%}
}

@media (prefers-reduced-motion:reduce){
    .reveal-section.is-entering{animation:none}
    .project-image img{transition:none}
}


/* ===== v4 business links + company footer ===== */
.bridge-card{
    text-decoration:none;
    color:#fff;
    transition:transform .22s ease,border-color .22s ease,background .22s ease;
}
.bridge-card:hover{
    transform:translateY(-3px);
    border-color:rgba(99,201,255,.42);
    background:rgba(255,255,255,.065);
}
.bridge-card:focus-visible{
    outline:2px solid #63c9ff;
    outline-offset:3px;
}

.ksms-company-footer{
    padding:30px 0 32px;
    border-top:1px solid rgba(255,255,255,.08);
    background:#061220;
    color:rgba(255,255,255,.62);
}
.ksms-company-footer-inner{
    text-align:center;
}
.ksms-company-footer p{
    margin:0;
    font-size:12px;
    line-height:1.9;
    word-break:keep-all;
}
.ksms-company-footer a{
    color:rgba(255,255,255,.78);
    text-decoration:none;
}
.ksms-company-footer a:hover{
    color:#fff;
    text-decoration:underline;
}
.ksms-company-footer .copyright{
    margin-top:5px;
    color:rgba(255,255,255,.46);
}

@media(max-width:700px){
    .ksms-company-footer{
        padding:26px 0 28px;
    }
    .ksms-company-footer p{
        font-size:11px;
        line-height:1.8;
    }
}
