/* ===== 색 (확정: 차콜 + 로고 레드) ===== */
:root {
  --nav: #222627;          /* 메뉴 띠 · 진한 면 */
  --nav-ink: #f4f3f1;
  --accent: #c8161d;       /* 로고 레드 · 핵심 버튼 */
  --accent-press: #a3121a;
  --hero: #6b7687;         /* 첫 화면 배경(사진 배경과 이어지는 회색) */
  --hero-ink: #fff;
  --hero-ink-soft: #fff;
  --hero-shade: rgb(14 16 19 / .82);
  --tint: #f4f4f3;         /* 옅은 구간 배경 */
  --ink: #1d2021;
  --ink-soft: #565b5f;
  --line: #e2e3e3;
}

/* ===== 기본 ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: #fff;
  font-size: 17px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.wrap { width: min(1200px, 100% - 48px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: #fff; padding: 8px 14px; }

/* ===== 버튼 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 52px; padding: 0 26px;
  font-weight: 700; font-size: 16px; letter-spacing: -.01em;
  border: 1px solid transparent; border-radius: 4px;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-press); }
.btn--ghost { border-color: currentColor; color: var(--hero-ink); }
.btn--ghost:hover { background: var(--hero-ink); color: var(--hero); }
.btn--dark { background: var(--nav); color: var(--nav-ink); }
.btn--dark:hover { background: var(--accent); color: #fff; }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--tint); }
.btn--lg { min-height: 60px; padding: 0 32px; font-size: 17px; }

/* ===== 상단 ===== */
.site-header { position: sticky; top: -88px; z-index: 30; background: #fff; } /* 로고 띠는 스크롤되고 메뉴 띠만 고정 */
.brand-bar__inner { position: relative; display: flex; align-items: center; justify-content: center; height: 88px; }
.brand img { height: 56px; width: auto; }
.brand-bar__link {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 13px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px;
  transition: color .2s, border-color .2s;
}
.brand-bar__link:hover { color: var(--accent); border-color: var(--accent); }
.menu-toggle { display: none; }

.gnb { background: var(--nav); transition: background-color .3s ease; }
.gnb__list { display: flex; justify-content: center; gap: clamp(24px, 5vw, 72px); }
.gnb__list a {
  position: relative; display: block; padding: 17px 0;
  color: var(--nav-ink); font-size: 15px; font-weight: 600; opacity: .82;
  transition: opacity .2s;
}
.gnb__list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--accent); transform: scaleX(0); transition: transform .25s ease;
}
.gnb__list a:hover, .gnb__list a[aria-current="true"] { opacity: 1; }
.gnb__list a:hover::after, .gnb__list a[aria-current="true"]::after { transform: scaleX(1); }

/* ===== 첫 화면 ===== */
.hero {
  position: relative; overflow: hidden;
  background: var(--nav);
  color: var(--hero-ink);
  --hero-h: min(720px, calc(100svh - 141px));
  min-height: var(--hero-h);
  display: flex;
  transition: background-color .3s ease;
}
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero::before { /* 사진 위에 테마 색을 덮어 글씨가 또렷하게 (왼쪽 진하게 → 오른쪽 옅게) */
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, var(--hero-shade) 0%, var(--hero-shade) 30%, transparent 95%),
    linear-gradient(0deg, rgb(0 0 0 / .35), rgb(0 0 0 / .1) 40%);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 2; display: flex; align-items: center; }
