:root {
    --site-background: #f4f1ea; /* 눈이 편한 따뜻한 종이 톤 */
    --site-surface: #fbf9f4;
    --site-text: #2b2824;
    --site-muted: #6b655b;
    --site-secondary: #5a554d;
    --site-accent: #2f5fc4;
    --site-accent-hover: #274fa3;
    --site-accent-soft: #e8edf7;
    --site-border: #ddd8cc;
    --site-surface-subtle: #f0ede5;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Noto Sans KR",
        "Malgun Gothic",
        sans-serif;
    color: var(--site-text);
    background: var(--site-background);
    line-height: 1.6;
}

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

.container {
    width: 90%;
    max-width: 1120px;
    margin: 0 auto;
}


/* =========================
   HEADER
========================= */

header {
    position: sticky;
    top: 0;
    z-index: 100;

    background: rgba(251, 249, 244, 0.95);
    border-bottom: 1px solid #e4dfd3;

    backdrop-filter: blur(10px);
}

.nav {
    height: 72px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    --logo-h: clamp(34px, 5vw, 50px);
    /* 로고 이미지 높이 (변수: 값을 이름 붙여 재사용) */

    display: flex;
    align-items: center;
    gap: clamp(6px, 1vw, 10px);
    white-space: nowrap;
    /* 글자가 두 줄로 꺾이지 않게 */

    font-weight: 800;
    font-size: clamp(16px, 2.2vw, 20px);
    letter-spacing: -1px;
}

.logo-mark {
    height: var(--logo-h);
    aspect-ratio: 7 / 5;
    /* 가로세로 비율 고정 (기존 70×50과 동일) */
    flex-shrink: 0;
    /* 좁은 화면에서 찌그러지지 않게 */

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    border-radius: 0;
    overflow: hidden;
}

.logo-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* 비율 유지하며 영역 안에 맞춤 */
    display: block;
}

.logo .logo-text {
    font-size: clamp(13px, 2vw, 20px);
    /* 약 1000px 이상 20px, 600px 이하 13px */
    white-space: nowrap;
}

nav {
    display: flex;
    align-items: center;
    /* 하위 메뉴 영역(.nav-group)에 위아래 여백이 있어서 항목을 세로 중앙에 맞춘다 */
    gap: 30px;

    font-size: 14px;
    color: var(--site-secondary);
}

nav a:hover {
    color: var(--site-accent);
}

/* 메뉴가 많아서 좁은 데스크톱(801~1000px)에서는 간격을 줄이고 글자가 꺾이지 않게 한다 */
@media (min-width: 801px) and (max-width: 1000px) {
    nav {
        gap: 14px;
    }

    nav a {
        white-space: nowrap;
    }
}


/* =========================
   하위 메뉴 (기술 인사이트 ▾)
   - 데스크톱: 마우스를 올리거나 키보드로 포커스하면 열린다(.open은 터치 화면용)
   - 모바일(800px 이하): 항상 펼쳐서 들여쓰기로 보여 준다 (아래 MOBILE 블록)
   - 헤더는 다크 모드에서도 흰색이라 색은 한 가지만 쓴다
========================= */

.nav-group {
    position: relative;

    display: flex;
    align-items: center;

    /* 마우스가 글자에서 하위 메뉴로 이동하는 동안 끊기지 않도록 위아래 여백도 호버 영역에 포함 */
    padding: 22px 0;
}

.nav-caret::after {
    content: "▾";

    margin-left: 4px;

    font-size: 11px;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 50%;

    min-width: 150px;
    padding: 6px;

    background: #fbf9f4;
    border: 1px solid #ddd8cc;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(16, 24, 40, 0.14);

    z-index: 110;

    /* 닫힌 상태: 보이지 않고 클릭도 안 되게 하되, 열릴 때 부드럽게 나타나도록 display 대신 opacity 사용 */
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 6px);

    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

/* 열림: 마우스를 올렸을 때 / 키보드로 이동했을 때(:focus-visible) / 터치 화면에서 눌렀을 때(.open)
   ※ :focus-within은 쓰지 않는다. 마우스로 클릭한 링크에도 포커스가 남아서 메뉴가 계속 열려 있게 된다. */
