/* ══════════════════════════════════════════════
   KAICORE — 공통 스타일
   기업소개 · 기술 · 서비스 페이지가 함께 사용한다.
   여기 고치면 세 페이지에 동시 반영되니 주의.
   ══════════════════════════════════════════════ */

:root {
  --navy-900: #071320;
  --navy-850: #091825;
  --navy-800: #0B1C2D;
  --navy-750: #0E2237;
  --navy-700: #122840;
  --navy-600: #17324E;

  --blue:       #2F6BFF;
  --blue-light: #5B8FFF;
  --cyan:       #00D4FF;
  --glow:       rgba(47, 107, 255, 0.35);
  --blue-soft:  rgba(47, 107, 255, 0.10);

  --gold:       #E5B567;
  --gold-soft:  rgba(229, 181, 103, 0.12);

  --green:  #34D399;
  --coral:  #FF7A7A;

  --white:  #FFFFFF;
  --light:  #F6F8FB;

  --t1: rgba(255, 255, 255, 0.96);
  --t2: rgba(255, 255, 255, 0.62);
  --t3: rgba(255, 255, 255, 0.40);

  --d1: #0B1C2D;
  --d2: #5A6A7A;
  --d3: #8B97A5;

  --line:       rgba(255, 255, 255, 0.08);
  --line-soft:  rgba(255, 255, 255, 0.05);
  --line-light: rgba(11, 28, 45, 0.09);

  --card:       rgba(255, 255, 255, 0.032);
  --card-hover: rgba(255, 255, 255, 0.06);

  --r:    18px;
  --r-sm: 12px;
  --r-lg: 26px;

  --wrap: 1180px;
  --pad:  clamp(76px, 8.5vw, 128px);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--navy-800);
  color: var(--t1);
  line-height: 1.62;
  overflow-x: hidden;
  letter-spacing: -0.011em;
  word-break: keep-all;
  overflow-wrap: break-word;
}

img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

section { position: relative; }
.sec        { padding: var(--pad) 0; }
.sec-alt    { background: var(--navy-750); }
.sec-deep   { background: var(--navy-900); }
.sec-light  { background: var(--light); color: var(--d1); }

/* ── 타이포 ─────────────────────────────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--blue-light);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: ''; width: 22px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue-light));
}
.sec-light .eyebrow { color: var(--blue); }

h1 { font-size: clamp(34px, 5.4vw, 58px); font-weight: 800; line-height: 1.12; letter-spacing: -0.035em; }
h2 { font-size: clamp(28px, 4.1vw, 45px); font-weight: 800; line-height: 1.2;  letter-spacing: -0.032em; }
h3 { font-size: clamp(19px, 2.1vw, 23px); font-weight: 700; line-height: 1.35; letter-spacing: -0.024em; }

.lead {
  font-size: clamp(15px, 1.65vw, 18px);
  color: var(--t2); line-height: 1.72; max-width: 62ch;
}
.sec-light .lead { color: var(--d2); }

.sec-head { margin-bottom: clamp(44px, 5vw, 68px); }
.sec-head.center { text-align: center; }
.sec-head.center .lead { margin-left: auto; margin-right: auto; }
.sec-head h2 + .lead { margin-top: 20px; }

.hl { color: var(--blue-light); }
.hl-gold { color: var(--gold); }
.sec-light .hl { color: var(--blue); }

/* ── 버튼 ───────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 28px; border-radius: 12px;
  font-size: 15px; font-weight: 650;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), background .22s, border-color .22s;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue), #1F55E0);
  color: #fff; box-shadow: 0 8px 26px -10px var(--glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 36px -10px var(--glow); }
.btn-ghost { background: rgba(255,255,255,.04); border-color: var(--line); color: var(--t1); }
.btn-ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); }
.sec-light .btn-ghost { background: #fff; border-color: var(--line-light); color: var(--d1); }
.btn-lg { padding: 17px 34px; font-size: 16px; }

/* ── 스크롤 인 ──────────────────────────── */
.rise { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.rise.in { opacity: 1; transform: none; }
.d1 { transition-delay: .08s } .d2 { transition-delay: .16s }
.d3 { transition-delay: .24s } .d4 { transition-delay: .32s }
@media (prefers-reduced-motion: reduce) {
  .rise { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ══════════════════════════════════════════════
   NAV — 드롭다운 포함
   ══════════════════════════════════════════════ */
nav {
  position: fixed; inset: 0 0 auto 0; z-index: 200;
  padding: 18px 0;
  transition: padding .4s var(--ease), background .4s var(--ease), border-color .4s var(--ease);
}
nav.stuck {
  padding: 12px 0;
  background: rgba(9, 24, 37, .84);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  border-bottom: 1px solid var(--line-soft);
}
/* 드롭다운이 열려 있는 동안에는 배경을 깔아야 메뉴가 떠 보이지 않는다 */
nav.sub-open {
  background: rgba(9, 24, 37, .92);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
}
nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; height: 34px; text-decoration: none; }
.brand img { height: 28px; width: auto; object-fit: contain; }

.nav-menu { display: flex; align-items: center; gap: 30px; list-style: none; }
.nav-menu > li { position: relative; }
.nav-menu a {
  color: var(--t2); text-decoration: none;
  font-size: 14px; font-weight: 550; letter-spacing: -0.02em;
  transition: color .2s;
}
.nav-menu a:hover, .nav-menu a.is-current { color: var(--t1); }

.nav-top {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 10px 0;                 /* 링크와 드롭다운 사이 마우스가 끊기지 않게 */
  background: none; border: 0; cursor: pointer;
}
.nav-caret { width: 11px; height: 11px; stroke: currentColor; stroke-width: 2.4; fill: none; transition: transform .3s var(--ease); }
.has-sub.open .nav-caret { transform: rotate(180deg); }
.has-sub.open > .nav-top { color: var(--t1); }

.nav-sub {
  position: absolute; top: calc(100% + 10px); left: 50%;
  transform: translate(-50%, -8px);
  min-width: 268px; padding: 10px;
  background: rgba(12, 30, 47, .97);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 28px 60px -24px rgba(0,0,0,.7);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .26s var(--ease), transform .26s var(--ease), visibility .26s;
}
.has-sub.open .nav-sub { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); }
/* 링크와 패널 사이의 빈틈을 덮어 hover 가 끊기지 않게 한다 */
.nav-sub::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }

