/* ==========================================================================
   INTOWN — contact.css (contact.html 전용)
   site.css 토큰만 사용합니다. 오류 표시용 적색(--c-error)만 이 페이지에서 정의합니다.
   ========================================================================== */

/* 공통 보조 글자색 대비 보정 — 모든 페이지 CSS 에 같은 값(site.css 토큰이 같은 값으로 바뀌면 지워도 됩니다).
   --fog-3 #6c7585 → #7a8394 (night 위 5.3:1 · night-3 위 4.8:1) · --ink-3 #676e7b → #5f6673 (paper 위 5.2:1 · paper-2 위 4.7:1)
   헤더 · 공통 푸터 · 모바일 메뉴 · 눈썹 라벨 · 서브내비가 모든 페이지에서 같은 회색으로 보입니다. */
:root { --fog-3: #7a8394; --ink-3: #5f6673; }

:root {
  --c-error: #b3261e;
  --c-error-soft: rgba(179, 38, 30, 0.1);
  /* 입력 칸 · 선택 카드 경계선: 흰 카드(#fff) 위 약 3.2:1, 입력 바탕(#f8f8f5) 위 약 3.0:1 (WCAG 1.4.11) */
  --field-line: rgba(10, 13, 19, 0.46);
  --field-line-hover: rgba(10, 13, 19, 0.62);
}

/* 앵커 이동 대상(섹션 · 양식)은 포커스만 받고 테두리를 그리지 않습니다. 다음 Tab이 그 안의 첫 요소로 이어집니다. */
main > section:focus, main > section:focus-visible { outline: none; border-radius: 0; }
.iform:focus, .iform:focus-visible { outline: none; }

/* ---------- 복사 버튼 (공통) ----------------------------------------------- */
.copy-btn {
  display: inline-flex; align-items: center; gap: 8px; justify-self: start; flex: none;
  height: 34px; padding: 0 14px 0 12px; border-radius: 999px; white-space: nowrap;
  font-size: 0.8125rem; font-weight: 600; letter-spacing: -0.01em; color: var(--fg-2);
  box-shadow: inset 0 0 0 1px var(--line-c2);
  transition: color 0.25s, box-shadow 0.25s, background-color 0.25s;
}
.copy-btn:hover { color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg-3); }
.copy-btn svg { width: 14px; height: 14px; flex: none; }
.copy-btn .i-check { display: none; }
.copy-btn.is-copied { color: var(--fg); background: color-mix(in oklab, var(--accent-2) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent-2) 55%, transparent); }
.copy-btn.is-copied .i-copy { display: none; }
.copy-btn.is-copied .i-check { display: block; color: var(--accent-2); }
[data-theme="light"] .copy-btn.is-copied .i-check { color: #3f7d22; }
.copy-btn.is-failed { color: var(--c-error); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c-error) 45%, transparent); }
html:not(.js) .copy-btn { display: none; } /* 스크립트가 없으면 동작하지 않으므로 숨김 */

/* ---------- Hero ----------------------------------------------------------- */
/* 위 여백은 다른 하위 페이지 히어로(site.css .page-hero)와 같게 두어 머리글 위치를 맞추고,
   아래 여백만 줄여 양식이 첫 화면에 걸리게 합니다(1440×900에서 양식 카드 머리가 첫 화면 안). */
.contact-hero { padding-bottom: clamp(40px, 4vw, 64px); }
.contact-hero .page-hero__inner { gap: clamp(20px, 2.2vw, 32px); }
/* 가운뎃점으로 묶은 짝(MES · SRM, 예지보전 · 머신비전)은 HTML에서 줄바꿈하지 않게 묶었습니다 — 가운뎃점이 줄 끝에 남지 않습니다 */
.contact-hero .page-hero__lead { max-width: 30em; text-wrap: balance; }
/* 넓은 화면에서는 두 번째 문장(연락 방법)을 새 줄에서 시작합니다. 좁은 화면에서는 이어서 흐릅니다. */
@media (max-width: 640px) { .contact-hero .br-wide { display: none; } }
.contact-hero .page-hero__glow { inset: auto -14% -55% auto; }