.nav-group:hover .submenu,
.nav-group:has(:focus-visible) .submenu,
.nav-group.open .submenu {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

/* 하위 메뉴를 고른 직후에는 마우스가 위에 있어도 닫아 둔다(index.html 스크립트가 .closed를 붙였다 뗀다) */
.nav-group.closed .submenu {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.submenu a {
    display: block;

    padding: 10px 16px;

    border-radius: 8px;

    color: #3a362f;
    font-weight: 500;
    white-space: nowrap;
}

.submenu a:hover {
    background: #eff6ff;
    color: #2f5fc4;
}

/* 메뉴로 이동할 때 고정 헤더(72px)에 제목이 가려지지 않게 한다 */
.history-group-title[id] {
    scroll-margin-top: 96px;
}


/* =========================
   HERO
========================= */

.hero {
    padding: 100px 0 40px;

    background:
        radial-gradient(circle at 80% 20%,
            var(--site-accent-soft) 0,
            transparent 35%),
        linear-gradient(180deg,
            #f4f1ea 0%,
            #efebe2 100%);
}

.hero-label {
    display: inline-block;

    padding: 7px 13px;
    margin-bottom: 22px;

    border-radius: 20px;

    background: var(--site-accent-soft);
    color: var(--site-accent);

    font-size: 13px;
    font-weight: 700;
}

.hero h1 {
    margin: 0;

    max-width: 780px;

    font-size: clamp(42px, 6vw, 70px);

    line-height: 1.1;

    letter-spacing: -4px;
}

.hero h1 span {
    color: var(--site-accent);
}

.hero-text {
    margin: 28px 0 28px;

    max-width: 650px;
    word-break: keep-all;

    color: var(--site-muted);

    font-size: 18px;
}

.hero-cta {
    margin-top: 24px;
}

.hero-news {
    margin-top: 0;
    max-width: 650px;
    padding: 18px 20px;
    border: 1px solid var(--site-border);
    border-radius: 12px;
    background: rgba(251, 249, 244, 0.85);
}

.hero-news-title {
    margin: 0 0 10px;
    font-size: 14px;
    color: var(--site-accent);
    letter-spacing: 0;
}

.hero-news-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.hero-news-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    padding: 8px 0;
    border-top: 1px solid var(--site-border);
    font-size: 14px;
}

.hero-news-list li:first-child {
    border-top: 0;
}

.hero-news-date {
    color: var(--site-muted);
    font-variant-numeric: tabular-nums;
}

.hero-news-tag {
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--site-accent-soft);
    color: var(--site-accent);
    font-size: 12px;
    font-weight: 700;
}

.hero-news-list a {
    color: var(--site-text);
    font-weight: 600;
}

.hero-news-list a:hover {
    color: var(--site-accent);
}

.button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 13px 21px;

    border-radius: 9px;

    font-size: 14px;
    font-weight: 700;

    transition: 0.2s;
}

.button-primary {
    color: white;
    background: var(--site-accent);
}

.button-primary:hover {
    background: var(--site-accent-hover);
}


/* =========================
   SECTION DIVIDERS
   (배경색 대비 대신 구분선으로 섹션 경계 표시 -
   다크 모드에서도 안정적으로 보이도록)
========================= */

main > section:not(.hero) {
    border-top: 1px solid #e4dfd3;
}


/* =========================
   SECTION
========================= */

section {
    /* 모든 섹션의 위아래 여백을 같게 맞춘다(첫 화면 제외) */
    padding: 64px 0;
}

.section-title {
    margin-bottom: 42px;
}

.section-label {
    color: var(--site-accent);

    font-size: 13px;
    font-weight: 800;

    letter-spacing: 1px;
}

.section-title h2 {
    margin: 8px 0 10px;

    font-size: 42px;

    line-height: 1.2;

    letter-spacing: -2px;
}

.section-title p {
    margin: 0;

    color: #6b655b;
}


/* =========================
   SERVICES
========================= */

.services {
    background: #ebe7de;
}

.service-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 20px;
}

.service-card {
    padding: 32px;

    min-height: 280px;

    background: #fbf9f4;

    border: 1px solid #ddd8cc;

    border-radius: 16px;
}

.service-icon {
    width: 46px;
    height: 46px;

    margin-bottom: 25px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: #edf4ff;
    color: #5a4be4;

    font-weight: 900;
}

.service-card h3 {
    margin: 0 0 12px;

    font-size: 20px;

    letter-spacing: -0.7px;
}

.service-card p {
    margin: 0;

    color: #6b655b;

    font-size: 15px;
}

.service-card ul {
    padding: 0;
    margin: 20px 0 0;

    list-style: none;

    color: #5a554d;

    font-size: 14px;
}

/* 점(·)을 고정 위치에 두고 글자는 고정 들여쓰기로 시작한다.
   (영문으로 시작하는 줄은 점이 다른 글꼴로 그려져서 줄마다 위치가 어긋났음) */
.service-card li {
    position: relative;

    margin: 6px 0;
    padding-left: 18px;
}

.service-card li::before {
    content: "·";

    position: absolute;
    left: 3px;

    color: #2f5fc4;

    font-weight: bold;
}


/* =========================
   ABOUT
========================= */

.about-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 80px;

    align-items: center;
}

.about h2 {
    margin-top: 8px;

    font-size: 42px;

    line-height: 1.2;

    letter-spacing: -2px;
}

.about p {
    color: #6b655b;
}

.principles {
    display: grid;

    gap: 14px;
}

.principle {
    padding: 20px;

    border: 1px solid #ddd8cc;

    border-radius: 13px;

    background: #fbf9f4;
}

.principle strong {
    display: block;

    margin-bottom: 4px;
}

.principle span {
    color: #6b655b;

    font-size: 14px;
}


/* =========================
   HISTORY
========================= */

.history-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 950px;
}

.history-group-title {
    margin: 32px 0 14px;
    font-size: 16px;
    font-weight: 700;
    color: #5a554d;
}

.history-group-title:first-of-type {
    margin-top: 8px;
}

html.dark-mode .history-group-title {
    color: #9a9da0;
}

.insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 16px;
    max-width: 950px;
}

.insight-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 24px;
    background: #fbf9f4;
    border: 1px solid #ddd8cc;
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.insight-card:hover,
.insight-card:focus-visible {
    border-color: var(--site-accent);
    box-shadow: 0 4px 18px rgba(37, 99, 235, 0.1);
}

.insight-card h3 {
    margin: 0;
    color: #2b2824;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.insight-card p {
    margin: 0;
    color: #5a554d;
    font-size: 14px;
    line-height: 1.6;
}

html.dark-mode .insight-card {
    background: #2c2e32;
    border-color: #2a2c2e;
}

html.dark-mode .insight-card h3 {
    color: #d9d9d9;
}

html.dark-mode .insight-card p {
    color: #9a9da0;
}

.history-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 24px;
    background: #fbf9f4;
    border: 1px solid #ddd8cc;
    border-radius: 12px;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.history-main {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.history-date {
    color: #3a362f;
    font-size: 15px;
    font-weight: 400;
}

.history-desc {
    color: #2b2824;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.history-desc a {
    color: inherit;
    text-decoration: none;
}

.history-desc a:hover,
.history-desc a:focus-visible {
    text-decoration: underline;
}

.insight-link-cue {
    display: inline-flex;
    width: 18px;
    height: 18px;
    margin-left: 3px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--site-accent-soft);
    color: var(--site-accent);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1;
    vertical-align: 3px;
    white-space: nowrap;
}

.history-desc a:hover .insight-link-cue,
.history-desc a:focus-visible .insight-link-cue {
    background: var(--site-accent);
    color: #fff;
    text-decoration: none;
}

.history-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.history-client {
    font-size: 13px;
    color: #5a554d;
    background: #f0ede5;
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid #e4dfd3;
}

.history-role {
    font-size: 13px;
    font-weight: 500;
    color: #3a362f;
    background: #edf4ff;
    padding: 3px 10px;
    border-radius: 6px;
}

.history-env {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px dashed #e4dfd3;
    font-size: 12px;
}

.env-tag {
    color: #5a554d;
    background: #f0ede5;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}


/* =========================
   INSIGHTS
========================= */

.insights {
    /* 서비스·진행순서 섹션(조금 더 진한 회색)과 번갈아 보이도록 기본 배경 */
    background: var(--site-background);
}



/* =========================
   PROCESS
========================= */

.process {
    background: #ebe7de;
}

.process-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 18px;
}

.process-card {
    position: relative;

    padding: 28px;

    min-height: 185px;

    background: #fbf9f4;

    border: 1px solid #ddd8cc;

    border-radius: 14px;
}

.process-number {
    color: #435e99;

    font-size: 13px;
    font-weight: 900;
}

.process-card h3 {
    margin: 9px 0 8px;

    font-size: 18px;
}

.process-card p {
    margin: 0;

    color: #6b655b;

    font-size: 14px;
}


/* =========================
   CONTACT
========================= */

.contact {
    padding: 64px 0;

    text-align: left;

    color: white;

    background: #172033;
}

.contact .section-label {
    color: #9dbdff;
}

.contact h2 {
    margin: 10px 0;

    font-size: 42px;

    letter-spacing: -2px;
}

.contact p {
    margin: 0 0 30px;

    max-width: 620px;

    color: #b9c2d0;
}

.contact-email {
    margin: 0;
}

/* 문의 폼 (Web3Forms로 전송) */
.contact-form {
    max-width: 560px;
    margin: 0 0 8px;

    text-align: left;
}

.contact-field {
    margin-bottom: 16px;
}

.contact-field label {
    display: block;

    margin-bottom: 6px;

    color: #dbe4f2;
    font-size: 14px;
    font-weight: 600;
}

.contact-field input,
.contact-field textarea {
    display: block;
    box-sizing: border-box;

    width: 100%;
    padding: 12px 14px;

    border: 1px solid #3b4a63;
    border-radius: 8px;

    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;

    font: inherit;
    font-size: 15px;
}

.contact-field textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-field input:focus,
.contact-field textarea:focus {
    outline: none;

    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25);
}

/* 스팸 방지용 숨은 칸: 사람 눈에도, 화면 낭독기에도 보이지 않게 한다 */
.contact-hp {
    display: none;
}

.contact-consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;

    margin: 4px 0 20px;

    color: #dbe4f2;
    font-size: 14px;
    cursor: pointer;
}

.contact-consent input {
    flex: none;

    width: 18px;
    height: 18px;
    margin-top: 2px;

    accent-color: #2563eb;
}

.contact-consent small {
    display: block;

    margin-top: 6px;

    color: #98a6bb;
    font-size: 12.5px;
    line-height: 1.55;
}

.contact-submit {
    display: block;

    width: 100%;
    max-width: 560px;
    margin: 0;
}

.contact-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* 폼 전송 결과(성공은 초록, 실패는 빨강) */
.contact .contact-form-status {
    margin: 14px 0 0;

    text-align: left;
}

.contact .contact-form-status.is-error {
    color: #fca5a5;
}

