/* ============================================================
           RESET & BASE
        ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
    font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    font-weight: 400;
    background-color: #ffffff;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a  { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

/* ============================================================
   HEADER
============================================================ */
.header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #ffffff;
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
    height: 88px;
}

.header-logo { display: flex; align-items: center; }

.header-logo a {
    display: flex;
    align-items: center;
    line-height: 0;
}

.header-logo img {
    height: 52px;
    width: auto;
}

.logo-text {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #1a1a1a;
    white-space: nowrap;
    line-height: 1.35;
}

.logo-text span {
    display: block;
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.12em;
    color: #999;
    margin-top: 4px;
}

.header-cert { display: flex; align-items: center; }

.header-cert a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #555;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    padding: 9px 18px;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.header-cert a:hover {
    background-color: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
}

.header-cert a::before {
    content: '';
    display: inline-block;
    width: 15px; height: 15px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

.header-cert a:hover::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E");
}

/* ============================================================
   MAIN
============================================================ */
.main { padding-top: 88px; }

/* ============================================================
   ① HERO + BRANDS 통합 섹션
      두 섹션의 배경색을 모두 #ffffff로 통일 → 경계선 제거
============================================================ */
.hero-section {
    /* ① border-bottom 제거, gradient 제거 → 흰색 단색으로 통일 */
background-color: #ffffff;
padding: 72px 40px 60px;    /* 하단 padding 줄여 brands와 자연스럽게 연결 */
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.hero-eyebrow {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #c8102e;
    margin-bottom: 18px;
}

.hero-title {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: clamp(26px, 3.6vw, 44px);
    font-weight: 300;
    letter-spacing: -0.01em;
    color: #1a1a1a;
    line-height: 1.25;
    margin-bottom: 16px;
}

.hero-title strong { font-weight: 700; }

.hero-subtitle {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 13px;
    font-weight: 300;
    color: #999;
    letter-spacing: 0.07em;
}
/* PC: 구분자·한글 사명 모두 inline (한 줄 출력) */
.hero-subtitle-sep { display: inline; }
.hero-subtitle-kr  { display: inline; }

/* ============================================================
   BRAND CARDS
   ① brands-section 배경도 #ffffff → hero와 경계 없이 이어짐
   ② 카드 이미지 오버레이 밝기 완화 (기존 사이트 수준으로)
============================================================ */
.brands-section {
    background-color: #ffffff;  /* ① hero와 동일 배경 → 경계 사라짐 */
padding: 0 40px 60px;       /* 상단 padding 제거 → hero와 바로 연결 */
}

.brand-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1200px;
    margin: 0 auto;
    gap: 0;
    background-color: transparent;
}

/* 카드: padding으로 주변 여백이 흰색(섹션 배경)으로 보임 */
.brand-card {
    position: relative;
    height: 420px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    cursor: pointer;
    padding: 20px;
    background-color: #ffffff;
}

/* 두 카드 사이 여백 제거 */
.brand-card--lexus  { padding-right: 10px; }
.brand-card--toyota { padding-left:  10px; }

/* 배경 이미지 래퍼 — overflow:hidden으로 scale 시 영역 밖으로 안 넘침 */
.brand-card-img-wrap {
    position: absolute;
    top: 20px; bottom: 20px;
    left: 20px; right: 20px;
    overflow: hidden;           /* ← 핵심: scale 확대 시 이 경계 안에서만 표시 */
}

.brand-card--lexus  .brand-card-img-wrap { right: 10px; }
.brand-card--toyota .brand-card-img-wrap { left:  10px; }

/* 배경 이미지: 래퍼 전체를 채움 */
.brand-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transition: transform 0.6s ease;
}

/* ② 배경 이미지 URL — 실제 tfskr 경로 적용 */
.brand-card--toyota .brand-card-bg {
    background-image: url('/econtract/views/res/imgs/bg_intro_toyota.jpg');
    background-color: #1a1a2e;
}

.brand-card--lexus .brand-card-bg {
    background-image: url('/econtract/views/res/imgs/bg_intro_lexus.jpg');
    background-color: #0d1b2a;
}

