/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --teal: #2dd4bf;
  --orange: #f97316;
  --red: #ef4444;
  --blue: #1e3a5f;
  --dark: #1a1a1a;
  --gray: #64748b;
  --light-gray: #f1f5f9;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Source Sans 3', -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--dark);
  overflow-x: hidden;
}

/* 로고 플래시 - 첫 로드 시 */
.flash-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 18%, rgba(45, 212, 191, 0.12), transparent 55%),
              radial-gradient(circle at 16% 82%, rgba(239, 68, 68, 0.08), transparent 55%),
              linear-gradient(180deg, #f8fafc, #eef2ff);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
  pointer-events: none;
}

.flash-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.flash-screen-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flash-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.05) 0px,
      rgba(255, 255, 255, 0.05) 1px,
      transparent 1px,
      transparent 4px
    );
  mix-blend-mode: overlay;
  opacity: 0.07;
  animation: flash-scanline 1.6s ease-out 0.15s forwards;
}

@keyframes flash-scanline {
  0% {
    transform: translateY(0);
    opacity: 0.06;
  }
  60% {
    opacity: 0.16;
  }
  100% {
    transform: translateY(-10px);
    opacity: 0.08;
  }
}

.flash-dust-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.flash-logo-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flash-logo-wrap::before {
  /* 거친 철 표면 텍스처(오버레이) */
  content: '';
  position: absolute;
  inset: -10px;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.20) 0px,
      rgba(255, 255, 255, 0.20) 1px,
      transparent 1px,
      transparent 6px
    ),
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.35), transparent 55%),
    radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.18), transparent 60%);
  mix-blend-mode: overlay;
  opacity: 0;
  filter: blur(0.3px);
  animation: metal-shimmer 1.8s ease-out 0.85s forwards;
  z-index: 1;
}

@keyframes metal-shimmer {
  0% {
    opacity: 0;
    transform: translateX(-8px) rotate(-2deg);
  }
  35% {
    opacity: 0.18;
  }
  100% {
    opacity: 0;
    transform: translateX(10px) rotate(2deg);
  }
}

.flash-logo-wrap::after {
  /* 연필 스케치 레이어: 좌->우로 천천히 그려지듯이 노출 */
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    url('assets/ci-logo.png'),
    repeating-linear-gradient(60deg,
      rgba(255, 255, 255, 0.30) 0px,
      rgba(255, 255, 255, 0.30) 1px,
      transparent 1px,
      transparent 6px
    ),
    repeating-linear-gradient(0deg,
      rgba(0, 0, 0, 0.25) 0px,
      rgba(0, 0, 0, 0.25) 1px,
      transparent 1px,
      transparent 5px
    );
  background-size: contain, 220px 220px, 240px 240px;
  background-position: center, center, center;
  background-repeat: no-repeat, repeat, repeat;
  opacity: 0.85;
  mix-blend-mode: multiply;
  filter: grayscale(1) contrast(6) brightness(1.06);
  clip-path: inset(0 100% 0 0);
  z-index: 2;
  animation:
    flash-pencil-draw 2.2s cubic-bezier(0.22, 0.61, 0.36, 1) 0.05s forwards,
    flash-pencil-fade 0.65s ease-out 1.25s forwards;
}

.flash-frag {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 999px;
  opacity: 0;
  z-index: 1;
  transform: translate(-50%, -50%)
    translate(var(--ox, 0px), var(--oy, 0px))
    rotate(var(--rot, 0deg))
    scale(var(--s, 0.5));
  animation: flash-frag-scatter 1.55s cubic-bezier(0.22, 0.61, 0.36, 1) 0.05s forwards;
  filter: grayscale(1) contrast(1.6) brightness(0.95);
}

@keyframes flash-frag-scatter {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%)
      translate(var(--ox, 0px), var(--oy, 0px))
      rotate(var(--rot, 0deg))
      scale(var(--s, 0.5));
  }
  25% {
    opacity: 0.55;
  }
  60% {
    opacity: 0.40;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%)
      translate(0px, 0px)
      rotate(0deg)
      scale(1);
  }
}