/* 연락 방법 — 기본(태블릿): 2 × 2
   라벨은 히어로 오른쪽 아래의 빛 번짐 · 격자선 위에 놓여도 4.5:1 이상이 되도록 한 단계 밝게(가장 밝은 배경 표본 기준 4.9:1) */
.contact-hero .reach { --fg-3: #8790a0; }
.reach { list-style: none; margin: clamp(8px, 1.2vw, 16px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line-c2); }
.reach__item { position: relative; min-width: 0; display: grid; align-content: start; justify-items: start; gap: 10px; padding: 22px clamp(12px, 1.6vw, 24px) 24px 0; }
.reach__item:nth-child(even) { padding-left: clamp(16px, 1.8vw, 28px); border-left: 1px solid var(--line-c); }
.reach__item:nth-child(n + 3) { border-top: 1px solid var(--line-c); }
.reach__item::before { content: ""; position: absolute; left: 0; top: -1px; width: 0; height: 1px; background: var(--grad); transition: width 0.7s var(--ease-out); }
.reach__item:hover::before, .reach__item:focus-within::before { width: 100%; }
.reach__k { font-size: 0.8125rem; font-weight: 500; line-height: 1.45; letter-spacing: -0.005em; color: var(--fg-3); }
.reach__v {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  font-size: clamp(1.1875rem, 0.92rem + 0.62vw, 1.5625rem); font-weight: 620; letter-spacing: -0.03em; line-height: 1.25; color: var(--fg);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; padding-bottom: 4px;
  transition: background-size 0.5s var(--ease-out); white-space: nowrap;
}
.reach__v:hover { background-size: 100% 1px; }
.reach__v svg { width: 16px; height: 16px; flex: none; color: var(--fg-2); transition: transform 0.5s var(--ease-out); }
.reach__v:hover svg { transform: translateY(3px); }
.reach__note { font-size: 0.875rem; line-height: 1.55; color: var(--fg-2); }

/* 넓은 화면: 제목 · 설명(8칸) + 연락 방법 목록(오른쪽 4칸). 첫 화면의 빈 오른쪽을 채우고 히어로 높이를 줄입니다. */
@media (min-width: 1024px) {
  .contact-hero .page-hero__inner { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); }
  .contact-hero .page-hero__inner > * { grid-column: 1 / span 8; }
  .contact-hero .reach { grid-column: 9 / span 4; grid-row: 1 / span 3; align-self: end; grid-template-columns: minmax(0, 1fr); margin: 0; }
  .contact-hero .reach__item,
  .contact-hero .reach__item:nth-child(even) {
    grid-template-columns: 4.75rem minmax(0, 1fr); column-gap: 16px; row-gap: 6px; align-items: baseline;
    padding: clamp(12px, 1.1vw, 16px) 0 clamp(13px, 1.18vw, 17px); border-left: 0;
  }
  .contact-hero .reach__item + .reach__item { border-top: 1px solid var(--line-c); }
  .contact-hero .reach__k { grid-column: 1; grid-row: 1; }
  .contact-hero .reach__v, .contact-hero .reach__note, .contact-hero .reach .copy-btn { grid-column: 2; }
  .contact-hero .reach__v { font-size: clamp(1.25rem, 0.96rem + 0.4vw, 1.4375rem); }
  .contact-hero .reach .copy-btn { margin: 4px 0 2px; }
}
@media (max-width: 640px) {
  .contact-hero .page-hero__title { font-size: clamp(1.875rem, 8.4vw, 2.5rem); }
  .reach { grid-template-columns: minmax(0, 1fr); }
  .reach__item,
  .reach__item:nth-child(even) { grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; row-gap: 6px; align-items: center; padding: 14px 0 16px; border-left: 0; }
  .reach__item + .reach__item { border-top: 1px solid var(--line-c); }
  .reach__k { grid-column: 1 / -1; }
  .reach__v { font-size: 1.25rem; }
  .reach__note { grid-column: 1 / -1; font-size: 0.8125rem; }
  .reach__item--map .reach__note { display: none; }
  .reach .copy-btn { grid-column: 2; grid-row: 2; }
}
@media (max-width: 359px) {
  .reach__item { grid-template-columns: minmax(0, 1fr); }
  .reach .copy-btn { grid-column: 1; grid-row: auto; }
}