/* ② 오버레이 — img-wrap 안에서 inset:0으로 bg 위에 위치 */
.brand-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.65) 0%,
        rgba(0, 0, 0, 0.20) 50%,
        rgba(0, 0, 0, 0.00) 100%
    );
    transition: background 0.4s ease;
}

/* overlay는 img-wrap 안에 위치하므로 별도 inset 불필요 */

/* 카드 전체 영역 클릭 레이어 — 이미지 포함 카드 전체를 링크로 동작 */
.brand-card-link-all {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 3;             /* overlay(z-index 없음) 위, body(z-index:2) 아래이면 안되니 3으로 */
    display: block;
    cursor: pointer;
}

/* brand-card-body 안의 링크들은 클릭 레이어보다 위에 표시 */
.brand-card-body {
    position: relative;
    z-index: 4;             /* link-all(3)보다 위 → 내부 버튼 클릭 가능 */
}

/* 호버 시 이미지 확대 — overflow:hidden인 래퍼 안에서만 커짐 (삐져나오지 않음) */
.brand-card:hover .brand-card-bg { transform: scale(1.06); }
.brand-card:hover .brand-card-overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.30) 50%,
        rgba(0, 0, 0, 0.05) 100%
    );
}

/* 카드 콘텐츠 — z-index는 위 .brand-card-body에서 통합 정의 */
.brand-card-body {
    padding: 36px 40px;
    color: #fff;
}

.brand-card-bar {
    width: 36px;
    height: 3px;
    margin-bottom: 18px;
    background-color: #c8102e;
}

.brand-card--lexus .brand-card-bar { background-color: #a0845c; }

.brand-card-logo-img {
    height: 30px;
    width: auto;
    margin-bottom: 10px;
    filter: brightness(0) invert(1);
}

.brand-card-logo-text {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
    margin-bottom: 4px;
}

.brand-card-brand-sub {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.13em;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    margin-bottom: 22px;
}

.brand-card-main-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 18px;
    letter-spacing: 0.02em;
    transition: gap 0.2s ease;
}

.brand-card-main-link::after { content: '→'; font-size: 14px; }
.brand-card:hover .brand-card-main-link { gap: 10px; }

.brand-card-links { display: flex; gap: 10px; flex-wrap: wrap; }

.brand-card-link {
    display: inline-flex;
    align-items: center;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.80);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 100px;
    padding: 6px 16px;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.brand-card-link:hover {
    background-color: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.65);
    color: #fff;
}

/* ============================================================
   CTA SECTION — 공인인증서 내보내기
============================================================ */
.cta-section {
    padding: 48px 40px;
    background-color: #f7f8fa;
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
}