@keyframes flash-pencil-draw {
  0% {
    clip-path: inset(0 100% 0 0);
    opacity: 0.55;
    filter: grayscale(1) contrast(5.5) brightness(1.04);
  }

  22% {
    clip-path: inset(0 72% 0 0);
    opacity: 0.78;
    filter: grayscale(1) contrast(6.2) brightness(1.06);
  }

  48% {
    clip-path: inset(0 46% 0 0);
    opacity: 0.9;
    filter: grayscale(1) contrast(6.6) brightness(1.08);
  }

  70% {
    clip-path: inset(0 22% 0 0);
    opacity: 0.95;
    filter: grayscale(1) contrast(6.9) brightness(1.09);
  }

  100% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
    filter: grayscale(1) contrast(6) brightness(1.06);
  }
}

@keyframes flash-pencil-fade {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.flash-logo {
  max-width: min(280px, 50vw);
  height: auto;
  opacity: 0;
  animation:
    flash-logo-appear 1.25s ease-out 0.45s forwards,
    flash-logo-neon 1.8s ease-out 0.45s forwards;
  will-change: filter, transform, opacity;
  position: relative;
  z-index: 3;
}

@keyframes flash-logo-appear {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes flash-logo-neon {
  0% {
    filter:
      contrast(1.18)
      saturate(1.55)
      brightness(1.08)
      drop-shadow(0 0 10px rgba(45, 212, 191, 0.35))
      drop-shadow(0 0 20px rgba(45, 212, 191, 0.18))
      drop-shadow(0 0 26px rgba(239, 68, 68, 0.14));
    transform: scale(0.98);
  }
  45% {
    filter:
      contrast(1.25)
      saturate(1.75)
      brightness(1.18)
      drop-shadow(0 0 14px rgba(45, 212, 191, 0.55))
      drop-shadow(0 0 26px rgba(45, 212, 191, 0.25))
      drop-shadow(0 0 40px rgba(239, 68, 68, 0.22));
    transform: scale(1.01);
  }
  100% {
    filter:
      contrast(1.18)
      saturate(1.5)
      brightness(1.08)
      drop-shadow(0 0 10px rgba(45, 212, 191, 0.3))
      drop-shadow(0 0 18px rgba(45, 212, 191, 0.14))
      drop-shadow(0 0 26px rgba(239, 68, 68, 0.10));
    transform: scale(1);
  }
}

/* 커스텀 커서 - 원형 색상 반전 효과 */
.custom-cursor {
  position: fixed;
  width: 140px;
  height: 140px;
  left: 0;
  top: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease-out, height 0.2s ease-out;
}

/* 빈곳 위에서는 14px로 작게 */
.custom-cursor--empty {
  width: 14px;
  height: 14px;
}

.custom-cursor--pressed {
  /* 클릭 시 원이 살짝 줄어드는 느낌 */
  transform: translate(-50%, -50%) scale(0.9);
  transition: transform 0.1s ease-out;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(241, 245, 249, 0.95);
  backdrop-filter: blur(10px);
  padding: 28px 24px;
  min-height: 170px;
  transition: background 0.3s;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 130px; /* 로고 영역 확보 */
}

/* 로고: 뷰포트 좌측 상단에 고정, 스크롤/리사이즈와 무관하게 위치·크기 유지 */
.nav-logo {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 1001;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo img {
  height: 132px; /* 기존 대비 150% 크기 */
  width: auto;
  min-width: 80px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-menu {
  position: absolute;
  bottom: 20px;
  right: 24px;
  display: flex;
  list-style: none;
  gap: 32px;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: var(--dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.35rem; /* 기존 대비 150% 크기 */
  letter-spacing: -0.03em;
  transition: color 0.2s;
}

.nav-menu a:hover {
  color: var(--teal);
}

.nav-toggle {
  position: absolute;
  bottom: 20px;
  right: 24px;
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--dark);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Hero Section - 흰색 + 연필로 그린 듯한 격자 배경 */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 180px 24px 100px;
  position: relative;
  overflow: hidden;
  --hero-grid: #4a4a4a;
  --hero-grid-stroke: #b5b5b5;
  --hero-grid-progress: 0;
  background-color: #fff;
}

/* 격자 오버레이 - 좌/우/상/하 가장자리에서 반대편으로 선이 그려지는 효과 */
.hero-grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-grid-overlay svg {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-grid-overlay .hero-grid-line {
  stroke: var(--hero-grid-stroke, #b5b5b5);
  stroke-width: 0.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 100;
  transition: stroke-dashoffset 0.05s ease-out;
}

.hero-grid-overlay .hero-grid-from-left {
  stroke-dashoffset: calc(100 * (1 - var(--hero-grid-progress-left, 0)));
}

.hero-grid-overlay .hero-grid-from-right {
  stroke-dashoffset: calc(100 * (1 - var(--hero-grid-progress-right, 0)));
}

.hero-grid-overlay .hero-grid-from-top {
  stroke-dashoffset: calc(100 * (1 - var(--hero-grid-progress-top, 0)));
}

.hero-grid-overlay .hero-grid-from-bottom {
  stroke-dashoffset: calc(100 * (1 - var(--hero-grid-progress-bottom, 0)));
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-dust-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.75;
  mix-blend-mode: multiply;
}

.hero-scroll-down {
  position: absolute;
  bottom: 32px;
  left: 50%;
  margin-left: -48px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  color: var(--hero-grid, #2d2d2d);
  transition: color 0.2s, opacity 0.2s;
  z-index: 2;
}

.hero-scroll-down svg {
  animation: hero-scroll-bounce 2s ease-in-out infinite;
  transition: transform 0.2s;
}

.hero-scroll-down:hover {
  color: #1a1a1a;
  opacity: 0.9;
}

.hero-scroll-down:hover svg {
  transform: translateY(4px);
  animation: none;
}

@keyframes hero-scroll-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

/* 타이틀 영역 - 텍스트가 이미지보다 앞에 오도록 */
.hero-title-zone {
  position: relative;
  isolation: isolate;
  cursor: default;
  padding: 24px 16px;
  margin: -24px -16px;
}

.hero-title {
  position: relative;
  z-index: 2;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  animation: hero-scroll-bounce 2s ease-in-out infinite;
  font-size: clamp(2.5rem, 8vw, 5rem);
  letter-spacing: 0.0375em;
  color: var(--hero-grid, #2d2d2d);
  text-transform: uppercase;
  margin-bottom: 16px;
  text-shadow: none;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-inline: 8px;
  white-space: nowrap; /* 넓은 화면에서는 타이틀 줄바꿈 방지 */
}

.hero-tagline {
  position: relative;
  z-index: 2;
  margin-bottom: 0;
  font-family: 'Source Sans 3', -apple-system, sans-serif;
  text-shadow: none;
  font-weight: 400;
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.8;
  word-break: keep-all; /* 띄어쓰기 기준으로만 줄바꿈 */
  letter-spacing: 0.02em;
  color: var(--hero-grid, #2d2d2d);
  margin: 0 auto;
  padding-inline: 12px;
}

.hero-tagline .hero-serif {
  font-family: 'Noto Serif KR', Georgia, serif;
  font-weight: 600;
}

/* 태그라인 나타내기 효과 */
.hero-tagline-inner {
  opacity: 0;
  white-space: nowrap; /* 넓은 화면에서는 한 줄 유지 */
  word-break: keep-all;
}

/* 모바일 전용 줄바꿈 - 데스크톱에서는 숨김 */
.hero-br-mobile,
.hero-title-br-mobile {
  display: none;
}

@media (max-width: 420px) {
  .hero-title {
    letter-spacing: 0.02em;
  }
}

@media (max-width: 768px) {
  .hero-title {
    white-space: normal; /* 좁은 화면에서는 줄바꿈 허용 */
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .hero-tagline-inner {
    white-space: normal; /* 좁은 화면에서는 줄바꿈 허용 */
    word-break: keep-all; /* 띄어쓰기 기준으로만 줄바꿈, 단어 중간 절단 방지 */
    overflow-wrap: break-word; /* 단일 단어가 너무 길 때만 줄바꿈 */
  }

  .hero-br-mobile,
  .hero-title-br-mobile {
    display: block; /* 모바일에서 지정 위치에 줄바꿈 */
  }

  .hero-scroll-down {
    display: none;
  }

  /* 모바일에서는 신발 커서 숨기고 기본 포인터 사용 */
  body {
    cursor: auto;
  }

  .custom-cursor {
    display: none !important;
  }
}

.hero-tagline-inner.visible {
  animation: tagline-appear 1.8s ease forwards;
}

@keyframes tagline-appear {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 타이프라이터 커서 */
.typing-cursor {
  display: inline-block;
  width: 3px;
  min-width: 3px;
  height: 0.9em;
  background: #fff;
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cursor-blink 0.7s step-end infinite;
}

.hero .typing-cursor {
  background: var(--hero-grid, #2d2d2d);
}

.typing-cursor.done,
.typing-cursor.hidden {
  display: none;
}

@keyframes cursor-blink {
  50% { opacity: 0; }
}

/* Who We Are */
.who-we-are {
  padding: 80px 0;
  background: #fff;
}

.section-title {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: 0.1em;
  text-align: center;
  margin-bottom: 24px;
  color: var(--dark);
}

/* PORTFOLIO 섹션 타이틀 전용 스타일 (크기 150%, 왼쪽 정렬, 밑줄 효과) */
.project-section .section-title {
  font-size: clamp(2.6rem, 6vw, 3.75rem);
  text-align: left;
  margin-left: 0;
  margin-bottom: 32px;
  display: inline-block;
  padding-bottom: 6px;
  position: relative;
}

.project-section .section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--dark);
}

.section-desc {
  max-width: 700px;
  margin: 0 auto 48px;
  text-align: center;
  color: var(--gray);
  font-size: 1rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.team-member {
  text-align: center;
}

.team-photo {
  width: 160px;
  height: 160px;
  margin: 0 auto 16px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--light-gray);
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-member h3 {
  font-family: 'Oswald', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.team-role {
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 8px;
}

.team-social {
  font-size: 0.75rem;
  color: #cbd5e1;
}

/* Pride Banner */
.pride-banner {
  padding: 80px 24px;
  background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
  text-align: center;
}

.pride-banner h2 {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: 0.15em;
  color: #fff;
  text-transform: uppercase;
}

/* What We Do (Services) */
.what-we-do {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 140px 24px 80px; /* 상하 시각적 균형 */
  box-sizing: border-box;
  background: #fff;
  scroll-margin-top: 128px; /* 네비 바 높이만큼 앵커 스크롤 시 여백 */
}

.services-header-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 48px;
}

.services-header-grid .section-title {
  text-align: center;
  margin-bottom: 0;
}

.services-intro {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.services-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--dark);
  margin: 0;
  text-align: center;
  word-break: keep-all; /* 단어 중간 절단 방지 */
  overflow-wrap: break-word;
}

.services-diagram {
  max-width: 100%;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 48px 40px;
  background: linear-gradient(135deg, #fafbfc 0%, #f1f5f9 100%);
  border-radius: 16px;
  border: 1px solid rgba(45, 212, 191, 0.15);
}

.services-grid-inset {
  margin: 0;
}

/* MarCom Flow Diagram - Modern */
.marcom-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  padding: 0;
}

.marcom-five-col {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr 1fr 1fr;
  gap: 32px;
  align-items: center;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.marcom-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.marcom-col-1 {
  align-items: flex-end;
}

.marcom-col-5 {
  align-items: flex-start;
}

.marcom-col-1 .marcom-items,
.marcom-col-5 .marcom-items {
  align-items: inherit;
}

.marcom-col {
  position: relative;
}

.marcom-arrow-line {
  position: absolute;
  top: 50%;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, #94a3b8 0%, #64748b 50%, #475569 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  pointer-events: none;
  transform: translateY(-50%);
}

.marcom-arrow-left {
  left: 100%;
  width: 28px;
  margin-left: 4px;
  background: linear-gradient(90deg, #94a3b8 0%, #64748b 100%);
}

.marcom-arrow-left::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 10px solid #475569;
  margin-left: -10px;
  filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.2));
}

.marcom-arrow-right {
  right: 100%;
  left: auto;
  width: 28px;
  margin-right: 4px;
  background: linear-gradient(90deg, #64748b 0%, #94a3b8 100%);
}

.marcom-arrow-right::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid #475569;
  margin-right: -10px;
  filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.2));
}

.marcom-center {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 32px;
  background: var(--dark);
  color: #fff;
  border-radius: 12px;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 8px 24px rgba(26, 26, 26, 0.2);
}

.marcom-category {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--teal), #14b8a6);
  color: #fff;
  border-radius: 999px;
  font-family: 'Oswald', sans-serif;
  font-size: 0.96rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-align: center;
}

.marcom-connector {
  color: var(--gray);
  font-size: 1.5rem;
}

.marcom-arrow {
  opacity: 0.5;
}

.marcom-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.marcom-item {
  display: inline-block;
  padding: 8px 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1.02rem;
  color: var(--dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.marcom-item:hover {
  border-color: var(--teal);
  box-shadow: 0 4px 12px rgba(45, 212, 191, 0.15);
}

@media (max-width: 768px) {
  .marcom-five-col {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .marcom-arrow-line {
    display: none;
  }

  .marcom-col-1,
  .marcom-col-5 {
    align-items: center !important;
  }

  .marcom-col-1 .marcom-items,
  .marcom-col-5 .marcom-items {
    align-items: center !important;
  }

  /* 모바일 순서: 1.MarCom 2.Brand Comms 3.Launching/Conference/Touch 4.Marketing Promo 5.Off-line/Exhibition/Media */
  .marcom-col-3 { order: 1; }
  .marcom-col-2 { order: 2; }
  .marcom-col-1 { order: 3; }
  .marcom-col-4 { order: 4; }
  .marcom-col-5 { order: 5; }
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  padding: 32px 24px;
  text-align: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fafafa;
  transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.service-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  color: var(--teal);
}

.service-icon svg,
.service-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.service-card h3 {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.1em;
  margin: 0;
}

/* References Section - 3D grid background (fixed, content만 스크롤) */
.project-section.references-section {
  position: relative;
  min-height: 100vh;
  padding: 140px 0 80px;
  scroll-margin-top: 128px;
  background-color: #f5f7fb;
  /* 얇은 기본 격자 + 중앙을 향해 모이는 보조 선으로 3D 느낌 */
  background-image:
    /* 기본 수평/수직 격자 */
    linear-gradient(to right, rgba(148, 163, 184, 0.22) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.22) 1px, transparent 1px),
    /* 좌우 벽 방향선 (살짝 더 옅게) */
    linear-gradient(75deg, transparent 0, transparent 45%, rgba(148, 163, 184, 0.16) 46%, transparent 47%),
    linear-gradient(-75deg, transparent 0, transparent 45%, rgba(148, 163, 184, 0.16) 46%, transparent 47%);
  background-size: 38px 38px, 38px 38px, 100% 100%, 100% 100%;
  background-attachment: fixed;
  overflow: hidden;
}

/* 고정 배경을 쓰므로, 의도치 않은 겹침을 막기 위해 섹션 내용만 위로 띄우기 */

.project-section .container {
  position: relative;
  z-index: 1;
  width: 92%;
  max-width: none;
  min-width: 320px;
}

.references-title {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.15em;
  color: var(--dark);
  margin-bottom: 32px;
  text-align: center;
}

.references-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.reference-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  background: #f1f5f9;
  transform: translateY(36px) scale(0.95);
  opacity: 0;
  box-shadow: 0 0 0 rgba(15, 23, 42, 0);
  transition:
    transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.4s ease-out,
    box-shadow 0.45s ease-out;
}

.reference-item.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  box-shadow:
    0 26px 70px rgba(15, 23, 42, 0.4),
    0 0 0 1px rgba(15, 23, 42, 0.28);
}

.reference-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center center;
  transition:
    transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
    filter 0.3s ease-out;
}

.reference-item:hover img {
  transform: translate3d(0, -10px, 26px) scale(1.07);
  filter: brightness(1.03);
}

.reference-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.35), transparent 60%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.35s ease-out;
  pointer-events: none;
}

.reference-item:hover::before {
  opacity: 1;
}

/* 행마다 높낮이 차이를 줘서 단조로움 줄이기 (기울기 없이) */
.references-grid .reference-item:nth-child(4n+2),
.references-grid .reference-item:nth-child(4n+3) {
  transform: translateY(50px) scale(0.94);
}

.references-grid .reference-item:nth-child(4n+2).is-visible,
.references-grid .reference-item:nth-child(4n+3).is-visible {
  transform: translateY(8px) scale(1);
}

.references-grid .reference-item:nth-child(8n+1),
.references-grid .reference-item:nth-child(8n+4) {
  transform: translateY(24px) scale(0.95);
}

.references-grid .reference-item:nth-child(8n+1).is-visible,
.references-grid .reference-item:nth-child(8n+4).is-visible {
  transform: translateY(-6px) scale(1.01);
}

.reference-title-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: break-word;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.reference-item:hover .reference-title-overlay {
  opacity: 1;
}

.reference-title-two-lines {
  text-align: center;
  line-height: 1.4;
}

/* Reference Popup */
.reference-popup {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  background: radial-gradient(circle at 10% 0%, rgba(15, 23, 42, 0.25), transparent 60%),
              radial-gradient(circle at 90% 100%, rgba(15, 23, 42, 0.2), transparent 60%);
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}

.reference-popup.is-open {
  opacity: 1;
  visibility: visible;
}

.reference-popup-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(15, 23, 42, 0.65), rgba(15, 23, 42, 0.9));
  cursor: pointer;
}

.reference-popup-content {
  position: relative;
  max-width: 832px;
  max-height: calc(100vh - 48px);
  width: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
  border-radius: 0;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 0 0 1px rgba(0, 0, 0, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.08),
    0 12px 32px rgba(0, 0, 0, 0.12),
    0 24px 64px rgba(0, 0, 0, 0.16);
  overflow-x: hidden;
  overflow-y: auto;
  transform-origin: 50% 55%;
  transform: translateY(24px) scale(0.94) rotateX(6deg);
  opacity: 0;
  transition:
    transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.45s ease-out,
    box-shadow 0.45s ease-out;
}

.reference-popup.is-open .reference-popup-content {
  opacity: 1;
  transform: translateY(0) scale(1) rotateX(0deg);
}

/* 입체감 테두리 하이라이트 */
.reference-popup-content::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, transparent 30%, transparent 70%, rgba(0, 0, 0, 0.03) 100%);
  pointer-events: none;
}