/* ---------- Inquiry: 안내(왼쪽 위) · 분야별 안내(왼쪽 아래) · 양식(오른쪽) ----------- */
/* DOM 순서는 안내 → 양식 → 분야별 안내(탭 순서와 좁은 화면의 표시 순서가 같습니다). */
.inquiry { padding-top: clamp(64px, 6vw, 104px); }
.inquiry__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 1fr; column-gap: clamp(16px, 2vw, 32px); row-gap: clamp(48px, 5vw, 72px); align-items: start; }
.inquiry__intro { grid-column: 1 / span 4; grid-row: 1; display: grid; gap: 24px; }
.inquiry__intro .t-lead { max-width: 30em; }
.inquiry__main { grid-column: 6 / span 7; grid-row: 1 / span 2; min-width: 0; }

.guide { grid-column: 1 / span 4; grid-row: 2; display: grid; gap: 6px; }
.guide__list { list-style: none; margin: 0; padding: 0; }
.guide__link { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 20px; row-gap: 4px; padding: 20px 0; border-bottom: 1px solid var(--line-c); }
.guide__title { font-size: 1.0625rem; font-weight: 650; letter-spacing: -0.022em; line-height: 1.4; }
.guide__desc { grid-column: 1; font-size: 0.875rem; line-height: 1.6; color: var(--fg-2); }
.guide__arrow { grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-c2); transition: background-color 0.35s, color 0.35s, box-shadow 0.35s; }
.guide__arrow svg { width: 15px; height: 15px; transition: transform 0.5s var(--ease-out); }
.guide__link:hover .guide__arrow, .guide__link:focus-visible .guide__arrow { background: var(--fg); color: var(--bg); box-shadow: none; }
.guide__link:hover .guide__arrow svg { transform: translateX(2px); }
.guide__link:hover .guide__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* ---------- 양식 카드 ------------------------------------------------------ */
.iform {
  position: relative; background: var(--card); border: 1px solid var(--line-c); border-radius: var(--radius-l);
  padding: clamp(24px, 3.4vw, 52px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 50px 90px -60px rgba(10, 20, 40, 0.35), 0 10px 24px -18px rgba(10, 20, 40, 0.14);
}
.iform::before { content: ""; position: absolute; top: -1px; left: clamp(24px, 3.4vw, 52px); width: 72px; height: 2px; border-radius: 2px; background: var(--grad); }
.iform__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; padding-bottom: 22px; margin-bottom: 30px; border-bottom: 1px solid var(--line-c); }
.iform__title { font-size: var(--fs-h4); font-weight: 650; letter-spacing: -0.026em; }
.iform__req { font-size: 0.8125rem; color: var(--fg-3); }
.iform__star { color: var(--c-blue); font-weight: 700; }

