/*
 * HERO: 메인 문구·우측 제어 애니메이션·바로가기 버튼 및 아래 기술 키워드 띠
 * 수정 위치: 홈페이지 최상단 슬로건·원래 SVG 위치·버튼·기술 키워드 띠.
 * v0.1.6: v0.1.4의 히어로 배치 관련 수치는 그대로 두고, SVG만 시인성 있게 교체.
 */

/* 1. 히어로 아래의 바로가기 버튼 그룹: 사업분야 보기 / 프로젝트 보기 */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 33px;
}

/* 2. 히어로 아래 기술 키워드 띠: PLC / HMI / SERVO / ROBOT / ELECTRICAL */
.capabilities {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding-block: 25px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.capabilities i {
  font-style: normal;
}

/* 모바일: 기술 키워드 띠가 화면 너비에 맞춰 줄바꿈 */
@media (max-width: 760px) {
  .capabilities {
      justify-content: center;
      flex-wrap: wrap;
      gap: 12px 18px;
      padding-block: 22px;
      font-size: 8px;
  }

  .capabilities i {
      font-size: 9px;
  }
}

/* 3. 기술 키워드 띠의 반투명 배경·테두리·강조색 */
/* 기술 키워드 띠의 테두리·배경·텍스트 색상 */
.capability-strip {
  border-block: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.02);
}

.capabilities {
  color: #b6c9da;
}

.capabilities i {
  color: var(--accent);
}

/* 4. 메인 히어로 전체 높이 및 본문 위아래 공간 */
/* 아래부터는 메인 히어로에만 적용되는 텍스트·배경·SVG 디자인입니다. */
.hero.hero-brand {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(580px, 82svh, 720px); /* PC 히어로의 최소/반응형/최대 높이 */
  padding-top: 150px; /* PC 히어로 위쪽 여백 */
  padding-bottom: 60px;
  gap: 0;
}

/* 메인 히어로 배경의 은은한 네이비/블루 빛. 화면 전체 너비로 확장됨 */
.hero-brand::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  top: 0;
  bottom: 0;
  left: 50%;
  width: var(--hero-background-width, 100vw); /* 화면 전체 너비로 확장; js/hero.js가 변수 관리 */
  transform: translateX(-50%);
  background:
    radial-gradient(
      ellipse at 75% 40%,
      rgba(30, 58, 138, 0.24),
      transparent 65%
    ),
    radial-gradient(
      ellipse at 50% 55%,
      rgba(56, 189, 248, 0.07),
      transparent 60%
    );
}

/* 히어로 문구가 배경 SVG보다 앞에 표시되도록 하는 층 순서 */
.hero-brand .hero-copy {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
}

/* 5. 메인 영문 슬로건 첫 줄: Control the system, */
.hero-brand h1 {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(48px, 6vw, 88px); /* PC 메인 슬로건 글자 크기 */
  font-weight: 700;
  line-height: 1.13;
  letter-spacing: -0.045em;
  word-break: normal;
}