.reference-popup-image {
  width: 100%;
  aspect-ratio: 16/9;
  background: radial-gradient(circle at 50% 0%, #f9fafb, #e2e8f0);
  overflow: hidden;
}

.reference-popup-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center center;
  transform: scale(1.02);
  transition: transform 0.6s ease-out;
}

.reference-popup.is-open .reference-popup-image img {
  transform: scale(1);
}

.reference-popup-body {
  padding: 24px 40px 40px;
}

.reference-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--gray);
  cursor: pointer;
  transition: color 0.2s;
}

.reference-popup-close:hover {
  color: var(--dark);
}

.reference-popup-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  color: var(--dark);
  margin-bottom: 16px;
}

.reference-popup-detail {
  color: var(--gray);
  line-height: 1.7;
  font-size: 1rem;
}

.reference-popup-detail ul {
  list-style-type: square;
  margin: 0;
  padding-left: 1.2em;
}

.reference-popup-detail li {
  margin-bottom: 4px;
}

.reference-popup-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.reference-popup-gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 0;
  cursor: pointer;
  transition: opacity 0.2s;
}

.reference-popup-gallery img:hover {
  opacity: 0.9;
}

@media (max-width: 768px) {
  .reference-popup-detail {
    word-break: keep-all;
    overflow-wrap: break-word;
  }
}