.iform__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; }
.field { display: grid; align-content: start; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field--full { grid-column: 1 / -1; }
.field__label { display: flex; align-items: baseline; gap: 6px; padding: 0; font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.016em; color: var(--fg); line-height: 1.4; }
.field__req { color: var(--c-blue); font-weight: 700; }
legend.field__label { margin-bottom: 10px; }

.field__input {
  width: 100%; height: 54px; padding: 0 16px; margin: 0;
  border-radius: 12px; border: 1px solid var(--field-line); background: #f8f8f5; color: var(--fg);
  font: inherit; font-size: 1rem; line-height: 1.4; letter-spacing: -0.01em;
  -webkit-appearance: none; appearance: none;
  transition: border-color 0.2s, box-shadow 0.25s, background-color 0.25s;
}
.field__input::placeholder { color: var(--fg-3); opacity: 1; }
.field__input:hover { border-color: var(--field-line-hover); }
.field__input:focus, .field__input:focus-visible { outline: none; border-color: var(--ink); background: var(--white); box-shadow: 0 0 0 4px rgba(42, 72, 168, 0.14); }
.field__input--area { height: auto; min-height: 208px; padding: 14px 16px; line-height: 1.7; resize: vertical; }
.field__input:-webkit-autofill { -webkit-text-fill-color: var(--ink); box-shadow: 0 0 0 100px #f3f6ec inset; }

.field.is-invalid .field__input { border-color: var(--c-error); background: var(--white); box-shadow: 0 0 0 4px var(--c-error-soft); }
.field.is-valid .field__input:not(:focus) { border-color: rgba(10, 13, 19, 0.56); }
.field__error { display: flex; align-items: flex-start; gap: 7px; margin: 0; font-size: 0.8125rem; line-height: 1.5; font-weight: 550; color: var(--c-error); }
.field__error svg { width: 15px; height: 15px; flex: none; margin-top: 1.5px; }
.field__foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 16px; }
.field__count { margin-left: auto; padding-top: 1px; font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.04em; color: var(--fg-3); white-space: nowrap; }
.field__count.is-near { color: var(--fg); }

/* 문의 분야 — 라디오 카드 (같은 줄의 카드는 높이를 맞춥니다) */
.topic__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.topic__opt { position: relative; display: grid; cursor: pointer; }
.topic__opt input { position: absolute; top: 14px; left: 14px; width: 1px; height: 1px; margin: 0; opacity: 0; }
.topic__card {
  position: relative; display: grid; align-content: start; gap: 3px; height: 100%; padding: 15px 16px 16px 18px;
  border-radius: 12px; border: 1px solid var(--field-line); background: #f8f8f5; color: var(--fg);
  transition: background-color 0.3s, border-color 0.3s, color 0.3s, box-shadow 0.3s, transform 0.4s var(--ease-out);
}
.topic__title { padding-right: 30px; font-size: 0.9375rem; font-weight: 650; letter-spacing: -0.018em; line-height: 1.35; }
.topic__sub { font-size: 0.8125rem; line-height: 1.45; color: var(--fg-3); transition: color 0.3s; }
/* 선택 표시는 제목 줄 오른쪽 — 보조 설명은 카드 폭 전체를 씁니다 */
.topic__check { position: absolute; top: 15px; right: 14px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--field-line); color: var(--ink); transition: background 0.3s, box-shadow 0.3s; }
.topic__check svg { width: 11px; height: 11px; opacity: 0; transform: scale(0.6); transition: opacity 0.25s, transform 0.4s var(--ease-out); }
.topic__opt:hover .topic__card { border-color: var(--field-line-hover); background: var(--white); }
.topic__opt input:checked + .topic__card { background: var(--ink); border-color: var(--ink); color: var(--fog); box-shadow: 0 16px 30px -22px rgba(10, 20, 40, 0.7); }
.topic__opt input:checked + .topic__card .topic__sub { color: var(--fog-2); }
.topic__opt input:checked + .topic__card .topic__check { background: var(--grad-brand-hi); box-shadow: none; }
.topic__opt input:checked + .topic__card .topic__check svg { opacity: 1; transform: none; }
.topic__opt input:focus-visible + .topic__card { outline: 2px solid var(--c-blue); outline-offset: 3px; }
.topic__opt:active .topic__card { transform: scale(0.985); }