.nav-sub a {
  display: block; padding: 11px 13px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600; color: var(--t2);
  transition: background .2s, color .2s;
}
.nav-sub a:hover { background: rgba(47,107,255,.14); color: #fff; }
.nav-sub a small {
  display: block; margin-top: 2px;
  font-size: 11.5px; font-weight: 500; color: var(--t3); letter-spacing: 0;
}
.nav-sub a:hover small { color: rgba(255,255,255,.6); }

.nav-cta {
  background: var(--blue); color: #fff !important;
  padding: 10px 20px; border-radius: 10px; font-weight: 650 !important;
  transition: box-shadow .3s, transform .3s;
}
.nav-cta:hover { box-shadow: 0 0 22px var(--glow); transform: translateY(-1px); }

.nav-burger {
  display: none; width: 40px; height: 40px;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; gap: 5px; align-items: center; justify-content: center;
}
.nav-burger span { display: block; width: 20px; height: 1.6px; background: var(--t1); border-radius: 2px; transition: .3s var(--ease); }
.nav-burger.on span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.nav-burger.on span:nth-child(2) { opacity: 0; }
.nav-burger.on span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

/* ══════════════════════════════════════════════
   PAGE HERO — 하위 페이지 공통 머리
   ══════════════════════════════════════════════ */
.page-hero {
  position: relative; overflow: hidden;
  padding: clamp(148px, 16vw, 196px) 0 clamp(64px, 7vw, 96px);
  background:
    radial-gradient(1100px 620px at 76% 6%, rgba(47,107,255,.18), transparent 62%),
    radial-gradient(880px 520px at 8% 84%, rgba(0,212,255,.10), transparent 60%),
    var(--navy-900);
}
.page-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.024) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: radial-gradient(ellipse 76% 64% at 46% 40%, #000 30%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse 76% 64% at 46% 40%, #000 30%, transparent 76%);
}
.page-hero .wrap { position: relative; z-index: 2; }
.page-hero h1 { max-width: 17ch; }
.page-hero .lead { margin-top: 24px; font-size: clamp(15.5px, 1.7vw, 19px); }
.page-hero .grad {
  background: linear-gradient(100deg, var(--blue-light) 0%, var(--cyan) 52%, var(--gold) 150%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ══════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════ */
footer { background: var(--navy-900); padding: 56px 0 40px; border-top: 1px solid var(--line-soft); }
.foot-top { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; justify-content: space-between; padding-bottom: 28px; border-bottom: 1px solid var(--line-soft); }
.foot-logo { height: 26px; width: auto; opacity: .85; }
.foot-links { display: flex; flex-wrap: wrap; gap: 24px; list-style: none; }
.foot-links a { color: var(--t3); text-decoration: none; font-size: 13.5px; transition: color .2s; }
.foot-links a:hover { color: var(--t1); }
.foot-biz { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; font-size: 12.5px; color: var(--t3); }
.foot-copy { margin-top: 20px; font-size: 12px; color: rgba(255,255,255,.28); }

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .nav-menu {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(9,24,37,.98);
    backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 22px;
    max-height: calc(100vh - 60px); overflow-y: auto;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: .32s var(--ease);
  }
  .nav-menu.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-menu > li { border-bottom: 1px solid var(--line-soft); }
  .nav-menu > li:last-child { border-bottom: 0; padding-top: 14px; }
  .nav-menu a { display: block; padding: 15px 0; font-size: 15px; }
  .nav-cta { text-align: center; }
  .nav-burger { display: flex; }

  /* 모바일에서는 hover 가 없으므로 아코디언으로 편다 */
  .nav-top { width: 100%; justify-content: space-between; padding: 15px 0; font-size: 15px; color: var(--t2); }
  .nav-sub {
    position: static; transform: none; opacity: 1; visibility: visible; pointer-events: auto;
    min-width: 0; padding: 0 0 10px; margin: 0;
    background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
    display: none;
  }
  .has-sub.open .nav-sub { display: block; transform: none; }
  .nav-sub::before { display: none; }
  .nav-sub a { padding: 11px 14px; font-size: 14px; background: rgba(255,255,255,.04); margin-bottom: 6px; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
}