/* Process Section */
.process {
  padding: 80px 24px;
  background: var(--teal);
  scroll-margin-top: 128px;
}

.process-title {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0.15em;
  text-align: center;
  color: #fff;
  margin-bottom: 48px;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.process-step {
  text-align: center;
  color: #fff;
}

.process-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border: 2px solid #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.process-icon svg {
  width: 36px;
  height: 36px;
}

.process-step h3 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.process-step p {
  font-size: 0.9rem;
  opacity: 0.95;
  line-height: 1.5;
}

/* CTA Sections */
.cta-sections {
  display: grid;
  grid-template-columns: 1fr;
}

.cta-block {
  padding: 60px 32px;
  text-align: center;
  color: #fff;
}

.cta-orange { background: var(--orange); }
.cta-red { background: var(--red); }
.cta-blue { background: var(--blue); }

/* Contact Section */
.contact-section {
  min-height: 100svh; /* footer를 Contact 섹션 안으로 이동 */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: clamp(160px, 18svh, 240px) 24px 0; /* footer 아래로 배경이 남지 않도록 하단 패딩 제거 */
  box-sizing: border-box;
  background: #fff;
  scroll-margin-top: 128px;
}

.contact-section .footer {
  width: 100vw; /* contact-section 패딩 무시하고 풀블리드 */
  margin-top: auto; /* 가능한 경우 하단에 붙여서 함께 보이도록 */
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  align-self: stretch;
}