/* 슬로건 두 번째 줄: Code the future. 색상 그라데이션 및 PC 들여쓰기 */
.hero-brand h1 span {
  display: inline-block;
  margin-left: clamp(70px, 7vw, 120px); /* PC 두 번째 줄 들여쓰기; 모바일에서 0으로 변경 */
  background: linear-gradient(100deg, #b5eaff 0%, #38bdf8 85%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

/* 슬로건 아래 한글 번역 문구 */
.hero-brand .hero-translation {
  margin-top: 27px;
  font-size: 19px;
  letter-spacing: -0.6px;
  color: #d2e0ee;
}

/* 슬로건 아래 구분선, 기술 설명, 바로가기 버튼의 가로 배치 */
.hero-brand .hero-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-top: 49px;
  padding-top: 29px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

/* 하단 왼쪽 PLC/HMI/Servo/Robot 기술 설명 영역 */
.hero-brand .hero-details {
  margin: 0;
  min-width: 0;
  flex: 1;
}

/* 기술 목록 한 줄(PLC · HMI · Servo · Robot Control)의 글자 */
.hero-brand .hero-tech {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.5px;
  color: #d4e5f2;
}

/* 기술 설명 두 번째 줄: 제어/시운전/전기공사 안내 */
.hero-brand .hero-description {
  margin-top: 9px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-sub, #a8b8cd);
}

/* 하단 오른쪽의 사업분야 보기·프로젝트 보기 버튼 배치 */
.hero-brand .actions {
  margin: 0;
  flex-shrink: 0;
  gap: 12px;
}

.hero-brand .actions .button {
  white-space: nowrap;
}

/*
 * 6. 히어로 우측 애니메이션 SVG 위치: v0.1.4의 도식도 위치를 그대로 사용
 * 화면 위치: 첫 화면 오른쪽, 슬로건의 뒤쪽 영역
 * 중요: right=0 / top=100px / width=47% / max-width=580px은 원본과 동일.
 * 이 위치를 변경할 때는 아래 .hero-brand .hero-system-graphic만 수정하면 됨.
 * 이전 SVG는 opacity:0.125였으나, 새 애니메이션은 밝은 선이 보이도록 1로 변경.
 */
.hero-brand .hero-system-graphic {
  position: absolute;
  z-index: 0;
  right: 0;        /* 원본: 히어로 본문 오른쪽에 붙임 */
  top: 100px;     /* 원본: 히어로 위쪽에서 100px 내려온 위치 */
  width: 47%;     /* 원본: 본문 가로 폭 대비 도식 너비 */
  max-width: 580px; /* 원본: SVG 최대 너비 */
  height: auto;
  color: #bcecff;
  opacity: 1;     /* 변경: 배경 장식이 아닌 실제 애니메이션으로 선명하게 표시 */
  pointer-events: none;
  user-select: none;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 0 14px rgba(45, 139, 195, 0.055));
}

/*
 * 7. 애니메이션 SVG의 장비별 색상 및 표시 방식
 * - 연결선: .hero-wire-base / .hero-wire-active / .hero-signal-dot
 * - 로봇: .hero-robot-body / .hero-robot-detail / .hero-robot-joint-outer/inner
 * - 제어반과 PLC: .hero-panel-shell / .hero-panel-door / .hero-plc-case / .hero-led
 * - 서보: .hero-servo-case / .hero-servo-rotor
 * - HMI: .hero-hmi-shell / .hero-bulb
 * 애니메이션 시작/종료 시점과 움직임은 js/hero.js에서 관리.
 */
/* 우측 전체 SVG: 크기가 바뀌어도 선 굵기가 균일하게 유지되도록 설정 */
.hero-scene path,
.hero-scene rect,
.hero-scene circle,
.hero-scene line,
.hero-scene ellipse,
.hero-scene polyline,
.hero-scene text {
  vector-effect: non-scaling-stroke;
}

/* SVG 내부 공통 선/면 색상 */
/* 우측 SVG 장식선: 장비 위/아래의 얇은 배경 가이드 라인 */
.hero-scene-background {
  fill: none;
  stroke: rgba(98, 130, 158, 0.34);
  stroke-width: 1.05;
  stroke-linecap: round;
}

/* 우측 SVG 공통 도면선: 로봇 베이스·서보 등 기본 외곽선의 색/두께 */
.hero-machine-outline {
  fill: none;
  stroke: #a7bfd3;
  stroke-width: 2.05;
  stroke-linejoin: round;
  stroke-linecap: round;
}

/* 우측 SVG 공통 내부선: 제어반 내부·모터 홈·HMI 화면 구획 */
.hero-machine-detail {
  fill: none;
  stroke: #7491aa;
  stroke-width: 1.45;
  stroke-linejoin: round;
  stroke-linecap: round;
}

/* 우측 SVG 연결선: 로봇·서보·HMI를 제어반에 이어 주는 경로 */
.hero-wire {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-wire-base {
  stroke: rgba(93, 131, 160, 0.75);
  stroke-width: 1.55;
}

/* 신호 이동 중 밝아지는 파란 연결선: 불투명도는 hero.js에서 제어 */
.hero-wire-active {
  stroke: #38bdf8;
  stroke-width: 1.8;
  opacity: 0;
}

/* 신호점 3개: hero.js가 실제 위치(cx/cy)와 opacity를 갱신함 */
.hero-signal-dot {
  fill: #38bdf8;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 1.05;
  opacity: 0;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.6));
}

/* [HERO / 로봇] 바닥 받침대와 바닥 기준선의 선 색상 */
.hero-ground {
  stroke: rgba(148, 177, 201, 0.88);
}

/* [HERO / 로봇] 끊어진 U자형 받침대를 하나의 닫힌 면으로 변경.
   선의 굵기와 면 색을 본체와 맞추고, 끝점이 바닥 기준선에 이어지게 함. */
