/* ==========================================================
   HashLabs — 기본 스타일
   브랜드 컬러: 네이비 #031A48 (신뢰·전문성) / 그레이 #6B7486 (기술·균형)
   ========================================================== */
:root {
    --navy: #031A48;
    --navy-900: #020F2C;
    --navy-700: #0B2A66;
    --gray: #6B7486;
    --gray-300: #C9CED8;
    --gray-100: #F3F5F8;
    --line: #E3E7EE;
    --text: #1A2233;
    --text-sub: #5B6475;
    --white: #fff;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(3, 26, 72, .08);
    --header-h: 76px;
    --container: 1200px;
    --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--white);
    line-height: 1.65;
    word-break: keep-all;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
code { background: var(--gray-100); padding: .1em .4em; border-radius: 4px; font-size: .9em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 860px; }
.center { text-align: center; }
.center .btn, .center img { margin-left: auto; margin-right: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 50px; padding: 0 26px; border-radius: 10px;
    font-weight: 600; font-size: 16px; font-family: inherit;
    border: 1.5px solid transparent; cursor: pointer;
    transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-700); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--gray-100); }
.btn-outline-light { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-outline-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    height: var(--header-h);
    background: rgba(255,255,255,.96);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(3,26,72,.05); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand img { width: 230px; height: auto; }

.site-nav { display: flex; align-items: center; gap: 32px; }
.site-nav > ul { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.site-nav > ul > li { position: relative; }
.site-nav > ul > li > a {
    display: block; padding: 10px 16px; font-weight: 600; font-size: 16px; color: var(--text);
    border-radius: 8px;
}
.site-nav > ul > li.active > a, .site-nav > ul > li > a:hover { color: var(--navy); background: var(--gray-100); }
.site-nav .sub {
    position: absolute; top: calc(100% + 6px); left: 50%; transform: translate(-50%, 6px);
    min-width: 150px; list-style: none; margin: 0; padding: 8px;
    background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transition: .18s;
}
.site-nav .sub::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.site-nav .has-sub:hover .sub, .site-nav .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.site-nav .sub a { display: block; padding: 8px 12px; border-radius: 8px; font-size: 15px; color: var(--text-sub); white-space: nowrap; }
.site-nav .sub a:hover, .site-nav .sub .active a { background: var(--gray-100); color: var(--navy); }

.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; padding: 10px; }
.nav-toggle span:not(.sr-only) { display: block; height: 2px; background: var(--navy); margin: 5px 0; transition: .2s; }
.nav-open .nav-toggle span:nth-child(2) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(3) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hexagon background pattern ---------- */
.hex-bg {
    position: absolute; inset: 0; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 1 L55 16.5 L55 47.5 L28 63 L1 47.5 L1 16.5 Z M28 63 L28 97' fill='none' stroke='%23ffffff' stroke-opacity='.06' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 56px 97px;
    mask-image: radial-gradient(ellipse at 75% 40%, #000 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 75% 40%, #000 0%, transparent 70%);
}

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    background: radial-gradient(1200px 600px at 80% 20%, var(--navy-700) 0%, var(--navy) 45%, var(--navy-900) 100%);
    color: #fff;
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 40px; min-height: 620px; padding-top: 80px; padding-bottom: 80px; }
.hero .eyebrow { color: var(--gray-300); }
.hero h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 800; }
.hero h1 span { color: #AEB8CC; }
.hero .lead { font-size: clamp(16px, 1.6vw, 19px); color: rgba(255,255,255,.78); margin-bottom: 36px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-visual { display: flex; justify-content: center; }
.hero-visual img { width: min(380px, 80%); filter: drop-shadow(0 30px 60px rgba(0,0,0,.35)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-12px); } }
@media (prefers-reduced-motion: reduce) { .hero-visual img { animation: none; } html { scroll-behavior: auto; } }

.eyebrow { font-size: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gray); margin-bottom: 12px; }

/* ---------- Sub page hero ---------- */
.page-hero {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-900) 100%);
    color: #fff; padding: 88px 0 80px;
}
.page-hero .container { position: relative; }
.page-hero .eyebrow { color: var(--gray-300); }
.page-hero h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; }
.page-hero .lead { color: rgba(255,255,255,.75); margin: 0; font-size: 17px; }

