/*------------------------------------------------------------------
Project:	
Version:	1.0
Last change:	
Assigned to:	
Primary use:	
-------------------------------------------------------------------*/


@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100;300;400;500;700;900&display=swap');
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

/* Duos Brush Pro Font */
@font-face {
  font-family: 'Duos Brush Pro';
  src: url('../fonts/DuosBrushPro-Regular.woff2') format('woff2'),
       url('../fonts/DuosBrushPro-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Duos Brush Pro';
  src: url('../fonts/DuosBrushPro-Black.woff2') format('woff2'),
       url('../fonts/DuosBrushPro-Black.woff') format('woff');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/*------------------------------------------------------------------

01. General Styles
02. Intro
03. Header Elements
04. Footer Elements
05. Responsive 

-------------------------------------------------------------------*/




/*--------------------------------------------------
	01. General Settings
---------------------------------------------------*/
:root {
  scroll-behavior: smooth;

  --surface: #FFFFFF;
  --surface-weak: #F5F5F5;
  --border-subtle: rgba(0,0,0,.10);
  --shadow-1: 0 2px 10px rgba(0,0,0,.15);
  --shadow-2: 0 8px 32px rgba(0,0,0,.10);
  --radius-1: 2px;
  --radius-2: 8px;

  --text:#2E2E2F;
  --muted:#6F7785;
  --blue: #0073FF;     /* BRENEX 블루 */
  --accent:#FF6A2B;   /* 타임라인 활성 연도(오렌지) */
  --dot:#C9CED6;      /* 타임라인 하단 점 */
  --max:1200px;

  /* intro */
  --intro-bg: radial-gradient(#1a1a1a, #000);
  --text-color: #f5f5f5;
  --intro-stagger: .25s;

  /* text rise */
  --rise-distance: 60px;
  --stagger: 200ms;                 
  --dur: 1200ms;
  --easing: cubic-bezier(.2,.7,.2,1);

  /* main */
  --bg:#ffffff;
  --ink:#0b0f19;
  --muted:#6b7280;
  --tagline:#111827;

  /* timeline */
  --card-bg:#f3f4f6; 
  --card-border:#e5e7eb;
  --card-active-bg:#111827; 
  --card-active-text:#f9fafb;
  --tilt: 10deg;
  --depth: 50px;
  --side-scale: 0.92;
  --timeline-pin-top: 96px;
  

  /* service */
  --rule: #111;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: 'Poppins', 'Noto Sans KR', 'Pretendard', sans-serif;
  font-size:16px;
  height:100%;
  max-width: 100%;
  color: #2E2E2F;
  background-size: 20px 20px;
  min-height: 100vh;

  user-select: none; /* supported by Chrome and Opera */
  -webkit-user-select: none; /* Safari */
  -khtml-user-select: none; /* Konqueror HTML */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */		

  scroll-behavior: smooth;
  overflow-x: hidden;

  transform: none !important; 
}

 body{
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html {
  box-sizing: border-box;
  margin-right: 0px!important;
  scroll-behavior: auto !important; 
}

html.intro-lock,
body.intro-lock {
  height: 100%;
  overflow: hidden;
}


body.smooth-scroll {
  overflow:hidden;
}

body.has-slider {
  overflow:hidden;
}

body.hidden {
  opacity:0;
}

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
  border: 0;
  margin: 0;
  outline: 0;
  padding: 0;
  vertical-align: baseline;
}

#page-content, main { transform: none !important; }

/* Mark 태그 (histoy.html) */
mark {
  background-color: rgba(108, 99, 255, 0.2); /* #6C63FF 베이스, 20% 투명도 */
  padding: 2px 0px;
  border-radius: 4px;
  font-weight: 500;
}

mark:hover {
  background-color: rgba(108, 99, 255, 0.3);
  border-color: rgba(108, 99, 255, 0.5);
  transform: translateY(-1px);
  transition: all 0.2s ease;
}


/* text-effect (rise) */
.rise-ani { position: relative; overflow: hidden; }

.rise-line{
   opacity:0;
  transform: translateY(var(--rise-distance, 24px));
  filter: blur(6px);
  will-change: transform, opacity, filter;
  transition:
    transform var(--dur,600ms) var(--easing,cubic-bezier(0.4,0,0.2,1)) var(--delay,0ms),
    opacity   var(--dur,600ms) var(--easing,cubic-bezier(0.4,0,0.2,1)) var(--delay,0ms),
    filter    var(--dur,600ms) var(--easing,cubic-bezier(0.4,0,0.2,1)) var(--delay,0ms);
}

.rise-ani.is-inview .rise-line{
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}


@media (prefers-reduced-motion: reduce){
  .rise-line{ transition:none; transform:none; filter:none; opacity:1; }
  .ani-marker{ transition:none; background-size:100% 100%; }
}
 
/* 기본: 햄버거 버튼 (데스크탑 비표시) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1002;
}
.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: all .3s ease;
}
.hamburger.active span:nth-child(1){ transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2){ opacity: 0; }
.hamburger.active span:nth-child(3){ transform: rotate(-45deg) translate(6px, -6px); }

/* 사이드바 & 백드롭 레이어 */
.mobile-drawer {
  position: fixed;
  inset: 0 0 0 auto;     /* 우측 고정 */
  width: min(84vw, 320px);
  transform: translateX(100%);
  background: #fff;
  box-shadow: -12px 0 32px rgba(0,0,0,.12);
  z-index: 1001;
  transition: transform .34s cubic-bezier(.22,.9,.3,1);
  display: flex;
  flex-direction: column;
  padding: 24px 20px 28px;
}
.mobile-drawer.open { transform: translateX(0%); }
.mobile-drawer[aria-hidden="false"] { outline: none; }

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.32);
  -webkit-backdrop-filter: blur(1.5px);
  backdrop-filter: blur(1.5px);
  z-index: 1000;
  opacity: 0;
  transition: opacity .25s ease;
}
.drawer-backdrop.show { opacity: 1; }
.drawer-backdrop[hidden] { display: none; }

.drawer-nav { margin-top: 45px; }
.drawer-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 0;
  margin: 0;
}
.drawer-menu a{
  /* display: block; */
  padding: 16px 12px;
  font: 600 1.1rem 'Pretendard','Poppins',sans-serif;
  color: var(--text);
  text-decoration: none;
  border-radius: 12px;
  transition: background .2s ease, color .2s ease, transform .2s ease;
  min-height: 48px;
  display: flex;
  align-items: center;
}
.drawer-menu a:active { transform: translateY(1px); }
.drawer-menu a:hover { background: rgba(0,0,0,.06); color: var(--blue); }
.drawer-menu a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.drawer-menu a.is-active,
.drawer-menu a[aria-current="page"] {
  outline: 2px solid var(--blue);   /* 테두리 */
  outline-offset: 4px;
  border-radius: 10px;
}

