@import url('//fonts.googleapis.com/earlyaccess/notosanskr.css');

/* ===================== Reset & base ===================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --brand: #17a4d3;
  --bg-light: #f0f5f8;
  --bg-portfolio: #e9f0f2;
  --text-dark: #232323;
  --text-gray: #585858;
  --text-light-gray: #b7b7b7;
  --header-h: 80px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  font-size: 16px;
  color: var(--text-dark);
  line-height: 1.6;
  background: #fff;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section { position: relative; }

/* ===================== Scroll reveal ===================== */
.reveal { opacity: 0; transition: opacity .7s ease, transform .7s ease; }
.reveal[data-anim="fade-up"] { transform: translateY(30px); }
.reveal[data-anim="fade-right"] { transform: translateX(-30px); }
.reveal[data-anim="fade-left"] { transform: translateX(30px); }
.reveal[data-anim="rotate-in"] { transform: rotate(-25deg) scale(.7); transition: opacity 1s ease, transform 1s ease; }
.reveal.in-view { opacity: 1; transform: none; }

/* ===================== Header ===================== */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 500;
  background: transparent;
  transition: background .25s ease, box-shadow .25s ease;
}
#site-header.scrolled { background: #fff; box-shadow: 0 2px 14px rgba(0,0,0,.08); }

.header-inner {
  position: relative;
  /* max-width: 1100px; */
  margin: 0 auto;
  height: 100%;
  padding: 0 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo { position: relative; display: block; flex: 0 0 auto; }
.logo-desktop, .logo-desktop .logo-img { width: 84px; }
.logo-mobile { display: none; }
.logo-mobile .logo-img { width: 60px; }
.logo-img {
  height: auto;
  transition: opacity .25s ease;
}
.logo-normal { position: relative; opacity: 1; }
.logo-scroll { position: absolute; top: 0; left: 0; opacity: 0; }
#site-header.scrolled .logo-normal { opacity: 0; }
#site-header.scrolled .logo-scroll { opacity: 1; }

#main-nav {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
}
#main-nav ul { display: flex; gap: 10px; white-space: nowrap; }
#main-nav a {
  display: inline-block;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  padding: 5px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color .25s ease, border-color .25s ease;
}
#main-nav a.active { border-color: rgba(255,255,255,.85); }
#site-header.scrolled #main-nav a { color: var(--text-dark); }
#site-header.scrolled #main-nav a.active { border-color: var(--brand); color: var(--brand); }

#menu-toggle {
  display: none;
  position: relative;
  width: 30px; height: 30px;
  background: none; border: none;
  align-items: center; justify-content: center;
  padding: 0;
  color: #fff;
  transition: color .25s ease;
}
#menu-toggle svg {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity .25s ease, transform .25s ease;
}
#menu-toggle .icon-close { opacity: 0; transform: translate(-50%, -50%) rotate(-90deg) scale(.5); }
#menu-toggle.active .icon-menu { opacity: 0; transform: translate(-50%, -50%) rotate(90deg) scale(.5); }
#menu-toggle.active .icon-close { opacity: 1; transform: translate(-50%, -50%) rotate(0) scale(1); }
#site-header.scrolled #menu-toggle { color: var(--brand); }
#menu-toggle.active { color: var(--brand); }

#mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 590;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease;
}
#mobile-nav-backdrop.open { opacity: 1; visibility: visible; }

#mobile-nav {
  position: fixed;
  top: 0; right: -100%;
  width: 78%; max-width: 340px; height: 100vh;
  background: #fff;
  z-index: 600;
  box-shadow: -8px 0 30px rgba(0,0,0,.15);
  transition: right .35s ease;
  padding: 60px 36px 40px;
}
#mobile-nav.open { right: 0; }
#mobile-nav-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 30px; height: 30px;
  background: none; border: none;
  color: var(--text-dark);
  padding: 0;
  cursor: pointer;
}
#mobile-nav ul { display: flex; flex-direction: column; gap: 26px; }
#mobile-nav a { font-size: 18px; font-weight: 600; color: var(--text-dark); }