.cta-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.cta-text h2 {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.cta-text p {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 13px;
    font-weight: 300;
    color: #888;
    line-height: 1.65;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #1a1a1a;
    color: #fff;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.03em;
    padding: 14px 28px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.cta-btn:hover { background-color: #c8102e; }

/* ============================================================
   FOOTER
============================================================ */
.footer {
    background-color: #1a1a1a;
    padding: 40px 40px 36px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-top {
    display: flex;
    align-items: center;
    gap: 36px;
    padding-bottom: 24px;
    border-bottom: 1px solid #2e2e2e;
    margin-bottom: 18px;
}

.footer-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.footer-logo img {
    height: 34px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-logo-text {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #fff;
    text-transform: uppercase;
    line-height: 1.5;
    white-space: nowrap;
}

.footer-logo-text small {
    display: block;
    font-size: 9px;
    font-weight: 300;
    color: #666;
    letter-spacing: 0.09em;
    margin-top: 3px;
}

.footer-divider {
    width: 1px;
    height: 44px;
    background-color: #333;
    flex-shrink: 0;
}

.footer-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.footer-info p {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 12px;
    font-weight: 300;
    color: #888;
    line-height: 1.7;
}

.footer-info span {
    display: inline-block;
    margin-right: 20px;
}

.footer-info strong {
    color: #bbb;
    font-weight: 500;
    margin-right: 4px;
}

.footer-copy {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 11px;
    font-weight: 300;
    color: #555;
    letter-spacing: 0.03em;
    text-align: right;
}

/* ============================================================
   ③ 반응형 미디어쿼리 — 활성 적용
============================================================ */

/* 태블릿 (1024px 이하) */
@media (max-width: 1024px) {
    .header-inner {
        padding: 0 24px;
        height: 72px;
    }

    .header-logo img { height: 42px; }

    .main { padding-top: 72px; }

    .hero-section { padding: 56px 24px 48px; }

    .brands-section { padding: 0 24px 48px; }

    .brand-card { height: 380px; }

    .brand-card-body { padding: 28px 28px; }

    .cta-section { padding: 40px 24px; }

    .footer { padding: 36px 24px 30px; }
}

/* 모바일 가로 / 소형 태블릿 (768px 이하) */
@media (max-width: 768px) {
    .header-inner {
        padding: 0 20px;
        height: 60px;
    }

    .header-logo img { height: 34px; }

    /* 헤더 우측 버튼 텍스트 축약 — 아이콘만 표시 */
.header-cert a {
    padding: 8px 12px;
    font-size: 0;           /* 텍스트 숨김 */
    gap: 0;
}

.header-cert a::before {
    width: 18px; height: 18px;
}

.main { padding-top: 60px; }

.hero-section { padding: 44px 20px 36px; }

.hero-title { font-size: 26px; }

.hero-subtitle { font-size: 12px; }

/* 모바일: 구분자 숨기고 한글 사명 아래 행으로 */
.hero-subtitle-sep { display: none; }
.hero-subtitle-kr  { display: block; margin-top: 4px; }

/* 브랜드 카드: 모바일에서 세로 1열 */
.brands-section { padding: 0 20px 48px; }

.brand-cards { grid-template-columns: 1fr; }

.brand-card {
    height: 320px;
    padding: 16px;
}

/* 모바일 1열: 상하 여백 조정 (사이 간격 통일) */
.brand-card--lexus  {
    padding-right: 16px;
    padding-bottom: 8px;    /* 두 카드 사이 간격 절반 */
}

.brand-card--toyota {
    padding-left: 16px;
    padding-top: 8px;       /* 두 카드 사이 간격 절반 */
}

/* img-wrap 위치를 모바일 padding에 맞춰 재정의 */
    .brand-card--lexus  .brand-card-img-wrap {
        top: 16px; bottom: 8px; left: 16px; right: 16px;
    }

    .brand-card--toyota .brand-card-img-wrap {
        top: 8px; bottom: 16px; left: 16px; right: 16px;
    }

    .brand-card-body { padding: 24px 24px; }

    .cta-section { padding: 32px 20px; }

    .cta-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .cta-btn { width: 100%; justify-content: center; }

    .footer { padding: 28px 20px 24px; }

    .footer-top {
        flex-wrap: wrap;
        gap: 16px;
        align-items: flex-start;
    }

    .footer-divider { display: none; }

    .footer-info p { font-size: 11px; }

    .footer-info span { margin-right: 12px; }

    .footer-copy { text-align: left; margin-top: 4px; }
}

/* 모바일 세로 (480px 이하) */
@media (max-width: 480px) {
    .header-inner { height: 54px; }

    .header-logo img { height: 28px; }

    .hero-section { padding: 36px 16px 28px; }

    .hero-title { font-size: 22px; line-height: 1.3; }

    .hero-eyebrow { font-size: 10px; }

    .brands-section { padding: 0 16px 36px; }

    .brand-card { height: 280px; padding: 12px; }

    .brand-card--lexus  {
        padding-right: 12px;
        padding-bottom: 6px;
    }

    .brand-card--toyota {
        padding-left: 12px;
        padding-top: 6px;
    }

    .brand-card--lexus  .brand-card-img-wrap {
        top: 12px; bottom: 6px; left: 12px; right: 12px;
    }

    .brand-card--toyota .brand-card-img-wrap {
        top: 6px; bottom: 12px; left: 12px; right: 12px;
    }

    .brand-card-body { padding: 20px; }

    .brand-card-logo-img { height: 24px; }

    .brand-card-brand-sub { font-size: 10px; margin-bottom: 14px; }

    .cta-section { padding: 28px 16px; }

    .footer { padding: 24px 16px 20px; }

    .footer-logo img { height: 26px; }

    .footer-info p { font-size: 10px; }

    .main { padding-top: 54px; }
}

/* 접근성: 모션 감소 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
    }
}