.drawer-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1002;
}

.drawer-close span {
  position: absolute;
  display: block;
  width: 24px;
  height: 3px;
  background: var(--blue);
  border-radius: 2px;
  transition: background .2s ease;
}

.drawer-close span:nth-child(1) {
  transform: rotate(45deg);
}
.drawer-close span:nth-child(2) {
  transform: rotate(-45deg);
}



/* 헤더와의 z-index 관계 조정 */
.header { z-index: 1003; }

/* 반응형: 1024px 미만에서 데스크탑 내비 숨기고 햄버거/드로어 활성화 */
@media (max-width: 1023px) {
  .navigation .flexnav { display: none; }
  .hamburger { display: flex; }
}

/* 태블릿 중간 크기에서 네비게이션 최적화 */
@media (max-width: 1199px) and (min-width: 1024px) {
  .flexnav { gap: 2rem; }
  .flexnav a { font-size: 1.1rem; }
}

/* 모션 최소화 선호 시 */
@media (prefers-reduced-motion: reduce){
  .mobile-drawer { transition: none; }
  .drawer-backdrop { transition: none; }
  .hamburger span { transition: none; }
}

/* 다크 모드(선택) */
@media (prefers-color-scheme: dark){
  .mobile-drawer { background: #111; box-shadow: -12px 0 32px rgba(0,0,0,.4); }
  .drawer-menu a{ color: #eee; }
  .drawer-menu a:hover { background: rgba(255,255,255,.06); color: var(--blue); }
}



/*--------------------------------------------------
	02. Intro
---------------------------------------------------*/
#intro{
  position: fixed; 
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--intro-bg);
  z-index: 9999;
}
#intro-inner{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 1.5rem;
  width: 100%;
  font: 300 1.4rem 'Poppins', sans-serif;
  color: var(--text-color);
  user-select: none;
  will-change: transform, opacity;
}
.intro-brand{ justify-self: end; } 
.intro-year { justify-self: start; }
.intro-meter{ justify-self: center; }

.intro-brand,.intro-year {
  display: inline-block;
  transform: translateX(0); 
}

.intro-meter{
  font: 500 clamp(16px, 3vw, 22px)/1.2 "Courier New", Courier, monospace;
  color: var(--text-color);
  opacity: .95;
  min-width: 5ch;
  text-align: center;

}
.intro-meter .bracket{ color: var(--blue); }
.intro-meter .percent{ min-width: 4ch; display: inline-block; text-align: right; }

#intro.done{
  pointer-events: none;
  animation: introFadeOut 700ms ease forwards;
}

@keyframes introFadeOut{ to{ opacity: 0; } }