.contact-container {
  max-width: 600px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  padding-bottom: clamp(72px, 10svh, 140px); /* 기존 contact-section 하단 여백을 컨텐츠 영역으로 이동 */
}

.contact-logo {
  display: block;
  max-width: clamp(140px, 22vw, 200px);
  height: auto;
  margin: 0 auto clamp(18px, 3svh, 32px);
}

.contact-title {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
  font-weight: 500;
  color: #4a4a4a;
  margin: 0 0 8px 0;
  text-align: center;
}

.contact-company {
  font-family: 'Noto Serif KR', Georgia, serif;
  font-size: 0.95rem;
  color: #6b4e4a;
  margin: -4px 0 clamp(18px, 3svh, 26px) 0;
  text-align: center;
}

.contact-item {
  margin-bottom: clamp(18px, 3.2svh, 40px);
  text-align: center;
}

.contact-label {
  display: block;
  font-family: 'Noto Serif KR', Georgia, serif;
  font-weight: 900;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: #6b4e4a;
  margin-bottom: 8px;
}

.contact-value {
  font-family: 'Noto Serif KR', Georgia, serif;
  font-size: 1rem;
  color: #6b4e4a;
  text-decoration: none;
  line-height: 1.7;
  margin: 0;
  display: block;
}

a.contact-value:hover {
  text-decoration: underline;
}