/* 폼 아래 보조 영역: 이메일로 직접 보내기 */
.contact-email {
    max-width: 560px;
    margin: 36px 0 0;
    padding-top: 28px;

    border-top: 1px solid #2b3648;
}

.contact .contact-or {
    margin: 0 0 12px;

    font-size: 14px;
}

.contact-email .contact-address {
    font-size: 18px;
}

/* 보조 버튼은 주 버튼보다 작고 가볍게 */
.contact-copy-sub {
    padding: 10px 24px;

    font-size: 14px;
}

/* 이메일 주소: 눌러서 전체 선택할 수 있게 한다(복사가 안 되는 환경의 대비) */
.contact .contact-address {
    margin: 0 0 18px;

    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.2px;

    user-select: all;
}

/* 주 버튼: 이메일 주소 복사 (기존 '문의하기' 버튼과 같은 모양) */
.contact-copy {
    display: inline-block;
    padding: 14px 34px;
    border: 0;
    background: #fbf9f4;
    color: #2f5fc4;
    cursor: pointer;
    border-radius: 7px;
    font: inherit;
    font-weight: 600;
    box-shadow: 0 4px 0 #dbeafe, 0 6px 12px rgba(0, 0, 0, 0.12);
    transition: all 0.15s ease;
}

.contact-copy:hover {
    background: #eff6ff;
    color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #dbeafe, 0 8px 16px rgba(0, 0, 0, 0.15);
}

.contact-copy:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #dbeafe, 0 3px 6px rgba(0, 0, 0, 0.1);
}

.contact-copy:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 3px;
}

/* 복사 결과 안내(자리를 미리 잡아 두어 문구가 나타나도 화면이 흔들리지 않게 한다) */
.contact .contact-status {
    min-height: 22px;
    margin: 14px 0 0;

    color: #86efac;
    font-size: 14px;
}

/* 보조 수단: 메일 앱으로 열기 */
.contact .contact-alt {
    margin: 6px 0 0;

    font-size: 14px;
}

.contact-alt a {
    color: #9dbdff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.contact-alt a:hover {
    color: #ffffff;
}


/* =========================
   FOOTER
========================= */

footer {
    padding: 28px 0;

    background: #111827;

    color: #98a2b3;

    font-size: 13px;
}

/* =========================
MOBILE MENU
========================= */

.menu-toggle {
    display: none;

    width: 44px;
    height: 44px;

    padding: 9px;

    border: 0;
    border-radius: 8px;

    background: transparent;

    cursor: pointer;

    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.menu-toggle span {
    display: block;

    width: 23px;
    height: 2px;

    background: #172033;

    border-radius: 2px;

    transition: 0.2s;
}


/* =========================
MOBILE
========================= */

@media (max-width: 800px) {

    .nav {
        position: relative;

        height: auto;
        min-height: 72px;

        padding: 10px 0;
    }


    /* 로고 */
    .logo {
        gap: 8px;

        font-size: 17px;

        letter-spacing: -0.8px;
    }

    .logo-mark {
        width: 52px;
        height: 42px;
    }

    .logo-mark img {
        width: 52px;
        height: 42px;
    }


    /* 햄버거 버튼 표시 */
    .menu-toggle {
        display: flex;
    }


    /* 모바일 메뉴 */
    nav {
        display: none;

        position: absolute;

        top: calc(100% + 1px);
        left: 0;
        right: 0;

        padding: 10px;

        background: rgba(255, 255, 255, 0.98);

        border: 1px solid #e4dfd3;
        border-top: 0;

        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);

        border-radius: 0 0 12px 12px;

        flex-direction: column;
        align-items: stretch;
        gap: 2px;

        font-size: 14px;
    }


    /* 메뉴가 열린 상태 */
    nav.mobile-open {
        display: flex;
    }


    nav a {
        display: block;

        padding: 12px 14px;

        border-radius: 8px;
    }

    nav a:hover {
        background: #f0ede5;
        color: #2f5fc4;
    }


    /* 하위 메뉴: 모바일 메뉴 안에서는 항상 펼쳐 둔다 */
    .nav-group {
        display: block;

        padding: 0;
    }

    .nav-caret {
        display: none;
    }

    .submenu {
        position: static;
        transform: none;

        /* 모바일 메뉴 안에서는 항상 보인다 */
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transition: none;

        min-width: 0;
        margin: 0 0 4px 14px;
        padding: 0;

        border: 0;
        border-left: 2px solid #ddd8cc;
        border-radius: 0;
        box-shadow: none;
    }

    .submenu a {
        padding: 10px 14px;
    }


    /* 햄버거 → X 모양 */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }


    /* HERO */

    .hero {
        padding: 72px 0 32px;
    }

    .hero h1 {
        font-size: 45px;
        letter-spacing: -2.5px;
    }


    /* SECTION */

    section {
        padding: 48px 0;
    }

    .section-title h2,
    .about h2,
    .contact h2 {
        font-size: 32px;
    }


    /* GRID */

    .service-grid,
    .about-grid,
    .process-grid {
        grid-template-columns: 1fr;
    }

    .about-grid {
        gap: 35px;
    }

    .process-card {
        min-height: auto;
    }


    /* HISTORY */

    .history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .history-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .history-meta {
        align-self: flex-start;
    }


}