/* 모션 최소화 선호 시 */
@media (prefers-reduced-motion: reduce){
  #intro.done{ animation-duration: 1ms; }
}



/*--------------------------------------------------
	03. Header Elements
---------------------------------------------------*/
#header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 4rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background-color 320ms ease,
    backdrop-filter 320ms ease,
    -webkit-backdrop-filter 320ms ease,
    border-color 320ms ease;
}

.header.is-blurred {
  /* 반투명 배경 + 블러 조합이 중요! (투명 100%면 블러가 보이지 않음) */
  background-color: rgba(255, 255, 255, 0.12);  /* 라이트 테마 예시 */
  /* 다크 배경 rgba(28,22,20,0.35) 같이 조정 */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* iOS/Safari */

  border-bottom-color: rgba(0,0,0,0.08); /* 살짝 경계 */
}

.header,
.header * {
  will-change: backdrop-filter, background-color, border-color;
}

.header.black-section {
  background-color: #080808;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  padding: 0.5rem 0;
}

.logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.5px;
}


/* Navigation styles */
.navigation {
  display: flex;
  align-items: center;
}

.nav-left {
  display: flex;
  align-items: center;
}

.flexnav {
  display: flex;
  list-style: none;
  gap: 3rem;
  margin: 0;
  padding: 0;
}

.flexnav a {
  text-decoration: none;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.flexnav a:hover {
  color: var(--blue) !important;
}

.flexnav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--blue);
  transition: width 0.3s ease;
}

.flexnav a:hover::after {
  width: 100% !important;
}




/*--------------------------------------------------
	04. Footer Elements
---------------------------------------------------*/		
.footer {
  background: url('../images/footer.png') center/cover no-repeat;
  padding: 100px 0 5px 0;
  width: 100%;
  position: relative;
  min-height: 975px;
}

/* footer에 dark-section 클래스가 있을 때 배경 오버라이드 */
.footer.dark-section {
  background-color: #F3F6FB;
  background-image: url('../images/footer.png');
  background-position: right bottom;
  background-size: contain;
  background-repeat: no-repeat;
}

.footer-content {
  display: flex;
  justify-content: flex-start;
  align-items: flex-end; /* footer-content를 하단 정렬로 변경 */
  max-width: 100%;
  margin: 0 auto;
  padding: 0 80px;
  position: relative;
  overflow: hidden;
}

.footer-contact,
.footer-info {
  position: relative;
  z-index: 2;              
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 300px; /* footer-left를 아래로 이동 */
}

.footer-brand {
  margin: 20px 0;
}

.footer-brand h3 {
  font-size: 4.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1;
  margin-bottom: 34px;
}

