/* =========================================================
   에이앰(주) 홍보 홈페이지 공통 스타일
   수행계획서: 반응형 / HTML5·CSS3·JS / Chrome·Edge·Safari·모바일
   ========================================================= */

:root {
    --primary: #0097B2;
    --secondary: #26C09C;
    --accent: #FFD15B;
    --bg: #FFFFFF;
    --text-dark: #1A3A4A;
    --text-muted: #7A8C94;
    --soft-blue: #F0F9FA;
    --line: #E3EDEF;
    --pick-color: #FF6B6B;
    --font-main: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg);
    font-family: var(--font-main);
    color: var(--text-dark);
    overflow-x: hidden;
    line-height: 1.6;
}

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

a { color: inherit; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- 내비게이션 ---------- */

.nav-container {
    position: absolute;
    top: 0;
    width: 100%;
    padding: 30px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.nav-container.is-solid {
    position: relative;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 20px 60px;
}

.logo {
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.05em;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-mark {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.nav-links {
    display: flex;
    gap: 30px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: stretch;
}

.nav-links a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
    white-space: nowrap;
    display: inline-block;
}

.nav-links > .nav-item > a {
    display: flex;
    align-items: center;
    padding: 14px 0;
}

.nav-links a:hover,
.nav-links a[aria-current="page"],
.nav-item.is-active > a {
    color: var(--primary);
}

.nav-links a[aria-current="page"],
.nav-item.is-active > a { font-weight: 700; }

/* ---------- 드롭다운 하위 메뉴 ---------- */

.sub-toggle { display: none; }

.sub-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: -14px;
    min-width: 186px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px;
    margin: 0;
    box-shadow: 0 18px 44px rgba(26, 58, 74, 0.14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    z-index: 200;
}

/* 부모에서 메뉴로 마우스가 이동할 때 hover가 끊기지 않도록 하는 여백 */
.sub-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}

.nav-item.has-sub:hover > .sub-menu,
.nav-item.has-sub:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li { display: block; }

.sub-menu a {
    display: block;
    padding: 10px 14px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

.sub-menu a:hover,
.sub-menu a[aria-current="page"] {
    background: var(--soft-blue);
    color: var(--primary);
}

/* 하위 메뉴가 있는 항목 표시 */
.nav-item.has-sub > a::after {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-left: 7px;
    vertical-align: 2px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.55;
}

.btn-lang {
    background: none;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-dark);
    cursor: pointer;
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: 10px;
    width: 42px;
    height: 42px;
    cursor: pointer;
    position: relative;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    content: '';
    position: absolute;
    left: 50%;
    width: 18px;
    height: 2px;
    background: var(--text-dark);
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-toggle span { top: 50%; margin-top: -1px; }
.nav-toggle span::before { top: -6px; left: 0; transform: none; }
.nav-toggle span::after { top: 6px; left: 0; transform: none; }

/* ---------- 버튼 ---------- */

.btn-cta {
    background: var(--text-dark);
    color: white;
    padding: 14px 32px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
}

.btn-cta:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.btn-ghost {
    background: none;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 13px 30px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-ghost:hover { background: var(--soft-blue); }

/* ---------- 서브페이지 헤더 ---------- */

.page-hero {
    background: linear-gradient(160deg, var(--soft-blue), #fff 70%);
    padding: 80px 0 70px;
    border-bottom: 1px solid var(--line);
    text-align: center;
}

.page-hero .eyebrow {
    display: inline-block;
    padding: 4px 12px;
    background: #fff;
    color: var(--primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 18px;
    border: 1px solid rgba(0, 151, 178, 0.15);
}

.page-hero h1 {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.25;
    margin-bottom: 16px;
}

.page-hero p {
    color: var(--text-muted);
    font-size: 17px;
    max-width: 720px;
    margin: 0 auto;
}

/* ---------- 섹션 ---------- */

.section { padding: 80px 0; }
.section.tinted { background: var(--soft-blue); }

.section-head { margin-bottom: 44px; max-width: 760px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.section-head h2 {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.3;
    margin-bottom: 14px;
}

.section-head p { color: var(--text-muted); font-size: 16px; }

.label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 12px;
    display: block;
}

/* ---------- 카드 그리드 ---------- */

.grid { display: grid; gap: 24px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 30px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 40px rgba(26, 58, 74, 0.08);
}

.card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.card p { color: var(--text-muted); font-size: 14px; }

.card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--soft-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    font-size: 22px;
}

.card ul { list-style: none; margin-top: 14px; }

.card ul li {
    color: var(--text-muted);
    font-size: 14px;
    padding-left: 14px;
    position: relative;
    margin-bottom: 6px;
}

.card ul li::before {
    content: '';
    position: absolute;
    left: 0; top: 10px;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--secondary);
}

/* ---------- 2단 소개 블록 ---------- */

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.split .visual {
    aspect-ratio: 4 / 3;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    text-align: center;
    padding: 24px;
    line-height: 1.5;
}

.split .visual.soft {
    background: var(--soft-blue);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    border: 1px dashed rgba(0, 151, 178, 0.3);
}

.split .visual.product-photo {
    padding: 0;
    overflow: hidden;
    background: #f4f5f4;
    border: 1px solid var(--line);
}

.split .visual.product-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 24px;
    border-radius: 18px;
    border: 1px dashed rgba(0, 151, 178, 0.28);
    background: linear-gradient(145deg, #f3f8f9, #e4eef0);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    color: #71868f;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-align: center;
}

/* ---------- 연혁 ---------- */

.timeline { list-style: none; position: relative; padding-left: 28px; }

.timeline::before {
    content: '';
    position: absolute;
    left: 6px; top: 6px; bottom: 6px;
    width: 2px;
    background: linear-gradient(var(--primary), var(--secondary));
}

.timeline li { position: relative; padding-bottom: 26px; }

.timeline li::before {
    content: '';
    position: absolute;
    left: -28px; top: 6px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--primary);
}

.timeline .when {
    font-size: 13px;
    font-weight: 800;
    color: var(--primary);
    display: block;
}

.timeline .what { font-size: 15px; font-weight: 600; }

/* ---------- 프로세스 (업사이클링 흐름) ---------- */

.process {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    counter-reset: step;
}

.process li {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 26px 22px;
    position: relative;
    counter-increment: step;
}

.process li::before {
    content: 'STEP ' counter(step);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--secondary);
    display: block;
    margin-bottom: 10px;
}

.process h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.process p { font-size: 13px; color: var(--text-muted); }

/* ---------- 사양 테이블 ---------- */

.table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); }