/* =========================
THEME TOGGLE
========================= */

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;

    padding: 5px;

    border: 1px solid #ddd8cc;
    border-radius: 999px;

    background: #fbf9f4;
    color: #2b2824;

    cursor: pointer;

    transition: 0.2s;
}

.theme-toggle span {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 32px;
    height: 28px;

    border-radius: 999px;

    font-size: 15px;

    transition: 0.2s;
}

/* 선택된 모드 표시(밝게: ☀ / 어둡게: ☾) - 색상은 항상 동일, 위치만 이동 */
.theme-toggle .light {
    background: #dbeafe;
}

.theme-toggle .dark {
    background: transparent;
}

/* 키보드 조작 시 포커스 표시 */
.theme-toggle:focus-visible,
.menu-toggle:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}


/* =========================
DARK MODE
========================= */

/* ========================= */
/* HEADER - LIGHT MODE       */
/* 다크 모드에서도 상단 고정 */
/* ========================= */

header {
    background: #fbf9f4;
    border-bottom: 1px solid #ddd8cc;
}

.logo {
    color: #101828;
}

nav {
    color: #5a554d;
}

nav a:hover {
    color: #155eef;
}

html.dark-mode {
    color: #cdcdcd;
    background: #26282b;
}

/* [수정 3] body 에 흰색 배경(#ffffff)이 고정되어 있어서
   배경 색이 따로 없는 ABOUT(IT SOLVERS), HISTORY 섹션이
   다크 모드에서 하얗게 보이던 문제를 해결 */
html.dark-mode body {
    color: #cdcdcd;
    background: #26282b;
}

html.dark-mode main > section:not(.hero) {
    border-top-color: #2a2c2e;
}

html.dark-mode .hero {
    background:
        radial-gradient(circle at 80% 20%,
            #172554 0,
            transparent 35%),
        linear-gradient(180deg,
            #26282b 0%,
            #0d0e0f 100%);
}

html.dark-mode .hero-label {
    background: #172554;
    color: #93b4ff;
}

html.dark-mode .hero h1 {
    color: #d9d9d9;
}

html.dark-mode .hero h1 span {
    color: #60a5fa;
}

html.dark-mode .hero-text {
    color: #9a9da0;
}

html.dark-mode .hero-news {
    background: #2c2e32;
    border-color: #2a2c2e;
}

html.dark-mode .hero-news-list li {
    border-top-color: #2a2c2e;
}

html.dark-mode .hero-news-title {
    color: #7da7ff;
}

html.dark-mode .hero-news-date {
    color: #9a9da0;
}

html.dark-mode .hero-news-tag {
    background: #172554;
    color: #93b4ff;
}

html.dark-mode .hero-news-list a {
    color: #d9d9d9;
}

html.dark-mode .hero-news-list a:hover {
    color: #7da7ff;
}

html.dark-mode .section-label {
    color: #7da7ff;
}

html.dark-mode .section-title h2,
html.dark-mode .about h2 {
    color: #d9d9d9;
}

html.dark-mode .section-title p,
html.dark-mode .about p {
    color: #9a9da0;
}


/* SERVICES */

html.dark-mode .services,
html.dark-mode .process {
    background: #0d0e0f;
}

/* 인사이트는 밝은 화면에서 흰 배경이므로, 어두운 화면에서는 본문 배경색을 따른다 */
html.dark-mode .insights {
    background: #26282b;
}

html.dark-mode .service-card,
html.dark-mode .process-card,
html.dark-mode .principle,
html.dark-mode .history-item {
    background: #2c2e32;
    border-color: #2a2c2e;
}

html.dark-mode .service-card h3,
html.dark-mode .process-card h3,
html.dark-mode .principle strong,
html.dark-mode .history-desc {
    color: #d9d9d9;
}

html.dark-mode .service-card p,
html.dark-mode .process-card p,
html.dark-mode .principle span {
    color: #9a9da0;
}

html.dark-mode .service-icon {
    background: #1e3a5f;
    color: #8db4ff;
}

html.dark-mode .process-number {
    color: #8db4ff;
}

html.dark-mode .service-card ul {
    color: #b4b7ba;
}

html.dark-mode .service-card li::before {
    color: #60a5fa;
}


/* HISTORY */

html.dark-mode .history-date {
    color: #a9acaf;
}

html.dark-mode .history-client {
    color: #b4b7ba;
    background: #202224;
    border-color: #344054;
}

html.dark-mode .history-role {
    color: #b9d0ff;
    background: #1e3a5f;
}

html.dark-mode .history-env {
    border-top-color: #2a2c2e;
}

html.dark-mode .env-tag {
    color: #b4b7ba;
    background: #202224;
}


/* THEME BUTTON
   [수정 1] 헤더가 항상 흰색이므로 버튼 바탕/테두리는 다크 모드에서도 바꾸지 않음
   (선택 표시만 ☀ → ☾ 로 이동) */

html.dark-mode .theme-toggle .light {
    background: transparent;
}

html.dark-mode .theme-toggle .dark {
    background: #dbeafe;
}


/* MOBILE */

/* ========================= */
/* MOBILE NAV - LIGHT MODE   */
/* ========================= */

@media (max-width: 800px) {

    nav {
        background: #fbf9f4;
        border: 1px solid #ddd8cc;
    }

    nav a:hover {
        background: #f8fafc;
    }

}

/* [수정 1] 햄버거 버튼 선 색상은 헤더(항상 흰색)에 맞춰 고정 -
   기존의 다크 모드용 흰색 규칙은 흰 헤더 위에서 보이지 않아 삭제 */


/* CONTACT */

html.dark-mode .contact {
    background: #070708;
}


/* =========================
THEME TOGGLE MOBILE
========================= */

@media (max-width: 800px) {

    .theme-toggle {
        margin-left: auto;
        margin-right: 4px;
    }

    .theme-toggle span {
        width: 30px;
        height: 27px;
    }

}


/* =========================
   INSIGHT PAGE: 리스 개요
   (기존 인사이트 계산기 페이지와 동일한 톤)
========================= */

body.lease-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f4f1ea;
    line-height: 1.5;
}

