/* =====================================================================
   OPTO · Machine Vision Overlay — 디자인 시그니처 레이어
   v1.4 베이스(app.css) 위에 추가로 로드됩니다. app.css 는 수정하지 않습니다.
   외부 CDN 미사용(시놀로지 자체 호스팅 원칙 유지) — 시스템 모노폰트만 사용.
   제거하려면 main.ejs 에서 이 파일 link/script 한 줄만 빼면 원본으로 복귀합니다.
   ===================================================================== */

:root {
  --font-mono: ui-monospace, "JetBrains Mono", "Cascadia Code", "Cascadia Mono", Consolas, "Courier New", monospace;
  --opto-glow: 0 0 10px currentColor;
}

/* ---------------------------------------------------------------------
   1) EYEBROW → 모노스페이스 데이터 리드아웃 (점멸 도트)  · 전 페이지 공통
   --------------------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  letter-spacing: .18em;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: var(--opto-glow);
  animation: opto-blink 2.4s steps(1) infinite;
  flex: 0 0 auto;
}
@keyframes opto-blink { 0%, 70% { opacity: 1; } 71%, 100% { opacity: .25; } }
/* 시안 배경 섹션(최종 CTA)에서는 네이비로 대비 확보 */
.section--cyan .eyebrow { color: var(--navy-950); }

/* ---------------------------------------------------------------------
   2) HOME HERO → 비전 리클(머신비전 조준경) 시그니처
      JS(opto-signature.js)가 .home-hero__signal 안에 구조를 주입하고
      .opto-reticle 클래스를 부여합니다. JS 미동작 시 원본 pulse-ring 유지.
   --------------------------------------------------------------------- */
.home-hero__signal.opto-reticle::before,
.home-hero__signal.opto-reticle::after { display: none; } /* 원본 펄스링 제거 */

.opto-reticle__ring { position: absolute; border-radius: 50%; border: 1px solid rgba(0,225,255,.25); }
.opto-reticle__ring.r1 { inset: 0; border-color: rgba(0,225,255,.28); }
.opto-reticle__ring.r2 { inset: 11%; border-style: dashed; border-color: rgba(0,225,255,.20); animation: opto-spin 60s linear infinite; }
.opto-reticle__ring.r3 { inset: 24%; border-color: rgba(0,225,255,.16); }
@keyframes opto-spin { to { transform: rotate(360deg); } }

.opto-reticle__cross { position: absolute; left: 50%; top: 50%; width: 142%; height: 1px; transform: translate(-50%,-50%); background: linear-gradient(90deg, transparent, rgba(0,225,255,.4), transparent); }
.opto-reticle__cross.v { width: 1px; height: 142%; }