.hero__copy { padding-block: 72px 96px; position: relative; z-index: 2; }
.hero h1 {
  font-size: clamp(36px, 4.6vw, 60px); font-weight: 800; line-height: 1.22; letter-spacing: -.035em;
  text-wrap: balance;
}
.hero__lead { margin-top: 22px; max-width: 27.5em; text-wrap: pretty; font-size: clamp(16px, 1.35vw, 19px); line-height: 1.75; color: var(--hero-ink-soft); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.hero__scroll {
  z-index: 2;
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  color: var(--hero-ink); opacity: .8; font-size: 28px; animation: nudge 2.4s ease-in-out 1s 3;
}
/* 밝은 사진용: 흰 막을 덮고 글씨를 어둡게 */
.hero--light { --hero-ink: #1d2021; --hero-ink-soft: #3d4246; background: #f4f4f3; }
.hero--light::before { background: linear-gradient(90deg, rgb(255 255 255 / .95) 0%, rgb(255 255 255 / .88) 36%, rgb(255 255 255 / 0) 86%); }
.hero--light .btn--ghost:hover { color: #fff; }
@keyframes nudge { 50% { transform: translate(-50%, 6px); } }

/* ===== 공통 구간 ===== */
.section { padding-block: clamp(72px, 9vw, 120px); }
.section--tint { background: var(--tint); }
.section__head { text-align: center; margin-bottom: clamp(40px, 5vw, 64px); }
.section__head h2, .ceo h2, .column h2, .location h2 {
  font-size: clamp(28px, 3vw, 38px); font-weight: 800; letter-spacing: -.03em; line-height: 1.3;
}
.section__head p { margin-top: 10px; color: var(--ink-soft); font-size: 18px; }

/* 핵심 분야 */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pillar {
  padding: 40px 34px 44px; background: #fff;
  border: 1px solid var(--line); border-top: 3px solid var(--nav); border-radius: 4px;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.pillar:hover { border-top-color: var(--accent); box-shadow: 0 14px 34px -18px rgb(20 20 20 / .28); transform: translateY(-3px); }
.pillar__no { display: block; color: var(--accent); font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.pillar h3 { margin-top: 14px; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.pillar p { margin-top: 12px; color: var(--ink-soft); font-size: 16px; }

/* 업무분야 */
.services { display: grid; grid-template-columns: 1fr 1fr; column-gap: 56px; border-top: 2px solid var(--ink); }
.services li {
  display: flex; flex-direction: column; gap: 2px;
  padding: 24px 4px; border-bottom: 1px solid var(--line);
  transition: padding-left .25s ease;
}
.services li:hover { padding-left: 14px; }
.services li:hover strong { color: var(--accent); }
.services strong { font-size: 19px; font-weight: 700; letter-spacing: -.02em; transition: color .2s; }
.services span { color: var(--ink-soft); font-size: 15px; }

/* 대표 세무사 */
.ceo { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.ceo__photo { background: var(--hero); border-radius: 4px; overflow: hidden; aspect-ratio: 4 / 5; }
.ceo__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.ceo h2 { font-weight: 600; }
.ceo h2 strong { font-weight: 800; }
.ceo__lead { margin-top: 20px; font-size: clamp(19px, 1.8vw, 23px); line-height: 1.6; letter-spacing: -.02em; }
.placeholder {
  margin-top: 36px; padding: 26px 28px;
  border: 1px dashed #b9bcbf; border-radius: 4px; color: var(--ink-soft);
  display: flex; flex-direction: column; gap: 4px;
}
.placeholder strong { color: var(--ink); }

/* 칼럼 */
.column { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.column p { margin-top: 8px; color: var(--ink-soft); }

/* 상담 띠 */
.cta { background: var(--nav); color: var(--nav-ink); padding-block: clamp(64px, 8vw, 96px); transition: background-color .3s ease; }
.cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.cta h2 { font-size: clamp(26px, 2.8vw, 36px); font-weight: 800; line-height: 1.35; letter-spacing: -.03em; }
.cta p { margin-top: 12px; opacity: .78; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* 오시는 길 */
.location { display: grid; grid-template-columns: 5fr 7fr; grid-template-areas: "title map" "info map" "link map"; grid-template-rows: auto auto 1fr; column-gap: clamp(32px, 5vw, 72px); row-gap: 28px; }
.location h2 { grid-area: title; }
.location__info { grid-area: info; }
.location__link { grid-area: link; align-self: start; justify-self: start; }
.location__map { grid-area: map; min-height: 380px; border-radius: 4px; overflow: hidden; background: var(--tint); border: 1px solid var(--line); }
.location__map iframe { display: block; width: 100%; height: 100%; min-height: 380px; border: 0; }
.location__info { display: grid; gap: 10px; }
.location__info div { display: grid; grid-template-columns: 6em 1fr; }
.location__info dt { color: var(--ink-soft); font-weight: 600; }
.location__info a:hover { color: var(--accent); }
.location__info dd, .quick__tel b, .hero__actions .btn--ghost, .site-footer { font-variant-numeric: tabular-nums; }
html { scrollbar-color: #b7babd #f1f1f1; }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #b7babd; border-radius: 6px; border: 3px solid #f1f1f1; }
::-webkit-scrollbar-thumb:hover { background: var(--nav); }

/* 하단 */
.site-footer { background: #17191a; color: #a5a9ac; padding-block: 48px 120px; font-size: 14px; line-height: 1.9; }
.site-footer img { height: 44px; width: auto; margin-bottom: 18px; }
.site-footer span { margin-right: 18px; display: inline-block; }
.site-footer small { display: block; margin-top: 14px; color: #8d9295; }

/* ===== 빠른 메뉴 (오른쪽 세로 패널) ===== */
.quick {
  position: fixed; right: 20px; top: 50%; transform: translateY(-46%); z-index: 40;
  width: 136px; background: #fff; border-radius: 20px; border: 1px solid #e3e4e5;
  box-shadow: 0 16px 44px -16px rgb(20 24 28 / .3);
  display: flex; flex-direction: column; padding: 6px 0 0; overflow: hidden;
}
.quick a {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 20px 10px; text-align: center; font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--ink);
  transition: color .2s;
}
.quick a + a { border-top: 1px solid var(--line); }
/* 흑백 선 아이콘 */
.qi { width: 38px; height: 38px; fill: none; stroke: var(--nav); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease, stroke .2s ease; }
.quick a:hover .qi { stroke: var(--accent); }
.quick a:hover { color: var(--accent); }
.quick a:hover .qi { transform: translateY(-2px); }
/* 전화문의: 맨 아래 진한 회색 칸 */
.quick__tel { background: #4a4f53; color: #fff !important; }
.quick__tel:hover { background: #393d40; }
.quick__tel .qi, .quick__tel:hover .qi { stroke: #fff; }
.quick__tel small { display: block; font-size: 14px; font-weight: 600; color: #fff; opacity: .92; }
.quick__tel b { display: block; margin-top: 2px; font-size: 16px; font-weight: 800; letter-spacing: -.03em; color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums; }


.d-only { display: inline; }

/* ===== 태블릿 ===== */
@media (max-width: 1100px) {
  .location { grid-template-columns: 1fr; grid-template-areas: "title" "info" "map" "link"; grid-template-rows: none; }
}

/* ===== 1520px 이하: 오른쪽 빠른 메뉴가 본문을 가리지 않도록 하단 고정 바로 전환 ===== */
@media (max-width: 1520px) {
  .quick {
    top: auto; bottom: 0; left: 0; right: 0; transform: none;
    width: auto; border-radius: 0; flex-direction: row; padding: 0;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -6px 20px -10px rgb(0 0 0 / .3);
  }
  .quick a { flex: 1; flex-direction: row; justify-content: center; gap: 6px; padding: 16px 4px; font-size: 14px; font-weight: 700; color: var(--ink); }
  .quick a + a { border-top: 0; border-left: 1px solid var(--line); }
  .quick .qi { width: 22px; height: 22px; stroke-width: 1.9; }
  .quick__tel { background: #4a4f53; color: #fff !important; border-radius: 0; }
  .quick__tel b, .quick__tel small { color: #fff; }
  .quick__tel b { font-size: 14px; margin-top: 0; }
  .quick__tel:hover { background: #393d40; }
  .quick__tel:hover b { color: #fff; }
  .quick .d-only { display: none; }
  .site-footer { padding-bottom: 130px; }
  .quick a span br { display: none; }
}

/* ===== 모바일 ===== */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 32px); }
  html { scroll-padding-top: 64px; }

  .brand-bar__inner { height: 64px; justify-content: flex-start; }
  .brand img { height: 46px; }
  .brand-bar__link { display: none; }
  .menu-toggle {
    display: grid; place-items: center; position: absolute; right: -8px; top: 8px;
    width: 48px; height: 48px; border: 0; background: none; color: var(--ink); font-size: 24px; cursor: pointer;
  }
  .gnb { display: none; }
  .gnb.is-open { display: block; }
  .gnb__list { flex-direction: column; gap: 0; }
  .gnb__list a { padding: 15px 0; border-bottom: 1px solid rgb(255 255 255 / .1); }
  .gnb__list a::after { display: none; }

  .hero { min-height: min(620px, calc(100svh - 120px)); }
  .hero::before { background: linear-gradient(0deg, var(--hero-shade) 0%, var(--hero-shade) 45%, rgb(0 0 0 / .25) 100%); }
  .hero__inner { align-items: flex-end; }
  .hero--light::before { background: linear-gradient(0deg, rgb(255 255 255 / .96) 0%, rgb(255 255 255 / .9) 48%, rgb(255 255 255 / .25) 100%); }
  .hero__copy { padding-block: 120px 40px; }
  .hero__lead { margin-top: 16px; }
  .hero__actions { margin-top: 28px; }
  .hero__actions .btn { flex: 1 1 auto; }
  .hero__scroll { display: none; }

  .pillars { grid-template-columns: 1fr; gap: 14px; }
  .pillar { padding: 30px 24px 32px; }
  .services { grid-template-columns: 1fr; }
  .ceo { grid-template-columns: 1fr; gap: 32px; }
  .ceo__photo { max-width: 420px; }
  .cta__actions, .cta__actions .btn { width: 100%; }
  .column .btn, .location .btn { width: 100%; }
  .location__info div { grid-template-columns: 5em 1fr; }

  .site-header { top: 0; }
  .quick .d-only-flex { display: none; }
  .d-only { display: none; }

  /* 색 시안 버튼: 모바일에서는 상단 오른쪽 작은 칩으로 */
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 화면에는 안 보이고 화면낭독기에만 읽히는 제목 */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