.lease-overview {
    --lo-text: #1f2933;
    --lo-muted: #667085;
    --lo-line: #dde3ea;
    --lo-accent: #1d5fd1;
    --lo-accent-weak: #e8f0fc;

    flex: 1;
    width: min(100% - 32px, 960px);
    min-width: 0;
    margin: 0 auto;
    padding: 28px 0 48px;
    color: var(--lo-text);
    word-break: keep-all;
}

.lease-overview h1 {
    margin: 0 0 6px;
    font-size: clamp(22px, 4vw, 30px);
    overflow-wrap: anywhere;
}

.lease-overview h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.lease-overview h3 {
    margin: 20px 0 8px;
    font-size: 16px;
}

.lease-overview h4 {
    margin: 16px 0 6px;
    font-size: 15px;
    color: var(--lo-accent);
}

.lease-overview .lease-table-wrap {
    margin: 8px 0;
    overflow-x: auto;
}

.lease-overview .lease-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.lease-overview .lease-table th,
.lease-overview .lease-table td {
    padding: 8px 10px;
    border: 1px solid var(--lo-border, #ddd8cc);
    text-align: left;
}

.lease-overview .lease-table th {
    background: var(--lo-accent-weak);
}

.lease-overview .lease-table.num td:nth-child(2) {
    text-align: right;
    white-space: nowrap;
}

.lease-overview .lease-table.compare {
    table-layout: fixed;
}

.lease-overview .lease-table.compare th:first-child,
.lease-overview .lease-table.compare td:first-child {
    width: 16%;
    font-weight: 700;
    background: var(--lo-accent-weak);
}

.lease-overview .lease-table.compare td {
    vertical-align: top;
    overflow-wrap: anywhere;
}

.lease-overview p {
    margin: 8px 0;
}

.lease-overview .sub,
.lease-overview .note {
    color: var(--lo-muted);
    font-size: 13px;
}

.lease-overview > section.card,
.lease-overview > nav.card {
    min-width: 0;
    margin-top: 16px;
    padding: 20px;
    border: 1px solid var(--lo-line);
    border-radius: 10px;
    background: #fbf9f4;
    scroll-margin-top: 88px;
}

.lease-overview .toc {
    display: block;
    position: static;
    gap: 0;
    box-shadow: none;
    font-size: inherit;
    color: inherit;
}

.lease-overview .toc a {
    display: inline;
    padding: 0;
    border-radius: 0;
    background: none;
}

.lease-overview .toc h2 {
    font-size: 16px;
}

.lease-overview .toc ol {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: toc;
    font-size: 14px;
}

.lease-overview .toc li {
    counter-increment: toc;
}

.lease-overview .toc li::before {
    content: counter(toc) ". ";
    color: var(--lo-muted);
}

.lease-overview .toc a {
    color: var(--lo-accent);
    font-weight: 600;
}

.lease-overview .toc a:hover {
    text-decoration: underline;
}

.lease-overview .definition {
    margin: 12px 0 16px;
    padding: 14px 16px;
    border-left: 4px solid var(--lo-accent);
    border-radius: 0 8px 8px 0;
    background: var(--lo-accent-weak);
}

.lease-overview .benefit-grid,
.lease-overview .comparison,
.lease-overview .lease-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.lease-overview .benefit,
.lease-overview .lease-item {
    padding: 16px;
    border: 1px solid var(--lo-line);
    border-radius: 8px;
    background: #fbf9f4;
}

.lease-overview .benefit-number {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: var(--lo-accent-weak);
    color: var(--lo-accent);
    font-size: 13px;
    font-weight: 700;
}

.lease-overview .benefit h3,
.lease-overview .lease-item h3 {
    margin: 0 0 6px;
}

.lease-overview .benefit p,
.lease-overview .lease-item p {
    margin: 0;
    color: var(--lo-muted);
    font-size: 14px;
}

.lease-overview .lease-item .en {
    display: block;
    margin-bottom: 4px;
    color: var(--lo-accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    overflow-wrap: anywhere;
}

.lease-overview .placeholder {
    margin-top: 14px;
    padding: 14px;
    border: 1px dashed #cbd3dc;
    border-radius: 8px;
    color: var(--lo-muted);
    font-size: 14px;
}

.lease-overview .placeholder strong {
    color: var(--lo-text);
}

.lease-overview .type-panel {
    padding: 16px;
    border: 1px solid var(--lo-line);
    border-radius: 8px;
}

.lease-overview .type-panel.finance {
    background: var(--lo-accent-weak);
    border-color: #c9dbf7;
}

.lease-overview .type-panel.operating {
    background: #f4f1ea;
}

.lease-overview .type-panel h3 {
    margin: 0 0 6px;
}

.lease-overview .type-panel p {
    margin: 0;
    color: var(--lo-muted);
    font-size: 14px;
}

.lease-overview .criteria {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: criteria;
}

.lease-overview .criteria li {
    position: relative;
    margin: 10px 0;
    padding: 12px 14px 12px 52px;
    border: 1px solid var(--lo-line);
    border-radius: 8px;
    font-size: 14px;
    counter-increment: criteria;
}

.lease-overview .criteria li::before {
    content: counter(criteria);
    position: absolute;
    top: 12px;
    left: 14px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--lo-accent-weak);
    color: var(--lo-accent);
    font-size: 12px;
    font-weight: 700;
}

.lease-overview .criteria strong {
    display: block;
    margin-bottom: 2px;
    font-size: 15px;
}

.lease-overview .formula {
    display: inline-block;
    margin-top: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #f0f3f7;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.lease-overview .change-flow {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
}

.lease-overview .flow-step {
    display: grid;
    place-items: center;
    min-height: 80px;
    padding: 12px;
    border: 1px solid var(--lo-line);
    border-radius: 8px;
    background: #fbf9f4;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.lease-overview .flow-arrow {
    color: var(--lo-accent);
    font-size: 20px;
    font-weight: 700;
}

.lease-overview .flow-figure {
    margin: 16px 0;
    text-align: center;
}

.lease-overview .flow-figure img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--lo-line);
    border-radius: 8px;
    background: #fbf9f4;
}