.hero-robot-pedestal {
  fill: #152d47;
  stroke: #a9bfd2;
  stroke-width: 1.9;
  stroke-linejoin: round;
}

/* 로봇 팔: 두꺼운 링크 3개의 윤곽선과 내부 면 색상 */
.hero-robot-body {
  fill: rgba(24, 51, 75, 0.22);
  stroke: #b4c8d8;
  stroke-width: 2.05;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.hero-robot-forearm {
  stroke-width: 1.95;
}

.hero-robot-detail {
  fill: none;
  stroke: #7f9cb4;
  stroke-width: 1.32;
  stroke-linecap: round;
}

/* [HERO / ROBOT v0.1.8] 실시간 생성되는 각 관절 외곽선.
   베이스/팔꿈치/세 번째 관절 + 손목 끝의 작은 관절까지 적용. */
.hero-robot-joint-outer {
  fill: #0f2136;
  stroke: #b2c7d9;
  stroke-width: 1.9;
}

.hero-robot-joint-inner {
  fill: #163046;
  stroke: #6f92ac;
  stroke-width: 1.2;
}

/* 제어반·서보·HMI 케이스 공통: 도형 모서리의 선 연결 처리 */
.hero-panel-shell,
.hero-panel-door,
.hero-plc-case,
.hero-servo-case,
.hero-servo-inner,
.hero-servo-side,
.hero-hmi-shell {
  stroke-linejoin: round;
  stroke-linecap: round;
}

/* 중앙 제어반 외함 및 오른쪽 아래 HMI 외함의 면 색과 테두리 */
.hero-panel-shell, .hero-hmi-shell {
  fill: rgba(13, 28, 47, 0.38);
  stroke: #a5c0d4;
  stroke-width: 1.95;
}

/* 제어반 내부 PLC 모듈 배경: 실제 청록 발광은 hero.js에서 켜짐 */
.hero-plc-case {
  fill: rgba(10, 25, 43, 0.26);
  stroke: #95bed1;
  stroke-width: 1.58;
}

.hero-plc-module-lines {
  fill: none;
  stroke: #00a6a6;
  stroke-width: 1.15;
  opacity: 0.8;
}

/* [HERO / 중앙 CONTROL PANEL] 문이 닫히면 내부 PLC가 비치지 않도록 불투명하게 표시.
   v0.1.6의 rgba(..., 0.66)를 제거하여 뒷면 PLC 도형이 새어 나오지 않음.
   문 형상 변화 자체는 js/hero.js의 renderHeroScene()에서 담당. */
.hero-panel-door {
  fill: #14263c;
  stroke: #b7cfdf;
  stroke-width: 1.95;
}

/* HMI 상태 램프·제어반 도어 램프: OFF 기본 색상 */
.hero-bulb {
  fill: #193753;
  stroke: #a7bfd2;
  stroke-width: 1.35;
}

.hero-bulb-secondary {
  opacity: 0.62;
}

/* 우측 상단 서보: 모터 본체 색상 (회전 부품 아님) */
.hero-servo-case {
  fill: rgba(10, 28, 46, 0.18);
}

.hero-servo-inner, .hero-servo-side {
  fill: rgba(14, 33, 53, 0.12);
  stroke: #a7bfd3;
  stroke-width: 1.85;
}

.hero-servo-shaft {
  fill: rgba(16, 34, 54, 0.08);
}

.hero-servo-shaft-inner {
  stroke-width: 1.6;
}

/* [HERO / SERVO v0.1.8] 모터 외형 좌우 반전은 index.html의
   #hero-servo-illustration (translate(1194 0) scale(-1 1))에서 처리함.
   이 CSS에서는 위치/회전을 변경하지 않으며 밝기만 관리함.
   회전축 중심: 원본 좌표(539,152) → 화면상(655,152). */
.hero-servo-rotor {
  opacity: 0.88;
}

/* HMI 내부 표시창 면 색상 */
.hero-hmi-screen {
  fill: rgba(16, 32, 51, 0.18);
}

/* [HERO / PLC v0.1.9] 제어반 문 안쪽, PLC 상단 LED 4개의 색상·테두리.
   실제 원 크기는 index.html의 #hero-plc-leds 원 반지름(r="3.8")에서 수정.
   점등 시 광원 효과는 js/hero.js의 plcLeds.style.filter에서 관리. */
.hero-led {
  fill: #69f1e1;                 /* Siemens 계열 청록 LED 발광색 */
  stroke: #185767;               /* 켜지기 전에도 원형 램프가 보이도록 얇은 테두리 */
  stroke-width: 0.6;
}

/* SVG 장비 아래 ROBOT / CONTROL PANEL / SERVO / HMI 문자 */
.hero-panel-label, .hero-scene-label {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  letter-spacing: 1.8px;
  fill: #8caac4;
}


/* 모바일에서만 노출되는 설명 문구 줄바꿈 */
.hero-mobile-break {
  display: none;
}

/* 7. 큰 데스크톱(1600px 이상): 히어로 위아래 여백 조정 */
@media (min-width: 1600px) {
  .hero.hero-brand {
      padding-top: 160px;
      padding-bottom: 65px;
  }
}

/* 태블릿(1050px 이하): 문구와 버튼 간격 조정 */
@media (max-width: 1050px) {
  .hero.hero-brand {
      padding-top: 140px;
      padding-bottom: 55px;
  }

  .hero-brand .hero-bottom {
      gap: 24px;
  }

  .hero-brand .hero-description {
      max-width: 390px;
  }

  .hero-brand .actions .button {
      padding-inline: 17px;
      gap: 18px;
      font-size: 12px;
  }
}

/* 작은 태블릿(900px 이하): 슬로건 들여쓰기·SVG 크기·하단 세로 배치 */
@media (max-width: 900px) {
  .hero-brand h1 span {
      margin-left: 40px;
  }

  .hero-brand .hero-system-graphic {
      width: 48%;
      top: 115px;
  }

  .hero-brand .hero-bottom {
      align-items: flex-start;
      flex-direction: column;
      gap: 24px;
  }

  .hero-brand .hero-description {
      max-width: none;
  }
}

/* 모바일(760px 이하): 슬로건/버튼의 원래 위치는 유지하고 SVG만 아래로 배치 */
@media (max-width: 760px) {
  .hero-brand h1 span {
      margin-left: 0;
  }

  /*
   * 새 SVG는 투명한 배경 도식과 달리 선명하므로,
   * 원본 모바일 위치(top:90px)에 두면 큰 제목과 겹쳐 가독성이 떨어짐.
   * 모바일에서만 그림을 본문 아래로 내림. 제목/문구/버튼 자체의 위치·스타일은 변경하지 않음.
   */
  .hero.hero-brand {
      display: flex;
      flex-direction: column;
      align-items: stretch;
  }

  .hero-brand .hero-copy {
      order: 1; /* 슬로건과 하단 설명·버튼을 먼저 표시 */
  }

  .hero-brand .hero-system-graphic {
      position: relative; /* 모바일에서만 absolute를 풀어 본문 다음에 표시 */
      top: auto;
      right: auto;
      order: 2;
      align-self: center;
      width: 100%;
      max-width: 580px;
      margin-top: 22px;
      opacity: 1;
  }

  .hero.hero-brand {
      min-height: 0;
      padding-top: 124px;
      padding-bottom: 44px;
  }

  .hero-brand h1 {
      font-size: clamp(30px, 7.8vw, 57px);
      line-height: 1.2;
      letter-spacing: -0.045em;
  }

  .hero-brand .hero-translation {
      font-size: 15px;
      margin-top: 20px;
      letter-spacing: -0.5px;
  }

  .hero-brand .hero-bottom {
      margin-top: 34px;
      padding-top: 24px;
      gap: 24px;
  }

  .hero-brand .hero-tech {
      font-size: 12px;
      letter-spacing: 0.2px;
  }

  .hero-brand .hero-description {
      font-size: 13px;
      margin-top: 9px;
  }

  .hero-mobile-break {
      display: block;
  }

  .hero-brand .actions {
      width: 100%;
      flex-wrap: wrap;
  }

  .hero-brand .actions .button {
      padding: 13px 19px;
      gap: 20px;
  }
}

/* 작은 모바일(360px 이하): 슬로건과 버튼이 화면을 넘치지 않도록 축소 */
@media (max-width: 360px) {
  .hero.hero-brand {
      padding-top: 116px;
      padding-bottom: 38px;
  }

  .hero-brand h1 {
      font-size: 29px;
  }

  .hero-brand .hero-translation {
      font-size: 13px;
  }

  .hero-brand .actions {
      gap: 10px;
  }

  .hero-brand .actions .button {
      padding-inline: 15px;
      gap: 16px;
  }
}