.footer-contact {
  display: flex;
  align-items: center;
  margin: 20px 0;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 40px;
  background: transparent;
  border: 1px solid var(--text);
  border-radius: 50px;
  color: var(--text);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.contact-btn:hover {
  background: var(--text);
  color: #FFFFFF;
  border-color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(46, 46, 47, 0.2);
}

.contact-btn i {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.contact-btn:hover i {
  transform: translateX(4px);
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 20px 0 0;
  margin-bottom: 40px;
}

.footer-phone {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  margin: 0;
}

.footer-address, .footer-copyright {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
  margin: 0;
  line-height: 1.4;
}

.footer-copyright p {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text);
  margin: 0;
  opacity: 0.8;
}

.footer-brush {
  position: absolute;
  right: -13vw;
  bottom: 4vw;
  font-family: 'Duos Brush Pro', cursive;
  font-weight: 400;
  font-size: clamp(163px, 32vw, 540px);
  line-height: 0.85;
  color: var(--blue);
  z-index: 1;
  pointer-events: none;
  user-select: none;
  transform: rotate(-22deg);
  text-shadow: 
  0 1px 0 rgba(255, 255, 255, 0.35),
  0 14px 28px rgba(0, 0, 0, 0.08);
}


/*--------------------------------------------------
	Staggered Animation Initial States
---------------------------------------------------*/
/* Ensure section is visible */
.stagger-section {
  overflow: visible; /* Allow items to animate from below */
}

/* Performance optimization - let JavaScript handle initial state */
.stagger-section .stagger-item {
  will-change: transform, opacity;
}

/* Remove will-change after animation */
.stagger-section .stagger-item.animated {
  will-change: auto;
}

/* Accessibility - respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .tech-company-section .stagger-item {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/*--------------------------------------------------
	Highlight Text Animation
---------------------------------------------------*/
/* Highlight text container - no initial highlight */
.highlight-text {
  --hl-bg: linear-gradient(135deg, #D0E0FF 0%, #B8D4FF 100%);
  --hl-round: 52px;
  position: relative;
  display: inline-block;
  z-index: 0;
  isolation: isolate; 
  /* Text styling without background */
  padding: 8px 16px;
  color: var(--text);
  font-weight: 600;
  margin: 0 8px;
}

/* Highlight background (pseudo-element) - blue like original */
.highlight-text::before {
  content: '';
  position: absolute;
  inset:0;
  /* left: 0;
  right: 0;
  top: 0;
  bottom: 0; */
  background: var(--hl-bg);
  border-radius: var(--hl-round);
  /* Use clip-path instead of scaleX to maintain border-radius shape */
  clip-path: inset(0 100% 0 0 round var(--hl-round)); /* Initially hidden from right 100%는 왼쪽에서 안보이게해서 다 보이게 */
  z-index: -1;
  will-change: clip-path;
  transition: clip-path 0.6s cubic-bezier(0.4,0,0.2,1) var(--delay,0ms);
}

/* Animation complete state - show the blue highlight */
.highlight-text.animated::before {
  clip-path: inset(0 0 0 0 round var(--hl-round)); /* Fully visible */
  will-change: auto;
}

.highlight-text.bg-pink{
  --hl-bg: linear-gradient(135deg, #e3b7e8 0%, #e3b7e8 100%);
}

.rise-line .highlight-text{ filter:none; }

/* Accessibility - respect reduced motion preference for highlight */
@media (prefers-reduced-motion: reduce) {
  .highlight-text::before {
    clip-path: inset(0 0 0 0) !important;
    transition: none !important;
  }
}


/* =================================================
  1) 태블릿 이하 (≤864px)
  ================================================= */
@media (max-width: 864px){
    :root{
    --depth: 70px;
    --tilt: 10deg;
    --side-scale: .96;
  }
  
  /* ========common=========== */
  .content-row{padding: 2% 0; min-height: auto;}
  .content-max-width{ padding: 0 20px; }

  /* ========index.html=========== */
  /* Hero */
  .hero-section{ height: 92svh; min-height: 92svh; padding: clamp(6vh,8vh,10vh) clamp(4vw,5vw,6vw); }
  h1.brand{ font-size: clamp(40px, 18vw, 220px); letter-spacing: 0.02em; padding: 0 4%; }
  .tagline{ gap: clamp(.4rem, 2vw, 1rem); min-height: clamp(24px, 5.5vw, 48px); padding: 0 4%; }
  .word{ font-size: clamp(14px, 3.8vw, 28px); }
  
  /* Timeline title */
  .timeline-title{ font-size:3rem; padding:40px 0 24px; }
  .card-name { font-size: 1.4rem; }
  .card-period { font-size: 1.3rem; }
  .viewport{ width: 94%; padding: 16px 0 24px; }
  .swiper{ padding: 16px 0 32px; }
  #timeline-swiper .swiper-slide{ filter: grayscale(.15); }
  #timeline-swiper .swiper-slide-active{ filter: none; }
  .card{
    width: min(420px, 86vw) !important;
    height: auto !important;
    min-height: 420px;                 
    padding: 18px 18px 22px !important;
  }
  .card-section{ padding: 10px; }
  .card-detail{ font-size: 1.1rem; line-height: 1.5; }
  .card-arrow{ right: 20px; bottom: 20px; width: 44px; height: 44px; }
  .swiper-pagination{ display: block; margin-top: 6px; }


  /* Tech */
  .tech-title h2{ font-size:3.2rem; }
  .tech-text{ font-size:2.8rem; }
  
  /* Statistics */
  .statistics-title h2{ font-size: clamp(1.6rem, 3.8vw, 2.6rem); padding: 40px 16px; } 
  .metric-number{ font-size: clamp(2.2rem, 4.8vw, 3.6rem); }
  .statistics-metrics{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    justify-content: center;   
    gap: 58px;
  }
  .metric-item{
    justify-self: center;      
    width: 100%;
    max-width: 260px;          
    text-align: center;        
  }
  .metric-item:nth-child(3){
    grid-column: 1 / -1;       
    justify-self: center;      
  }

  /* Footer */  
  .footer { min-height: 780px; padding: 96px 0 12px; }
  .footer-content { padding: 0 48px; flex-direction: row; align-items:flex-start; gap: 40px; }
  .footer-left {margin-top: 0PX; }
  .footer-brand h3{ font-size: clamp(3rem, 5.5vw, 3.6rem); }  

  /* ========history.html=========== */
  .history-section .hero-section{ min-height: 56svh; padding: 2% 4vw; }
  .main-title-container{ text-align: center; }
  .main-subtitle-history{ font-size: clamp(3rem, 8vw, 5rem); margin-bottom: 1.5rem; line-height: 1; }
  .history-section h1.brand{ font-size: clamp(48px, 14vw, 160px); letter-spacing: 0.02em; padding: 0 2%; white-space: nowrap; }
  .history-section { padding: 56px 20px 40px; }
  .history-wrap { max-width: 100%; }
  .history-row{ display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
  .year-hero{ order: 2; font-size: clamp(96px, 20vw, 140px); line-height: 0.9; margin-top: 12px; text-align: center; align-self: center; }
  .history-list{ order: 1; font-size: 14px; line-height: 1.6; gap: 8px; text-align: center; }
  .history-list p{white-space: normal; overflow: visible; text-overflow: clip;}

  /* 하단 타임라인: 좁은 화면에서 좌우 스크롤 가능 */
  .timeline{ height: auto; padding: 8px 0; overflow: visible; }
  .timeline-years{
    flex-wrap: wrap;                 /* 줄바꿈 */
    justify-content: center;         /* 가운데 정렬 */
    column-gap: 32px; row-gap: 12px; /* 간격 */
  }
  .timeline-years .year, .timeline-years .dots-group{ top: 0; }
  .timeline-years .wrap-break{ flex-basis: 100%; height: 0; }

  /* Vision 섹션 폰트 축소 */
  .vision-section{ padding: 80px 0; }
  .vision-subtitle{ font-size: clamp(2.2rem, 6vw, 3rem); }
  .vision-title{ font-size: clamp(6rem, 16vw, 10rem); }

  /* ========about.html=========== */
  .company-intro{ gap: .55rem; }
  .intro-text{ font-size: clamp(1.6rem, 3.2vw, 2.2rem); line-height: 1.6; word-break: keep-all; }
  .highlight-text{ padding: 6px 12px; }

  /* 서비스 섹션: 작은 화면에서는 스택(겹침) 비활성화 → 자연스러운 리스트 */
  .services-section{ padding-top: 2.5rem; }
  .services-section.is-holding .stack-row > .service-item{ position: relative; top:auto; } /* 안전장치 */
  .stack-row > .service-item{
    position: static;         /* sticky 해제 */
    top: auto; transform: none; box-shadow: none; }
  .services-list{ overflow: visible; }
  .service-item{ padding: 1.5rem 1rem; }
  .service-number{ font-size: 1.4rem; min-width: 44px; margin-right: 1rem; color: #888; }
  .service-content{ margin-bottom: 1.3rem; }
  .service-title{ font-size: clamp(1.6rem, 3.6vw, 2.2rem); line-height: 1.35; }
  .service-description{ font-size: 1.05rem; line-height: 1.55; color: #555; }

  /* ========service.html=========== */
  .stack-fixed{
    top: 7vh;
    left: clamp(16px,4vw,56px);
    right: clamp(16px,4vw,56px);
    padding-bottom: 3vh;
  }
  .stack-item{ margin-bottom:1.8rem; padding-block: 12px 12px; }
  section.service{ height: 100vh; }
  #stackItems + .btnContents {bottom: clamp(15px, 9vh, 68px); }
  .stack-title{
    font-size: clamp(26px, 6.5vw, 37px);
    padding: 16px 36px 0 12px;
  }
  .stack-title.on{}
  .stack-title .num{
    font-size: .38em;
    top: -1.1em;
    letter-spacing: .03em;
  }
  .stack-title .txt{ margin-left: .3em; }
  .stack-subline,
  .stack-subline.on{
    font-size: 16px;
    padding: 24px 0 50px 54px;
  }
  .stack-sep{ margin: 12px 0 12px; }
  .stack-fixed.stack-altpad #stackItems .stack-subline,
  .stack-fixed.stack-altpad #stackItems .stack-subline.on {
    padding: 24px 50px 108px;  
  }

  /* ========news.html=========== */
  .intro-title-dark{ font-size: clamp(2rem, 4.8vw, 2.6rem); }
  .highlight-text{ padding: 6px 12px; }

  .flat-swiper-section .viewport{
    width: 94%;
    padding: 20px 0 40px;
    margin-inline: auto;
  }

  #flat-news-swiper .flat-wrapper{
    gap: 16px;
    padding-right: clamp(16px, 6vw, 64px);   /* 끝 여백 살짝 키움 */
  }

  #flat-news-swiper .newscard{
    width: min(420px, 78vw);
    height: min(460px, 72vh);
    border-radius: 12px;
    padding: 16px 16px 18px;
  }

  #flat-news-swiper .news-image{ height: 200px; border-radius: 10px; }

  #flat-news-swiper .flat-indicator{ bottom: 10px; height: 5px; }


  .news-image{ height: 180px; }
  .news-content{ padding: 18px; }
  .news-card-title{ font-size: 1.15rem; margin-bottom: 12px; }
  .news-preview{ font-size: .95rem; -webkit-line-clamp: 2; }
  .news-meta{ font-size: .82rem; }

  /* 뉴스 상세(디테일 페이지용) */
  .news-detail-section{ padding: 96px 0 48px; }
  .article-title{ font-size: 2rem; }
  .article-main-image{ margin-bottom: 28px; }
  .article-content{ font-size: 1.05rem; line-height: 1.75; }

  /* 관련 뉴스(하단 캐러셀/그리드 역할) */
  .related-news-section{ padding: 48px 0; }
  .related-news-title{ font-size: 1.6rem; margin-bottom: 28px; }
  .related-news-carousel{ margin: 0 24px; }
  .related-news-track{ gap: 20px; }

  /* 2장씩 보이게 */
  .related-news-card{ flex: 0 0 calc(50% - 10px); }
  .related-news-card .news-image{ height: 160px; }
  .related-news-card .news-content{ padding: 18px; height: auto; }
  .related-news-card .news-card-title{ font-size: 1.1rem; }
  .related-news-card .news-preview{ -webkit-line-clamp: 2; }

  .carousel-nav{ gap: 10px; }
  .nav-btn{ width: 44px; height: 44px; }

  /* ========contact.html=========== */
  .contact-hero{ 
    height: auto; 
    min-height: 45vh; 
    margin-top: 4vh;
    padding: 40px 20px;
  }
  .intro-title{
    font-size: clamp(2.2rem, 5vw, 3rem);
    line-height: 1.3;
    margin-bottom: 20px;
  }

}

/* ================================================
  2) 모바일 (≤650px)
  ================================================ */
@media (max-width: 700px){
    :root{
    --depth: 0px;
    --tilt: 0deg;
    --side-scale: 1;
  }
  /* ========common=========== */
  .content-row{ padding: 3% 0; }
  .content-max-width{ padding: 0 2%; }

  /* ========index.html=========== */  
  /* Hero */
  .hero-section{ height: auto; min-height: 82svh; padding: clamp(5vh,7vh,9vh) clamp(5vw,6vw,8vw); }

  h1.brand{ /* 한 줄 고집 버리고 자연스럽게 줄바꿈 허용 */
    font-size: clamp(36px, 16vw, 160px); letter-spacing: 0.01em; white-space: nowrap; word-break: keep-all; overflow-wrap: anywhere; padding: 0 1%; }
  .tagline{ /*flex-direction: column;*/ gap: .35rem; min-height: auto; padding: 0 1%; }
  .word{  font-size: clamp(15px, 6vw, 22px); }

  /* Timeline */
  .timeline-title{ font-size:clamp(1.8rem, 6vw, 2.4rem); padding:32px 0 16px; }
  .card-name{ font-size:1.2rem; }
  .card-period{ font-size:1.1rem; }
  .viewport{ width: 100%; padding: 0.5% 0 1%; }
  .swiper{ padding: 1% 0 2%; }

  /* 모바일에선 옆 카드 기울임/축소/그레이 전부 제거 */
  #timeline-swiper .swiper-slide{
    transform: translateZ(0) scale(1) !important;
    filter: none !important;
    opacity: 1 !important;
  }
  #timeline-swiper .swiper-slide-prev,
  #timeline-swiper .swiper-slide-next{
    transform: translateZ(0) rotateY(0) scale(1) !important;
  }
  .card{
    width: min(360px, 90vw) !important;  
    height: auto !important;
    min-height: 380px;
    padding: 16px 16px 20px !important;
  }
  .card-section{ padding: 8px; }
  .card-subtitle{ font-size: .95rem; margin-bottom: 4px; }
  .card-name, .card-period{ font-size: clamp(1.1rem, 4.5vw, 1.4rem); }
  .card-detail{ font-size: 1rem; line-height: 1.5; margin-bottom: 18px; }
  .card-divider{ margin: 14px 0; }
  .card-arrow{ right: 16px; bottom: 16px; width: 40px; height: 40px; }
  .swiper-pagination{ display: block; margin-top: 6px; }

  /* Statistics */
  .tech-title h2{ font-size:2.2rem; }
  .tech-text{ font-size:2rem; }
  .statistics-metrics{
    display: grid !important;
    grid-template-columns: 1fr;               /* 1열 */
    justify-content: center;
    gap: 35px;
    padding-top: 10px;
  }
  .metric-item{
    justify-self: center;                     /* 카드 박스 가운데 */
    width: min(92vw, 340px);                  /* 카드 자체 크기 살짝 축소 */
    text-align: center;
  }
  .metric-number{ font-size: clamp(1.8rem, 6vw, 3rem); }

  .services-btn, .about-btn, .contact-btn, .form-submit-btn { padding: 12px 18px; font-size: 1rem; }

  .footer{ min-height:auto; padding:72px 0 8px; }
  .footer-content{ padding:0 20px; flex-direction:column; align-items:center; gap:24px; }
  .footer-brand h3{ font-size:clamp(2rem, 7vw, 2.6rem); text-align:center; }

  /* ========history.html=========== */
  .history-section .hero-section{ min-height: 74svh; padding: 2% 4vw; }
  .main-subtitle-history{ font-size: clamp(1.5rem, 8.5vw, 3rem); margin-bottom: 1rem; line-height: 1; text-align: center; }
  .history-section { padding: 44px 16px 32px; }
  .history-row { gap: 12px;}
  .year-hero{ order: 2; font-size: clamp(72px, 22vw, 110px); margin-top: 8px; text-align: center; align-self: center; }
  .history-list{ order: 1; font-size: 13px; gap: 6px; }
  /* .timeline-years{ column-gap: 22px; row-gap: 10px; } */
  .timeline-years .year{ font-size: 16px; }
  .dots-group{ gap: 18px; }

  /* Vision 섹션 더 축소 */
  .vision-section{ padding: 64px 0; }
  .vision-subtitle{ font-size: clamp(1.8rem, 7vw, 2.4rem); }

  /* ========about.html=========== */
  .company-intro{ gap: .5rem; }
  .intro-text{ font-size: clamp(1rem, 3vw, 2rem); line-height: 1.55;}
  .highlight-text{ padding: 5px 10px;
    --hl-round: 40px;         /* 하이라이트 둥근 모서리 살짝 축소 */
  }

  /* ========service.html=========== */
  section.service{ height: auto; }
  #stack.stack-fixed { 
    display: none !important; 
  }
  .service, 
  .service::before, 
  .service::after{
    text-align: left !important;
  }
  .service{
    display: block !important;
    padding: 18px 0 !important;
    border-bottom: 1px solid var(--text);
  }
  /* 핀 요소/애니메이션 트리거 숨김 */
  .service .pin{ display: none !important; }

  /* data-title / data-sub을 화면에 출력 */
  .service::before{
    content: attr(data-title);
    display: block;
    font-weight: 700;
    font-size: 1em;
    line-height: 1.35;
    margin-bottom: 8px;
  }
  .service::after{
    content: attr(data-sub);
    display: block;
    font-size: .95rem;
    line-height: 1.5;
    color: var(--muted);
    word-break: keep-all; 
    letter-spacing: -0.01em;
  }
  .service .sr-only{
    position: static !important;
    width: auto !important;
    height: auto !important;
    clip: auto !important;
    clip-path: none !important;
    white-space: normal !important;
    overflow: visible !important;
  }

  /* ========news.html=========== */
  :root { --news-card-w-mobile: 92vw; }
  .flat-swiper-section .viewport{
    width: 100%;
    padding: 16px 0 32px;
  }
  #flat-news-swiper .flat-wrapper{
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 12px;
    transform: none !important;         /* JS 이동 제거 */
    padding-right: 0;                    /* 트레일링 여백 불필요 */
  }
  #flat-news-swiper .flat-item{
    transform: none !important;
    flex: 1 1 auto;                      /* grid에 맞춤 */
  }
  #flat-news-swiper .newscard{
    width: 100%;
    height: auto;                        /* 내용 높이에 맞춤 */
    border-radius: 12px;
    padding: 14px;
  }
  /* 인디케이터 숨김 */
  #flat-news-swiper .flat-indicator{ display:none; }

  #flat-news-swiper .news-image{ height: 180px; border-radius: 10px; }

  /* 텍스트 간격/사이즈 조금 컴팩트하게(선택) */
  .news-card-title{ font-size: clamp(16px, 4.5vw, 18px); line-height: 1.35; }
  .news-preview{ font-size: clamp(13px, 3.8vw, 14px); line-height: 1.55; }
  .news-meta{ font-size: 12px; opacity:.8; }
  .intro-title-dark{ font-size: clamp(1.2rem, 3.5vw, 1.5rem); }
  .highlight-text{ padding: 5px 10px; --hl-round: 40px; }
  .news-card{ width: min(var(--news-card-w-mobile), 380px) !important; margin-inline: auto !important; 
     position: static !important; z-index: auto !important; border-radius: 10px !important; box-shadow: 0 1px 4px rgba(0,0,0,.06) !important;}
  .news-image{ max-height: 180px; height: auto; }
  .news-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .news-content{ padding: 12px 14px; }
  .news-card-title{ font-size: 1.2rem; }
  .news-preview{ font-size: 0.85rem; line-height: 1.55; }
  .news-meta{ font-size: 0.8rem; }
  .news-section + * {
    position: relative !important;
    z-index: 1 !important;
  }

  /* 뉴스 상세 */
  .news-detail-section{ padding: 72px 0 40px; }
  .article-title{ font-size: 1.6rem; }
  .article-main-image{ margin-bottom: 22px; }
  .article-content{ font-size: 1rem; line-height: 1.7; }

  /* 관련 뉴스: 1장씩 스크롤(터치 캐러셀 느낌) */
  .related-news-carousel{ margin: 0 12px; overflow: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; }
  .related-news-track{ gap: 16px; }
  .related-news-card{ flex: 0 0 50%; scroll-snap-align: center; }
  .related-news-card .news-image{ height: 150px; }
  .related-news-card .news-content{ padding: 16px; }
  .related-news-card .news-card-title{ font-size: 1.05rem; }
  .related-news-card .news-preview{ font-size: .92rem; -webkit-line-clamp: 2; }
  .related-news-card .news-meta{ font-size: .82rem; }

  .carousel-nav{ gap: 8px; }
  .nav-btn{ width: 40px; height: 40px; }

  /* ========contact.html=========== */
  .contact-hero{ 
    min-height: 40vh; 
    margin-top: 3vh;
    padding: 30px 16px;
  }
  
  .intro-title{
    font-size: clamp(1.8rem, 6vw, 2.4rem);
    line-height: 1.2;
    margin-bottom: 16px;
  }

}