/* ---------- Sections ---------- */
.section { padding: 100px 0; }
.section-muted { background: var(--gray-100); }
.section-head { text-align: center; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(26px, 3.2vw, 38px); font-weight: 800; color: var(--navy); }
.section-desc { color: var(--text-sub); margin: 0; }

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

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px 32px; transition: transform .25s, box-shadow .25s, border-color .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card h3 { font-size: 21px; color: var(--navy); }
.card p { color: var(--text-sub); margin: 0; }
.card-en { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gray); margin-bottom: 4px; }

.num { display: inline-block; font-size: 15px; font-weight: 800; color: var(--gray); margin-bottom: 18px; letter-spacing: .05em; }
.num::after { content: ""; display: block; width: 24px; height: 2px; background: var(--navy); margin-top: 8px; }

/* ---------- Icon badges (CSS mask icons) ---------- */
.icon-badge { width: 60px; height: 60px; border-radius: 50%; background: var(--navy); position: relative; margin-bottom: 22px; flex-shrink: 0; }
.icon-badge::after { content: ""; position: absolute; inset: 15px; background: #fff; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.icon-shield { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 2.5 4 5.5v6c0 5 3.4 8.8 8 10 4.6-1.2 8-5 8-10v-6z'/%3E%3C/svg%3E"); }
.icon-chip { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Crect x='6' y='6' width='12' height='12' rx='2'/%3E%3Cpath d='M9 2v4M15 2v4M9 18v4M15 18v4M2 9h4M2 15h4M18 9h4M18 15h4'/%3E%3C/svg%3E"); }
.icon-hex { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M12 2 20.7 7v10L12 22 3.3 17V7z'/%3E%3Cpath d='M12 8.5 15 10.25v3.5L12 15.5 9 13.75v-3.5z' fill='%23000'/%3E%3C/svg%3E"); }
.icon-h { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 3h4v7h6V3h4v18h-4v-7H9v7H5z'/%3E%3C/svg%3E"); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; background: var(--navy); color: #fff; padding: 72px 0; }
.cta-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; }
.cta-band p { margin: 0; color: rgba(255,255,255,.72); }

/* ---------- Placeholder ---------- */
.placeholder-box { border: 2px dashed var(--gray-300); border-radius: var(--radius); padding: 56px 32px; text-align: center; color: var(--text-sub); background: #fff; }
.placeholder-box strong { display: block; color: var(--navy); font-size: 20px; margin-bottom: 8px; }
.placeholder-box p { margin: 0; }

/* ---------- About: brand ---------- */
.brand-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; }
.brand-logo { display: flex; align-items: center; justify-content: center; padding: 56px; }
.brand-logo:hover { transform: none; box-shadow: none; border-color: var(--line); }
.brand-logo img { width: 100%; max-width: 380px; }
.brand-point { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 28px; }
.brand-point .icon-badge { margin: 0; }
.brand-point h3 { font-size: 19px; color: var(--navy); margin-bottom: 4px; }
.brand-point p { color: var(--text-sub); margin: 0; }
.color-row { display: flex; gap: 24px; justify-content: center; margin-top: 48px; flex-wrap: wrap; }
.swatch { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 22px 14px 14px; }
.swatch span { width: 48px; height: 48px; border-radius: 10px; }
.swatch strong { display: block; color: var(--navy); }
.swatch small { color: var(--text-sub); }

/* ---------- History timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 110px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl-year { display: grid; grid-template-columns: 110px 1fr; margin-bottom: 40px; }
.tl-year h2 { font-size: 28px; color: var(--navy); font-weight: 800; }
.tl-year ul { list-style: none; margin: 0; padding: 4px 0 0 40px; }
.tl-year li { position: relative; padding: 6px 0; color: var(--text); }
.tl-year li::before { content: ""; position: absolute; left: -46px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--navy); }
.tl-month { display: inline-block; min-width: 48px; font-weight: 700; color: var(--gray); }

/* ---------- Services page ---------- */
.service-list { display: grid; gap: 20px; }
.service-row { display: grid; grid-template-columns: 80px 1.3fr 1fr; gap: 32px; align-items: start; }
.service-row h2 { font-size: 24px; color: var(--navy); }
.service-row .num { margin: 4px 0 0; font-size: 20px; }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { position: relative; padding: 6px 0 6px 28px; color: var(--text); }
.check-list li::before { content: ""; position: absolute; left: 0; top: 13px; width: 14px; height: 8px; border-left: 2.5px solid var(--navy); border-bottom: 2.5px solid var(--navy); transform: rotate(-45deg); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; align-items: start; }
.contact-info h2 { font-size: 24px; color: var(--navy); }
.contact-info dl { margin: 0; }
.contact-info dt { font-size: 14px; font-weight: 700; color: var(--gray); margin-top: 18px; }
.contact-info dd { margin: 4px 0 0; font-size: 17px; }
.contact-form:hover { transform: none; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.field em { color: #C0392B; font-style: normal; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field select, .field textarea {
    width: 100%; font: inherit; font-size: 16px; color: var(--text);
    padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 160px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(3,26,72,.08); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #C0392B; }
.field small { display: block; color: #C0392B; margin-top: 6px; font-size: 14px; }
.field.check label { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.field.check input { width: 18px; height: 18px; accent-color: var(--navy); }
.hint { font-size: 13px; color: var(--text-sub); margin: 6px 0 0 26px; }
.hp { position: absolute; left: -9999px; }
.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 24px; font-weight: 500; }
.alert-success { background: #E8F3EC; color: #1E6B3A; }
.alert-error { background: #FBEAEA; color: #A12A2A; }

/* ---------- 404 ---------- */
.error-page h1 { color: var(--navy); }
.error-page img { margin-bottom: 24px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,.7); font-size: 14px; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; padding-top: 64px; padding-bottom: 40px; flex-wrap: wrap; }
.footer-brand img { width: 220px; margin-bottom: 14px; }
.footer-brand p { margin: 0; }
.footer-nav { display: flex; gap: 56px; }
.footer-nav strong { display: block; color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer-nav a { display: block; padding: 3px 0; }
.footer-nav a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px; padding-bottom: 40px; }
.company-info { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.copyright { margin: 0; color: rgba(255,255,255,.45); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .service-row { grid-template-columns: 60px 1fr; }
    .service-row .check-list { grid-column: 2; }
}
@media (max-width: 860px) {
    :root { --header-h: 64px; }
    /* backdrop-filter 는 fixed 메뉴의 기준 박스를 바꾸므로 모바일에서는 끈다 */
    .site-header { backdrop-filter: none; background: #fff; }
    .brand img { width: 170px; }
    .nav-toggle { display: block; }
    .site-nav {
        position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: #fff; padding: 16px 24px 32px; overflow-y: auto;
        transform: translateX(100%); transition: transform .25s ease; visibility: hidden;
    }
    .nav-open .site-nav { transform: none; visibility: visible; }
    .site-nav > ul { flex-direction: column; gap: 0; }
    .site-nav > ul > li { border-bottom: 1px solid var(--line); }
    .site-nav > ul > li > a { padding: 16px 4px; font-size: 18px; background: none !important; }
    .site-nav .sub { position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; border: 0; padding: 0 0 12px; }
    .site-nav .has-sub:hover .sub { transform: none; }
    .nav-cta { margin-top: 24px; height: 50px; font-size: 16px; }
    .hero-inner { grid-template-columns: 1fr; min-height: auto; padding-top: 64px; padding-bottom: 72px; text-align: left; }
    .hero-visual { order: -1; }
    .hero-visual img { width: 150px; }
    .br-pc { display: none; }
    .grid-3, .brand-grid, .contact-grid { grid-template-columns: 1fr; }
    .section { padding: 72px 0; }
    .footer-nav { gap: 32px; flex-wrap: wrap; }
}
@media (max-width: 560px) {
    .container { padding: 0 16px; }
    .grid-4, .form-row { grid-template-columns: 1fr; }
    .card { padding: 28px 22px; }
    .service-row { grid-template-columns: 1fr; gap: 12px; }
    .service-row .check-list { grid-column: auto; }
    .timeline::before { left: 70px; }
    .tl-year { grid-template-columns: 70px 1fr; }
    .tl-year h2 { font-size: 22px; }
    .tl-year ul { padding-left: 28px; }
    .tl-year li::before { left: -34px; }
    .brand-logo { padding: 32px; }
}