/* ===================== Hero ===================== */
.hero { height: 100vh; min-height: 560px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; background-color: #ddd; }
.hero-video-wrap { position: absolute; inset: 0; overflow: hidden; background: transparent; }
.hero-video-wrap video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,18,28,.35) 0%, rgba(8,18,28,.4) 55%, rgba(8,18,28,.6) 100%); }
.hero-content { position: relative; z-index: 2; text-align: center; color: #fff; padding: 0 20px; }
.hero-welcome { font-size: 26px; font-weight: 300; margin-bottom: 18px; letter-spacing: .5px; }
.hero-welcome strong { font-weight: 800; }
.hero-content h1 { font-size: 48px; font-weight: 700; line-height: 1.55; margin-bottom: 24px; }
.hero-sub { font-size: 18px; font-weight: 400; opacity: .9; }
.hero-sub + .hero-sub { margin-top: 4px; }

.hero-bottom {
  position: absolute; bottom: 60px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 2;
  animation: bounce 1.8s infinite;
}
.hero-bottom img { width: 70px; height: auto; }
.chevron-down { display: block; width: 20px; height: 10px; color: #fff; animation: bounce 1.8s infinite; }
.chevron-down.sm { width: 16px; height: 8px; margin: 10px auto; color: var(--bg-light); opacity: .8; }
@keyframes bounce { 0%,100% { transform: translateY(0); opacity: .6; } 50% { transform: translateY(6px); opacity: 1; } }

/* ===================== Section headings ===================== */
.eyebrow {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  border-radius: 9px;
  padding: 8px 20px;
  margin-bottom: 20px;
}
h2 { font-size: 36px; font-weight: 900; color: var(--brand); margin-bottom: 10px; }
.lead { font-size: 16px; color: var(--brand); margin-bottom: 40px; }

/* ===================== Intro ===================== */
.intro { padding: 150px 0; position: relative; overflow: hidden; }
.intro-left { text-align: center; }
.intro h2 { font-size: 60px; }
.intro .lead { font-size: 24px; margin-bottom: 0; }

.intro-cloud { position: absolute; top: 0; right: 0; width: 640px; max-width: 60%; z-index: 0; pointer-events: none; }

.intro-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: .85fr 1.15fr;
  gap: 70px; align-items: start;
}
.intro-left { display: flex; flex-direction: column; align-items: center; }
.intro-stat-box {
  background: var(--bg-light);
  border-radius: 14px;
  padding: 34px 28px;
  font-size: 16px;
  color: var(--text-gray);
  text-align: center;
  margin-top: 26px;
}
.intro-text { padding-top: 96px; }
.intro-text p { font-size: 16px; color: var(--text-gray); margin-bottom: 18px; }
.intro-text strong { color: var(--text-dark); }

/* ===================== Service ===================== */
.service { padding: 130px 0; color: #fff; overflow: hidden; }
.service-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.service .container { position: relative; z-index: 2; }

.service-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 50px; text-align: center; }
.service-col h3 { font-size: 60px; font-weight: 800; margin-bottom: 6px; }
.service-eng { font-size: 20px; opacity: .85; margin-bottom: 6px; }

.gear-btn {
  position: relative;
  background: none; border: none;
  width: 300px; max-width: 70vw;
  margin: 26px auto 0;
  padding: 0;
}
.gear-btn img { transition: transform .3s ease; filter: drop-shadow(0 10px 24px rgba(0,0,0,.25)); }
.gear-btn:hover img { transform: scale(1.06) rotate(6deg); }
.gear-tip {
  position: absolute;
  top: -6px; right: -8px;
  background: rgba(255,255,255,.92);
  color: var(--brand);
  font-weight: 700;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 14px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease;
  white-space: nowrap;
  pointer-events: none;
}
.gear-tip::after {
  content: '';
  position: absolute; left: 18px; bottom: -6px;
  border: 6px solid transparent;
  border-top-color: rgba(255,255,255,.92);
}
.gear-btn:hover .gear-tip { opacity: 1; transform: translateY(0); }

.service-footnote {
  text-align: center;
  font-size: 13px;
  color: #fff;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 999px;
  padding: 14px 24px;
  max-width: 520px;
  margin: 0 auto;
}

/* ===================== Portfolio ===================== */
.portfolio { background: var(--bg-portfolio); padding: 110px 0; }
.portfolio-head { text-align: center; margin-bottom: 50px; }
.portfolio-icon { width: 56px; height: 56px; color: var(--brand); margin-bottom: 12px; }
.portfolio-head h2 { font-size: 56px; margin-bottom: 12px; }
.portfolio-head .chevron-down { width: 18px; height: 9px; color: var(--brand); margin: 0 auto; animation: bounce 1.8s infinite; }

/* 데스크탑: 기존 방식 그대로 모든 연도를 masonry 카드로 나열 */
.timeline-desktop-list { columns: 3 280px; column-gap: 22px; }
/* 모바일: 최신 연도만 인라인 + 과거 연도는 버튼 → 모달 (기본은 숨김, ≤900px에서 전환) */
.timeline-mobile-view { display: none; }

.year-card {
  break-inside: avoid;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(20,40,60,.06);
  padding: 26px 24px 18px;
  margin-bottom: 22px;
}
.timeline-mobile-view .year-card { max-width: 640px; margin-left: auto; margin-right: auto; }
.year-card h3 { font-size: 21px; font-weight: 800; color: var(--brand); margin-bottom: 16px; }
.year-entry { padding: 9px 0; border-top: 1px dashed rgba(0,0,0,.08); }
.year-entry:first-of-type { border-top: none; }
.entry-title { font-size: 14px; font-weight: 700; color: var(--text-dark); margin-bottom: 2px; }
.entry-desc { font-size: 12.5px; color: var(--text-light-gray); line-height: 1.5; }

.portfolio-past { text-align: center; margin-top: 50px; }
.portfolio-past-label { font-size: 22px; font-weight: 800; color: var(--brand); margin-bottom: 26px; }
.year-btn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 640px;
  margin: 0 auto;
}
.year-btn {
  font-family: inherit;
  background: #fff;
  color: var(--brand);
  font-weight: 700;
  font-size: 15px;
  border: none;
  border-radius: 10px;
  padding: 16px 10px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(20,40,60,.05);
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.year-btn:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }

/* ===================== Contact ===================== */
.contact { padding: 140px 0; color: #fff; overflow: hidden; }
.contact-bg { position: absolute; inset: 0; background-size: cover; background-position: center; background-color: #0c1b26; }
.contact .container { position: relative; z-index: 2; }

.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: center; }
.contact-info { text-align: left; }
.contact-plus {
  display: block;
  width: 56px; height: 56px;
  color: #fff;
  margin: 0 0 20px;
}
.contact-info h2 { color: #fff; font-size: 60px; line-height: 1.05; margin-bottom: 26px; }
.contact-tel { font-size: 18px; margin-bottom: 8px; }
.contact-addr { font-size: 14px; color: rgba(255,255,255,.75); }

.contact-form { display: flex; flex-direction: column; gap: 20px; }
.contact-form label { font-size: 14px; font-weight: 600; display: flex; flex-direction: column; gap: 8px; }
.contact-form em { color: #ff5a5a; font-style: normal; margin-left: 2px; }
.contact-form input,
.contact-form textarea {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 6px;
  padding: 12px 14px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s ease;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(255,255,255,.4); }
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--brand); }
.contact-form textarea { resize: vertical; }
.phone-group { display: flex; align-items: center; gap: 8px; }
.phone-group input { width: 100%; text-align: center; }
.phone-group span { opacity: .6; }

.send-btn {
  position: relative;
  align-self: flex-start;
  background: var(--brand);
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  padding: 13px 34px;
  border-radius: 6px;
  transition: background .2s ease, transform .2s ease;
}
.send-btn:hover { background: #0f7fa6; transform: translateY(-1px); }
.send-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.send-btn.loading { color: transparent; }
.send-btn.loading:disabled { opacity: 1; }
.send-btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: send-btn-spin .7s linear infinite;
}
@keyframes send-btn-spin {
  to { transform: rotate(360deg); }
}

.form-status { font-size: 13px; min-height: 18px; margin: -6px 0 0; }
.form-status.success { color: #6be3a4; }
.form-status.error { color: #ff5a5a; }

/* ===================== Footer ===================== */
#site-footer { background: #f5f7f8; color: var(--text-gray); padding: 46px 0; font-size: 13px; }
.footer-logo { width: 130px; margin-bottom: 18px; }
.footer-line { font-size: 14px; margin-bottom: 4px; }
.footer-copyright { margin-top: 14px; color: var(--text-light-gray); }


/* ===================== EAI / RPA modal ===================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10,20,30,.6);
  z-index: 900;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 60px 20px;
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  overflow-y: auto;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-box {
  position: relative;
  background: #fff;
  max-width: 720px; width: 100%;
  border-radius: 14px;
  padding: 50px 46px 46px;
  transform: translateY(-16px);
  transition: transform .25s ease;
}
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-close {
  position: absolute; top: 16px; right: 18px;
  width: 34px; height: 34px;
  border: none; background: rgba(0,0,0,.05);
  border-radius: 50%;
  font-size: 20px; line-height: 1;
  color: var(--text-gray);
}
.modal-panel h3 { font-size: 36px; font-weight: 800; color: var(--text-dark); }
#portfolio-modal-content h3 { font-size: 21px; color: var(--brand); }
.modal-panel .modal-eng { color: var(--text-gray); font-size: 16px; margin-bottom: 16px; }
.modal-panel hr { border: none; border-top: 1px solid #eee; margin-bottom: 22px; }
.modal-panel h4 { font-size: 22px; font-weight: 800; margin: 26px 0 10px; color: var(--text-dark); }
.modal-panel p { font-size: 14px; color: var(--text-gray); line-height: 1.8; }
.diagram-img { width: 100%; border-radius: 8px; }

.diagram-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 18px 0; }
.diagram-caption { font-weight: 700; color: var(--brand); font-size: 13px; margin-bottom: 10px; }
.diagram-svg { width: 100%; background: #f4f6f7; border-radius: 8px; }
.diagram-tag { text-align: center; font-size: 12px; margin-top: 8px; }

.flow-box { background: #12384a; color: #fff; border-radius: 8px; padding: 18px; text-align: center; font-size: 13px; }
.flow-box.before { background: #0f6f95; }
.flow-box.after { background: #1596c4; }
.flow-arrow { margin: 8px 0; font-size: 12px; opacity: .85; }
.flow-people, .flow-robots { font-size: 20px; letter-spacing: 4px; margin: 6px 0; }
.flow-person { font-size: 24px; }
.flow-label, .flow-manage, .flow-rule { font-size: 13px; font-weight: 600; }

.bullet-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 10px; }
.bullet-cols ul, .bullet-list { padding-left: 18px; }
.bullet-cols li, .bullet-list li { font-size: 13px; color: var(--text-gray); margin-bottom: 6px; list-style: disc; }

.effect-list { margin-top: 8px; }
.effect-list li { font-size: 13.5px; color: var(--text-gray); line-height: 1.8; margin-bottom: 14px; list-style: none; }
.effect-list strong { color: var(--text-dark); font-size: 14px; }

.stat-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.stat-card { background: var(--bg-light); border-radius: 10px; padding: 20px; text-align: center; }
.stat-card strong { display: block; color: var(--brand); font-size: 15px; margin-bottom: 6px; }
.stat-card span { font-size: 12px; color: var(--text-gray); }

/* ===================== Responsive ===================== */
@media (max-width: 900px) {
  :root { --header-h: 60px; }
  #main-nav { display: none; }
  #menu-toggle { display: flex; margin-left: auto; }
  .header-inner { justify-content: flex-end; }
  .logo-desktop { display: none; }
  .logo-mobile {
    display: block;
    position: fixed;
    left: 55%;
    top: calc(var(--header-h) / 2);
    transform: translate(-50%, -50%);
  }

  .hero-welcome { font-size: 16px; }
  .hero-content h1 { font-size: 24px; }
  .hero-sub { font-size: 14px; }
  .intro h2 { font-size: 36px; }
  .intro .lead { font-size: 18px; }
  .intro-stat-box { font-size: 13px; }
  .intro-text p { font-size: 14px; }
  .service-col h3 { font-size: 30px; }
  .service-eng { font-size: 13px; }
  .contact-info h2 { font-size: 36px; }

  .intro-grid { grid-template-columns: 1fr; }
  .intro-text { padding-top: 0; }
  .intro-cloud { width: 200px; opacity: .6; }
  .service-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .gear-btn { width: 100%; max-width: 150px; margin-top: 18px; }
  .contact-grid { grid-template-columns: 1fr; }
  .timeline-desktop-list { display: none; }
  .timeline-mobile-view { display: block; }
  .stat-cols { grid-template-columns: 1fr; }

  .intro, .service, .contact, .portfolio { padding: 90px 0; }
  .modal-box { padding: 40px 22px 30px; }
}

@media (max-width: 560px) {
  .header-inner { padding: 0 18px; }
  .logo, .logo-img { width: 104px; }

  .service-grid { gap: 10px; }
  .service-col h3 { font-size: 24px; }
  .service-eng { font-size: 11px; }
  .gear-btn { max-width: 120px; margin-top: 14px; }

  .year-btn-grid { gap: 10px; }
  .year-btn { font-size: 13px; padding: 14px 6px; }
}
