/* (주)해강엔지니어링 — 색은 로고(남색·주황)에서, 주황은 계획홍수위선에만 */
:root {
  --ink: #172B55;        /* 로고 남색을 어둡게 — 글자·문의 띠 */
  --brand: #23479B;      /* 로고 남색 */
  --flood: #E45B10;      /* 로고 주황을 조금 어둡게 — 흰·연회색·남색 배경 모두 대비 3:1 이상(WCAG 1.4.11) */
  --paper: #FFFFFF;
  --tint: #F1F4F8;       /* 기술연구 띠 */
  --line: #CBD3DE;       /* 도면 선·구분선 */
  --text: #1E2633;
  --muted: #4E5A6B;
  --water: #DCE6F3;
  --wrap: 1080px;
  --gutter: clamp(20px, 5vw, 40px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--flood); outline-offset: 3px; border-radius: 4px; }
h1, h2 { color: var(--ink); text-wrap: balance; }
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: calc(var(--gutter) + env(safe-area-inset-left));
  padding-right: calc(var(--gutter) + env(safe-area-inset-right));
}

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--paper); padding: 8px 12px; }

/* 머리띠 */
.top { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 17px; white-space: nowrap; }
.nav { display: flex; gap: 4px; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--text); text-decoration: none; font-weight: 500; white-space: nowrap; border-radius: 6px;
}
.nav a:hover { color: var(--brand); background: var(--tint); }

/* 첫 화면 */
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(32px, 6vw, 72px); border-bottom: 1px solid var(--line); }
.hero h1 { margin: 0 0 20px; font-size: clamp(18px, 3.12vw, 30px); line-height: 1.25; font-weight: 800; letter-spacing: -0.025em; }
.lead { margin: 0 0 28px; max-width: 34em; color: var(--muted); font-size: clamp(17px, 1.8vw, 19px); }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  background: var(--brand); color: #fff; font-weight: 700; text-decoration: none; border-radius: 6px;
}
.btn:hover { background: var(--ink); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--tint); }
.link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* 개조식 목록 — 주황 짧은 선 머리표(로고 주황) */
.ticks { margin: 0 0 12px; padding: 0; list-style: none; max-width: 36em; }
.ticks li { position: relative; padding-left: 18px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .82em; width: 9px; height: 2px; background: var(--flood); }
.lead.ticks { margin-bottom: 28px; }

/* 기술연구 — 홍수량 산정 절차(실제 순서라 번호를 쓴다) */
.sub { margin: 0 0 16px; color: var(--muted); }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps > li { counter-increment: s; border-top: 1px solid var(--line); }
.steps > li:last-child { border-bottom: 1px solid var(--line); }
.steps summary {
  display: grid; grid-template-columns: 2.4em 1fr 24px; column-gap: 8px; align-items: baseline;
  padding: 14px 0; min-height: 44px; cursor: pointer; list-style: none;
}
.steps summary::-webkit-details-marker { display: none; }
.steps summary::before {
  content: counter(s, decimal-leading-zero); grid-row: span 2;
  color: var(--brand); font-weight: 800; font-variant-numeric: tabular-nums;
}
/* 펼침 표시: + / − */
.steps summary::after { content: "+"; grid-column: 3; grid-row: 1; color: var(--brand); font-weight: 700; font-size: 20px; line-height: 1; justify-self: end; }
.steps details[open] > summary::after { content: "−"; }
.steps summary:hover b { color: var(--brand); }
.steps summary:focus-visible { outline: 3px solid var(--flood); outline-offset: 2px; border-radius: 4px; }
.steps b { grid-column: 2; color: var(--ink); font-size: 18px; }
.steps summary > span { grid-column: 2; color: var(--muted); }
@media (min-width: 720px) {
  .steps summary { grid-template-columns: 2.4em 11em 1fr 24px; }
  .steps summary::before { grid-row: auto; }
  .steps summary > span { grid-column: 3; }
  .steps summary::after { grid-column: 4; }
}
.apps { padding: 4px 0 20px; display: grid; gap: 28px; }
@media (min-width: 720px) { .apps { padding-left: calc(2.4em + 8px); } }
.app h3 { margin: 0 0 6px; color: var(--ink); font-size: 17px; font-weight: 700; }
.app .ticks { margin-bottom: 12px; color: var(--muted); }
.app figure { margin: 0; }
.app img { width: 100%; border: 1px solid var(--line); border-radius: 6px; background: #fff; }

/* 띠 */
.band { padding: clamp(48px, 8vw, 88px) 0; }
.band--tint { background: var(--tint); }
.band--ink { background: var(--ink); color: #E8EDF5; }
.band--ink h2 { color: #fff; }
.band--ink a { color: #fff; }
.band--ink a.btn--light { color: var(--ink); }
.band__in { display: grid; gap: 20px 48px; }
.band h2 { margin: 0; font-size: clamp(24px, 3vw, 30px); line-height: 1.3; font-weight: 800; letter-spacing: -0.02em; }
.prose p { margin: 0 0 12px; max-width: 36em; }
.prose p:last-child { margin-bottom: 0; }

.services { margin: 0; }
.services > div { padding: 20px 0; border-top: 1px solid var(--line); }
.services > div:last-child { border-bottom: 1px solid var(--line); }
.services dt { color: var(--ink); font-weight: 700; font-size: 19px; margin-bottom: 4px; }
.services dd { margin: 0; color: var(--muted); max-width: 36em; }
.services .ticks { margin: 0; }
.prose .item-title { margin: 0 0 4px; color: var(--ink); font-weight: 700; font-size: 19px; }

.mail { font-weight: 600; }
.contact-line .k { display: inline-block; min-width: 4em; color: var(--muted); }
/* 개조식 목록 아래 한 줄 비우고 시작, 모든 줄 같은 간격 */
address { margin-top: 1.9em; font-style: normal; line-height: 1.9; }
address .k { display: inline-block; min-width: 4.5em; color: #AFC0DA; }
/* 줄 높이를 키우지 않는 인라인 링크 — 위아래 여백으로 누르는 영역 확보(24px 이상) */
.maplink { margin-left: 8px; padding: 6px 0; font-weight: 600; }
address .copy { color: #AFC0DA; font-size: 15px; }

/* 문의 띠가 페이지 끝 — 회사 정보·저작권 포함(바닥 띠 통합) */
#contact { padding-bottom: calc(clamp(48px, 8vw, 88px) + env(safe-area-inset-bottom)); }
/* 휴대폰: 메뉴는 한 줄, 넘치면 그 안에서만 가로로 */
@media (max-width: 719px) {
  html { scroll-padding-top: 116px; }  /* 휴대폰 머리띠는 로고+메뉴 두 줄이라 더 높다 */
  .top__in { flex-direction: column; align-items: stretch; gap: 0; padding-top: 8px; }
  .brand img { width: 32px; height: auto; }
  .nav { overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 0 10px; }
  .nav a:first-child { padding-left: 0; }
}

@media (min-width: 900px) {
  .band__in { grid-template-columns: 220px 1fr; }
}