.contact-line {
  display: block;
  height: 1px;
  background: #6b4e4a;
  margin-top: 12px;
  margin-left: auto;
  margin-right: auto;
  width: min(280px, 100%);
}

.cta-content h3 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.cta-content p {
  font-size: 0.95rem;
  opacity: 0.95;
}

/* Footer */
.footer {
  padding: 24px;
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  text-align: center;
  flex-wrap: wrap;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .references-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav {
    min-height: 100px;
    padding: 12px 16px;
  }

  .nav-logo {
    top: 12px;
    left: 16px;
  }

  .nav-logo img {
    height: 72px;
  }

  .hero {
    min-height: auto;       /* 뷰포트보다 내용이 길면 자연스럽게 스크롤 */
    overflow: visible;      /* 하단 텍스트/이미지 잘림 방지 */
    padding: max(130px, env(safe-area-inset-top, 0px) + 110px) 24px 60px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    bottom: auto;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: rgba(241, 245, 249, 0.98);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    transition: right 0.3s ease;
  }

  .nav-menu.active {
    right: 0;
  }

  .hero-content {
    width: 100%;
  }

  .hero-title-zone {
    width: 100%;
    margin: 0;
    padding: 16px 8px;
  }

  .hero-title,
  .hero-tagline {
    max-width: 100%;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .team-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .team-photo {
    width: 140px;
    height: 140px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .services-grid-inset {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .services-grid-inset .service-card {
    padding: 16px 12px;
  }

  .services-grid-inset .service-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 8px;
  }

  .services-grid-inset .service-card h3 {
    font-size: 0.7rem;
    letter-spacing: 0.05em;
  }

  .references-grid {
    grid-template-columns: 1fr;
  }

  .process-grid {
    grid-template-columns: 1fr;
  }

  .cta-sections {
    grid-template-columns: 1fr;
  }

  .cta-block {
    padding: 40px 24px;
  }

  .contact-section {
    padding: clamp(140px, 18svh, 220px) 20px 0;
  }

  .contact-container {
    padding-bottom: clamp(56px, 10svh, 120px);
  }

  .contact-title {
    font-size: clamp(1.7rem, 7vw, 2rem);
    margin-bottom: clamp(18px, 3.5svh, 36px);
  }

  .contact-item {
    margin-bottom: clamp(16px, 3svh, 32px);
  }
}

@media (max-height: 720px) {
  .contact-section {
    padding: 140px 20px 0;
  }

  .contact-container {
    padding-bottom: 64px;
  }

  .contact-logo {
    max-width: 150px;
    margin: 0 auto 16px;
  }

  .contact-title {
    margin-bottom: 18px;
  }

  .contact-item {
    margin-bottom: 16px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.7rem;
    letter-spacing: 0.02em;
    line-height: 1.15;
    padding-inline: 4px;
  }

  .hero-tagline {
    font-size: 0.8rem;
    line-height: 1.5;
    padding-inline: 6px;
    margin-bottom: 12px; /* 아래 캐러셀과 간격 확보 */
  }

  .hero-tagline-inner {
    display: block;
    white-space: normal;
    word-break: keep-all; /* 띄어쓰기 기준으로만 줄바꿈 */
    overflow-wrap: break-word;
  }

  .section-title {
    font-size: 1.5rem;
  }
}
