/* =======================================================
   💎 [Aiedge CSS 분할] 4. pages.css (메인/서브 히어로, 연혁 뷰 & 반응형 미디어)
   ======================================================= */
/* --- 1. 메인 인덱스 페이지 전용 배너 구역 --- */
.hero {
  position: relative;
  min-height: 820px;
  height: 100vh;
  max-height: 940px;
  overflow: hidden;
  background: #020818;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .9s ease;
  background-size: cover;
  background-position: center right;
  display: flex;
  align-items: center;
}

.hero-slide.active { opacity: 1; z-index: 1; }
.hero-slide:before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 10, 26, .98) 0%, rgba(3, 10, 26, .88) 24%, rgba(3, 10, 26, .44) 48%, rgba(3, 10, 26, .05) 100%);
}
.hero-slide:after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 76% 50%, rgba(0, 200, 255, .18), transparent 36%), linear-gradient(180deg, rgba(0, 0, 0, .08), rgba(0, 0, 0, .5));
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(40vw, 520px);
  max-width: 520px;
  margin-left: max(20px, calc((100vw - 1180px) / 2));
  padding-top: 78px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 13px;
  border: 1px solid rgba(0, 200, 255, .36);
  border-radius: 999px;
  background: rgba(0, 200, 255, .08);
  color: #8de7ff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.eyebrow:before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
}