table.spec {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 520px;
    background: #fff;
}

table.spec th,
table.spec td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

table.spec thead th {
    background: var(--soft-blue);
    font-weight: 700;
    font-size: 13px;
    color: var(--text-dark);
}

table.spec tbody th {
    width: 200px;
    font-weight: 700;
    color: var(--text-dark);
    background: #FAFDFD;
}

table.spec td { color: var(--text-muted); }
table.spec tr:last-child th,
table.spec tr:last-child td { border-bottom: none; }

/* ---------- 자료 목록 ---------- */

.doc-list { list-style: none; display: grid; gap: 12px; }

.doc-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px 22px;
}

.doc-list .doc-name { font-weight: 600; font-size: 15px; }
.doc-list .doc-meta { font-size: 13px; color: var(--text-muted); }

.tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--soft-blue);
    color: var(--primary);
    white-space: nowrap;
}

.tag.pending { background: #FFF6E0; color: #9A7B1E; }

/* ---------- 영상 자리 ---------- */

.video-frame {
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    background: var(--soft-blue);
    border: 1px dashed rgba(0, 151, 178, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

.video-frame .play {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    color: var(--primary);
    font-size: 18px;
}

.shorts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.shorts-frame {
    aspect-ratio: 9 / 16;
    border-radius: 16px;
    background: linear-gradient(160deg, var(--soft-blue), #fff);
    border: 1px dashed rgba(0, 151, 178, 0.3);
    display: flex;
    align-items: flex-end;
    padding: 18px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

/* ---------- 문의 폼 ---------- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-row { display: flex; flex-direction: column; gap: 8px; }
.form-row.full { grid-column: 1 / -1; }

.form-row label { font-size: 13px; font-weight: 700; }
.form-row .req { color: #D64545; }

.form-row input,
.form-row select,
.form-row textarea {
    font-family: inherit;
    font-size: 15px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--text-dark);
    width: 100%;
}

.form-row textarea { min-height: 160px; resize: vertical; }

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
    border-color: transparent;
}

.form-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.form-consent input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; }

.form-note {
    background: var(--soft-blue);
    border-radius: 14px;
    padding: 18px 20px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ---------- CTA 밴드 ---------- */

.cta-band {
    background: linear-gradient(120deg, var(--primary), var(--secondary));
    color: #fff;
    border-radius: 24px;
    padding: 56px 48px;
    text-align: center;
}

.cta-band h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 12px; }
.cta-band p { opacity: 0.92; margin-bottom: 26px; }

.cta-band .btn-cta { background: #fff; color: var(--text-dark); }
.cta-band .btn-cta:hover { background: var(--text-dark); color: #fff; }

/* ---------- 법적 문서 ---------- */

.legal { max-width: 860px; }
.legal h2 { font-size: 20px; font-weight: 800; margin: 36px 0 12px; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--text-muted); font-size: 15px; margin-bottom: 10px; }
.legal ul, .legal ol { padding-left: 20px; }

/* ---------- 푸터 ---------- */

.site-footer {
    background: var(--text-dark);
    color: rgba(255,255,255,0.72);
    padding: 60px 0 40px;
    font-size: 14px;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 40px;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.site-footer .logo { color: #fff; margin-bottom: 16px; }

.footer-desc { font-size: 14px; line-height: 1.8; }

.footer-col h4 {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
}

.footer-col ul { list-style: none; display: grid; gap: 9px; }
.footer-col a { text-decoration: none; transition: color 0.3s; }
.footer-col a:hover { color: #fff; }

.footer-bottom {
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: rgba(255,255,255,0.55);
}

.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: #fff; }

/* ---------- 반응형 ---------- */

@media (max-width: 1024px) {
    .nav-container,
    .nav-container.is-solid { padding: 16px 20px; }

    .nav-toggle { display: block; order: 3; }

    .nav-links {
        display: none;
        order: 4;
        width: 100%;
        flex-direction: column;
        gap: 4px;
        padding-top: 14px;
        margin-top: 14px;
        border-top: 1px solid var(--line);
    }

    .nav-links.is-open { display: flex; }
    .nav-links a { padding: 12px 2px; font-size: 15px; }

    /* 모바일에서는 마우스 올리기가 없으므로 아코디언으로 펼친다 */
    .nav-item { display: flex; flex-wrap: wrap; align-items: center; }
    .nav-item > a { flex: 1; }
    .nav-item.has-sub > a::after { display: none; }

    .sub-toggle {
        display: block;
        width: 40px;
        height: 40px;
        background: none;
        border: none;
        cursor: pointer;
        position: relative;
        flex-shrink: 0;
    }

    .sub-toggle::after {
        content: '';
        position: absolute;
        top: 50%; left: 50%;
        width: 7px; height: 7px;
        margin: -5px 0 0 -4px;
        border-right: 2px solid var(--text-muted);
        border-bottom: 2px solid var(--text-muted);
        transform: rotate(45deg);
        transition: transform 0.25s;
    }

    .sub-toggle[aria-expanded="true"]::after {
        transform: rotate(-135deg);
        margin-top: -2px;
    }

    .sub-menu {
        position: static;
        width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
        display: none;
        border: none;
        box-shadow: none;
        background: var(--soft-blue);
        border-radius: 12px;
        padding: 6px;
        margin: 4px 0 10px;
    }

    .sub-menu::before { display: none; }
    .nav-item.is-open > .sub-menu { display: block; }
    .nav-item.has-sub:hover > .sub-menu { display: none; }
    .nav-item.has-sub.is-open:hover > .sub-menu { display: block; }
    .sub-menu a { padding: 11px 12px; font-size: 14px; }

    .nav-container { flex-wrap: wrap; background: #fff; }
    .nav-container:not(.is-solid) { position: relative; }

    .btn-lang { order: 2; }

    .grid.cols-2,
    .grid.cols-3,
    .grid.cols-4 { grid-template-columns: 1fr; }

    .split { grid-template-columns: 1fr; gap: 30px; }
    .process { grid-template-columns: repeat(2, 1fr); }
    .shorts-grid { grid-template-columns: repeat(2, 1fr); }
    .form-grid { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr; gap: 28px; }

    .page-hero { padding: 50px 0 44px; }
    .page-hero h1 { font-size: 28px; }
    .section { padding: 54px 0; }
    .section-head h2 { font-size: 24px; }
    .cta-band { padding: 40px 24px; }
    .cta-band h2 { font-size: 22px; }
    table.spec tbody th { width: 140px; }
}

@media (max-width: 560px) {
    .process { grid-template-columns: 1fr; }
    .shorts-grid { grid-template-columns: 1fr 1fr; }
    .doc-list li { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