/* 개인정보 수집 · 이용 동의 */
.consents { display: grid; gap: 10px; margin-top: 30px; }
.consent { display: grid; gap: 10px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line-c); background: #f8f8f5; }
.consent__label { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.consent__box {
  flex: none; position: relative; width: 22px; height: 22px; margin: 0; border-radius: 6px; border: 1.5px solid var(--field-line); background: var(--white);
  -webkit-appearance: none; appearance: none; cursor: pointer; transition: background 0.2s, border-color 0.2s;
}
.consent__box::after { content: ""; position: absolute; left: 6.5px; top: 2.5px; width: 5px; height: 10px; border: solid var(--white); border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0.6); opacity: 0; transition: opacity 0.2s, transform 0.3s var(--ease-out); }
.consent__box:checked { background: var(--ink); border-color: var(--ink); }
.consent__box:checked::after { opacity: 1; transform: rotate(45deg); }
.consent__box:focus-visible { outline: 2px solid var(--c-blue); outline-offset: 3px; }
.consent__text { font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.016em; line-height: 1.45; padding-top: 1px; }
.consent__details { padding-left: 34px; }
.consent__details summary { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; color: var(--fg-2); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; list-style: none; }
.consent__details summary::-webkit-details-marker { display: none; }
.consent__details summary::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); transition: transform 0.3s; }
.consent__details[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.consent__dl { display: grid; gap: 6px; margin: 12px 0 0; font-size: 0.8125rem; line-height: 1.6; }
.consent__dl > div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 12px; }
.consent__lead { margin-top: 12px; font-size: 0.8125rem; line-height: 1.6; color: var(--fg-2); }
.consent__to { margin-top: 14px; font-size: 0.8125rem; font-weight: 700; letter-spacing: -0.01em; color: var(--fg); }
.consent__to + .consent__dl { margin-top: 6px; }
.consent__dl dt { font-weight: 650; color: var(--fg); }
.consent__dl dd { margin: 0; color: var(--fg-2); }
.consent__note { margin-top: 10px; font-size: 0.8125rem; line-height: 1.6; color: var(--fg-3); }
.consent .field__error { padding-left: 34px; }
.consent.is-invalid { border-color: var(--c-error); background: var(--white); box-shadow: 0 0 0 4px var(--c-error-soft); }
.consent.is-invalid .consent__box { border-color: var(--c-error); }
/* 자동 등록 방지(hCaptcha) — 동의 전에는 안내 문구만, 동의 후 위젯(303×78, 좁으면 164×144)을 불러옵니다 */
.captcha { margin-top: 26px; }
.captcha__box { display: grid; justify-items: start; gap: 10px; min-height: 78px; align-content: center; }
.captcha__box:focus { outline: none; }
.captcha__widget:empty { display: none; }
/* 화면 폭이 좁아졌는데 이미 체크를 마친 위젯은 다시 그리지 않으므로, 가로 스크롤 대신 오른쪽 로고 부분만 가립니다 */
.captcha__widget { max-width: 100%; overflow: hidden; }
.captcha__widget iframe { display: block; }
.captcha__status { font-size: 0.8125rem; line-height: 1.6; color: var(--fg-3); }
.captcha__status:empty { display: none; }
.captcha__box[data-state="idle"], .captcha__box[data-state="loading"] { padding: 16px 18px; border-radius: 12px; border: 1px dashed var(--field-line); background: #f8f8f5; }
.captcha__box[data-state="loading"] .captcha__status::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; border-radius: 50%; border: 1.5px solid currentColor; border-right-color: transparent; animation: iform-spin 0.8s linear infinite; }
.captcha__box[data-state="error"] { padding: 14px 16px; border-radius: 12px; border: 1px solid color-mix(in oklab, var(--c-error) 28%, transparent); background: color-mix(in oklab, var(--c-error) 4%, var(--white)); }
.captcha__box[data-state="error"] .captcha__status { color: var(--fg-2); }
.captcha.is-invalid .captcha__widget iframe { border-radius: 6px; box-shadow: 0 0 0 2px var(--c-error), 0 0 0 6px var(--c-error-soft); }
.iform__noscript { margin-top: 22px; padding: 14px 16px; border-radius: 12px; background: color-mix(in oklab, var(--c-error) 6%, var(--white)); color: var(--c-error); font-size: 0.875rem; line-height: 1.55; font-weight: 550; }

/* 스팸 함정(봇만 채우는 칸) — 화면 · 보조기기 모두에서 숨깁니다 */
.iform__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* 제출 영역 */
.iform__foot { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px 28px; margin-top: 34px; padding-top: 30px; border-top: 1px solid var(--line-c); }
.iform__submit { height: 58px; padding-left: 28px; font-size: 1.0625rem; }
.iform__submit .btn__icon { width: 40px; height: 40px; }
.iform__submit[aria-busy="true"] { cursor: progress; opacity: 0.78; }
.iform__submit[aria-busy="true"] .btn__icon svg { display: none; }
.iform__submit[aria-busy="true"] .btn__icon::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: iform-spin 0.8s linear infinite; }
@keyframes iform-spin { to { transform: rotate(360deg); } }
.iform__note { font-size: 0.8125rem; line-height: 1.65; color: var(--fg-2); max-width: 46ch; }