.lease-overview .flow-figure figcaption {
    margin-top: 8px;
    color: var(--lo-muted);
    font-size: 13px;
}

.lease-overview .note {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f4f1ea;
}

.lease-overview .note strong {
    color: var(--lo-text);
}

.lease-overview .note.key-point {
    padding: 16px 18px;
    border-left: 4px solid var(--lo-accent, #2563eb);
    background: var(--lo-accent-weak, #eef4ff);
}

.lease-overview .note.key-point strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.1em;
    color: var(--lo-accent, #2f5fc4);
}

body.lease-page footer .container span {
    margin-left: 8px;
    opacity: .8;
}

@media (max-width: 760px) {
    .lease-overview {
        padding-top: 24px;
    }
}

@media (max-width: 600px) {
    .lease-overview .benefit-grid,
    .lease-overview .comparison,
    .lease-overview .lease-list {
        grid-template-columns: 1fr;
    }

    .lease-overview .change-flow {
        grid-template-columns: 1fr;
    }

    .lease-overview .flow-arrow {
        text-align: center;
        transform: rotate(90deg);
    }

    .lease-overview > section.card,
    .lease-overview > nav.card {
        padding: 16px;
    }

    .lease-overview .lease-table.compare,
    .lease-overview .lease-table.compare tbody,
    .lease-overview .lease-table.compare tr,
    .lease-overview .lease-table.compare td {
        display: block;
        width: 100%;
    }

    .lease-overview .lease-table.compare thead {
        display: none;
    }

    .lease-overview .lease-table.compare tr {
        margin-bottom: 12px;
        border: 1px solid var(--lo-border, #ddd8cc);
        border-radius: 8px;
        overflow: hidden;
    }

    .lease-overview .lease-table.compare td {
        border: 0;
        border-top: 1px solid var(--lo-border, #ddd8cc);
    }

    .lease-overview .lease-table.compare td:first-child {
        width: 100%;
        border-top: 0;
    }

    .lease-overview .lease-table.compare td[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 2px;
        color: var(--lo-accent);
        font-size: 12px;
        font-weight: 700;
    }
}

@media print {
    body.lease-page header,
    body.lease-page footer,
    .lease-overview .toc {
        display: none;
    }

    .lease-overview > section.card {
        break-inside: avoid;
    }
}

.next-steps ul { margin: 8px 0 0; padding-left: 20px; }
.next-steps li { margin: 6px 0; }

/* 서브페이지 작성일 */
.page-date {
    margin-left: auto;
    color: #6b655b;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.nav-right .page-date {
    margin-left: 0;
}

/* 서브페이지 본문 최상단 우측 작성일 */
.page-date-row {
    text-align: left;
    margin: 0 0 12px;
}

.page-date-row .page-date {
    margin-left: 0;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

html.dark-mode .page-date {
    color: #9a9da0;
}

/* 푸터 하단 링크(소개·문의·개인정보처리방침) */
.footer-links {
    margin-top: 10px;
    font-size: 13px;
}

.footer-links a {
    color: inherit;
    opacity: 0.85;
    text-decoration: underline;
}

/* 주요실적: 처음 몇 개만 보이고 나머지는 펼쳐서 보기 */
.history-more > summary {
    display: block;
    margin: 8px 0 18px;
    padding: 12px 16px;
    border: 1px solid var(--site-border);
    border-radius: 10px;
    color: var(--site-accent);
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    list-style: none;
}

.history-more > summary::-webkit-details-marker {
    display: none;
}

.history-more > summary:hover,
.history-more > summary:focus-visible {
    background: var(--site-accent-soft);
}

.history-more[open] > summary {
    margin-bottom: 18px;
}

/* 서브페이지 보조 안내 문구 */
.lease-overview .muted {
    color: #6b655b;
    font-size: 14px;
}

/* 폰: 첫 화면 제목이 두 줄에 맞게 들어가도록 글자 크기를 화면 너비에 맞춘다(단어 중간에서 끊지 않음) */
.hero h1 {
    word-break: keep-all;
}

@media (max-width: 600px) {
    .hero h1 {
        font-size: clamp(24px, 6.8vw, 40px);
        letter-spacing: -1.5px;
        line-height: 1.25;
    }
}

/* 로고 그림의 흰 배경이 따뜻한 헤더 위에서 네모로 보이지 않게 한다(밝은 화면) */
html:not(.dark-mode) header img { mix-blend-mode: multiply; }

/* =========================
   밝은 화면: 문의 구역과 푸터를 페이지 톤에 맞춘다
   (이전에는 남색 띠로 따로 놀았음. 어두운 화면은 기존 규칙을 그대로 쓴다)
========================= */

html:not(.dark-mode) .contact { background: #ebe7de; color: #2b2824; }
html:not(.dark-mode) .contact .section-label { color: #2f5fc4; }
html:not(.dark-mode) .contact p { color: #5a554d; }
html:not(.dark-mode) .contact-field label,
html:not(.dark-mode) .contact-consent { color: #3a362f; }
html:not(.dark-mode) .contact-consent small { color: #6b655b; }
html:not(.dark-mode) .contact-field input,
html:not(.dark-mode) .contact-field textarea { background: #fffdf9; color: #2b2824; border-color: #cfc9bb; }
html:not(.dark-mode) .contact-field input:focus,
html:not(.dark-mode) .contact-field textarea:focus { border-color: #2f5fc4; }
html:not(.dark-mode) .contact-email { border-top-color: #d3cdbf; }
html:not(.dark-mode) .contact .contact-or { color: #6b655b; }
html:not(.dark-mode) .contact .contact-address { color: #2b2824; }
html:not(.dark-mode) .contact-copy { background: #2f5fc4; color: #ffffff; }
html:not(.dark-mode) .contact-copy:hover { background: #274fa3; color: #ffffff; }
html:not(.dark-mode) .contact .contact-status { color: #1b6b3a; }
html:not(.dark-mode) .contact .contact-form-status.is-error { color: #b42318; }
html:not(.dark-mode) .contact-alt a { color: #2f5fc4; }
html:not(.dark-mode) .contact-alt a:hover { color: #274fa3; }

html:not(.dark-mode) footer { background: #e4dfd3; color: #5a554d; border-top: 1px solid #d8d2c4; }
html:not(.dark-mode) footer strong { color: #2b2824; }
html:not(.dark-mode) footer a { color: #3a362f; }

/* 주요실적: 연도 슬라이드 바(왼쪽 끝=전체, 오른쪽으로 갈수록 오래된 연도). 선택 값은 동그라미 위에 따라다닌다 */
.history-years {
    position: relative;
    max-width: 950px;
    margin: 0 0 16px;
    padding-top: 30px;
}

.history-years-label {
    position: absolute;
    top: 0;
    left: calc(8px + (100% - 16px) * var(--pos, 0));
    transform: translateX(-50%);
    white-space: nowrap;
    color: var(--site-accent);
    font-size: 14px;
    font-weight: 700;
}

.history-years-range {
    display: block;
    width: 100%;
    height: 16px;
    margin: 0;
    background: transparent;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

/* 막대는 한 색으로만 두고, 지나온 쪽이 채워지는 효과는 쓰지 않는다 */
.history-years-range::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
    background: var(--site-border);
}

.history-years-range::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background: var(--site-border);
}

.history-years-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    margin-top: -6px;
    border: 0;
    border-radius: 50%;
    background: var(--site-accent);
}

.history-years-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: 0;
    border-radius: 50%;
    background: var(--site-accent);
}

.history-item[hidden] {
    display: none;
}

/* 주요실적: 3개씩 더 보기 */
.history-more-btn {
    display: block;
    width: 100%;
    max-width: 950px;
    margin: 16px 0 0;
    padding: 12px 16px;
    border: 1px solid var(--site-border);
    border-radius: 10px;
    background: transparent;
    color: var(--site-accent);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

@media (hover: hover) {
    .history-more-btn:hover {
        background: var(--site-accent-soft);
    }
}

.history-more-btn:focus-visible {
    background: var(--site-accent-soft);
}

.history-more-btn[hidden] {
    display: none;
}