.opto-reticle__core { position: absolute; inset: 35%; border-radius: 50%; border: 1.5px solid var(--cyan-500); background: radial-gradient(circle at 35% 30%, #11608c, #06223b 70%); box-shadow: 0 0 50px rgba(0,225,255,.35), inset 0 0 40px rgba(0,225,255,.2); }
.opto-reticle__core::after { content: ""; position: absolute; inset: 32%; border-radius: 50%; background: var(--cyan-500); box-shadow: 0 0 30px var(--cyan-500), 0 0 60px rgba(0,225,255,.5); }

.opto-reticle__scan { position: absolute; left: 8%; right: 8%; height: 2px; top: 50%; background: linear-gradient(90deg, transparent, var(--cyan-500), transparent); box-shadow: 0 0 14px var(--cyan-500); animation: opto-scan 4.5s ease-in-out infinite; }
@keyframes opto-scan { 0%,100% { top: 14%; opacity: .3; } 50% { top: 86%; opacity: 1; } }

.opto-viz-tag { position: absolute; font-family: var(--font-mono); font-size: 11px; color: var(--cyan-500); border: 1px solid rgba(0,225,255,.4); background: rgba(3,16,29,.7); padding: 4px 9px; border-radius: 5px; letter-spacing: .05em; backdrop-filter: blur(4px); white-space: nowrap; }
.opto-viz-tag.t1 { top: 4%; left: 0; }
.opto-viz-tag.t2 { bottom: 8%; right: 0; }
.opto-viz-tag.t3 { top: 48%; right: 0; }

/* ---------------------------------------------------------------------
   3) 카드 코너 브래킷 (객체 검출 박스) — hover/focus 시 표시
      overflow:hidden 이 없는 카드에만 적용해 클리핑 방지.
   --------------------------------------------------------------------- */
.problem-card, .contact-option { position: relative; }
.problem-card::before, .problem-card::after,
.contact-option::before, .contact-option::after {
  content: ""; position: absolute; width: 16px; height: 16px;
  border: 1.5px solid var(--cyan-500); opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}
.problem-card::before, .contact-option::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.problem-card::after, .contact-option::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.problem-card:hover::before, .problem-card:hover::after,
.problem-card:focus-within::before, .problem-card:focus-within::after,
.contact-option:hover::before, .contact-option:hover::after,
.contact-option:focus-within::before, .contact-option:focus-within::after { opacity: 1; }

/* business-card 는 overflow:hidden 이라, 코드 배지에 브래킷 악센트를 부여 */
.business-card__code { position: relative; }
.business-card__code::before {
  content: ""; position: absolute; top: -6px; left: -6px; width: 12px; height: 12px;
  border: 1.5px solid var(--cyan-500); border-right: none; border-bottom: none;
  opacity: 0; transition: opacity var(--transition);
}
.business-card:hover .business-card__code::before { opacity: 1; }

/* ---------------------------------------------------------------------
   4) 숫자/지표 — 모노 tabular 정렬 (카운터는 JS가 처리)
   --------------------------------------------------------------------- */
.proof-strip__item strong,
[data-count] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

/* loop / journey 번호도 모노 톤 통일 */
.loop-diagram__node span,
.journey-stepper__no,
.scenario-flow__step > span { font-family: var(--font-mono); }

/* ---------------------------------------------------------------------
   5) 접근성: 모션 최소화 환경에서는 모든 시그니처 애니메이션 정지
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .eyebrow::before,
  .opto-reticle__ring.r2,
  .opto-reticle__scan { animation: none; }
}

/* =====================================================================
   사업영역 상세 — 머신비전·AI 모티프 섹션 (business-detail.ejs)
   ===================================================================== */

/* ---- 1) 성과지표 스캔 밴드 (navy) ---- */
.opto-scanband { position: relative; overflow: clip; }
.opto-scanband__scan {
  position: absolute; left: 0; right: 0; top: 0; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--cyan-500), transparent);
  box-shadow: 0 0 16px var(--cyan-500);
  animation: opto-band-scan 6s linear infinite;
}
@keyframes opto-band-scan { 0% { top: 0; opacity: .15; } 50% { opacity: .9; } 100% { top: 100%; opacity: .15; } }
.opto-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.opto-stat {
  position: relative; padding: 28px 24px;
  border: 1px solid rgba(0,225,255,.22); border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(0,225,255,.05), rgba(3,16,29,.2));
}
.opto-stat::before, .opto-stat::after { content: ""; position: absolute; width: 14px; height: 14px; border: 1.5px solid var(--cyan-500); opacity: .7; }
.opto-stat::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.opto-stat::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.opto-stat__num { display: block; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: clamp(2rem, 3.4vw, 2.9rem); font-weight: 800; line-height: 1; color: var(--cyan-500); letter-spacing: -.02em; text-shadow: 0 0 26px rgba(0,225,255,.4); }
.opto-stat__l { display: block; margin-top: 14px; color: var(--white); font-weight: 700; font-size: 1rem; }
.opto-stat__s { display: block; margin-top: 4px; color: #8eabba; font-size: .8rem; }
.opto-scanband__note { margin-top: 26px; color: #7e98a8; font-size: .8rem; }

/* ---- 2) 머신비전/AI 파이프라인 (white) ---- */
.opto-vpipe { display: grid; grid-template-columns: repeat(5, 1fr); gap: 30px 22px; }
.opto-vpipe__step {
  position: relative; padding: 24px 20px 22px;
  border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.opto-vpipe__step:hover { transform: translateY(-5px); border-color: var(--cyan-500); box-shadow: var(--shadow-sm); }
.opto-vpipe__scan { position: absolute; left: 14px; right: 14px; top: 0; height: 3px; background: linear-gradient(90deg, var(--cyan-500), transparent); transform: scaleX(0); transform-origin: left; transition: transform var(--transition); }
.opto-vpipe__step:hover .opto-vpipe__scan { transform: scaleX(1); }
.opto-vpipe__tag { display: inline-block; margin-bottom: 14px; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; color: var(--navy-700); background: rgba(0,225,255,.1); border: 1px solid rgba(0,225,255,.3); padding: 4px 9px; border-radius: 6px; }
.opto-vpipe__step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.opto-vpipe__step p { color: var(--slate-600); font-size: .9rem; line-height: 1.6; }
.opto-vpipe__arrow { position: absolute; top: 50%; right: -16px; transform: translateY(-50%); z-index: 2; color: var(--cyan-500); font-size: 1.4rem; line-height: 1; }
@media (max-width: 1180px) { .opto-vpipe { grid-template-columns: repeat(2, 1fr); } .opto-vpipe__arrow { display: none; } }
@media (max-width: 680px) { .opto-vpipe { grid-template-columns: 1fr; } }

/* ---- 3) AI 포커스 + 기술 스택 (white, 2-column, 비전 모니터 모티프) ---- */
.opto-aigrid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: start; }
.opto-ai h2 { margin: 14px 0 18px; }
.opto-ai__lead { color: var(--slate-700); font-size: 1.05rem; line-height: 1.75; }
.opto-ai__points { margin-top: 22px; display: grid; gap: 12px; }
.opto-ai__points li { position: relative; padding-left: 26px; color: var(--slate-900); font-weight: 600; font-size: .98rem; }
.opto-ai__points li::before { content: ""; position: absolute; left: 0; top: 6px; width: 13px; height: 13px; border: 1.5px solid var(--cyan-500); border-right: none; border-bottom: none; }

/* 비전 모니터(미니 리클) — 흰 배경 안에서 다크 패널로 */
.opto-ai__viz { position: relative; margin-top: 34px; aspect-ratio: 16 / 7; border-radius: var(--radius-lg); background: radial-gradient(120% 140% at 80% 20%, #0a2540, #03101d 70%); border: 1px solid rgba(0,225,255,.28); overflow: hidden; box-shadow: var(--shadow-sm); }
.opto-ai__ring { position: absolute; top: 50%; left: 78%; transform: translate(-50%,-50%); border-radius: 50%; border: 1px solid rgba(0,225,255,.3); }
.opto-ai__ring.r1 { width: 150px; height: 150px; }
.opto-ai__ring.r2 { width: 92px; height: 92px; border-style: dashed; animation: opto-spin 50s linear infinite; }
.opto-ai__core { position: absolute; top: 50%; left: 78%; transform: translate(-50%,-50%); width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--cyan-500); background: radial-gradient(circle at 35% 30%, #11608c, #06223b 72%); box-shadow: 0 0 36px rgba(0,225,255,.5), inset 0 0 18px rgba(0,225,255,.3); }
.opto-ai__core::after { content: ""; position: absolute; inset: 32%; border-radius: 50%; background: var(--cyan-500); box-shadow: 0 0 18px var(--cyan-500); }
.opto-ai__cross { position: absolute; top: 50%; left: 78%; width: 220px; height: 1px; transform: translate(-50%,-50%); background: linear-gradient(90deg, transparent, rgba(0,225,255,.4), transparent); }
.opto-ai__cross.v { width: 1px; height: 200px; }
.opto-ai__scan { position: absolute; left: 8%; right: 8%; top: 50%; height: 2px; background: linear-gradient(90deg, transparent, var(--cyan-500), transparent); box-shadow: 0 0 12px var(--cyan-500); animation: opto-ai-scan 5s ease-in-out infinite; }
@keyframes opto-ai-scan { 0%,100% { top: 16%; opacity: .3; } 50% { top: 84%; opacity: 1; } }
.opto-ai__tag { position: absolute; left: 18px; bottom: 16px; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; color: var(--cyan-500); border: 1px solid rgba(0,225,255,.4); background: rgba(3,16,29,.6); padding: 4px 9px; border-radius: 5px; backdrop-filter: blur(4px); }

.opto-stack__title { margin: 6px 0 22px; }
.opto-stack__group { padding: 16px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: start; }
.opto-stack__group:first-of-type { border-top: none; }
.opto-stack__label { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .05em; color: var(--navy-700); font-weight: 700; padding-top: 4px; }
.opto-stack__items { display: flex; flex-wrap: wrap; gap: 8px; }
.opto-stack__items span { font-size: .82rem; color: var(--slate-700); background: var(--mist-100); border: 1px solid var(--line); padding: 5px 11px; border-radius: 999px; }

@media (max-width: 980px) {
  .opto-metrics { grid-template-columns: repeat(2, 1fr); }
  .opto-aigrid { grid-template-columns: 1fr; gap: 40px; }
  .opto-stack__group { grid-template-columns: 120px 1fr; }
}
@media (max-width: 560px) {
  .opto-metrics { grid-template-columns: 1fr; }
  .opto-stack__group { grid-template-columns: 1fr; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .opto-scanband__scan, .opto-ai__ring.r2, .opto-ai__scan { animation: none; }
}

/* =====================================================================
   홈 '회사 소개' 섹션 + 솔루션 인덱스 보강 섹션
   ===================================================================== */

/* ---- 홈: 회사 소개 카드 ---- */
.opto-about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.opto-about { position: relative; padding: 30px 26px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition); }
.opto-about:hover { transform: translateY(-5px); border-color: var(--cyan-500); box-shadow: var(--shadow-sm); }
.opto-about::before { content: ""; position: absolute; top: -1px; left: -1px; width: 16px; height: 16px; border: 1.5px solid var(--cyan-500); border-right: none; border-bottom: none; opacity: 0; transition: opacity var(--transition); }
.opto-about:hover::before { opacity: 1; }
.opto-about__no { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; background: var(--navy-850); color: var(--cyan-500); font-family: var(--font-mono); font-size: .78rem; font-weight: 800; }
.opto-about h3 { margin: 22px 0 12px; }
.opto-about p { color: var(--slate-600); font-size: .94rem; line-height: 1.65; }

/* ---- 솔루션: 고객 산출물 (navy scan band) ---- */
.opto-deliv { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.opto-deliv__item { position: relative; padding: 24px 20px; border: 1px solid rgba(0,225,255,.22); border-radius: var(--radius-md); background: linear-gradient(180deg, rgba(0,225,255,.05), rgba(3,16,29,.2)); }
.opto-deliv__item::before, .opto-deliv__item::after { content: ""; position: absolute; width: 13px; height: 13px; border: 1.5px solid var(--cyan-500); opacity: .7; }
.opto-deliv__item::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.opto-deliv__item::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.opto-deliv__item strong { display: block; color: var(--white); font-size: 1.02rem; font-weight: 700; }
.opto-deliv__item span { display: block; margin-top: 7px; color: #8eabba; font-size: .82rem; line-height: 1.45; }

/* ---- 솔루션: 카테고리 카드 (A–E) ---- */
.opto-cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.opto-cat { position: relative; display: flex; flex-direction: column; padding: 28px 26px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition); overflow: hidden; }
.opto-cat:hover { transform: translateY(-6px); border-color: var(--cyan-500); box-shadow: var(--shadow-md); }
.opto-cat::after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 3px; background: linear-gradient(90deg, var(--cyan-500), transparent); transform: scaleX(0); transform-origin: left; transition: transform var(--transition); }
.opto-cat:hover::after { transform: scaleX(1); }
.opto-cat__code { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border: 1px solid rgba(0,225,255,.4); border-radius: 50%; color: var(--cyan-500); font-family: var(--font-mono); font-weight: 800; font-size: .9rem; }
.opto-cat__label { margin-top: 16px; font-family: var(--font-mono); font-size: .74rem; letter-spacing: .1em; color: var(--navy-700); text-transform: uppercase; }
.opto-cat h3 { margin: 6px 0 10px; }
.opto-cat p { color: var(--slate-600); font-size: .92rem; line-height: 1.65; }
.opto-cat__link { margin-top: 18px; color: var(--navy-850); font-weight: 800; font-size: .9rem; }
.opto-cat__link span { color: var(--cyan-500); }

@media (max-width: 1180px) {
  .opto-cat-grid { grid-template-columns: repeat(2, 1fr); }
  .opto-deliv { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .opto-about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .opto-cat-grid { grid-template-columns: 1fr; }
  .opto-deliv { grid-template-columns: 1fr; }
}