.iform__alert:empty { display: block; height: 0; margin: 0; padding: 0; border: 0; overflow: hidden; }
.iform__alert:not(:empty) { display: flex; align-items: flex-start; gap: 10px; margin-top: 22px; padding: 14px 16px; border-radius: 12px; border: 1px solid color-mix(in oklab, var(--c-error) 30%, transparent); background: color-mix(in oklab, var(--c-error) 6%, var(--white)); color: var(--c-error); font-size: 0.875rem; font-weight: 550; line-height: 1.55; }
.iform__alert svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
/* 전송 제한 안내(재전송 대기 · 중복) — 오류가 아니라 안내 톤 */
.iform__alert.is-info:not(:empty) { border-color: color-mix(in oklab, var(--c-blue) 26%, transparent); background: color-mix(in oklab, var(--c-blue) 5%, var(--white)); color: var(--c-blue); }

.iform__done { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; margin-top: 22px; padding: 22px; border-radius: 16px; border: 1px solid color-mix(in oklab, var(--c-green) 40%, transparent); background: color-mix(in oklab, var(--c-green) 8%, var(--white)); }
.iform__done[hidden] { display: none; }
.iform__done:focus { outline: none; }
.iform__done-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-brand); color: var(--white); }
.iform__done-icon svg { width: 16px; height: 16px; }
.iform__done-body { display: grid; gap: 8px; }
.iform__done-title { font-size: 1.0625rem; font-weight: 650; letter-spacing: -0.022em; line-height: 1.4; }
.iform__done-text { font-size: 0.875rem; line-height: 1.65; color: var(--fg-2); }
.iform__done-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
/* 전송 실패 안내 — 경고 톤(완료 안내의 초록과 구분) */
.iform__done--fail { border-color: color-mix(in oklab, var(--c-error) 28%, transparent); background: color-mix(in oklab, var(--c-error) 4%, var(--white)); }
.iform__done--fail .iform__done-icon { background: var(--c-error); }
.iform__done.is-flash { animation: done-in 0.7s var(--ease-out); }
@keyframes done-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.iform__direct { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 22px; padding: 14px 14px 14px 18px; border-radius: 14px; background: color-mix(in oklab, var(--fg) 3.5%, transparent); }
.iform__direct p { font-size: 0.875rem; line-height: 1.55; color: var(--fg-2); }
.iform__direct strong { color: var(--fg); font-weight: 650; }
/* 완료 안내가 열리면 같은 안내(직접 보내기 · 주소 복사)는 완료 안내 안에서만 보여 줍니다 */
.iform__done:not([hidden]) ~ .iform__direct { display: none; }