.hero h1 { font-size: clamp(34px, 3.15vw, 52px); line-height: 1.16; max-width: 100%; }
.hero p { font-size: clamp(15px, 1.15vw, 18px); color: #c7d5e9; max-width: 100%; margin: 0 0 30px; line-height: 1.72; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-badges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 100%; }

.hero-badge {
  padding: 14px 15px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 20px;
  backdrop-filter: blur(12px);
}
.hero-badge strong { display: block; color: #fff; font-size: 15px; margin-bottom: 2px; }
.hero-badge span { display: block; color: #99aac0; font-size: 13px; line-height: 1.4; }

.hero-dots { position: absolute; z-index: 10; left: max(20px, calc((100vw - 1180px) / 2)); bottom: 40px; display: flex; gap: 9px; }
.hero-dot { width: 34px; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, .25); border: 0; cursor: pointer; }
.hero-dot.active { background: linear-gradient(90deg, var(--cyan), var(--blue)); }

/* --- 2. 서브페이지 전용 탑 히어로 배너 구역 --- */
.page-hero {
  padding: 150px 0 86px;
  min-height: 480px;
  background-size: cover;
  background-position: center right;
  position: relative;
  overflow: hidden;
}
.page-hero:before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 10, 26, .98) 0%, rgba(3, 10, 26, .89) 35%, rgba(3, 10, 26, .3) 76%, rgba(3, 10, 26, .1));
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { max-width: min(40vw, 560px); margin-top: 20px; font-size: clamp(30px, 3vw, 46px); line-height: 1.18; }
.page-hero p { max-width: min(40vw, 560px); color: #c7d5e9; font-size: clamp(15px, 1.15vw, 18px); margin: 0; line-height: 1.75; }

/* 섹션 레이아웃 구조체 */
.section { padding: 110px 0; position: relative; }
.section.dark { background: linear-gradient(180deg, #061022 0%, #030a1a 100%); }
.section.soft { background: linear-gradient(180deg, #030a1a 0%, #081730 100%); }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 42px; }
.section-kicker { color: #71dfff; text-transform: uppercase; letter-spacing: .12em; font-size: 13px; font-weight: 900; margin-bottom: 10px; }
.section-title { font-size: clamp(30px, 3.2vw, 48px); line-height: 1.22; letter-spacing: -.045em; margin: 0; }
.section-desc { max-width: 540px; color: #aebcd0; margin: 0; font-size: 17px; }

/* 🌟 [좌우 스플릿 패널 구조] 공용 규격 매칭 */
.feature-split {
  display: grid !important;
  grid-template-columns: 1.06fr .94fr !important;
  gap: 44px !important;
  align-items: stretch !important; /* ✨ 핵심: 양쪽 박스의 높이를 무조건 1:1로 꽉 채워 맞춤 */
}

.feature-split .image-panel {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: 100% !important; /* 억지로 막아둔 너비 제한 해제 */
  height: 100% !important; /* 400px 고정값 삭제, 부모 높이에 100% 꽉 맞춤 */
  min-height: 400px !important;
  border-radius: 34px !important; /* ✨ 왼쪽 텍스트 박스와 똑같이 34px 라운딩으로 대칭 통일! */
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  box-shadow: var(--shadow) !important;
  background: #07142b !important;
}

.feature-split .image-panel img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
}

/* 통계 지표 구역 */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.stat { padding: 24px; border-radius: 24px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .045); }
.stat strong { display: block; font-size: 30px; color: #fff; letter-spacing: -.03em; }
.stat span { color: #9dafc5; font-size: 14px; }

/* 프로세스 단계 구역 */
.process { counter-reset: step; display: grid; gap: 16px; }
.process-item {
  counter-increment: step; display: grid; grid-template-columns: auto 1fr; gap: 18px; padding: 22px;
  border-radius: 24px; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .1);
}
.process-item:before {
  content: counter(step, decimal-leading-zero); font-family: AudiowideLocal, monospace; color: #7feeff;
  background: rgba(0, 200, 255, .09); border: 1px solid rgba(0, 200, 255, .24); border-radius: 16px; padding: 10px 12px; height: fit-content;
}
.process-item h3 { margin: 0 0 6px; }
.process-item p { margin: 0; color: #aebcd0; }

/* 중간 띠 배너 구역 (CTA) */
.cta-band {
  padding: 20px 0;
  background: linear-gradient(90deg, #0123B4, #006dff);
  position: relative;
  overflow: hidden;
}
.cta-band:before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 72% 30%, rgba(255, 255, 255, .24), transparent 30%); opacity: .48;
}
.cta-band .container { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.cta-band h2 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.24; margin: 0 0 6px; letter-spacing: -.04em; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .78); font-size: 15px; }

/* --- 3. 회사소개 페이지 전용 연혁(History) 타임라인 구역 --- */
.history-timeline-section { background: linear-gradient(180deg, #030a1a 0%, #06152d 45%, #030a1a 100%); overflow: visible; }
.history-intro { max-width: 680px; margin-bottom: 34px; }
.history-intro p { margin: 14px 0 0; color: #aebcd0; font-size: 17px; line-height: 1.75; }

.history-visual {
  position: relative; height: 260px; border-radius: 28px; overflow: hidden; margin: 6px 0 54px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .08);
}
.history-visual img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.05) contrast(1.08); }
.history-visual:after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(3, 10, 26, .2), rgba(1, 35, 180, .1)); }

.history-visual-card {
  position: absolute; left: 6%; bottom: -1px; width: min(330px, 72vw); aspect-ratio: 2.4/1;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 12px;
  padding: 0 42px; background: var(--blue); color: #fff; z-index: 2; border-radius: 12px 12px 0 0; box-shadow: 0 18px 40px rgba(1, 35, 180, .35);
}
.history-visual-card span { font-size: 12px; letter-spacing: .02em; }
.history-visual-card strong { font-family: AudiowideLocal, 'Audiowide', system-ui, sans-serif; font-size: clamp(30px, 4vw, 46px); letter-spacing: .04em; line-height: 1; }

.history-shell { position: relative; display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 54px; align-items: start; }
.history-year-nav { position: sticky; top: 112px; z-index: 4; display: flex; flex-direction: column; gap: 10px; padding: 16px 0; }
.history-year-nav a {
  display: flex; align-items: center; gap: 10px; color: #7f8da3; font-family: AudiowideLocal, 'Audiowide', system-ui, sans-serif;
  font-size: 16px; letter-spacing: .04em; transition: color .2s ease, transform .2s ease;
}
.history-year-nav a:before {
  content: ''; width: 8px; height: 8px; border-radius: 999px; border: 1px solid rgba(141, 231, 255, .5);
  background: transparent; box-shadow: none; transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.history-year-nav a:hover, .history-year-nav a.active { color: #fff; transform: translateX(4px); }
.history-year-nav a.active:before { background: var(--cyan); box-shadow: 0 0 18px rgba(0, 200, 255, .85); transform: scale(1.2); }

.history-snap {
  position: relative !important; /* ✨ 핵심: 도망간 세로 선의 멱살을 잡아주는 기준점(닻) 복구! */
  height: auto !important; 
  min-height: 0 !important; 
  overflow: visible !important; 
  overscroll-behavior: auto !important;
  scroll-snap-type: none !important; 
  scroll-padding-top: 0 !important; 
  padding-right: 0 !important; 
  scrollbar-width: auto !important;
}

.history-snap::-webkit-scrollbar { display: none; }
.history-snap:before {
  content: ''; position: absolute; left: 220px; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, transparent, rgba(141, 231, 255, .38), rgba(141, 231, 255, .38), transparent); pointer-events: none;
}

.history-year-block {
  position: relative; min-height: clamp(520px, calc(100svh - 118px), 760px) !important; scroll-snap-align: start; scroll-snap-stop: normal;
  scroll-margin-top: 104px; padding-top: 42px !important; padding-bottom: 72px !important; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; align-items: start;
}
.history-year-block:last-child { min-height: clamp(420px, 68svh, 660px) !important; }

.history-dot {
  position: absolute; left: 216px; top: 52px; width: 9px; height: 9px; border-radius: 999px;
  background: var(--blue); box-shadow: 0 0 22px rgba(0, 200, 255, .8); transform: translateX(-50%); z-index: 2;
}

.history-items { display: grid; gap: 14px; max-width: 760px; }
.history-month { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 18px; align-items: start; }
.history-month span { font-family: AudiowideLocal, 'Audiowide', system-ui, sans-serif; color: #74dfff; font-size: 15px; line-height: 1.7; text-align: right; }
.history-month p { margin: 0; color: #d7e2f3; font-size: 17px; line-height: 1.72; word-break: keep-all; }
.history-month p:before { content: '•'; color: #74dfff; margin-right: 10px; }

/* 인터랙티브 모션 효과 구역 */
.reveal { opacity: 0; transform: translateY(24px); transition: .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* --- 5. 미디어 쿼리 반응형 고도화 단락 --- */
@media (min-width: 981px) {
  .history-year-block h3 {
    width: 100% !important; display: block !important; text-align: right !important;
    padding-right: 40px !important; font-size: clamp(48px, 5vw, 72px) !important;
    color: #fff; text-shadow: 0 0 34px rgba(0, 102, 255, .34); margin: 0;
  }
  .history-items { padding-left: 20px !important; }
}

@media (max-width: 1080px) {
  .nav { gap: 16px; font-size: 14px; }
  .header-cta { display: none; }
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-split { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .container { width: min(100% - 28px, 1180px); }
  .header-inner { height: 70px; }
  .logo-wrap { min-width: auto; }
  .logo-text { display: none; }
  .mobile-toggle { display: grid; place-items: center; }
  .nav {
    position: fixed; left: 14px; right: 14px; top: 78px; display: none; flex-direction: column;
    align-items: flex-start; gap: 0; background: rgba(3, 10, 26, .96); border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 22px; padding: 16px; box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: 13px 6px; width: 100%; }
  .hero { min-height: 740px; }
  .hero-slide { background-position: center right; }
  .hero-slide:before { background: linear-gradient(90deg, rgba(3, 10, 26, .98) 0%, rgba(3, 10, 26, .94) 42%, rgba(3, 10, 26, .55) 100%); }
  .hero-badges { grid-template-columns: 1fr; }
  .section { padding: 78px 0; }
  .section-head { display: block; }
  .section-desc { margin-top: 16px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .patent-grid { grid-template-columns: 1fr !important; }
  .priority-card.primary { grid-column: span 1; }
  .page-hero { padding: 130px 0 72px; }
  .cta-band .container { display: block; }
  .cta-band .btn { margin-top: 18px; }
  .footer-grid { grid-template-columns: 1fr; }
  .subnav { top: 70px; }
  .history-shell { grid-template-columns: 1fr; gap: 22px; }
  .history-year-nav { position: relative; top: auto; flex-direction: row; overflow-x: auto; padding-bottom: 12px; }
  .history-year-nav a { flex: 0 0 auto; font-size: 14px; }
/* =======================================================
     ✅ [모바일 최종 패치] 당겨서 새로고침 시 2026년 순간이동 버그 완전 박멸
     ======================================================= */
  .history-snap { 
    height: auto !important; 
    overflow: visible !important; 
    padding-right: 0 !important;
    /* ⚠️ 모바일 초기 진입 및 새로고침 시 자석 기능을 아예 파괴합니다. */
    scroll-snap-type: none !important; 
  }
  .history-snap:before { left: 92px; }
  
  .history-year-block {
    grid-template-columns: 92px 1fr; 
    gap: 26px; 
    align-items: start;
    /* ⚠️ 뷰포트(svh) 강제 높이를 해제하고, 자석 정렬 대상에서 완전히 탈탈 털어버립니다. */
    min-height: auto !important; 
    scroll-snap-align: none !important; 
    scroll-margin-top: 0 !important;
    padding-top: 50px !important; 
    padding-bottom: 50px !important;
  }
  .history-dot { left: 92px; top: 46px; }
  .history-year-block h3 {
    margin: 0;
    /* ✨ 예전의 그 사이버틱하고 멋진 폰트로 영구 고정! */
    font-family: AudiowideLocal, 'Audiowide', system-ui, sans-serif !important; 
    font-size: clamp(52px, 7vw, 96px);
    line-height: 1;
    letter-spacing: .02em;
    color: #fff;
    text-shadow: 0 0 34px rgba(0, 102, 255, .34);
  }
  .history-month { grid-template-columns: 1fr; gap: 4px; }
  .history-month span { text-align: left; font-size: 13px; }
  .history-month p { font-size: 15.5px; }
  .history-visual { height: 210px; margin-bottom: 38px; }
  .history-visual-card { padding: 0 26px; width: min(290px, 76vw); }
}

@media (max-width: 520px) {
  h1 { font-size: 40px; }
  .hero-actions { display: grid; }
  .hero-actions .btn { width: 100%; }
  .stats { grid-template-columns: 1fr; }
  .contact-list div { grid-template-columns: 1fr; gap: 4px; }
  .logo-box { width: 100px; }
  .hero-dots { bottom: 20px; }
  .page-hero p { font-size: 17px; }
  .section-title { font-size: 32px; }
  .card { padding: 24px; }
}

@media (min-width: 821px) {
  .hero-content { width: min(40vw, 520px); }
  .page-hero h1, .page-hero p { max-width: min(40vw, 560px); }
}

@media (max-width: 820px) {
  .hero-content { width: min(100% - 28px, 620px); max-width: 620px; }
  .page-hero h1, .page-hero p { max-width: 100%; }
}

/* =========================================
   ✨ 연혁 년도(2026 등) Audiowide 폰트 영구 고정 (PC/모바일 공통)
   ========================================= */
.history-year-block h3 {
  font-family: AudiowideLocal, 'Audiowide', system-ui, sans-serif !important;
}

/* 🚨 기존 CSS 하단 모바일 대응 구역 교체 */
@media (max-width: 768px) {
  .feature-split {
    display: flex !important; /* 👈 [핵심 추가] 억지 2칸 그리드 모드를 강제 해제하고 유연하게 변경 */
    flex-direction: column !important; /* 위아래 세로로 쌓기 */
    gap: 30px !important;
  }
  
  .feature-split .detail-block,
  .feature-split .image-panel {
    width: 100% !important; /* 좌우 꽉 차게 100% 할당 */
    max-width: 100% !important;
    height: auto !important;
  }
}

/* 태블릿 구간(1080px) 예외 처리 보강 */
@media (max-width: 1080px) {
  .feature-split { 
    display: flex !important;
    flex-direction: column !important;
  }
}

/* 🚨 [완벽 해결] 모바일 메인 히어로 구역 상단 잘림 & 하단 겹침 방어 */
@media (max-width: 820px) {
  /* 1. 부모 박스의 높이를 내용물이 다 들어갈 만큼 넉넉하게 강제 확보 */
  .hero {
    height: 100vh !important;
    min-height: 880px !important; 
    max-height: none !important;
  }
  
  /* 2. 중앙 정렬을 풀고 위에서부터 차곡차곡 내리기 */
  .hero-slide {
    align-items: flex-start !important; 
    padding-top: 110px !important; /* 상단 헤더에 안 가려지게 여백 확보 */
  }
  
  /* 3. 하단 표시줄(---)이 배지를 침범하지 못하도록 방어막(여백) 확보 */
  .hero-content {
    padding-top: 0 !important; 
    padding-bottom: 80px !important; 
  }
  
  /* 4. 표시줄(---) 위치를 맨 밑바닥으로 얌전히 내리기 */
  .hero-dots {
    bottom: 25px !important; 
  }
}

/* 🚨 [완벽 해결] 모바일 연혁(History) 투명인간(증발) 버그 애니메이션 락 강제 해제 */
@media (max-width: 980px) {
  .history-shell.reveal {
    opacity: 1 !important; /* 강제로 투명도를 100%로 켬 */
    transform: translateY(0) !important; /* 아래로 내려가 있던 위치를 원래대로 복구 */
    transition: none !important; /* 대기 타지 말고 즉시 보여주기 */
  }
}

/* 🚨 [완벽 분리] 모바일 연혁 거대 년도 텍스트 겹침 방지 패치 */
@media (max-width: 980px) {
  .history-year-block h3 {
    grid-column: 1 / -1 !important; /* 왼쪽 방을 부수고 가로 전체(1층 전체)를 혼자 다 쓰도록 확장! */
    margin-bottom: 24px !important; /* 아래층 내용물과 겹치지 않게 24px의 안전 여백 추가 */
  }
  
  .history-items {
    grid-column: 2 / -1 !important; /* 상세 내용은 2층의 오른쪽 칸(파란 세로선 우측)에 얌전히 배치! */
  }
}

/* =======================================================
   💎 [1호점 끝판왕] PC 연혁 애니메이션 완전 제거 -> 100% 무조건 선명하게 고정
   ======================================================= */
@media (min-width: 981px) {
  /* 스크립트가 깨우든 말든, 묻지도 따지지도 않고 투명도 100% 상시 점등! */
  .history-timeline-section .reveal,
  .history-shell.reveal,
  .history-year-block,
  .history-year-block h3,
  .history-month,
  .history-month p {
    opacity: 1 !important;
    transform: translateY(0) !important; /* 위아래로 꿀렁이는 모션 제거 */
    transition: none !important;        /* 괜히 흐릿하게 딜레이 주는 시간 삭제 */
  }
}