/* =================================================
   479px 이하 초소형 뷰포트 (index.html_Timeline)
   ================================================= */
@media (max-width: 479px){
  /* 타이틀 사이즈/패딩 축소 */
  .timeline-title{
    font-size: clamp(1.6rem, 6.2vw, 2rem);
    padding: 20px 0 10px;
    margin-bottom: 16px;
  }

  /* 뷰포트 가로 여백 최소화 */
  .viewport{
    width: 100%;
    padding: 6px 0 14px;
  }

  /* 스와이퍼를 "강제 리스트"로 전환 */
  #timeline-swiper{
    overflow: visible;               /* 내부 스크롤X 제거 */
    padding: 10px 0 16px;
  }
  #timeline-swiper .swiper-wrapper{
    display: grid !important;        /* 슬라이드 → 그리드 */
    grid-template-columns: 1fr;      /* 1열(읽기성 최우선) */
    gap: 10px 0;                      /* 카드 간 간격 */
    transform: none !important;      /* Swiper 변환 무효화 */
  }
  #timeline-swiper .swiper-slide{
    width: auto !important;
    height: auto !important;
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
    pointer-events: auto;            /* 링크 정상 동작 */
    cursor: auto;
  }
  #timeline-swiper .swiper-slide,
  #timeline-swiper .swiper-slide-active{
    filter: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  #timeline-swiper .swiper-slide-active .card{
    background: var(--card-bg) !important;
    color: var(--card-text, inherit) !important;
    border-color: var(--card-border) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.06) !important;
  }
  #timeline-swiper .swiper-slide-active .card .card-divider{
    background: var(--text);
  }
  /* 3D/양옆 기울임 스타일 전부 무력화 */
  #timeline-swiper .swiper-slide-prev,
  #timeline-swiper .swiper-slide-next{
    transform: none !important;
  }

  /* 페이지네이션은 숨김 (리스트형에선 불필요) */
  #timeline-swiper .swiper-pagination{
    display: none !important;
  }

  /* 카드 사이즈/여백 모바일 초소형 최적화 */
  .card{
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;        /* 길쭉 강제 방지 */
    padding: 14px 14px 18px !important;
    border-radius: 16px;
  }
  .card-section{ padding: 8px; }
  .card-subtitle{ font-size: .9rem; margin-bottom: 3px; }
  .card-name, .card-period{
    font-size: clamp(1rem, 4.2vw, 1.2rem);
    margin-bottom: 6px;
  }
  .card-detail{ font-size: .95rem; line-height: 1.5; margin-bottom: 14px; }
  .card-divider{ margin: 10px 0; opacity: .25; }

  .card-arrow{
    right: 14px; bottom: 50px;
    width: 36px; height: 36px;
  }

  /* 커버플로우 전용 변수도 안전하게 0 처리 */
  :root{
    --depth: 0px;
    --tilt: 0deg;
    --side-scale: 1;
  }
}

/* === Patch overrides (minimal) === */
/* Hide the 'top rule' pseudo-element only for the first stack title */
.stack-title.no-top-rule::before { content: none !important; display: none !important; transform: none !important; }
/* Remove bottom border on the last service section (keeps animations elsewhere intact) */
section.service:last-of-type { border-bottom: none !important; }
/* Safety: also hide any extra separator under the last stacked item if present via markup */
#stack .stack-items .stack-item:last-child .stack-sep { display: none !important; }

/* état par défaut : masqué */
.stack-title,
.stack-subline,
.stack-sep {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .28s ease, transform .28s ease;
  will-change: opacity, transform;
}

/* affiché quand le JS ajoute .on */
.stack-title.on,
.stack-subline.on,
.stack-sep.on {
  opacity: 1;
  transform: none;
}

/* accessibilité */
@media (prefers-reduced-motion: reduce) {
  .stack-title, .stack-subline, .stack-sep {
    transition: none;
    transform: none;
  }
}