@media (max-width: 1180px) {
  .inquiry__intro, .guide { grid-column: 1 / span 4; }
  .inquiry__main { grid-column: 5 / span 8; }
}
@media (max-width: 960px) {
  .inquiry__grid { grid-template-rows: none; row-gap: 48px; }
  .inquiry__intro, .inquiry__main, .guide { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 640px) {
  .iform { border-radius: 18px; padding: 24px 20px 20px; }
  .iform::before { left: 20px; }
  .iform__grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .topic__grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .topic__card { padding: 13px 14px 14px 16px; }
  .topic__check { top: 13px; right: 12px; }
  .iform__foot { grid-template-columns: minmax(0, 1fr); }
  .iform__submit { width: 100%; justify-content: space-between; }
  .iform__done { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .iform__direct { padding: 14px; }
  .consent { padding: 14px; }
  .consent__details, .consent .field__error { padding-left: 0; }
  .consent__dl > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (max-width: 400px) {
  .topic__title { font-size: 0.875rem; }
  .topic__sub { font-size: 0.75rem; }
}

/* ---------- Offices -------------------------------------------------------- */
/* 섹션 끝은 컨테이너 폭의 가는 선으로 닫고, 바로 아래 공통 푸터와 구분합니다. */
.offices { overflow: hidden; padding-bottom: 0; }
.offices > .container { padding-bottom: clamp(64px, 6vw, 96px); border-bottom: 1px solid var(--line-c); }
.offices .section-head__title { grid-column: 1 / span 6; }
.offices .section-head__desc { grid-column: 7 / span 6; }
.offices__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); row-gap: 40px; align-items: center; }
.offices__list { grid-column: 7 / span 6; grid-row: 1; display: grid; }
.kmap { grid-column: 1 / span 5; grid-row: 1; margin: 0; display: grid; gap: 18px; justify-items: center; }

/* 개략 위치도 (도트 매트릭스 · 울릉도 · 독도 포함) */
.kmap__stage { position: relative; width: min(100%, 540px); aspect-ratio: 1; }
.kmap__svg { position: relative; z-index: 1; width: 100%; height: 100%; overflow: visible; }
.kmap__land { fill: none; stroke: rgba(164, 172, 186, 0.34); stroke-width: 3.3; stroke-linecap: round; }
.kmap__arc { fill: none; stroke: url(#kmap-arc-grad); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 1 5; opacity: 0.95; }
/* 움직임은 사무소 카드 · 핀을 가리킬 때만 한 번 — 가리킨 곳으로 빛이 이동합니다 */
.kmap__comet { fill: none; stroke: #eaf7e0; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 5 95; stroke-dashoffset: 100; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .kmap[data-active="seoul"] .kmap__comet { animation: kmap-comet 1.8s var(--ease-in-out) 1 forwards; }
  .kmap[data-active="busan"] .kmap__comet { animation: kmap-comet-rev 1.8s var(--ease-in-out) 1 forwards; }
  .kmap[data-active="busan"] [data-pin="busan"] .kmap__dot::after,
  .kmap[data-active="seoul"] [data-pin="seoul"] .kmap__dot::after { animation: kmap-ping 1.2s var(--ease-out) 2; }
}
@keyframes kmap-comet { 0% { stroke-dashoffset: 100; opacity: 0; } 14% { opacity: 0.95; } 82% { opacity: 0.95; } 100% { stroke-dashoffset: 5; opacity: 0; } }
@keyframes kmap-comet-rev { 0% { stroke-dashoffset: 5; opacity: 0; } 14% { opacity: 0.95; } 82% { opacity: 0.95; } 100% { stroke-dashoffset: 100; opacity: 0; } }

.kmap__pins { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.kmap__pin { --pc: var(--c-blue-hi); --glow: 280px; position: absolute; left: var(--x); top: var(--y); width: 0; height: 0; transition: opacity 0.45s var(--ease-out); }
.kmap__pin--hq { --pc: var(--c-green-hi); }
.kmap__pin::before { content: ""; position: absolute; left: calc(var(--glow) / -2); top: calc(var(--glow) / -2); width: var(--glow); height: var(--glow); border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, color-mix(in oklab, var(--pc) 15%, transparent), color-mix(in oklab, var(--pc) 5%, transparent) 55%, transparent); z-index: -1; }
.kmap__dot, .kmap__label { pointer-events: auto; }
.kmap__dot { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--pc); box-shadow: 0 0 0 4px color-mix(in oklab, var(--pc) 22%, transparent), 0 0 26px color-mix(in oklab, var(--pc) 75%, transparent); transition: transform 0.5s var(--ease-out); }
.kmap__dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid color-mix(in oklab, var(--pc) 70%, transparent); opacity: 0; transition: opacity 0.3s; }
/* 가리킨 핀: 두 번 퍼진 뒤(모션 허용 시) 고정 고리로 남습니다 */
.kmap[data-active="busan"] [data-pin="busan"] .kmap__dot::after,
.kmap[data-active="seoul"] [data-pin="seoul"] .kmap__dot::after { opacity: 1; }
@keyframes kmap-ping { 0% { transform: scale(0.55); opacity: 1; } 100% { transform: scale(2.5); opacity: 0; } }
.kmap__label { position: absolute; top: -15px; left: 20px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding: 5px 11px 5px 9px; border-radius: 999px; background: rgba(9, 13, 21, 0.86); border: 1px solid var(--line-d-strong); font-size: 0.8125rem; font-weight: 600; letter-spacing: -0.01em; color: var(--fog); box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.8); transition: border-color 0.4s, background-color 0.4s; }
.kmap__label em { font-style: normal; font-family: var(--font-mono); font-size: 0.625rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pc); }
.kmap[data-active="busan"] .kmap__pin[data-pin="seoul"],
.kmap[data-active="seoul"] .kmap__pin[data-pin="busan"] { opacity: 0.3; }
.kmap[data-active="busan"] .kmap__pin[data-pin="busan"] .kmap__dot,
.kmap[data-active="seoul"] .kmap__pin[data-pin="seoul"] .kmap__dot { transform: scale(1.3); }
.kmap[data-active="busan"] .kmap__pin[data-pin="busan"] .kmap__label,
.kmap[data-active="seoul"] .kmap__pin[data-pin="seoul"] .kmap__label { border-color: color-mix(in oklab, var(--pc) 60%, transparent); }
.kmap__cap { font-size: 0.75rem; line-height: 1.5; color: var(--fg-3); text-align: center; text-wrap: balance; }

/* 사무소 */
.office { --pc: var(--c-blue-hi); position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: clamp(28px, 3vw, 40px) 0; border-top: 1px solid var(--line-c); }
.office--hq { --pc: var(--c-green-hi); }
.office::before { content: ""; position: absolute; left: 0; top: -1px; width: 0; height: 1px; background: var(--pc); transition: width 0.8s var(--ease-out); }
.office.is-active::before { width: 100%; }
.office__kicker { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase; color: var(--fg-3); }
.office__kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pc); box-shadow: 0 0 12px color-mix(in oklab, var(--pc) 70%, transparent); }
.office__name { font-size: var(--fs-h3); line-height: 1.2; letter-spacing: -0.035em; font-weight: 650; }
.office__addr { font-style: normal; display: grid; gap: 2px; }
.office__line { font-size: clamp(1.125rem, 0.98rem + 0.45vw, 1.375rem); font-weight: 560; letter-spacing: -0.022em; line-height: 1.45; color: var(--fg); }
.office__sub { font-size: var(--fs-sm); color: var(--fg-2); line-height: 1.55; }
.office__postal { display: inline-flex; align-items: baseline; gap: 10px; font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.04em; color: var(--fg); white-space: nowrap; }
.office__postal span { font-family: var(--font-sans); font-size: 0.8125rem; letter-spacing: -0.01em; color: var(--fg-3); }
.office__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.office__maps-label { margin-right: 6px; font-size: 0.8125rem; font-weight: 500; letter-spacing: -0.005em; color: var(--fg-3); }
.map-link { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px 0 15px; border-radius: 999px; white-space: nowrap; font-size: 0.8125rem; font-weight: 600; letter-spacing: -0.01em; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-c2); transition: background-color 0.3s, color 0.3s, box-shadow 0.3s; }
.map-link svg { width: 12px; height: 12px; opacity: 0.7; transition: transform 0.45s var(--ease-out); }
.map-link:hover { background: var(--fg); color: var(--bg); box-shadow: none; }
.map-link:hover svg { transform: translate(1px, -1px); opacity: 1; }
.office__actions .copy-btn { margin-left: auto; }

/* 위치도 칸이 좁을 때(약 410px 미만)는 본사 이름표를 핀 왼쪽 아래로 옮겨 칸 밖으로 나가지 않게 합니다 */
@media (max-width: 1180px) {
  .kmap__pin--hq .kmap__label { left: auto; right: 18px; top: 12px; }
}
@media (max-width: 1080px) {
  .offices .section-head__title { grid-column: 1 / span 5; }
  .offices .section-head__desc, .offices__list { grid-column: 6 / span 7; }
  .kmap { grid-column: 1 / span 5; }
}
/* 좁은 화면: 주소 · 지도 링크가 먼저, 장식용 위치도는 그 아래 */
@media (max-width: 960px) {
  .offices .section-head__title, .offices .section-head__desc { grid-column: 1 / -1; }
  .kmap, .offices__list { grid-column: 1 / -1; grid-row: auto; }
  .kmap__stage { width: min(100%, 420px); }
}
@media (max-width: 640px) {
  .kmap__pin { --glow: 190px; }
  .kmap__label { font-size: 0.75rem; padding: 4px 9px 4px 8px; }
  .kmap__pin--hq .kmap__label { left: auto; right: 16px; top: 12px; }
  .kmap__pin:not(.kmap__pin--hq) .kmap__label { left: 16px; }
  .office__actions .copy-btn { margin-left: 0; }
  .office__maps-label { flex-basis: 100%; margin: 0 0 2px; }
}

/* 웹메일로 보내기 (메일 앱이 없을 때) */
.iform__webmail { margin-top: 10px; }
a.copy-btn { text-decoration: none; }
.copy-btn--mail { background: var(--fg); color: var(--bg); box-shadow: none; }
.copy-btn--mail:hover { color: var(--bg); box-shadow: none; }
.copy-btn--mail:hover { opacity: 0.88; }
